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

Last PHP 8.1 chores #2560

Merged
merged 2 commits into from
Oct 27, 2023
Merged

Last PHP 8.1 chores #2560

merged 2 commits into from
Oct 27, 2023

Conversation

malarzm
Copy link
Member

@malarzm malarzm commented Oct 26, 2023

I think these are the last leftovers saying we need to do something once we're rocking PHP 8.1 :)

@malarzm malarzm added the Task label Oct 26, 2023
@malarzm malarzm added this to the 2.6.0 milestone Oct 26, 2023
@@ -14,16 +14,12 @@
*/
class CollWithPHP81Types extends ArrayCollection
{
/**
* @param Collection<TKey, TElement>&ArrayCollection<TKey, TElement> $param
Copy link
Member Author

@malarzm malarzm Oct 26, 2023

Choose a reason for hiding this comment

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

PHPCS somehow was producing [..]TElement> &ArrayCol[..] (note the space) and I have no willpower to dig into why. Everyone's happy with no PHPDoc ;)

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe prefixing with @psalm- like @psalm-param and @psalm-return would make PHPCS do not fail, anyway I don't know why static analysis is not complaining 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it could be because they got better over time and now they can infer same thing from class' @template-extends and return types? :)

@@ -14,16 +14,12 @@
*/
class CollWithPHP81Types extends ArrayCollection
{
/**
* @param Collection<TKey, TElement>&ArrayCollection<TKey, TElement> $param
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe prefixing with @psalm- like @psalm-param and @psalm-return would make PHPCS do not fail, anyway I don't know why static analysis is not complaining 🤔

@malarzm malarzm merged commit 14af2cb into doctrine:2.6.x Oct 27, 2023
12 checks passed
@malarzm malarzm deleted the last-php-chores branch October 27, 2023 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants