New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 8 compatibility #149
PHP 8 compatibility #149
Conversation
This deprecated function has been removed in PHP 8.
PHP 8 deprecates the ability to have function whatever($arg1, $arg2='something', $arg3) This commit reorders arguments of functions set_cached_item() and draw_jpeg_photo() to meet this new requirement.
As PHP 8 introduces a built-in Attribute class, a name clash occurs without this commit. Class names are used by the Visitor class to dynamically build method names. To avoid having to also rename the target methods, a class name mapping is introduced for this purpose. This map may be augmented whenever another similar case occurs.
In an '@ error suppression context, PHP 8 error_reporting() no longer returns 0 but an error mask of errors that cannot be supressed and passes the effective error number to the error handler (instead of 0). Adapt the test in a compatible way.
Hello, I just install PLA 1.2.6.3 and i had the same issue, i've check on my server your pull request and it's work for me. Timiti29 |
You're welcome :-) |
Thanks, works with 1.2.6.3 and php 8.0. |
This does not work with php 8.1 [php 8.1.6] |
PHP 8.1 replaces some kind of resources by built-in class instances. As is_resource() is always used to test for failures, replace calls by simple Boolean checks.
PHP 8.1 deprecates strftime().
PHP 8.1 deprecates float to int truncation.
…ected. PHP 8.1 deprecates this feature.
The last 4 pushed commits to this PR should improve PHP 8.1 compatibility. |
@monnerat I just checked your updated branch against PHP 8.1.6 and it's working great for me doing basic tasks. I didn't test all the features but it works in general. :-) |
Hello @monnerat I just tried your branch, and although it works with php8, it is based on the leenooks:master branch, which does not have recent fixes. I hit these 2 bugs with your branch : I'm not sure what the branching strategy is on the origin repo, but you might want to rebase your work on the 1.2 branch. |
Sure! But as the default branch for this repo is master, I based the PR on it ! I'm aware of this situation but I try to provide fixes according to the repo state. The real problem is the lack of upstream reaction. There are also some other unfixed problems I reported several years ago... In the absence of activity here, I'm sorry but I give up trying to maintain a fixed up-to-date fork ! |
So sad 😢 It really worked to me. |
You can still get the patch from this PR and apply it to the 1.2 branch: there is a single conflict, very easy to resolve. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any repo owner reviewing this ?
I don't think so: last repo owner "action" on it was on Jan 6, 2022 (#147). |
Seems I spoke too fast :-) Thanks for pulling Deon. |
:) So my focus on 1.2.x is rare (too many things going on), and I'm also trying to get a 2.x base out there, so more folks can start to contribute to bringing it up to speed (if they want) - thereby retiring 1.2.x. But it might be some time ... :( |
Do you have it published somewhere ? I can't find such a branch and master is older than 1.2. |
Hi Deon,
These are 4 commits targeting PHP 8 compatibility.
See the commit logs for more info.
Regards,
Patrick