Skip to content

Modernised code base and fixed PHP deprecations#116

Draft
NickSdot wants to merge 67 commits into
php:masterfrom
NickSdot:chore/php85-deprecations
Draft

Modernised code base and fixed PHP deprecations#116
NickSdot wants to merge 67 commits into
php:masterfrom
NickSdot:chore/php85-deprecations

Conversation

@NickSdot

Copy link
Copy Markdown
Contributor

Don't freak out about the size of the PR -- it's mostly mechanical changes. 😅

Yesterday when I was sending the PECL deprecation PRs I had struggle to get the site locally running because of still PHP 7.2 being used. Event though PECL is deprecated it likely will be online in maintenance mode at least a few more years. I thought it would be a bad idea to have it stuck on PHP 7.2 forever, so I thought why not give it a shot...

This PR makes PECL web run on PHP 8.3.

Additionally, while I was working on it I made (mostly) type related, mechanical IDE-proposed changes -- as well as some light cleanups and usage of more modern features (removed dead code, used ?? operator where sensible, used constructor property promotion, etc.). My goal was to get at least a bit of type coverage to increase confidence when making changes, make things more readable/neat where possible, and get IDE inspection reporting per file the best it can get.

All changes I made were conservative, where I wasn't sure if safe I used PHPDoc types instead of native types.

I want to highlight the change of Auth::secure(). The IDE marked the $admin` argument as unused (func_get_arg usage), which I found unfortunate in auth related code. I checked all call sites, and I do not see a reason why the old code was as it was -- hence I refactored it. I'd appreciate an extra careful look at that.


Marked the PR as draft because I am:

  • relatively sure that the changes made are okay, but not yet confident that I caught every single deprecation.
  • not actually sure what's up with the PEAR includes; and whether there is any way to get this working at all.

So this PR is not really more than a starting point, and I wanted to feel out if this even has chances to get merged.
Please let me know if this is something you would be interested in, and if you have some guidance what could be next, I'd appreciate it. Thank you!

NickSdot added 30 commits June 19, 2026 15:40
Note: the class has clearly bugs with undefined variables and stuff, but it is too risky without tests to get this actually done.
Note: the class has clearly bugs with undefined variables and stuff, but it is too risky without tests to get this actually done.
@NickSdot NickSdot marked this pull request as draft June 19, 2026 09:37
@NickSdot

Copy link
Copy Markdown
Contributor Author

Re: #114 (comment)

If you want me to remove the commit message prefixes here I can do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant