76855[WIP][TASK] Annotate that UIDs cannot be negative
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 16
- typo3/sysext/backend/Classes/Form/Exception/DatabaseRecordException.php+3 −5
- typo3/sysext/backend/Classes/Form/Exception/DatabaseRecordWorkspaceDeletePlaceholderException.php+3 −5
- typo3/sysext/core/Classes/Collection/AbstractRecordCollection.php+2 −6
- typo3/sysext/core/Classes/Context/UserAspect.php+1 −1
- typo3/sysext/core/Classes/Resource/AbstractFile.php+1 −3
- typo3/sysext/core/Classes/Resource/FileReference.php+1 −3
- typo3/sysext/core/Classes/Resource/ProcessedFile.php+2 −0
- typo3/sysext/core/Classes/Resource/ResourceStorage.php+1 −3
- typo3/sysext/extbase/Classes/DomainObject/AbstractDomainObject.php2+3 −1
- typo3/sysext/extbase/Classes/DomainObject/DomainObjectInterface.php+9 −0
- typo3/sysext/extbase/Classes/Persistence/Generic/LazyLoadingProxy.php+3 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/TtContent.php4+0 −10
- typo3/sysext/filelist/Classes/Dto/ResourceView.php+3 −0
- typo3/sysext/workspaces/Classes/Domain/Model/DatabaseRecord.php+8 −0
- typo3/sysext/workspaces/Classes/Domain/Record/AbstractRecord.php2+3 −0
- typo3/sysext/workspaces/Classes/Event/RetrievedPreviewUrlEvent.php+4 −0
Review log 2431
Show 46 earlier messages
-
Oliver Klee uploaded patch set 1 11/29/22, 14:22
-
Oliver Klee commented on patch set 1 CR -1 11/29/22, 14:25
on it -
Oliver Klee uploaded patch set 2
CR -111/29/22, 14:26 -
core-ci voted on patch set 1 V -1 11/29/22, 14:27 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34362
-
core-ci voted on patch set 2 V -1 11/29/22, 14:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34363
-
Nikita Hovratov commented on patch set 2 11/29/22, 14:45
AbstractDomainObject.php:80Please remove the absolute namespace.
-
Christian Kuhn commented on patch set 2 11/29/22, 15:16
AbstractRecord.php:80actually, they can't be negative? afaiks, negative uid's have been removed long ago in workspace handling. -
Oliver Klee commented on patch set 2 11/29/22, 15:21
AbstractDomainObject.php:80ReplyDone -
Oliver Klee uploaded patch set 3
V -111/29/22, 15:21 -
Oliver Klee commented on patch set 2 11/29/22, 15:24
AbstractRecord.php:80Reply UnresolvedThat's what I thought as well. ;-) However, in https://github.com/TYPO3/typo3/blob/main/typo3/sysext/workspaces/Classes/Domain/Record/StageRecord.php#L209 , the UID is compared with a negative number: `StagesService::STAGE_PUBLISH_EXECUTE_ID` is -20. I have no idea whether that code still makes any sense nowadays. Do you know more about this? -
core-ci voted on patch set 3 V -1 11/29/22, 15:29 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34365
-
Oliver Klee commented on patch set 3 CR -1 11/29/22, 16:38
On it for the unit tests failure. -
Oliver Klee commented on patch set 3 11/29/22, 16:56
Reply
Done -
Oliver Klee uploaded patch set 4
CR -1V -111/29/22, 16:56 -
core-ci voted on patch set 4 V +1 11/29/22, 17:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34366
-
Simon Schaufelberger commented on patch set 4 11/30/22, 11:01
TtContent.php:31why did you remove this? -
Oliver Klee commented on patch set 4 11/30/22, 11:52
TtContent.php:31ReplyIt's already in the same property in the parent class, and PHPStan uses that property's annotation. Now that I think of it, I should re-add the annotation, and we should remove the redundant property in a separate change. -
Oliver Klee commented on patch set 4 11/30/22, 11:55
TtContent.php:31ReplyAh, these $uid and $pid are only in the tests. So I can most probably safely remove them with this change. -
Oliver Klee commented on patch set 4 11/30/22, 12:09
TtContent.php:31ReplyI can indeed. Done. -
Oliver Klee uploaded patch set 5
V +111/30/22, 12:09 -
core-ci voted on patch set 5 V +1 11/30/22, 12:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/34416
-
Oliver Klee commented on patch set 5 CR -1 11/30/22, 14:45
Going to create a pre-patch first to get rid of the remnants of the negative UIDs. -
Oliver Klee marked it work in progress 02/19/23, 21:50
-
Oliver Klee uploaded patch set 6
CR -1V +103/11/23, 18:01 -
core-ci voted on patch set 6 V -1 03/11/23, 19:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38805
-
Oliver Klee uploaded patch set 7
V -103/27/23, 11:41 -
Oliver Klee uploaded patch set 8 11/25/23, 13:41
-
core-ci voted on patch set 8 V +1 11/25/23, 13:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/49924
-
Christian Kuhn commented on patch set 8 08/06/24, 12:24
how to continue here? it looks to me as if phpstorm does not understand 'positive-int', so i'm unsure if we should go ahead with this patch at all?! -
Oliver Klee commented on patch set 8 08/06/24, 14:37
Reply Unresolved
Current PHPStan provides all notations we need for this: - `positive-int` - `non-negative-int` - `int<1, max>` - `int<0, max>` https://phpstan.org/writing-php-code/phpdoc-types#integer-ranges The main blocker are the parts of the core that still rely on negative UIDs, and how to handle those. I have no idea if that is dead code, or if we still need the possibility to have negative UIDs in some cases. Do you know more about this, @lolli@schwarzbu.ch? -
Oliver Klee abandoned the change 08/25/24, 10:10