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 for LogInterface::log() $message argument #1445

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

greg0ire
Copy link
Member

PHPStan complains that it is not specified. Looking at the method signature of Psr\Log\LoggerTrait, it appears that $level uses a phpdoc, and both $message and $context use native type declarations, so the corresponding phpdoc was removed in 3.0.1

PHPStan complains that it is not specified. Looking at the method
signature of Psr\Log\LoggerTrait, it appears that $level uses a phpdoc,
and both $message and $context use native type declarations, so the
corresponding phpdoc was removed in 3.0.1
@derrabus
Copy link
Member

Maybe the doc blocks shouldn't have been removed in the first place. 🤔

cc @lyrixx

@greg0ire
Copy link
Member Author

Maybe, but now that this ship has sailed, I wouldn't revert it I think.

@goetas
Copy link
Member

goetas commented Aug 24, 2024

Shouldn't require 3.0.1 as minimum version fix the issue?

@greg0ire
Copy link
Member Author

greg0ire commented Aug 24, 2024

I don't think it would, because the issue appears with 3.0.1 IMO

Copy link
Member

@SenseException SenseException left a comment

Choose a reason for hiding this comment

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

{@inheritDoc} should actually do the trick for phpstan. I don't know why the phpdocs need to be added to make it work. 🤔

@greg0ire
Copy link
Member Author

@SenseException since 3.0.1, there is nothing to inherit, the phpdoc was dropped in the PR I linked in my original message.

@greg0ire greg0ire merged commit e6f64e3 into doctrine:3.8.x Aug 26, 2024
12 checks passed
@greg0ire greg0ire deleted the fix-sa branch August 26, 2024 06:12
Copy link
Contributor

@lyrixx lyrixx left a comment

Choose a reason for hiding this comment

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

👍🏼 It's better now

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.

5 participants