If ACL\Login is used, the loginGetLocale() call should be used to fetch the locale data set during login Language\L10n now has new encoding/charset optional parameter 4 If the locale does not have a charset set the defautl charset is UTF-8 unless set via the new parameter or setOverrideEncoding() Because of the deprecation of the getLocales call the following methods do no longer need $locales - Admin\Backend - Admin\EditBase - Output\Form\Generate - Template\SmartyExtend They all use the new l10n->getLocaleAsArray() call to set all the local variables * Admin\EditBase has new parameter "options" to set - cache_id - compile_id which must be passed on the SmartyExtend class init
1.5 KiB
1.5 KiB
Rules for detecting usage of deprecated classes, methods, properties, constants and traits.
Installation
To use this extension, require it in Composer:
composer require --dev phpstan/phpstan-deprecation-rules
If you also install phpstan/extension-installer then you're all set!
Manual installation
If you don't want to use phpstan/extension-installer, include rules.neon in your project's PHPStan config:
includes:
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
Deprecating code you don't own
This extension emits deprecation warnings on code, which uses properties/functions/methods/classes which are annotated as @deprecated.
In case you don't own the code which you want to be considered deprecated, use PHPStan Stub Files to declare deprecations for vendor files like:
/** @deprecated */
class ThirdPartyClass {}