[TASK] Use native str_starts_with() PHP method
One of our main utility methods "GeneralUtility::isFirstPartOfStr" can now replaced by PHP's native "str_starts_with()" function (see https://www.php.net/manual/en/function.str-starts-with.php) which is also available for PHP 7.4 thanks to Symfony's polyfill package. This way, we can a) slim down our own code base in favor of native PHP calls b) add a bit of performance due to native PHP calls c) move towards type-safety to ensure that we hand over strings to these methods, as our own method was a bit more "lax" on things Resolves: #95257 Releases: master Change-Id: I70617ab4419849353a72a10dfed31a2d96f58072 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70444 Tested-by:core-ci <typo3@b13.com> Tested-by:
Georg Ringer <georg.ringer@gmail.com> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Georg Ringer <georg.ringer@gmail.com> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch>
Showing
- typo3/sysext/backend/Classes/Domain/Repository/TableManualRepository.php 2 additions, 2 deletions...ckend/Classes/Domain/Repository/TableManualRepository.php
- typo3/sysext/backend/Classes/Form/FieldControl/AddRecord.php 2 additions, 2 deletionstypo3/sysext/backend/Classes/Form/FieldControl/AddRecord.php
- typo3/sysext/backend/Classes/Utility/BackendUtility.php 1 addition, 1 deletiontypo3/sysext/backend/Classes/Utility/BackendUtility.php
- typo3/sysext/backend/Classes/View/BackendLayoutView.php 1 addition, 1 deletiontypo3/sysext/backend/Classes/View/BackendLayoutView.php
- typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php 1 addition, 1 deletion...3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php
- typo3/sysext/core/Classes/Configuration/ConfigurationManager.php 1 addition, 1 deletion...ysext/core/Classes/Configuration/ConfigurationManager.php
- typo3/sysext/core/Classes/DataHandling/DataHandler.php 1 addition, 1 deletiontypo3/sysext/core/Classes/DataHandling/DataHandler.php
- typo3/sysext/core/Classes/IO/PharStreamWrapperInterceptor.php 1 addition, 1 deletion...3/sysext/core/Classes/IO/PharStreamWrapperInterceptor.php
- typo3/sysext/core/Classes/Localization/Parser/AbstractXmlParser.php 5 additions, 5 deletions...xt/core/Classes/Localization/Parser/AbstractXmlParser.php
- typo3/sysext/core/Classes/Locking/SimpleLockStrategy.php 1 addition, 1 deletiontypo3/sysext/core/Classes/Locking/SimpleLockStrategy.php
- typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php 3 additions, 3 deletionstypo3/sysext/core/Classes/Resource/Driver/LocalDriver.php
- typo3/sysext/core/Classes/Resource/ResourceCompressor.php 3 additions, 3 deletionstypo3/sysext/core/Classes/Resource/ResourceCompressor.php
- typo3/sysext/core/Classes/Resource/ResourceFactory.php 2 additions, 2 deletionstypo3/sysext/core/Classes/Resource/ResourceFactory.php
- typo3/sysext/core/Classes/TypoScript/Parser/ConstantConfigurationParser.php 2 additions, 2 deletions...Classes/TypoScript/Parser/ConstantConfigurationParser.php
- typo3/sysext/core/Classes/Utility/GeneralUtility.php 14 additions, 12 deletionstypo3/sysext/core/Classes/Utility/GeneralUtility.php
- typo3/sysext/core/Documentation/Changelog/master/Deprecation-95257-GeneralUtilityisFirstPartOfStr.rst 46 additions, 0 deletions...ster/Deprecation-95257-GeneralUtilityisFirstPartOfStr.rst
- typo3/sysext/core/Tests/Unit/Utility/Fixtures/GeneralUtilityFilesystemFixture.php 3 additions, 3 deletions...Unit/Utility/Fixtures/GeneralUtilityFilesystemFixture.php
- typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php 0 additions, 64 deletionstypo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php
- typo3/sysext/core/Tests/UnitDeprecated/Utility/GeneralUtilityTest.php 64 additions, 0 deletions.../core/Tests/UnitDeprecated/Utility/GeneralUtilityTest.php
- typo3/sysext/extbase/Classes/Utility/LocalizationUtility.php 1 addition, 1 deletiontypo3/sysext/extbase/Classes/Utility/LocalizationUtility.php
Please register or sign in to comment