75437[TASK] Add property type declarations with rector
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 42
- typo3/sysext/beuser/Classes/Domain/Repository/BackendUserGroupRepository.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Classes/Domain/Repository/ContentRepository.php+1 −1
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield/Classes/Domain/Repository/ContentRepository.php+1 −1
- typo3/sysext/extbase/Classes/DomainObject/AbstractDomainObject.php+2 −4
- typo3/sysext/extbase/Classes/Error/Error.php+1 −4
- typo3/sysext/extbase/Classes/Error/Message.php5+4 −12
- typo3/sysext/extbase/Classes/Error/Notice.php+1 −4
- typo3/sysext/extbase/Classes/Error/Warning.php+1 −1
- typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php+2 −4
- typo3/sysext/extbase/Classes/Mvc/Controller/Argument.php+4 −14
- typo3/sysext/extbase/Classes/Mvc/View/GenericViewResolver.php+1 −4
- typo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php+12 −48
- typo3/sysext/extbase/Classes/Mvc/Web/RequestBuilder.php+4 −12
- typo3/sysext/extbase/Classes/Pagination/QueryResultPaginator.php+2 −8
- typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/ColumnMap.php+14 −33
- typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php+5 −20
- typo3/sysext/extbase/Classes/Persistence/Generic/Qom/Join.php+3 −12
- typo3/sysext/extbase/Classes/Persistence/Generic/Qom/LogicalAnd.php+2 −8
- typo3/sysext/extbase/Classes/Persistence/Generic/Qom/LogicalNot.php+1 −4
- typo3/sysext/extbase/Classes/Persistence/Generic/Qom/LogicalOr.php+2 −8
Show 22 more files
- typo3/sysext/extbase/Classes/Persistence/Generic/Qom/LowerCase.php+1 −4
- typo3/sysext/extbase/Classes/Persistence/Generic/Qom/Ordering.php+1 −4
- typo3/sysext/extbase/Classes/Persistence/Generic/Qom/Statement.php+1 −4
- typo3/sysext/extbase/Classes/Persistence/Generic/Qom/UpperCase.php+1 −4
- typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php+1 −4
- typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php+23 −56
- typo3/sysext/extbase/Classes/Persistence/Generic/PersistenceManager.php+6 −24
- typo3/sysext/extbase/Classes/Persistence/Generic/Query.php+1 −2
- typo3/sysext/extbase/Classes/Persistence/Generic/Session.php+2 −7
- typo3/sysext/extbase/Classes/Persistence/ClassesConfiguration.php+1 −4
- typo3/sysext/extbase/Classes/Persistence/Repository.php4+4 −9
- typo3/sysext/extbase/Classes/Reflection/ClassSchema/Method.php+4 −16
- typo3/sysext/extbase/Classes/Reflection/ClassSchema/MethodParameter.php+2 −8
- typo3/sysext/extbase/Classes/Reflection/ClassSchema/Property.php+3 −12
- typo3/sysext/extbase/Classes/Reflection/ClassSchema.php+9 −33
- typo3/sysext/extbase/Classes/Reflection/ObjectAccess.php+1 −4
- typo3/sysext/extbase/Classes/Service/ImageService.php+1 −4
- typo3/sysext/extbase/Classes/Validation/Error.php+2 −8
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Repository/BlogRepository.php+1 −1
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Repository/PersonRepository.php+1 −1
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Repository/PostRepository.php+1 −1
- typo3/sysext/extbase/Tests/Unit/Persistence/Generic/BackendTest.php+5 −4
Review log 1620
-
Alexander Schnitzler uploaded patch set 1 08/13/22, 11:23
-
Alexander Schnitzler wrote 08/13/22, 11:23
Topic set to extbase -
core-ci voted on patch set 1 V -1 08/13/22, 11:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30139
-
Alexander Schnitzler uploaded patch set 2 08/13/22, 13:31
-
Alexander Schnitzler uploaded patch set 3 08/13/22, 13:37
-
core-ci voted on patch set 2 V -1 08/13/22, 13:39 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30148
-
core-ci voted on patch set 3 V -1 08/13/22, 13:45 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30149
-
Alexander Schnitzler uploaded patch set 4 08/13/22, 13:49
-
core-ci voted on patch set 4 V +1 08/13/22, 13:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/30150
-
Alexander Schnitzler commented on patch set 4 08/13/22, 13:57
This change is ready for review. -
Stefan Bürk commented on patch set 4 CR -1 08/13/22, 15:08
I think most should be fine, but there are hard breaking stuff in it - which should at least be documentend in a Breaking ReST file. Nut fully reviewed, just a quicm overlook - so only commented one hard breaking case for now. This should deeply reviewed / overworked.Repository.php:39This is hard breaking - and no way to have v11/v12 compatible repositories. https://3v4l.org/k3RHn https://3v4l.org/87EgQ -
Alexander Schnitzler commented on patch set 4 08/13/22, 15:30
Reply
True, some if it clearly is breaking. We should commit on a rule here because technically all changes to non-private properties are breaking changes if we assume people should be able to extend (xclass) all those classes. I'd be happy to boil it down to those classes and properties that are usually extended/overridden. -
Simon Schaufelberger commented on patch set 4 08/13/22, 21:46
Repository.php:39Replyit is possible with the setter -
Stefan Bürk commented on patch set 4 08/13/22, 21:49
Reply
XClass is "on your own risk" - and internal marked classes are "okay" also. But in case of Repository this is API and concrete Repositories should/must extend from this. Thus a corresponding Breaking ReST is needed which explains this and how they have to migrate. Sadly there is no (easy) compact way for typing properties. Only option so far to have cross core compat is using kind of intermidiate class alias hacks. We needed "such kind" of a hack in TF 7 (v11/v12) version to support Codeception 4 AND Codeception 5 (because they typed proteries in v5). I think we have rules in place - breaking stuf should be documented as Breaking and Migration Path explained. Granted, this is a harder case in case of the Repository. As already mentioned - just did a quick view not a full review. some points for it: * internal classes should be fine to change * pure xclassing to replace core/extbase classes => must not beconsidered as this is already long term stated as "use on own risk * private properties are fine to change (if safe to do so) - this has no effect on extending/xclassing at all. * API / Public classes needs documentation about the migration path (breaking rst) - and in this case, for Repository, at best describe the evenentually conditional class_alias way for extensions which needs to support two core version in one version. -
Stefan Bürk commented on patch set 4 08/13/22, 21:58
Repository.php:39ReplyMain issue is, that overriding the property for concrete Repository implementation is the communicated, documented and mostly used way. This is still breaking. Users have either to use the setter after each instantiting of the repository - or call it in the constructor. Which still is a drasticilly needed change. And this is only possiblle for protected properties which have a corresponding setter, in general. Patch must be marked as breaking, Breaking ReST added with corresponding migration paths and suggestions how to (easily) make v11/v12 compat code. Don't get me wrong - I do not say that we should not do this (main only). But not as a silent task without any notification for the user. Not for the public api parts like the Repository. A changelog file (BREAKING) is absolutly mandantory for this. We need to handle this with care. It does not matter if we do it now or in v13, as the problem would always be the same. -
Stefan Bürk commented on patch set 4 08/13/22, 22:08
Message.php:28Breaking ...Message.php:33UnresolvedBreaking ...Message.php:38UnresolvedBreaking ...Message.php:43UnresolvedBreaking ... -
Stefan Bürk commented on patch set 4 08/13/22, 22:19
Repository.php:39Reply Unresolved -
Torben Hansen commented on patch set 4 08/14/22, 05:42
I really like the change and if we get a breaking RST in, I see no problem with it for v12. It could be mentioned in the RST, that rector has been used to change the type declarations. This may motivate developers to consider to use/support rector. -
Alexander Schnitzler commented on patch set 4 08/14/22, 06:47
Reply Unresolved
Do you have an example at hand how that class_alias approach had been implemented in the past?Message.php:28Reply UnresolvedThat's what I meant in my last comment. Technically, all those changes are potentially breaking. This class is not marked internal but never ever have I seen anyone extend this class manually because there is absolutely no need to do so because the internal api that uses these classes cannot handle different types. It's a completely different case here compared to the repository. The latter is intended to be extended by the user, this class here isn't. Don't get me wrong. We can of course document all those changes but I often think we are a bit too cautious and assume the worst although unnecessary. I'd like us to look at all classes and evaluate if those are potentially affected, not just technically. Those questions are important to me: - Is this breaking during an update and how hard is the migrate path? - Are people affected by this if they want to support two versions of TYPO3. -
Alexander Schnitzler abandoned the change 03/17/23, 14:21
Blocked for months, no progress.