From 5eb6572277ab8f83acc51f96ec94db4e074d01b2 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 6 Mar 2024 13:57:07 +0000 Subject: update composer libs --- vendor/smarty/smarty/CHANGELOG.md | 13 ++++++++ vendor/smarty/smarty/README.md | 2 +- vendor/smarty/smarty/changelog/.gitkeep | 0 vendor/smarty/smarty/docs/getting-started.md | 2 +- vendor/smarty/smarty/docs/upgrading.md | 38 ++++++++++++++++++++++ vendor/smarty/smarty/libs/Smarty.class.php | 2 +- .../smarty/libs/plugins/modifier.implode.php | 15 +++++++++ .../libs/plugins/modifiercompiler.json_encode.php | 11 +++++++ .../libs/plugins/modifiercompiler.substr.php | 12 +++++++ ...y_internal_compile_private_print_expression.php | 2 +- .../sysplugins/smarty_internal_errorhandler.php | 2 +- vendor/smarty/smarty/mkdocs.yml | 4 ++- .../smarty/run-tests-for-all-php-versions.sh | 4 ++- 13 files changed, 100 insertions(+), 7 deletions(-) create mode 100644 vendor/smarty/smarty/changelog/.gitkeep create mode 100644 vendor/smarty/smarty/docs/upgrading.md create mode 100644 vendor/smarty/smarty/libs/plugins/modifier.implode.php create mode 100644 vendor/smarty/smarty/libs/plugins/modifiercompiler.json_encode.php create mode 100644 vendor/smarty/smarty/libs/plugins/modifiercompiler.substr.php (limited to 'vendor/smarty') diff --git a/vendor/smarty/smarty/CHANGELOG.md b/vendor/smarty/smarty/CHANGELOG.md index 04be00ec8..69d41e7aa 100644 --- a/vendor/smarty/smarty/CHANGELOG.md +++ b/vendor/smarty/smarty/CHANGELOG.md @@ -6,6 +6,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [4.4.1] - 2024-02-26 +- Fixed internal release-tooling + +## [4.4.0] - 2024-02-26 +### 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 diff --git a/vendor/smarty/smarty/README.md b/vendor/smarty/smarty/README.md index 0ef3cfab6..9b8706d45 100644 --- a/vendor/smarty/smarty/README.md +++ b/vendor/smarty/smarty/README.md @@ -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/). diff --git a/vendor/smarty/smarty/changelog/.gitkeep b/vendor/smarty/smarty/changelog/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/vendor/smarty/smarty/docs/getting-started.md b/vendor/smarty/smarty/docs/getting-started.md index 2ffbbd11b..f549e50e7 100644 --- a/vendor/smarty/smarty/docs/getting-started.md +++ b/vendor/smarty/smarty/docs/getting-started.md @@ -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/). diff --git a/vendor/smarty/smarty/docs/upgrading.md b/vendor/smarty/smarty/docs/upgrading.md new file mode 100644 index 000000000..667a1422c --- /dev/null +++ b/vendor/smarty/smarty/docs/upgrading.md @@ -0,0 +1,38 @@ +# Upgrading from an older version + +## Upgrading from v3 to v4 + +Smarty 4 is mostly identical to Smarty 3. Most notably, it adds support for PHP8 and drops support for PHP7.0 and below. +Additionally, some deprecated features that have long been discouraged have been dropped from the language. + +### Muting PHP8 warnings +If you simultaneously upgrade Smarty to v4 van PHP to v8, you may notice your error logs filling up with warnings about undefined or null template vars +due to a change in how PHP handles these. This may be helpful to spot errors, but if you find this annoying, you can use +`$smarty->muteUndefinedOrNullWarnings()` to make Smarty convert these warnings into notices. + +### ASP tags +You can no longer user ASP-style tags like `<% %>` and `<%= %>` in your templates. +Replace them with `{...}` tags. + +### SmartyBC +Check your codebase for `SmartyBC`. +We have dropped deprecated API calls that where only accessible through the SmartyBC class. + +### No more embedded PHP +We have completely dropped support for `{php}` and `{include_php}` tags and embedded PHP in templates. +Check your templates for this, and rewrite any embedded PHP blocks, by moving logic to your PHP files or by +creating a [plugin function](./programmers/plugins/plugins-functions.md). + +### Other changes + +Search your code for the following changes: + +- `SMARTY_RESOURCE_CHAR_SET` and `SMARTY_RESOURCE_DATE_FORMAT` constants have been removed +- `Smarty::muteExpectedErrors` and `Smarty::unmuteExpectedErrors` API methods have been removed +- `Smarty::getVariable` method has been removed. Use [Smarty::getTemplateVars](programmers/api-functions/api-get-template-vars.md) instead. +- [Smarty::registerResource](programmers/api-functions/api-register-resource.md) no longer accepts an array of callback functions + + + + + diff --git a/vendor/smarty/smarty/libs/Smarty.class.php b/vendor/smarty/smarty/libs/Smarty.class.php index f102d889e..0a47c8350 100644 --- a/vendor/smarty/smarty/libs/Smarty.class.php +++ b/vendor/smarty/smarty/libs/Smarty.class.php @@ -107,7 +107,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '4.3.4'; + const SMARTY_VERSION = '4.4.1'; /** * define variable scopes */ diff --git a/vendor/smarty/smarty/libs/plugins/modifier.implode.php b/vendor/smarty/smarty/libs/plugins/modifier.implode.php new file mode 100644 index 000000000..679d71d72 --- /dev/null +++ b/vendor/smarty/smarty/libs/plugins/modifier.implode.php @@ -0,0 +1,15 @@ +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 ])) { diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_errorhandler.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_errorhandler.php index 6f526c38a..4ddcfcd11 100644 --- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_errorhandler.php +++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_errorhandler.php @@ -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 diff --git a/vendor/smarty/smarty/mkdocs.yml b/vendor/smarty/smarty/mkdocs.yml index 7762cd75e..66949b809 100644 --- a/vendor/smarty/smarty/mkdocs.yml +++ b/vendor/smarty/smarty/mkdocs.yml @@ -26,7 +26,9 @@ markdown_extensions: nav: - Home: 'index.md' - - 'Getting started': 'getting-started.md' + - 'Getting started': + - Introduction: 'getting-started.md' + - 'Upgrading from an older version': 'upgrading.md' - 'Designers': - 'Basic Syntax': - Introduction: 'designers/language-basic-syntax/index.md' diff --git a/vendor/smarty/smarty/run-tests-for-all-php-versions.sh b/vendor/smarty/smarty/run-tests-for-all-php-versions.sh index b64f01e40..79bebb8a6 100755 --- a/vendor/smarty/smarty/run-tests-for-all-php-versions.sh +++ b/vendor/smarty/smarty/run-tests-for-all-php-versions.sh @@ -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 $@ -- cgit v1.2.3