70204[TASK] Use a static closure call if possible for better scoping
Commit message
Review
-
Code review CR +2 Done
- Andreas Kienast +2
- Benni Mack +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Andreas Kienast +2
- Benni Mack +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 1
Files 199
- Build/phpunit/FunctionalTestsBootstrap.php+1 −1
- Build/Scripts/annotationChecker.php+1 −1
- Build/Scripts/checkIntegrityCsvFixtures.php+1 −1
- Build/Scripts/extensionScannerRstFileReferences.php+1 −1
- Build/php-cs-fixer.php+1 −0
- typo3/sysext/adminpanel/Classes/Controller/MainController.php+2 −2
- typo3/sysext/adminpanel/Classes/Modules/DebugModule.php+1 −1
- typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php+1 −1
- typo3/sysext/backend/Classes/Controller/FileStorage/TreeController.php+2 −2
- typo3/sysext/backend/Classes/Controller/Page/LocalizationController.php+1 −1
- typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php+3 −3
- typo3/sysext/backend/Classes/Form/FormDataProvider/TcaSelectItems.php+2 −2
- typo3/sysext/backend/Classes/Routing/PreviewUriBuilder.php+1 −1
- typo3/sysext/backend/Classes/Tree/FileStorageTreeProvider.php+4 −4
- typo3/sysext/backend/Classes/Utility/BackendUtility.php+2 −2
- typo3/sysext/backend/Classes/View/PageLayoutView.php+1 −1
- typo3/sysext/backend/Classes/ServiceProvider.php+1 −1
- typo3/sysext/backend/Configuration/Services.php+1 −1
- typo3/sysext/backend/Resources/Private/Php/backend.php+1 −1
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/DatabaseUserPermissionCheckTest.php+2 −2
Show 179 more files
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaCheckboxItemsTest.php+3 −3
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaFlexProcessTest.php+2 −2
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaRadioItemsTest.php+3 −3
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaRecordTitleTest.php+4 −4
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectItemsTest.php+15 −15
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectTreeItemsTest.php+3 −3
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSlugTest.php+1 −1
- typo3/sysext/backend/Tests/Unit/Form/FormDataCompilerTest.php+3 −3
- typo3/sysext/beuser/Classes/Domain/Repository/BackendUserSessionRepository.php+3 −3
- typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php+3 −3
- typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php+1 −1
- typo3/sysext/core/Classes/Configuration/Parser/PageTsConfigParser.php+1 −1
- typo3/sysext/core/Classes/Database/Query/BulkInsertQuery.php+2 −2
- typo3/sysext/core/Classes/Database/Query/QueryHelper.php+3 −3
- typo3/sysext/core/Classes/Database/Schema/EventListener/SchemaColumnDefinitionListener.php+1 −1
- typo3/sysext/core/Classes/Database/Schema/EventListener/SchemaIndexDefinitionListener.php+1 −1
- typo3/sysext/core/Classes/Database/Schema/Parser/TableBuilder.php+3 −3
- typo3/sysext/core/Classes/Database/Schema/ConnectionMigrator.php+3 −3
- typo3/sysext/core/Classes/Database/RelationHandler.php+1 −1
- typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php+3 −3
- typo3/sysext/core/Classes/DataHandling/Localization/State.php+1 −1
- typo3/sysext/core/Classes/DataHandling/Model/RecordStateFactory.php+1 −1
- typo3/sysext/core/Classes/DataHandling/SlugEnricher.php+1 −1
- typo3/sysext/core/Classes/DependencyInjection/FailsafeContainer.php+2 −2
- typo3/sysext/core/Classes/Domain/Repository/PageRepository.php+1 −1
- typo3/sysext/core/Classes/ExpressionLanguage/FunctionsProvider/DefaultFunctionsProvider.php3+12 −12
- typo3/sysext/core/Classes/ExpressionLanguage/FunctionsProvider/Typo3ConditionFunctionsProvider.php+12 −12
- typo3/sysext/core/Classes/FormProtection/FormProtectionFactory.php+1 −1
- typo3/sysext/core/Classes/Html/DefaultSanitizerBuilder.php+1 −1
- typo3/sysext/core/Classes/Html/HtmlParser.php+3 −3
- typo3/sysext/core/Classes/Html/SimpleParser.php+1 −1
- typo3/sysext/core/Classes/Http/Message.php+3 −3
- typo3/sysext/core/Classes/Http/Stream.php+1 −1
- typo3/sysext/core/Classes/Http/Uri.php+2 −2
- typo3/sysext/core/Classes/Imaging/IconProvider/FontawesomeIconProvider.php+1 −1
- typo3/sysext/core/Classes/Imaging/ImageManipulation/CropVariantCollection.php+1 −1
- typo3/sysext/core/Classes/IO/CsvStreamFilter.php+1 −1
- typo3/sysext/core/Classes/Package/PseudoServiceProvider.php+1 −1
- typo3/sysext/core/Classes/Page/PageRenderer.php+2 −2
- typo3/sysext/core/Classes/Resource/Processing/LocalPreviewHelper.php+1 −1
- typo3/sysext/core/Classes/Resource/Rendering/AudioTagRenderer.php+1 −1
- typo3/sysext/core/Classes/Resource/Rendering/VideoTagRenderer.php+1 −1
- typo3/sysext/core/Classes/Resource/Rendering/VimeoRenderer.php+1 −1
- typo3/sysext/core/Classes/Resource/Rendering/YouTubeRenderer.php+1 −1
- typo3/sysext/core/Classes/Resource/Search/Result/FileSearchResult.php+1 −1
- typo3/sysext/core/Classes/Resource/Service/UserFileMountService.php+1 −1
- typo3/sysext/core/Classes/Resource/FileRepository.php+1 −1
- typo3/sysext/core/Classes/Routing/Aspect/PersistedPatternMapper.php+1 −1
- typo3/sysext/core/Classes/Routing/Aspect/SiteLanguageAccessorTrait.php+1 −1
- typo3/sysext/core/Classes/Routing/Aspect/StaticRangeMapper.php+1 −1
- typo3/sysext/core/Classes/Routing/PageSlugCandidateProvider.php+1 −1
- typo3/sysext/core/Classes/Routing/Route.php+2 −2
- typo3/sysext/core/Classes/Service/DependencyOrderingService.php+2 −2
- typo3/sysext/core/Classes/Type/File/FileInfo.php+1 −1
- typo3/sysext/core/Classes/TypoScript/Parser/ConstantConfigurationParser.php+1 −1
- typo3/sysext/core/Classes/Utility/ArrayUtility.php+3 −3
- typo3/sysext/core/Classes/Utility/GeneralUtility.php+1 −1
- typo3/sysext/core/Classes/Utility/HttpUtility.php+1 −1
- typo3/sysext/core/Configuration/Services.php+1 −1
- typo3/sysext/core/Resources/Private/Php/cli.php+1 −1
- typo3/sysext/core/Tests/Acceptance/Application/DbCheck/DbCheckModuleCest.php+1 −1
- typo3/sysext/core/Tests/Acceptance/Application/FileList/AbstractFileCest.php+2 −2
- typo3/sysext/core/Tests/Acceptance/Application/FormEngine/AbstractElementsBasicCest.php+1 −1
- typo3/sysext/core/Tests/Acceptance/Application/FormEngine/Inline1nCest.php+1 −1
- typo3/sysext/core/Tests/Acceptance/Application/Frontend/ContentElementsCest.php+1 −1
- typo3/sysext/core/Tests/Acceptance/Application/Frontend/FormFrameworkCest.php+1 −1
- typo3/sysext/core/Tests/Acceptance/Application/Frontend/FrontendLoginCest.php+1 −1
- typo3/sysext/core/Tests/Acceptance/Application/Frontend/IndexedSearchCest.php+1 −1
- typo3/sysext/core/Tests/Acceptance/Application/Login/BackendLoginCest.php+4 −4
- typo3/sysext/core/Tests/Acceptance/Application/Page/AddPageInPageModuleCest.php+1 −1
- typo3/sysext/core/Tests/Acceptance/Application/PageTree/DragAndDrop/PageCreationWithDragAndDropCest.php+1 −1
- typo3/sysext/core/Tests/Acceptance/Application/Site/SiteModuleCest.php+1 −1
- typo3/sysext/core/Tests/Acceptance/Support/Helper/Mouse.php+3 −3
- typo3/sysext/core/Tests/Acceptance/Support/Helper/PageTree.php+1 −1
- typo3/sysext/core/Tests/Functional/Database/Schema/SchemaMigratorTest.php+1 −1
- typo3/sysext/core/Tests/Functional/DataHandling/AbstractDataHandlerActionTestCase.php+1 −1
- typo3/sysext/core/Tests/Functional/Resource/ResourceStorageTest.php+1 −1
- typo3/sysext/core/Tests/Functional/Resource/StorageRepositoryTest.php+2 −2
- typo3/sysext/core/Tests/Functional/SiteHandling/SiteBasedTestTrait.php+1 −1
- typo3/sysext/core/Tests/Functional/Utility/RootlineUtilityTest.php+2 −2
- typo3/sysext/core/Tests/Unit/Authentication/BackendUserAuthenticationTest.php+2 −2
- typo3/sysext/core/Tests/Unit/Database/Query/Expression/ExpressionBuilderTest.php+23 −23
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/AbstractRestrictionTestCase.php+2 −2
- typo3/sysext/core/Tests/Unit/Database/Query/QueryBuilderTest.php+2 −2
- typo3/sysext/core/Tests/Unit/Database/Query/QueryHelperTest.php+2 −2
- typo3/sysext/core/Tests/Unit/Database/Schema/Types/EnumTypeTest.php+1 −1
- typo3/sysext/core/Tests/Unit/Database/Schema/Types/SetTypeTest.php+1 −1
- typo3/sysext/core/Tests/Unit/DataHandling/SlugHelperTest.php+1 −1
- typo3/sysext/core/Tests/Unit/DependencyInjection/Fixtures/TestRegistryServiceProvider.php+3 −3
- typo3/sysext/core/Tests/Unit/DependencyInjection/Fixtures/TestServiceProvider.php+2 −2
- typo3/sysext/core/Tests/Unit/DependencyInjection/Fixtures/TestServiceProviderOverride2.php+1 −1
- typo3/sysext/core/Tests/Unit/DependencyInjection/FailsafeContainerTest.php+24 −24
- typo3/sysext/core/Tests/Unit/DependencyInjection/ServiceProviderCompilationPassTest.php+5 −5
- typo3/sysext/core/Tests/Unit/EventDispatcher/EventDispatcherTest.php+8 −8
- typo3/sysext/core/Tests/Unit/EventDispatcher/ListenerProviderTest.php+3 −3
- typo3/sysext/core/Tests/Unit/ExpressionLanguage/ResolverTest.php+2 −2
- typo3/sysext/core/Tests/Unit/FormProtection/BackendFormProtectionTest.php+1 −1
- typo3/sysext/core/Tests/Unit/Html/Parser/ParserTest.php+1 −1
- typo3/sysext/core/Tests/Unit/Package/AbstractServiceProviderTest.php+1 −1
- typo3/sysext/core/Tests/Unit/Resource/Driver/LocalDriverTest.php+1 −1
- typo3/sysext/core/Tests/Unit/Resource/Security/FileNameValidatorTest.php+1 −1
- typo3/sysext/core/Tests/Unit/Routing/Aspect/AspectFactoryTest.php+1 −1
- typo3/sysext/core/Tests/Unit/Utility/ArrayUtilityTest.php+3 −3
- typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php+2 −2
- typo3/sysext/dashboard/Classes/Widgets/RssWidget.php+1 −1
- typo3/sysext/dashboard/Classes/ServiceProvider.php+1 −1
- typo3/sysext/dashboard/Configuration/Services.php+1 −1
- typo3/sysext/dashboard/Tests/Unit/DependencyInjection/DashboardWidgetPassTest.php+6 −6
- typo3/sysext/extbase/Classes/Configuration/AbstractConfigurationManager.php+1 −1
- typo3/sysext/extbase/Classes/Mvc/Web/RequestBuilder.php+1 −1
- typo3/sysext/extbase/Classes/Reflection/ClassSchema/Method.php+1 −1
- typo3/sysext/extbase/Classes/Reflection/ClassSchema.php+4 −4
- typo3/sysext/extbase/Classes/Reflection/ObjectAccess.php+4 −4
- typo3/sysext/extbase/Classes/Service/CacheService.php+1 −1
- typo3/sysext/extbase/Classes/Validation/Validator/AbstractCompositeValidator.php+2 −2
- typo3/sysext/extbase/Classes/Validation/Validator/AbstractValidator.php+2 −2
- typo3/sysext/extbase/Configuration/Services.php+1 −1
- typo3/sysext/extbase/Tests/Functional/Persistence/OperatorTest.php+1 −1
- typo3/sysext/extbase/Tests/Functional/Persistence/RelationTest.php+1 −1
- typo3/sysext/extbase/Tests/Functional/Persistence/TranslatedSiteContentTest.php+1 −1
- typo3/sysext/extbase/Tests/Functional/Property/PropertyMapperTest.php+1 −1
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbQueryParserTest.php+1 −1
- typo3/sysext/extbase/Tests/Unit/Utility/DebuggerUtilityTest.php+2 −2
- typo3/sysext/extbase/Tests/Unit/Validation/Validator/UrlValidatorTest.php+1 −1
- typo3/sysext/extbase/Tests/UnitDeprecated/Configuration/AbstractConfigurationManagerTest.php+5 −5
- typo3/sysext/extbase/Tests/UnitDeprecated/SignalSlot/DispatcherTest.php+8 −8
- typo3/sysext/fluid/Configuration/Services.php+1 −1
- typo3/sysext/fluid/Tests/Functional/ViewHelpers/Form/SelectViewHelperTest.php+1 −1
- typo3/sysext/fluid/Tests/Unit/View/TemplatePathsTest.php+1 −1
- typo3/sysext/form/Classes/Controller/FormEditorController.php+1 −1
- typo3/sysext/form/Classes/Controller/FormFrontendController.php+1 −1
- typo3/sysext/form/Classes/Domain/Condition/Functions/FormConditionFunctionsProvider.php+2 −2
- typo3/sysext/form/Classes/Domain/Configuration/ConfigurationService.php+1 −1
- typo3/sysext/form/Classes/Domain/Runtime/FormRuntime.php+2 −2
- typo3/sysext/form/Classes/Mvc/Persistence/FormPersistenceManager.php+1 −1
- typo3/sysext/form/Configuration/TCA/Overrides/sys_template.php+1 −1
- typo3/sysext/form/Configuration/TCA/Overrides/tt_content.php+1 −1
- typo3/sysext/form/Tests/Unit/Domain/Finishers/ClosureFinisherTest.php+1 −1
- typo3/sysext/form/Tests/Unit/Domain/Finishers/RedirectFinisherTest.php+1 −1
- typo3/sysext/form/ext_localconf.php+1 −1
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php+4 −4
- typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php+1 −1
- typo3/sysext/frontend/Classes/Html/HtmlWorker.php+1 −1
- typo3/sysext/frontend/Classes/Middleware/StaticRouteResolver.php+1 −1
- typo3/sysext/frontend/Classes/Resource/FileCollector.php+1 −1
- typo3/sysext/frontend/Resources/Private/Php/frontend.php+1 −1
- typo3/sysext/frontend/Tests/Functional/Rendering/LocalizedSiteContentRenderingTest.php+1 −1
- typo3/sysext/frontend/Tests/Functional/Rendering/UriPrefixRenderingTest.php+1 −1
- typo3/sysext/frontend/Tests/Functional/SiteHandling/EnhancerLinkGenerator/StaticRangeMapperTest.php+1 −1
- typo3/sysext/frontend/Tests/Functional/SiteHandling/EnhancerSiteRequest/StaticRangeMapperTest.php+1 −1
- typo3/sysext/frontend/Tests/Functional/SiteHandling/Framework/Builder/ApplicableConjunction.php+1 −1
- typo3/sysext/frontend/Tests/Functional/SiteHandling/Framework/Builder/Permutation.php+2 −2
- typo3/sysext/frontend/Tests/Functional/SiteHandling/Framework/Builder/TestSet.php+1 −1
- typo3/sysext/frontend/Tests/Functional/SiteHandling/AbstractTestCase.php+3 −3
- typo3/sysext/frontend/Tests/Functional/SiteHandling/SiteRequestTest.php+2 −2
- typo3/sysext/frontend/Tests/Functional/SiteHandling/SlugLinkGeneratorTest.php+1 −1
- typo3/sysext/frontend/Tests/Functional/SiteHandling/SlugSiteRequestTest.php+2 −2
- typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php+2 −2
- typo3/sysext/frontend/Tests/Unit/Controller/TypoScriptFrontendControllerTest.php+4 −4
- typo3/sysext/frontend/Tests/Unit/Plugin/AbstractPluginTest.php+1 −1
- typo3/sysext/impexp/Classes/Export.php+1 −1
- typo3/sysext/impexp/Classes/Import.php+1 −1
- typo3/sysext/install/Classes/ExtensionScanner/Php/Matcher/ConstructorArgumentMatcher.php+1 −1
- typo3/sysext/install/Classes/Report/InstallStatusReport.php+1 −1
- typo3/sysext/install/Classes/Service/EnableFileService.php+1 −1
- typo3/sysext/install/Classes/Service/LanguagePackService.php+2 −2
- typo3/sysext/install/Classes/SystemEnvironment/ServerResponse/ServerResponseCheck.php+2 −2
- typo3/sysext/install/Classes/Updates/SvgFilesSanitization.php+1 −1
- typo3/sysext/install/Resources/Private/Php/install.php+1 −1
- typo3/sysext/install/Tests/Functional/Updates/RowUpdater/WorkspaceVersionRecordMigrationTest.php+1 −1
- typo3/sysext/install/Tests/Unit/Service/SilentConfigurationUpgradeServiceTest.php+1 −1
- typo3/sysext/linkvalidator/Tests/Unit/Linktype/ExternalLinktypeTest.php+7 −7
- typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php+1 −1
- typo3/sysext/redirects/Classes/Controller/RecordHistoryRollbackController.php+1 −1
- typo3/sysext/scheduler/Classes/Command/SchedulerCommand.php+1 −1
- typo3/sysext/scheduler/Classes/Task/OptimizeDatabaseTableAdditionalFieldProvider.php+1 −1
- typo3/sysext/seo/Tests/Unit/XmlSitemap/PagesXmlSitemapDataProviderTest.php+1 −1
- typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php+1 −1
- typo3/sysext/workspaces/Classes/Service/StagesService.php+1 −1
Review log 1318
-
Wouter Wolters uploaded patch set 1 08/04/21, 18:04
-
core-ci voted on patch set 1 V +1 08/04/21, 18:15 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14104
-
crell commented on patch set 1 08/04/21, 19:49
I'm in favor of this, with the note below about short-lambdas. However, it may be logistically easier to do in chunks (one file or extension at a time) to make review easier, and to minimize conflicts with other patches, of which there are a whole lot. I didn't review the whole thing yet, due to the aforementioned size.DefaultFunctionsProvider.php:84There's a whole lot of cases in this patch where it makes sense to swap to a short-lambda as long as we're modifying the line. This is one of many many examples. -
Wouter Wolters uploaded patch set 2 08/05/21, 11:29
-
Wouter Wolters commented on patch set 2 08/05/21, 11:31
DefaultFunctionsProvider.php:84Replyshort lambda will be done in a separate patch. There is a fixer available for that. -
core-ci voted on patch set 2 V -1 08/05/21, 11:46 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14133
-
Wouter Wolters commented on patch set 2 CR -1 08/05/21, 17:16
The problem here is that all tests that use ->will(function... can't be made static but the fixer will make it static. There is an open PR https://github.com/phpspec/prophecy/pull/534/files that fixes this problem. Hopefully that can be merged and released soon to finish this patch. -
Wouter Wolters uploaded patch set 3 09/12/21, 12:17
-
core-ci voted on patch set 3 V -1 09/12/21, 12:20 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16618
-
Wouter Wolters uploaded patch set 4 09/13/21, 14:53
-
Wouter Wolters commented on patch set 4 09/13/21, 14:53
DefaultFunctionsProvider.php:84ReplyDone -
core-ci voted on patch set 4 V +1 09/13/21, 15:05 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16660
-
Wouter Wolters uploaded patch set 5 09/24/21, 09:23
-
core-ci voted on patch set 5 V +1 09/24/21, 09:39 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17147
-
Benni Mack voted on patch set 5 V +1 CR +1 09/24/21, 09:51
-
Simon Schaufelberger voted on patch set 5 V +1 CR +1 09/24/21, 10:36
-
Andreas Kienast voted on patch set 5 V +2 CR +2 09/24/21, 10:38
-
Andreas Kienast merged patch set 6 09/24/21, 10:38