Skip to content
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.4 support (after 21 November) #331

Closed
1 of 2 tasks
GuySartorelli opened this issue Nov 15, 2024 · 10 comments
Closed
1 of 2 tasks

PHP 8.4 support (after 21 November) #331

GuySartorelli opened this issue Nov 15, 2024 · 10 comments

Comments

@GuySartorelli
Copy link
Member

GuySartorelli commented Nov 15, 2024

PHP 8.4 releases on 21 November.

The major release policy states

At launch, a Silverstripe CMS major release supports all PHP versions in full support.

And
> Following the initial launch of a Silverstripe CMS major release, the development team aims to add forward compatibility for the next PHP release. e.g: Silverstripe CMS 5 at launch will support PHP 8.1 and PHP 8.2. CMS 5 should receive official support for an eventual PHP 8.3 in early 2024.

Acceptance criteria

  • All CMS 6 supported modules are compatible with PHP 8.4 with no deprecation warnings
  • All CMS 5.4 supported modules are compatible with PHP 8.4 with no deprecation warnings

New issues created

CI PRs

After merging CI PRs, re-trigger with force push PRs below to get PHP 8.4 jobs in matrix

Kitchen sink CI

PRs

@GuySartorelli
Copy link
Member Author

GuySartorelli commented Nov 18, 2024

@emteknetnz We don't add PHP 8.4 support to CMS 5. The quote you added is about adding PHP 8.3 support to CMS 5.
Specifically:

the development team aims to add forward compatibility for the next PHP release

Similarly we'll add 8.5 to CMS 6 when it releases, and not 8.6 to CMS 6.

Similarly for CMS 4 we added PHP 8.1 support but not 8.2 or 8.3

@emteknetnz
Copy link
Member

Have updated description to remove from CMS 5

@emteknetnz emteknetnz self-assigned this Nov 27, 2024
This was referenced Nov 28, 2024
@GuySartorelli
Copy link
Member Author

Note that docs also need to be updated - both with a changelog entry and make sure any references to supported PHP versions includes PHP 8.4

@emteknetnz emteknetnz removed their assignment Dec 3, 2024
@GuySartorelli
Copy link
Member Author

GuySartorelli commented Dec 3, 2024

Code changes merged.
Still need docs PR
Please remember to reassign to me when you unassign yourself

@emteknetnz
Copy link
Member

Done

@GuySartorelli
Copy link
Member Author

GuySartorelli commented Dec 3, 2024

Looking at the framework CI runs, there's still some PHP 8.4 deprecations warnings from our dependencies. Previously we've considered these to be part of PHP compatibility IIRC.

There's likely other deps with similar problems, these were just what I spied from looking at the below CI runs:

https://github.com/silverstripe/silverstripe-framework/actions/runs/12131524771/job/33823951169

PHP Deprecated: SensioLabs\AnsiConverter\AnsiToHtmlConverter::__construct(): Implicitly marking parameter $theme as nullable is deprecated, the explicit nullable type must be used instead in /home/runner/work/silverstripe-framework/silverstripe-framework/vendor/sensiolabs/ansi-to-html/SensioLabs/AnsiConverter/AnsiToHtmlConverter.php on line 27

https://github.com/silverstripe/silverstripe-framework/actions/runs/12131524771/job/33823950784

Deprecated: Embed\QueryResult::url(): Implicitly marking parameter $attribute as nullable is deprecated, the explicit nullable type must be used instead in /home/runner/work/silverstripe-framework/silverstripe-framework/vendor/embed/embed/src/QueryResult.php on line 82

and various others from the Embed\ namespace

PHP Deprecated: ML\JsonLD\Processor::listToRdf(): Implicitly marking parameter $graph as nullable is deprecated, the explicit nullable type must be used instead in /home/runner/work/silverstripe-framework/silverstripe-framework/vendor/ml/json-ld/Processor.php on line 2235

and various others from the ML\JsonLD\ namespace

@emteknetnz
Copy link
Member

emteknetnz commented Dec 3, 2024

They're third party deprecation notices for new deprecation notices as of PHP 8.4. There's not a whole lot we can do about those and it's not really our responsibility to fix them. They'll only show if developers turns on deprecation logging with PHP config and they will not affect a production site. They should get fixed over time as people release PHP 8.4 support for those depedencies.

The sensio labs one does have a fix committed, just not tagged

Seems like this issue can now be closed.

@GuySartorelli
Copy link
Member Author

GuySartorelli commented Dec 3, 2024

We can't say Silverstripe CMS 6 is PHP 8.4 compatible while there are lots of PHP deprecation warnings being thrown from our dependencies that projects can't opt out of.

In the past we have submitting pull requests providing PHP compatibility where it's missing in our dependencies. We have also previously forked dependencies that refused to update (see https://github.com/silverstripe/closure/ as an example).

Based on what we've done in the past, and in order to be able to say it's PHP 8.4 compatible, I think we should do the following:

  • Submit PRs to repos to provide PHP 8.4 support where no PR has yet been submitted
  • Open a new card to review the deprecation warnings before we release 6.0.0-rc1 in case we need to do some forking or replace a dependency, or at the very least so that we can provide appropriate comms to indicate that while our codebase has been updated, some upstream dependencies are known to not have done so yet.

@emteknetnz
Copy link
Member

Done #351

I think we can now close this issue

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

No branches or pull requests

2 participants