73238[BUGFIX] Fix some incorrect usages of Prophecy
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Stefan Bürk +1
-
Verified V +2 Done
- Christian Kuhn +2
- Stefan Bürk +1
- core-ci +1 CI
Issues 1
Files 79
- Build/phpstan/phpstan-baseline.neon+0 −285
- typo3/sysext/adminpanel/Tests/Unit/Middleware/AdminPanelInitiatorTest.php+9 −10
- typo3/sysext/adminpanel/Tests/Unit/Service/ConfigurationServiceTest.php+7 −7
- typo3/sysext/backend/Tests/Unit/Configuration/BackendUserConfigurationTest.php+17 −18
- typo3/sysext/backend/Tests/Unit/Controller/File/FileControllerTest.php+0 −4
- typo3/sysext/backend/Tests/Unit/Controller/FormInlineAjaxControllerTest.php+2 −2
- typo3/sysext/backend/Tests/Unit/Form/FormDataGroup/FlexFormSegmentTest.php+0 −6
- typo3/sysext/backend/Tests/Unit/Form/FormDataGroup/OnTheFlyTest.php+0 −4
- typo3/sysext/backend/Tests/Unit/Form/FormDataGroup/OrderedProviderListTest.php+0 −7
- typo3/sysext/backend/Tests/Unit/Form/FormDataGroup/SiteConfigurationDataGroupTest.php+0 −6
- typo3/sysext/backend/Tests/Unit/Form/FormDataGroup/TcaDatabaseRecordTest.php+0 −6
- typo3/sysext/backend/Tests/Unit/Form/FormDataGroup/TcaInputPlaceholderRecordTest.php+0 −6
- typo3/sysext/backend/Tests/Unit/Form/FormDataGroup/TcaSelectTreeAjaxFieldDataTest.php+0 −6
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/DatabaseLanguageRowsTest.php+0 −5
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/DatabaseUserPermissionCheckTest.php+0 −3
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/EvaluateDisplayConditionsTest.php+0 −3
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaCheckboxItemsTest.php+0 −9
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaColumnsProcessFieldDescriptionsTest.php+3 −2
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaColumnsProcessFieldLabelsTest.php+3 −2
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaFlexPrepareTest.php+0 −2
Show 59 more files
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaFlexProcessTest.php+0 −8
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaGroupTest.php+0 −4
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaInlineTest.php+0 −3
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaInputPlaceholdersTest.php+0 −6
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaRadioItemsTest.php+0 −9
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaRecordTitleTest.php+0 −6
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectItemsTest.php+3 −42
- typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectTreeItemsTest.php+0 −11
- typo3/sysext/backend/Tests/Unit/Form/FormDataCompilerTest.php+0 −3
- typo3/sysext/backend/Tests/Unit/Security/EmailLoginNotificationTest.php+2 −4
- typo3/sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php+5 −9
- typo3/sysext/backend/Tests/UnitDeprecated/Form/FormDataProvider/TcaFlexPrepareTest.php+0 −5
- typo3/sysext/core/Tests/Functional/Cache/Core/ClassAliasLoaderTest.php+1 −0
- typo3/sysext/core/Tests/Unit/Authentication/AbstractUserAuthenticationTest.php+0 −3
- typo3/sysext/core/Tests/Unit/Authentication/AuthenticationServiceTest.php+12 −9
- typo3/sysext/core/Tests/Unit/Authentication/BackendUserAuthenticationTest.php+0 −7
- typo3/sysext/core/Tests/Unit/Console/CommandRegistryTest.php+2 −5
- typo3/sysext/core/Tests/Unit/Database/Query/Expression/ExpressionBuilderTest.php+84 −88
- typo3/sysext/core/Tests/Unit/Database/Query/Restriction/AbstractRestrictionTestCase.php+0 −1
- typo3/sysext/core/Tests/Unit/Database/Query/QueryBuilderTest.php+2 −8
- typo3/sysext/core/Tests/Unit/Database/Schema/EventListener/SchemaColumnDefinitionListenerTest.php+1 −4
- typo3/sysext/core/Tests/Unit/Database/Schema/ConnectionMigratorTest.php+1 −4
- typo3/sysext/core/Tests/Unit/DependencyInjection/ServiceProviderRegistryTest.php+2 −4
- typo3/sysext/core/Tests/Unit/EventDispatcher/EventDispatcherTest.php+1 −4
- typo3/sysext/core/Tests/Unit/EventDispatcher/ListenerProviderTest.php+1 −4
- typo3/sysext/core/Tests/Unit/Hooks/TcaItemsProcessorFunctionsTest.php+6 −4
- typo3/sysext/core/Tests/Unit/Http/Security/ReferrerEnforcerTest.php+0 −3
- typo3/sysext/core/Tests/Unit/Imaging/IconFactoryTest.php+2 −4
- typo3/sysext/core/Tests/Unit/Imaging/IconRegistryTest.php+1 −4
- typo3/sysext/core/Tests/Unit/Routing/Aspect/AspectFactoryTest.php+2 −8
- typo3/sysext/core/Tests/Unit/Service/MarkerBasedTemplateServiceTest.php+0 −2
- typo3/sysext/core/Tests/Unit/Tree/TableConfiguration/DatabaseTreeDataProviderTest.php+1 −2
- typo3/sysext/core/Tests/Unit/TypoScript/TemplateServiceTest.php+1 −4
- typo3/sysext/dashboard/Tests/Unit/DependencyInjection/DashboardWidgetPassTest.php+0 −6
- typo3/sysext/dashboard/Tests/Unit/WidgetRegistryTest.php+2 −8
- typo3/sysext/extbase/Tests/Functional/Service/ExtensionServiceTest.php+5 −9
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbQueryParserTest.php+6 −12
- typo3/sysext/extbase/Tests/Unit/Service/ExtensionServiceTest.php+0 −2
- typo3/sysext/extbase/Tests/Unit/Utility/LocalizationUtilityTest.php+5 −5
- typo3/sysext/felogin/Tests/Unit/Configuration/RecoveryConfigurationTest.php+7 −17
- typo3/sysext/felogin/Tests/Unit/Redirect/RedirectHandlerTest.php+4 −12
- typo3/sysext/felogin/Tests/Unit/Service/RecoveryServiceTest.php+4 −15
- typo3/sysext/form/Tests/Unit/Domain/Finishers/AbstractFinisherTest.php+1 −3
- typo3/sysext/form/Tests/Unit/Domain/Finishers/ClosureFinisherTest.php+0 −2
- typo3/sysext/form/Tests/Unit/Domain/Finishers/RedirectFinisherTest.php+4 −3
- typo3/sysext/form/Tests/Unit/Service/TranslationServiceTest.php+0 −3
- typo3/sysext/frontend/Tests/Unit/Authentication/FrontendUserAuthenticationTest.php+0 −5
- typo3/sysext/frontend/Tests/Unit/ContentObject/ContentDataProcessorTest.php+0 −3
- typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php+0 −3
- typo3/sysext/frontend/Tests/Unit/ContentObject/FluidTemplateContentObjectTest.php7+6 −6
- typo3/sysext/frontend/Tests/Unit/DataProcessing/FlexFormProcessorTest.php+0 −3
- typo3/sysext/frontend/Tests/Unit/Http/RequestHandlerTest.php+39 −35
- typo3/sysext/frontend/Tests/Unit/Typolink/DatabaseRecordLinkBuilderTest.php+8 −7
- typo3/sysext/frontend/Tests/UnitDeprecated/ContentObject/ContentObjectRendererTest.php+2 −4
- typo3/sysext/install/Tests/Unit/Service/SilentConfigurationUpgradeServiceTest.php+0 −7
- typo3/sysext/install/Tests/Unit/UpgradeAnalysis/DocumentationFileTest.php+0 −3
- typo3/sysext/opendocs/Tests/Unit/Service/OpenDocumentServiceTest.php+0 −3
- typo3/sysext/redirects/Tests/Unit/Service/RedirectServiceTest.php+0 −12
- typo3/sysext/workspaces/Tests/Unit/Controller/Remote/RemoteServerTest.php+12 −17
Review log 2028
Show 23 earlier messages
-
Oliver Klee uploaded patch set 1 01/31/22, 00:53
-
core-ci voted on patch set 1 V -1 01/31/22, 00:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22766
-
Oliver Klee uploaded patch set 2 01/31/22, 01:01
-
core-ci voted on patch set 2 V +1 01/31/22, 01:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22767
-
Oliver Klee uploaded patch set 3 01/31/22, 22:45
-
core-ci voted on patch set 3 V -1 01/31/22, 22:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22833
-
Oliver Klee uploaded patch set 4 01/31/22, 22:49
-
Oliver Klee uploaded patch set 5 01/31/22, 22:50
-
core-ci voted on patch set 4 V -1 01/31/22, 22:52 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22835
-
core-ci voted on patch set 5 V -1 01/31/22, 22:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22836
-
Oliver Klee uploaded patch set 6 01/31/22, 22:57
-
Oliver Klee commented on patch set 6 01/31/22, 23:47
The jobs in the pipeline are green, but the result does not seem to get reported back: https://git.typo3.org/typo3/CI/cms/-/pipelines/22837 -
core-ci voted on patch set 6 V -1 02/01/22, 00:20 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22837
-
Christian Kuhn rebased onto patch set 7 02/01/22, 00:29
-
core-ci voted on patch set 6 V +1 02/01/22, 00:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22837
-
Christian Kuhn commented on patch set 7 02/01/22, 00:32
great written commit message! -
core-ci voted on patch set 7 V +1 02/01/22, 00:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/22845
-
Stefan Bürk commented on patch set 7 V +1 CR +1 02/01/22, 00:49
Nice patch, thanks for this work. -
Christian Kuhn voted on patch set 7 V +2 CR +2 02/01/22, 00:51
-
Christian Kuhn merged patch set 8 02/01/22, 00:51
-
Benjamin Franzke commented on patch set 8 02/01/22, 07:25
FluidTemplateContentObjectTest.php:64I understand that this notation is not correct, and has therefore been removed. BUT, is there any way to get templated annotations like: @var ObjectProphecy<ContentObjectRenderer> we really loose information due to these removals… -
Benjamin Franzke commented on patch set 8 02/01/22, 07:31
FluidTemplateContentObjectTest.php:64Reply -
Oliver Klee commented on patch set 8 02/01/22, 09:39
FluidTemplateContentObjectTest.php:64ReplyAs the Prophecy plugin for PHPStan has this information internally, we are not losing this information at least as far as PHPStan is concerned. I'm sure about this for local variables; I'm not 100% sure about this for properties (i.e., whether the native type annotation overrules what the Prophecy plugin knows). My best guest is that if the information was lost, we'd see this in the form of a PHPStan warning. -
Oliver Klee commented on patch set 8 02/01/22, 10:44
FluidTemplateContentObjectTest.php:64ReplyAddendum: 1) guest -> guess 2) Yes, it does (as PHPStan does not complain when methods are called on the prophecy). -
Benjamin Franzke commented on patch set 8 02/01/22, 14:31
FluidTemplateContentObjectTest.php:64ReplyWell, PHPStan doesn't complain because it does allow *everything* to be called on an untyped revealed prophecy (it basically is considered mixed at that point). Can simply be verified by adding invalid call to a separate method, phpstan will not be able to derive a type and therefore the call is not considered invalid (as everything is allowed on mixed): $this->contentObjectRendererProphecy->reveal()->thisIsAnInvalidCall(); But once you add `@var ObjectProphecy<ContentObjectRenderer>` as annotation, it wail correctly complain: 129 Call to an undefined method TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::thisIsAnInvalidCall(). So either we revert this change or re-add these annotations in a separate change. -
Benjamin Franzke commented on patch set 8 02/01/22, 15:56
FluidTemplateContentObjectTest.php:64ReplyHere is a patch that re-adds the information using generics: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73259 -
Oliver Klee commented on patch set 8 02/01/22, 16:29
Thanks, Benjamin! -
Stefan Bürk commented on patch set 8 02/01/22, 16:51
FluidTemplateContentObjectTest.php:64ReplyI would say we can close this comment chain in favor of Banjamin follow up patch. Got the point after reviewing the linked patch/review.