diff options
author | Mario <mario@mariovavti.com> | 2024-03-22 08:37:29 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-03-22 08:37:29 +0000 |
commit | 1aeb05628b6a2a069c46980efbe628362c9e3e74 (patch) | |
tree | e9aed15d0cd74e0c23dcb05c7be8fe9541efdf36 /vendor/smarty/smarty/docs/upgrading.md | |
parent | 5b7387459cf4de8f7354d81cb0392c4225714d94 (diff) | |
parent | b464fae3bf22585888c5f3def8eded76fd48ed16 (diff) | |
download | volse-hubzilla-9.0.tar.gz volse-hubzilla-9.0.tar.bz2 volse-hubzilla-9.0.zip |
Merge branch '9.0RC'9.0
Diffstat (limited to 'vendor/smarty/smarty/docs/upgrading.md')
-rw-r--r-- | vendor/smarty/smarty/docs/upgrading.md | 38 |
1 files changed, 38 insertions, 0 deletions
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 + + + + + |