[!!!][FEATURE] Migrate enableFields hook to PSR-14 event
This change replaces the hook to manipulate enableFields DB query constraints in PageRepository with a PSR-14 Event called "ModifyDefaultConstraintsForDatabaseQueryEvent" which allows to manipulate existing constraints as well. At the same time, the method "PageRepository->enableFields" is deprecated in favor of a new method called "getDefaultConstraints()" consisting of of two arguments now, removing the superfluous "show_hidden" which can be also set via the next method argument "$ignoreArray" as well. "getDefaultConstraints()" returns an array of constraints, which is quite handy to use in your own Doctrine DB QueryBuilders. This method also supports tableAlias definitions, useful for JOINs in e.g. Extbase. Resolves: #102793 Releases: main Change-Id: I5816e97ebda3a0ba8945b0ec2001eafe515b7076 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/82405 Tested-by:Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Benni Mack <benni@typo3.org> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Oliver Bartsch <bo@cedev.de> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Oliver Bartsch <bo@cedev.de>
Showing
- typo3/sysext/core/Classes/Domain/Event/ModifyDefaultConstraintsForDatabaseQueryEvent.php 80 additions, 0 deletions...n/Event/ModifyDefaultConstraintsForDatabaseQueryEvent.php
- typo3/sysext/core/Classes/Domain/Repository/PageRepository.php 113 additions, 74 deletions.../sysext/core/Classes/Domain/Repository/PageRepository.php
- typo3/sysext/core/Documentation/Changelog/13.0/Breaking-102793-PageRepository-enableFieldsHookRemoved.rst 40 additions, 0 deletions...reaking-102793-PageRepository-enableFieldsHookRemoved.rst
- typo3/sysext/core/Documentation/Changelog/13.0/Deprecation-102793-PageRepositoryEnableFields.rst 73 additions, 0 deletions...og/13.0/Deprecation-102793-PageRepositoryEnableFields.rst
- typo3/sysext/core/Documentation/Changelog/13.0/Feature-102793-PSR-14EventForModifyingDefaultConstraintsInPageRepository.rst 33 additions, 0 deletions...14EventForModifyingDefaultConstraintsInPageRepository.rst
- typo3/sysext/core/Tests/Functional/Domain/Repository/PageRepositoryTest.php 54 additions, 16 deletions...Tests/Functional/Domain/Repository/PageRepositoryTest.php
- typo3/sysext/core/Tests/Unit/Domain/Event/ModifyDefaultConstraintsForDatabaseQueryEventTest.php 82 additions, 0 deletions...ent/ModifyDefaultConstraintsForDatabaseQueryEventTest.php
- typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php 15 additions, 12 deletions...lasses/Persistence/Generic/Storage/Typo3DbQueryParser.php
- typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php 5 additions, 2 deletions.../frontend/Classes/ContentObject/ContentObjectRenderer.php
- typo3/sysext/frontend/Classes/ContentObject/RecordsContentObject.php 4 additions, 1 deletion...t/frontend/Classes/ContentObject/RecordsContentObject.php
- typo3/sysext/install/Configuration/ExtensionScanner/Php/ArrayDimensionMatcher.php 6 additions, 0 deletions...figuration/ExtensionScanner/Php/ArrayDimensionMatcher.php
- typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallMatcher.php 8 additions, 0 deletions.../Configuration/ExtensionScanner/Php/MethodCallMatcher.php
Please register or sign in to comment