Skip to content

add support for doctrine/dbal ^3.2 #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2022
Merged

add support for doctrine/dbal ^3.2 #5

merged 1 commit into from
Apr 11, 2022

Conversation

XilefNori
Copy link

No description provided.

.gitignore Outdated
@@ -1,3 +1,5 @@
.idea
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please store this in local global gitignore

Copy link
Author

@XilefNori XilefNori Apr 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. Thanks for hint

@@ -63,7 +63,7 @@ public function isEnumNameTypeMapping(): bool
/**
* {@inheritdoc}
*/
public function convertToPHPValue($value, AbstractPlatform $platform)
public function convertToPHPValue($value, AbstractPlatform $platform): ?Enum
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure whether this work if doctrine/dbal project introduce signatures on their classes at some point. I think we should avoid this at the moment for interfaces\overrides\etc

Copy link
Author

@XilefNori XilefNori Apr 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Did a verification test, looks OK https://3v4l.org/DLWKM

@@ -13,7 +13,7 @@ final class EnumTypeInitializer
* @param NamingStrategyInterface|null $strategy
* @param bool $enumNameTypeMapping
*
* @throws \Doctrine\DBAL\DBALException
* @throws \Doctrine\DBAL\Exception
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no such exception in doctrine/dbal: ^2, but we still allow it

Copy link
Author

@XilefNori XilefNori Apr 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Tag sorting confused me. v2.10.2 is top in tag list for me, checked that one

Copy link
Contributor

@scaytrase scaytrase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like most of these changes are not mandatory to support dbal ^3, and some of these changes must be avoided until dbal introduces own signatures on their methods for Type class.

And some other minor changes requested

@XilefNori
Copy link
Author

XilefNori commented Apr 11, 2022

Looks like most of these changes are not mandatory to support dbal ^3, and some of these changes must be avoided until dbal introduces own signatures on their methods for Type class.

Exception replacement is "mandatory" as PHPDoc can be mandatory.
Signature for Type subclasses added for hiding php 8.1 deprecation warning, and they completely valid, since return types are marked as "mixed"

And some other minor changes requested

Copy link
Contributor

@scaytrase scaytrase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@scaytrase scaytrase merged commit ad852ba into master Apr 11, 2022
@scaytrase scaytrase deleted the feature/DMS-1137 branch April 11, 2022 11:31
@scaytrase
Copy link
Contributor

Thanks @XilefNori!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants