Merge branch 'support/4.3' into issue_939_for_smarty4

This commit is contained in:
Simon Wisselink
2024-02-26 12:20:14 +01:00
9 changed files with 32 additions and 6 deletions

View File

@@ -32,6 +32,7 @@ jobs:
- "8.0"
- "8.1"
- "8.2"
- "8.3"
compiler:
- default
@@ -46,7 +47,9 @@ jobs:
- os: ubuntu-latest
php-version: "8.2"
compiler: jit
- os: ubuntu-latest
php-version: "8.3"
compiler: jit
steps:
- name: Checkout
uses: actions/checkout@v3

View File

@@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Using the `|implode`, `|json_encode` and `|substr` modifiers does not generate a deprecation warning anymore as they will continue to be supported in v5 [#939](https://github.com/smarty-php/smarty/issues/939)
### Added
- PHP8.3 support [#925](https://github.com/smarty-php/smarty/issues/925)
### Fixed
- Incorrect compilation of expressions when escape_html=true [#930](https://github.com/smarty-php/smarty/pull/930)
## [4.3.4] - 2023-09-14
## [4.3.3] - 2023-09-14

View File

@@ -7,7 +7,7 @@ Smarty is a template engine for PHP, facilitating the separation of presentation
Read the [documentation](https://smarty-php.github.io/smarty/) to find out how to use it.
## Requirements
Smarty can be run with PHP 7.1 to PHP 8.2.
Smarty can be run with PHP 7.1 to PHP 8.3.
## Installation
Smarty versions 3.1.11 or later can be installed with [Composer](https://getcomposer.org/).

View File

@@ -42,3 +42,8 @@ services:
service: base
build:
dockerfile: ./utilities/testrunners/php82/Dockerfile
php83:
extends:
service: base
build:
dockerfile: ./utilities/testrunners/php83/Dockerfile

View File

@@ -1,7 +1,7 @@
# Getting started
## Requirements
Smarty can be run with PHP 7.1 to PHP 8.2.
Smarty can be run with PHP 7.1 to PHP 8.3.
## Installation
Smarty can be installed with [Composer](https://getcomposer.org/).

View File

@@ -93,7 +93,7 @@ class Smarty_Internal_Compile_Private_Print_Expression extends Smarty_Internal_C
}
// autoescape html
if ($compiler->template->smarty->escape_html) {
$output = "htmlspecialchars((string) {$output}, ENT_QUOTES, '" . addslashes(Smarty::$_CHARSET) . "')";
$output = "htmlspecialchars((string) ({$output}), ENT_QUOTES, '" . addslashes(Smarty::$_CHARSET) . "')";
}
// loop over registered filters
if (!empty($compiler->template->smarty->registered_filters[ Smarty::FILTER_VARIABLE ])) {

View File

@@ -94,7 +94,7 @@ class Smarty_Internal_ErrorHandler
}
if ($this->allowUndefinedArrayKeys && preg_match(
'/^(Undefined index|Undefined array key|Trying to access array offset on value of type)/',
'/^(Undefined index|Undefined array key|Trying to access array offset on)/',
$errstr
)) {
return; // suppresses this error

View File

@@ -10,4 +10,6 @@ docker-compose run php72 ./run-tests.sh $@ && \
docker-compose run php73 ./run-tests.sh $@ && \
docker-compose run php74 ./run-tests.sh $@ && \
docker-compose run php80 ./run-tests.sh $@ && \
docker-compose run php81 ./run-tests.sh $@
docker-compose run php81 ./run-tests.sh $@ && \
docker-compose run php82 ./run-tests.sh $@ && \
docker-compose run php83 ./run-tests.sh $@

View File

@@ -0,0 +1,10 @@
FROM php:8.3-cli
## Basic utilities
RUN apt-get update -yqq && apt-get install -y curl apt-utils git zip unzip
## Composer
COPY ./utilities/testrunners/shared/install-composer.sh /root/install-composer.sh
WORKDIR /root
RUN sh ./install-composer.sh
RUN mv ./composer.phar /usr/local/bin/composer