Skip to content
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

Add phpdoc return typehints for JsonDocumentType class #104

Merged
merged 1 commit into from
Jan 19, 2022

Conversation

hhamon
Copy link
Contributor

@hhamon hhamon commented Jan 18, 2022

The main goal is to suppress the following warning messages raised by Symfony:

2022-01-18T07:23:10+00:00 [info] User Deprecated: Method "Doctrine\DBAL\Types\Type::convertToDatabaseValue()" might add "mixed" as a native return type declaration in the future. Do the same in child class "Dunglas\DoctrineJsonOdm\Type\JsonDocumentType" now to avoid errors or add an explicit @return annotation to suppress this message.

2022-01-18T07:23:10+00:00 [info] User Deprecated: Method "Doctrine\DBAL\Types\Type::convertToPHPValue()" might add "mixed" as a native return type declaration in the future. Do the same in child class "Dunglas\DoctrineJsonOdm\Type\JsonDocumentType" now to avoid errors or add an explicit @return annotation to suppress this message.

2022-01-18T07:23:10+00:00 [info] User Deprecated: Method "Doctrine\DBAL\Types\Type::requiresSQLCommentHint()" might add "bool" as a native return type declaration in the future. Do the same in child class "Dunglas\DoctrineJsonOdm\Type\JsonDocumentType" now to avoid errors or add an explicit @return annotation to suppress this message.

2022-01-18T07:23:10+00:00 [info] User Deprecated: Method "Doctrine\DBAL\Types\Type::getName()" might add "string" as a native return type declaration in the future. Do the same in child class "Dunglas\DoctrineJsonOdm\Type\JsonDocumentType" now to avoid errors or add an explicit @return annotation to suppress this message.

@dunglas
Copy link
Owner

dunglas commented Jan 18, 2022

This is already handled by #102

@hhamon
Copy link
Contributor Author

hhamon commented Jan 18, 2022

@dunglas yes and no because #102 enforces PHP 8.0 in composer.json file.

I think we need a last 1.x version that fixes deprecations and create a 2.x branch to support PHP 8.0+

@ddeboer
Copy link

ddeboer commented Jan 18, 2022

Makes sense to merge this first and tag 1.x, then merge #102 and tag that as 2.0. (I’ll rebase #102 after this is merged.)

@dunglas
Copy link
Owner

dunglas commented Jan 19, 2022

We don't have to release a new major version to bump PHP. I'll merge this one, tag, then bump the version into a new minor release.

@dunglas dunglas merged commit 37b4a30 into dunglas:main Jan 19, 2022
@dunglas
Copy link
Owner

dunglas commented Jan 19, 2022

Thanks Hugo!

@hhamon hhamon deleted the feature/php7-deprecation-types branch January 20, 2022 08:56
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.

None yet

3 participants