74365[TASK] Switch specific strpos() usages with equivalent string methods
Commit message
Review
-
Code review CR +2 Done
- Georg Ringer +2
- crell +1
- Stefan Bürk +1
- Nikita Hovratov +1
-
Verified V +2 Done
- Georg Ringer +2
- Stefan Bürk +1
- Nikita Hovratov +1
- core-ci +1 CI
Issues 1
Files 108
- Build/php-cs-fixer.php+1 −0
- typo3/sysext/backend/Classes/Controller/Wizard/AddController.php+2 −2
- typo3/sysext/backend/Classes/Controller/Wizard/ListController.php+2 −2
- typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php2+3 −1
- typo3/sysext/backend/Classes/Controller/SiteInlineAjaxController.php+1 −1
- typo3/sysext/backend/Classes/Form/Container/FullRecordContainer.php+2 −2
- typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php+1 −1
- typo3/sysext/backend/Classes/Form/FormDataProvider/DatabaseUniqueUidNewRow.php+1 −1
- typo3/sysext/backend/Classes/Form/FormDataProvider/EvaluateDisplayConditions.php+3 −3
- typo3/sysext/backend/Classes/Form/FormDataProvider/SiteTcaInline.php+2 −2
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaColumnsProcessPlaceholders.php+1 −1
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInline.php+1 −1
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaSiteLanguage.php+3 −3
- typo3/sysext/backend/Classes/Form/FormDataCompiler.php+1 −1
- typo3/sysext/backend/Classes/History/RecordHistory.php+1 −1
- typo3/sysext/backend/Classes/Search/LiveSearch/QueryParser.php+1 −1
- typo3/sysext/backend/Classes/Tree/View/PagePositionMap.php2+1 −1
- typo3/sysext/backend/Classes/Utility/BackendUtility.php+1 −1
- typo3/sysext/backend/Classes/View/BackendLayoutView.php+1 −1
- typo3/sysext/belog/Classes/Domain/Repository/LogEntryRepository.php+2 −2
Show 88 more files
- typo3/sysext/core/Classes/Cache/Backend/MemcachedBackend.php+3 −3
- typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php+1 −1
- typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php+1 −1
- typo3/sysext/core/Classes/Composer/PackageArtifactBuilder.php+3 −3
- typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php+2 −2
- typo3/sysext/core/Classes/Configuration/Loader/PageTsConfigLoader.php+1 −1
- typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php+1 −1
- typo3/sysext/core/Classes/Controller/RequireJsController.php+3 −3
- typo3/sysext/core/Classes/Database/Query/Expression/ExpressionBuilder.php2+3 −3
- typo3/sysext/core/Classes/Database/Schema/ConnectionMigrator.php+4 −4
- typo3/sysext/core/Classes/Database/Schema/SqlReader.php8+9 −5
- typo3/sysext/core/Classes/DataHandling/Localization/DataMapItem.php+1 −1
- typo3/sysext/core/Classes/DataHandling/DataHandler.php+1 −1
- typo3/sysext/core/Classes/DependencyInjection/AutowireInjectMethodsPass.php+1 −1
- typo3/sysext/core/Classes/Hooks/BackendUserGroupIntegrityCheck.php+1 −1
- typo3/sysext/core/Classes/Html/HtmlParser.php+2 −2
- typo3/sysext/core/Classes/Html/RteHtmlParser.php6+2 −2
- typo3/sysext/core/Classes/Http/Security/ReferrerEnforcer.php+2 −2
- typo3/sysext/core/Classes/Http/ServerRequestFactory.php+3 −3
- typo3/sysext/core/Classes/Http/Uri.php+2 −2
- typo3/sysext/core/Classes/Imaging/ImageMagickFile.php+1 −1
- typo3/sysext/core/Classes/LinkHandling/LegacyLinkNotationConverter.php+1 −1
- typo3/sysext/core/Classes/Localization/Locales.php+1 −1
- typo3/sysext/core/Classes/Package/PackageManager.php+1 −1
- typo3/sysext/core/Classes/Page/PageRenderer.php+1 −1
- typo3/sysext/core/Classes/Resource/Driver/AbstractHierarchicalFilesystemDriver.php+1 −1
- typo3/sysext/core/Classes/Resource/LocalPath.php+1 −1
- typo3/sysext/core/Classes/Resource/ResourceCompressor.php+3 −3
- typo3/sysext/core/Classes/Routing/Enhancer/VariableProcessor.php+2 −2
- typo3/sysext/core/Classes/Routing/PageRouter.php+1 −1
- typo3/sysext/core/Classes/Routing/PageSlugCandidateProvider.php+3 −3
- typo3/sysext/core/Classes/Routing/PageUriMatcher.php2+1 −1
- typo3/sysext/core/Classes/TypoScript/Parser/TypoScriptParser.php+3 −3
- typo3/sysext/core/Classes/TypoScript/TemplateService.php6+2 −2
- typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php2+4 −2
- typo3/sysext/core/Classes/Utility/GeneralUtility.php4+7 −7
- typo3/sysext/core/Classes/Utility/StringUtility.php+1 −1
- typo3/sysext/core/Resources/PHP/ClassMapGenerator.php+2 −2
- typo3/sysext/core/Tests/Unit/LinkHandling/LegacyLinkNotationConverterTest.php+2 −2
- typo3/sysext/extbase/Classes/Core/Bootstrap.php+1 −1
- typo3/sysext/extbase/Classes/Mvc/Controller/Arguments.php+1 −1
- typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php+1 −1
- typo3/sysext/extbase/Classes/Persistence/Repository.php6+3 −3
- typo3/sysext/extbase/Classes/Reflection/ClassSchema.php+1 −1
- typo3/sysext/extbase/Classes/Service/ImageService.php+2 −2
- typo3/sysext/extbase/Classes/Validation/Validator/RegularExpressionValidator.php+1 −1
- typo3/sysext/felogin/Classes/Validation/RedirectUrlValidator.php+2 −2
- typo3/sysext/fluid/Classes/Core/Cache/FluidTemplateCache.php+1 −1
- typo3/sysext/form/Classes/Domain/Configuration/ConfigurationService.php+3 −3
- typo3/sysext/form/Classes/Mvc/Configuration/InheritancesResolverService.php+1 −1
- typo3/sysext/form/Classes/Mvc/Property/TypeConverter/UploadedFileReferenceConverter.php+1 −1
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php+2 −2
- typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php+1 −1
- typo3/sysext/frontend/Classes/Page/CacheHashConfiguration.php+1 −1
- typo3/sysext/frontend/Classes/Resource/FileCollector.php+1 −1
- typo3/sysext/frontend/Classes/Resource/FilePathSanitizer.php+1 −1
- typo3/sysext/frontend/Classes/Typolink/LegacyLinkBuilder.php+1 −1
- typo3/sysext/frontend/Tests/Functional/Rendering/UriPrefixRenderingTest.php+2 −2
- typo3/sysext/frontend/Tests/Functional/SiteHandling/MountPointTest.php+1 −1
- typo3/sysext/frontend/Tests/Functional/SiteHandling/SiteRequestTest.php+4 −4
- typo3/sysext/frontend/Tests/Functional/SiteHandling/SlugSiteRequestTest.php+4 −4
- typo3/sysext/indexed_search/Classes/Controller/SearchController.php+3 −3
- typo3/sysext/indexed_search/Classes/Indexer.php+3 −3
- typo3/sysext/install/Classes/Controller/UpgradeController.php+1 −1
- typo3/sysext/install/Classes/FolderStructure/DefaultFactory.php+2 −2
- typo3/sysext/install/Classes/Service/SilentConfigurationUpgradeService.php+1 −1
- typo3/sysext/install/Classes/Service/Typo3tempFileService.php+1 −1
- typo3/sysext/install/Classes/Service/UpgradeWizardsService.php+1 −1
- typo3/sysext/install/Classes/Service/WebServerConfigurationFileService.php+2 −2
- typo3/sysext/install/Classes/SystemEnvironment/DatabaseCheck/Platform/MySql.php+1 −1
- typo3/sysext/install/Classes/SystemEnvironment/DatabaseCheck/Platform/PostgreSql.php+1 −1
- typo3/sysext/install/Classes/SystemEnvironment/DatabaseCheck/Platform/Sqlite.php+1 −1
- typo3/sysext/install/Classes/SystemEnvironment/DatabaseCheck/Platform/SqlSrv.php+1 −1
- typo3/sysext/install/Classes/SystemEnvironment/ServerResponse/FileDeclaration.php+2 −2
- typo3/sysext/install/Classes/SystemEnvironment/Check.php+1 −1
- typo3/sysext/install/Classes/UpgradeAnalysis/DocumentationFile.php2+3 −3
- typo3/sysext/linkvalidator/Classes/Linktype/FileLinktype.php+1 −1
- typo3/sysext/linkvalidator/Classes/Linktype/InternalLinktype.php+1 −1
- typo3/sysext/lowlevel/Classes/Controller/DatabaseIntegrityController.php2+1 −1
- typo3/sysext/lowlevel/Classes/Database/QueryGenerator.php+2 −2
- typo3/sysext/redirects/Classes/Service/RedirectService.php+1 −1
- typo3/sysext/redirects/Classes/Service/SlugService.php+1 −1
- typo3/sysext/reports/Classes/Report/Status/ConfigurationStatus.php+4 −4
- typo3/sysext/scheduler/Classes/Task/OptimizeDatabaseTableAdditionalFieldProvider.php+1 −1
- typo3/sysext/scheduler/Classes/Task/OptimizeDatabaseTableTask.php+1 −1
- typo3/sysext/setup/Classes/Controller/SetupModuleController.php+1 −1
- typo3/sysext/tstemplate/Classes/Controller/TemplateAnalyzerController.php+1 −1
- typo3/sysext/workspaces/Classes/Service/StagesService.php+2 −2
Review log 1924
-
crell uploaded patch set 1 04/20/22, 21:18
-
core-ci voted on patch set 1 V +1 04/20/22, 21:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26253
-
Stefan Bürk commented on patch set 1 CR -1 04/21/22, 10:15
on it -
Stefan Bürk commented on patch set 1 04/21/22, 13:18
FormInlineAjaxController.php:57Weired line break. Should be adjusted. Either online or the line starting with && to a new line ....PagePositionMap.php:205We can ommit superflous paranthesis now arount the blocks, as they are self contained now.FormTestService.php:64This is also a bugfix/change in behaviour. Old variant returned "false" if $formHtml startet with "[$fieldName]", str_contains() will return true. See: https://3v4l.org/IFcC3#v8.1.5 Maybe we should "consider" to extract this for fixing in v11 too, as a dedicated direct patch.ExpressionBuilder.php:689Could be simplified / made more clear with: `str_ends_with($value, $quoteChar)`SqlReader.php:100Can be replaced with `str_ends_with()`SqlReader.php:103Can be replaced with `!str_ends_with()`SqlReader.php:106Can be replaced with `str_ends_with()`SqlReader.php:114Can be replaced with `str_ends_with()`RteHtmlParser.php:647Can be replaced with `!str_ends_with()`RteHtmlParser.php:647Superlous empty charsRteHtmlParser.php:648Superflous empty chars and substr() can be replaced with `!str_ends_with()`PageUriMatcher.php:85Superflous spaces.TemplateService.php:716Superflous spaces.TemplateService.php:763Additional lets add paranthesis to current php operator order as minor side change - May help in debugging to see if this may be a bug or not in the future.TemplateService.php:763Superflous spaces.ExtensionManagementUtility.php:158Superflous spaces.GeneralUtility.php:1417Superflous spaces.GeneralUtility.php:2685superflous spaces.PathUtility.php:465Superflous spaces.Repository.php:222Superflous spaces.Repository.php:228Superflous spaces.Repository.php:239Superflous spaces.DocumentationFile.php:245Superflous spaces.DatabaseIntegrityController.php:166Superflous spaces. -
Stefan Bürk uploaded patch set 2 04/21/22, 13:28
-
Stefan Bürk commented on patch set 2 04/21/22, 13:31
FormInlineAjaxController.php:57ReplyDonePagePositionMap.php:205ReplyDoneSqlReader.php:100ReplyDoneSqlReader.php:103ReplyDoneSqlReader.php:106ReplyDoneSqlReader.php:114ReplyDoneRteHtmlParser.php:647ReplyDoneRteHtmlParser.php:647ReplyDoneRteHtmlParser.php:648ReplyDonePageUriMatcher.php:85ReplyDoneTemplateService.php:716ReplyDoneTemplateService.php:763ReplyDoneTemplateService.php:763ReplyDoneExtensionManagementUtility.php:158ReplyDoneGeneralUtility.php:1417ReplyDoneGeneralUtility.php:2685ReplyDonePathUtility.php:465ReplyDoneRepository.php:222ReplyDoneRepository.php:228ReplyDoneRepository.php:239ReplyDoneDocumentationFile.php:245ReplyDoneDatabaseIntegrityController.php:166ReplyDone -
core-ci voted on patch set 2 V +1 04/21/22, 13:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26272
-
crell uploaded patch set 3 04/21/22, 14:05
-
crell commented on patch set 2 04/21/22, 14:06
FormTestService.php:64Replystr_contains() was added in PHP 8, so it's not safe to use in v11 as it supports PHP 7.4. Sad panda. I think for now we just back this change out, since it's not a direct translation from one call to the other.ExpressionBuilder.php:689ReplyDone -
core-ci voted on patch set 3 V +1 04/21/22, 14:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26273
-
Stefan Bürk commented on patch set 3 04/21/22, 14:20
FormTestService.php:64ReplyWe have corresponding symfony/polyfill for it in v11. And already str_contains() placed/backported to v11. -
Stefan Bürk voted on patch set 3 V +1 CR +1 04/21/22, 16:44
-
Nikita Hovratov updated the commit message in patch set 4 04/21/22, 17:11
-
Nikita Hovratov voted on patch set 4 V +1 CR +1 04/21/22, 17:13
-
Stefan Bürk voted on patch set 4 V +1 CR +1 04/21/22, 17:14
-
core-ci voted on patch set 4 V +1 04/21/22, 17:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26281
-
Oliver Hader voted on patch set 4 CR +1 04/21/22, 18:15
-
Stefan Bürk uploaded patch set 5 04/22/22, 18:34
-
core-ci voted on patch set 5 V +1 04/22/22, 18:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/26315
-
Nikita Hovratov voted on patch set 5 V +1 CR +1 04/22/22, 18:50
-
crell commented on patch set 5 CR +1 04/22/22, 19:08
I don't see a change here other than a new parent, but +1 either way. -
Stefan Bürk commented on patch set 5 V +1 CR +1 04/22/22, 21:06
Reply
Rebased and solved merge-conflict. -
Georg Ringer voted on patch set 5 V +2 CR +2 04/22/22, 21:19
-
Georg Ringer merged patch set 6 04/22/22, 21:19