Various fixes for PHP 8 compatibility#1483
Conversation
|
So now you just omit |
What if |
The entire search profile is serialized upon save, so there should be no need for escaping at this point. The individual values are still escaped in |
I'm not sure what the concern is. |
|
May be |
Not sure I understand. Right on the next line below I guess this is unsafe. How could that be missed? |
No, it's not, because The call to If you feel it's safer I can also change the regexp to deal with quoted identifiers. |
|
|
No cookies are involved as far as I know. Search filters are taken from the request ( |
|
So |
Correct, with validation against |
|
Sorry I can not find it. Please point me the line where |
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
OK, I can see now. Yet this is so inconsistent and might hit once day later. I stop my ranting. Let's wait for @glensc. |
|
Is this ready for merge? please rebase against |
|
please also modify composer.json to allow php versions you tested. don't don't forget to update composer.lock |
Some pages, e.g. login.php, do not set the "messages" template parameter. Suppressing the resulting exception with @ no longer seems to work with PHP 8.
The "any" option in search fields is identified by an empty string. Calling escapeInteger() will convert those to 0. So far this did not cause problems because 0 and "" compare equal; this is no longer the case with PHP 8.
The quick filter form defines hidden input fields for the previous
values of date search options, but not for the end date ("between"
filter type). This causes an exception when saving the search profile.
Add the missing fields for end dates. To reduce code duplication, use a
Smarty section to loop through the various date fields.
Quoting the identifier breaks the regular expression in Pager::getTotalRows(), causing 0 issues to be displayed when sorting by last action date. The 'sort_by' parameter is validated in saveSearchParams(), so there should be no need for quoting.
I'm testing with PHP 8.1.14 (Fedora 37) and PHP 8.2.1 (CentOS 7.9). |
|
they say that php engine versions aren't following semver, so ~8.0, ~8.1, ~8.2 would be more accurate to say, so it wouldn't include 8.3 |
OK, makes sense. Done. |
|
Your lock update is wrong, you ran Doesn't make sense to put changelog and composer.json change to same commit, totally different changes. not atomic commit. now if I want to revert the composer.json commit I will also revert changelog change as it's same commit. that's about atomic commits principle. and "update composer.json" is a clickbait commit title. have to git show to see what the change is about :) "Allow PHP 8.0-8.2 PHP versions in composer" would be a more appropriate title. |
|
Oh, I didn't realize "^8.0" is already there from 2019: |
I thought that why you asked to make it more specific. 😁 Want me to drop the commit? |
yes, we wanted and you agreed. so do it. but properly this time :) |
See individual commits for details.