XMB Forum Software
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author: Subject: PHP 7 End of Life Roadmap
miqrogroove
XMB 1.9.12 Lead Developer
*********


Avatar


Posts: 469
Registered: 10-1-2002
Location: Florida
Member Is Offline

Mood: Past Three O'Clock

[*] posted on 2-12-2022 at 06:35 PM
PHP 7 End of Life Roadmap


PHP 7 is slated to discontinue security patches after November 2022.

https://www.php.net/supported-versions.php

To keep up with the changes, XMB 1.9.11 will also discontinue patches after this year.

XMB 1.9.12 will be checked for compatibility with the latest PHP 8.1 and patched as needed. Currently PHP 8.0 is supported and running here.

At this time, there is no realistic plan to update old code hacks to make them compatible with XMB 1.9.12. Even if the resources to do that were available, it would only continue an unsustainable addon project that needs to be modernized or entirely re-invented.

During or after 2022, I think we should start discussing an End of Life plan for XMB 1.
View user's profile Visit user's homepage View All Posts By User
miqrogroove
XMB 1.9.12 Lead Developer
*********


Avatar


Posts: 469
Registered: 10-1-2002
Location: Florida
Member Is Offline

Mood: Past Three O'Clock

[*] posted on 12-14-2024 at 05:40 PM
PHP 7 Roadmap Part 2


The past few years have been interesting. As of April 2024, I was still fixing multiple breaking changes from PHP 8.1.

Now that we're up and running with PHP 8.4, there are some decisions needed about XMB 1.

If we are going to keep this project alive, there will have to be changes. I am no longer testing anything on PHP 7 and recently uninstalled my last copy of PHP 7.4. Here is what we gain by dropping PHP 7.0:
- PHP 7.1 added nullable types. This is a big deal for type hinting optional parameters.
- PHP 7.4 added type declarations for class properties. This is a big deal for strong typing within object oriented code (we have some of that).
- PHP 7.4 added the null coalescing assignment operator.
- PHP 8.0 added property promotion. This can be used (it's a style choice) to create class properties inside the constructor using less code. Very helpful when writing dependency injection patterns.
- PHP 8.0 added named arguments. This makes it easier to work with complex functions.
- PHP 8.1 added Enumerations. This helps to standardize lists of constants.

In addition to those benefits, there's more to consider. Security support of PHP 8.0 ended a year ago, and I no longer have any copies of it that I would use for testing. Active support of PHP 8.1 ended a year ago, and will be on security support for the next year only.

Compare this to the current requirements, https://docs.xmbforum2.com/index.php?title=Requirements#PHP

So I'm proposing to drop PHP 7, and also to raise the PHP requirement to either 8.1 or 8.2. I definitely don't want to accommodate or be shackled to older versions of PHP for the lifetime of our XMB release cycle. This is a significant change, so it would happen in a new XMB number 1.9.13 or equivalent.

Along with those changes, it's time to start implementing some degree of "dependency injection." At the most basic level, XMB needs to end its extensive use of global statements, and start removing some of the variables that had always lived in global scope. The area of XMB most sensitive to global variable changes is the template system. That most likely means finding a better way of passing variables from input to output, and designing at least a barebone template processor function to replace all of the echo statements currently in use with templates. The last thing anyone wants is a long list of broken templates or extensive breaking changes as we've seen with the PHP 8 updates, so this has to work properly.

I'm not presently of the opinion that XMB 1 is ending. It just needs some adjustments to make it easier to maintain in the future. Whether or not that might inspire some new projects is still the big question.
View user's profile Visit user's homepage View All Posts By User

  Go To Top

Powered by XMB 1.9.12 (Debug Mode)
XMB Forum Software © 2001-2024 The XMB Group
[Queries: 16] [PHP: 48.8% - SQL: 51.2%]