Skip to content

Add Psalm, Drop PHP 7.3 and Update Coding Standard to 2.3#21

Merged
Ocramius merged 8 commits intolaminas:1.7.xfrom
gsteel:psalm-and-cs
Jan 10, 2022
Merged

Add Psalm, Drop PHP 7.3 and Update Coding Standard to 2.3#21
Ocramius merged 8 commits intolaminas:1.7.xfrom
gsteel:psalm-and-cs

Conversation

@gsteel
Copy link
Copy Markdown
Member

@gsteel gsteel commented Jan 9, 2022

Description

Fixes #8 - Add Psalm integration
Drops support for 7.3
Update Laminas Coding Standard to 2.3

gsteel added 2 commits January 9, 2022 22:34
Signed-off-by: George Steel <george@net-glue.co.uk>
Signed-off-by: George Steel <george@net-glue.co.uk>
Comment thread psalm-baseline.xml
Comment thread src/View/Helper/FlashMessenger.php Outdated
Comment thread src/View/Helper/FlashMessenger.php Outdated
Comment thread src/View/Helper/FlashMessenger.php Outdated
Comment thread test/FlashMessengerTest.php Outdated
@Ocramius Ocramius added this to the 1.7.0 milestone Jan 9, 2022
Signed-off-by: George Steel <george@net-glue.co.uk>
Signed-off-by: George Steel <george@net-glue.co.uk>
Signed-off-by: George Steel <george@net-glue.co.uk>
Signed-off-by: George Steel <george@net-glue.co.uk>
Comment thread src/FlashMessenger.php Outdated
* Messages from previous request
* @var array
*
* @var array<string, SplQueue>
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

How do I get SplQueue<array-key, string> without Psalm complaining about too many types? Tried @psalm-type MessageList = SplQueue<array-key, string> but psalm didn't like that either - I think it's because SplQueue is from stdlib as opposed to native??

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It should be possible if you reference \SplQueue, instead of the one provided by laminas/laminas-stdlib here 🤔

Alternatively:

\Laminas\Stdlib\SplQueue&\SplQueue<TKey, TValue>

@gsteel gsteel requested a review from Ocramius January 10, 2022 08:30
Signed-off-by: George Steel <george@net-glue.co.uk>
Signed-off-by: George Steel <george@net-glue.co.uk>
Copy link
Copy Markdown
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

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

Excellent, thanks @gsteel!

@Ocramius Ocramius self-assigned this Jan 10, 2022
@Ocramius Ocramius merged commit 420a99d into laminas:1.7.x Jan 10, 2022
@gsteel gsteel deleted the psalm-and-cs branch January 10, 2022 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Psalm integration

2 participants