laminas / laminas-mvc-plugin-flashmessenger

Plugin for creating and exposing flash messages via laminas-mvc controllers
https://docs.laminas.dev/laminas-mvc-plugin-flashmessenger/
BSD 3-Clause "New" or "Revised" License
10 stars 16 forks source link

Added support for PHP 8.1 #18

Closed Koen1999 closed 2 years ago

Koen1999 commented 2 years ago
Q A
Documentation no
Bugfix no
BC Break no
New Feature yes
RFC no
QA no

Description

This PR adds support for PHP 8.1. No big changes had to be made luckily. I ran a code inspection indicating no compatibility issues. Moreover, all tests are passing. This fixes #17

/bin/php8.1 /home/koen/laminas-mvc-plugin-flashmessenger/vendor/phpunit/phpunit/phpunit --configuration /home/koen/laminas-mvc-plugin-flashmessenger/phpunit.xml.dist /home/koen/laminas-mvc-plugin-flashmessenger/test --teamcity
Testing started at 19:31 ...
PHPUnit 9.5.10 by Sebastian Bergmann and contributors.

Time: 00:00.061, Memory: 8.00 MB

OK (47 tests, 195 assertions)
Process finished with exit code 0
Koen1999 commented 2 years ago

Should I adjust the lock file such that it works with PHP 7.3 or what is your policy on this?

snapshotpl commented 2 years ago

Try to composer require php "^7.3 || ~8.0.0 || ~8.1.0" instead of composer update

froschdesign commented 2 years ago

@Koen1999 Please see the error:

https://github.com/laminas/laminas-mvc-plugin-flashmessenger/runs/4372224075?check_suite_focus=true#step:3:336

Add:


use ReturnTypeWillChange;

…

#[ReturnTypeWillChange]
public function getIterator()