Skip to content

Added support for PHP 8.1#18

Merged
Ocramius merged 2 commits intolaminas:1.4.xfrom
Koen1999:php81
Nov 30, 2021
Merged

Added support for PHP 8.1#18
Ocramius merged 2 commits intolaminas:1.4.xfrom
Koen1999:php81

Conversation

@Koen1999
Copy link
Copy Markdown
Contributor

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
Copy link
Copy Markdown
Contributor Author

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

@snapshotpl
Copy link
Copy Markdown
Member

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

@snapshotpl snapshotpl added this to the 1.4.0 milestone Nov 30, 2021
Signed-off-by: Koen1999 <koen.teuwen@gmail.com>
@froschdesign
Copy link
Copy Markdown
Member

@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()

Signed-off-by: Koen1999 <koen.teuwen@gmail.com>
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.

Thanks @Koen1999!

@Ocramius Ocramius merged commit fe2e514 into laminas:1.4.x Nov 30, 2021
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.

PHP 8.1 support

4 participants