Add Doctrine DBAL 4 and Persistence 4 compatibility#135
Open
ireneperezddc1 wants to merge 5 commits into
Open
Conversation
added 2 commits
March 13, 2026 10:16
This commit adds support for doctrine/dbal ^4 and doctrine/persistence ^4. Changes: - Updated composer.json to allow doctrine/dbal ^4 and doctrine/persistence ^4 - Added required return type annotations `: void` to methods implementing interfaces from doctrine/persistence 4: - MutableAclProvider::propertyChanged() (implements PropertyChangedListener interface) - Acl::addPropertyChangedListener() (implements NotifyPropertyChanged interface) - Fixed foreign key constraints in Schema.php to use table names instead of Table objects (DBAL 4 requirement) Note: The return type annotations are now required (not optional) because the interfaces in doctrine/persistence 4 have these return types defined. Without them, PHP will throw a fatal error about incompatible method signatures.
added 3 commits
March 13, 2026 13:02
…raints This commit refactors the handling of primary keys and foreign key constraints in `Dbal/Schema.php` to ensure compatibility with both Doctrine DBAL 3 and 4. Adjustments include conditional logic to handle differences in method availability and schema construction.
ireneperezddc1
commented
Mar 13, 2026
| * @throws \InvalidArgumentException | ||
| */ | ||
| public function propertyChanged($sender, $propertyName, $oldValue, $newValue) | ||
| public function propertyChanged($sender, $propertyName, $oldValue, $newValue): void |
Author
There was a problem hiding this comment.
Without this, the function fails because of new propertyChanged definition
ireneperezddc1
commented
Mar 13, 2026
| * @return void | ||
| */ | ||
| public function addPropertyChangedListener(PropertyChangedListener $listener) | ||
| public function addPropertyChangedListener(PropertyChangedListener $listener): void |
Author
There was a problem hiding this comment.
Without returning type, the function fails because of new NotifyPropertyChanged definition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds support for doctrine/dbal ^4 and doctrine/persistence ^4.
Changes:
: voidto methods implementing interfaces from doctrine/persistence 4:Note: The return type annotations are now required (not optional) because the interfaces in doctrine/persistence 4 have these return types defined. Without them, PHP will throw a fatal error about incompatible method signatures.