darsyn / ip

Immutable value object for IPv4 and IPv6 addresses, including helper methods and Doctrine support.
http://darsyn.github.io/ip/
MIT License
249 stars 21 forks source link

Add @return PHPDoc annotations to AbstractType.php #83

Closed michnovka closed 2 years ago

michnovka commented 2 years ago

Get rid of error messages like:

2022-03-06T21:58:26+01:00 [info] User Deprecated: Method "Doctrine\DBAL\Types\Type::getSQLDeclaration()" might add "string" as a native return type declaration in the future. Do the same in child class "Darsyn\IP\Doctrine\AbstractType" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-03-06T21:58:26+01: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 "Darsyn\IP\Doctrine\AbstractType" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-03-06T21:58:26+01: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 "Darsyn\IP\Doctrine\AbstractType" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-03-06T21:58:26+01: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 "Darsyn\IP\Doctrine\AbstractType" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-03-06T21:58:26+01:00 [info] User Deprecated: Method "Doctrine\DBAL\Types\Type::getBindingType()" might add "int" as a native return type declaration in the future. Do the same in child class "Darsyn\IP\Doctrine\AbstractType" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-03-06T21:58:26+01: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 "Darsyn\IP\Doctrine\AbstractType" now to avoid errors or add an explicit @return annotation to suppress this message.

I used PHPDoc annotations and not explicit return types to keep compatibility with PHP5.6+ as your composer conf file says. Please merge, I get these errors all the time in my console. Thanks

michnovka commented 2 years ago

Fixes https://github.com/darsyn/ip/issues/84