PHP 8.1 - Issues with type sensitivity
Hello @skipperbent,
this PR fixes the issue with php 8.1 reported by @AlexanderSchaller in #605.
string 'strtolower(): Passing null to parameter #1 ($string) of type string is deprecated'
The issue is caused due to the fact that PHP 8 is more type sensitive than other php versions and added type sensitivity to a lot of php functions. All these functions are now deprecated and throw errors.
When somebody finds a php 8.1 related issue, please report it here until this PR is merged into master. When you provide the code snippet and detailed error message, I can have a look at it.
~ Marius
Edit: To ensure that the router works with PHP 8.1, here are some don't dos:
- Don't use the
ArrayAccessfunctionality with theInputItem. That means that you should not iterate through theInputItemobject ($input) directly and better iterate through$input->getValue(). This issue was reported by @jorge-koki in #612.
Hey,
after I added tests for PHP 8.1, I had to update PHPUnit to version 8 to support checks for PHP >= 7.2. Info: PHPUnit 7 is not supported anymore. We sould go to version 8. To do this we have to drop support for PHP 7.1
With this PR I just wanted to fix the issue explained above. I will remove the tests for PHP 8.1 and will move the tests to the PR #515.
~ Marius