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

Fixed deprecation warnings #5269

Merged
merged 1 commit into from
May 17, 2022
Merged

Fixed deprecation warnings #5269

merged 1 commit into from
May 17, 2022

Conversation

pkruithof
Copy link
Contributor

The PSR-3 LoggerInterface specifies the return types of loggers, while the PsrLogger in this library does not. This results in deprecations (in this case when using Symfony's debug classloader):

2022-05-12T14:10:25+00:00 [info] User Deprecated: Method "Psr\Log\LoggerInterface::emergency()" might add "void" as a native return type declaration in the future. Do the same in implementation "Google\Cloud\Logging\PsrLogger" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-05-12T14:10:25+00:00 [info] User Deprecated: Method "Psr\Log\LoggerInterface::alert()" might add "void" as a native return type declaration in the future. Do the same in implementation "Google\Cloud\Logging\PsrLogger" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-05-12T14:10:25+00:00 [info] User Deprecated: Method "Psr\Log\LoggerInterface::critical()" might add "void" as a native return type declaration in the future. Do the same in implementation "Google\Cloud\Logging\PsrLogger" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-05-12T14:10:25+00:00 [info] User Deprecated: Method "Psr\Log\LoggerInterface::error()" might add "void" as a native return type declaration in the future. Do the same in implementation "Google\Cloud\Logging\PsrLogger" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-05-12T14:10:25+00:00 [info] User Deprecated: Method "Psr\Log\LoggerInterface::warning()" might add "void" as a native return type declaration in the future. Do the same in implementation "Google\Cloud\Logging\PsrLogger" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-05-12T14:10:25+00:00 [info] User Deprecated: Method "Psr\Log\LoggerInterface::notice()" might add "void" as a native return type declaration in the future. Do the same in implementation "Google\Cloud\Logging\PsrLogger" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-05-12T14:10:25+00:00 [info] User Deprecated: Method "Psr\Log\LoggerInterface::info()" might add "void" as a native return type declaration in the future. Do the same in implementation "Google\Cloud\Logging\PsrLogger" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-05-12T14:10:25+00:00 [info] User Deprecated: Method "Psr\Log\LoggerInterface::debug()" might add "void" as a native return type declaration in the future. Do the same in implementation "Google\Cloud\Logging\PsrLogger" now to avoid errors or add an explicit @return annotation to suppress this message.
2022-05-12T14:10:25+00:00 [info] User Deprecated: Method "Psr\Log\LoggerInterface::log()" might add "void" as a native return type declaration in the future. Do the same in implementation "Google\Cloud\Logging\PsrLogger" now to avoid errors or add an explicit @return annotation to suppress this message.

Since I read in #5006 that return types are not yet possible here, I've added the return types to the phpdoc.

@pkruithof pkruithof requested review from a team as code owners May 12, 2022 14:33
@google-cla
Copy link

google-cla bot commented May 12, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

@bshaffer bshaffer merged commit ab426cc into googleapis:main May 17, 2022
@pkruithof pkruithof deleted the fix-logger-deprecations branch May 18, 2022 06:44
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