Problem/Motivation

there are a number of deprecated code issues relative to php version 8.4

Steps to reproduce

I ran php -l on this module with php 8.4 and got these deprecation issues:

Deprecated: Non-canonical cast (integer) is deprecated, use the (int) cast instead in ./contrib/pantheon_advanced_page_cache/tests/behat/helper_classes/AgeTracker.php on line 80

Deprecated: Non-canonical cast (integer) is deprecated, use the (int) cast instead in ./contrib/pantheon_advanced_page_cache/tests/behat/helper_classes/AgeTracker.php on line 80

Deprecated: Non-canonical cast (integer) is deprecated, use the (int) cast instead in ./contrib/pantheon_advanced_page_cache/tests/behat/helper_classes/AgeTracker.php on line 94

Deprecated: Non-canonical cast (integer) is deprecated, use the (int) cast instead in ./contrib/pantheon_advanced_page_cache/tests/behat/helper_classes/AgeTracker.php on line 94

Proposed resolution

each error indicates how to fix it

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

will_frank created an issue. See original summary.

yusuf_khan’s picture

Assigned: Unassigned » yusuf_khan

working on it

yusuf_khan’s picture

https://git.drupalcode.org/issue/pantheon_advanced_page_cache-3564796/-/... - @maintainer please review my commit im not sure from which branch to create a MR

yusuf_khan changed the visibility of the branch 3564796-php8.4-support to hidden.

yusuf_khan changed the visibility of the branch 3564796php8.4-support to hidden.

yusuf_khan’s picture

Status: Active » Needs review

@will_frank
please review my commit im not sure from which branch to create a MR

will_frank’s picture

@yusuf_khan when I tried to apply the diff patch from merge request !16 it didn't work.
Perhaps this is due to the branch used to create the MR as you mentioned.

will_frank’s picture

@yusuf_khan when I tried to manually apply the changes in the diff from request !16 then
the deprecation errors no longer appeared when I ran php -l on this module with php 8.4.
So if the problem with the diff can be addressed these changes should work.

yusuf_khan’s picture

Thanks for testing, @will_frank.

When I try to create a MR and compare it with the 32x branch, I see other unrelated commits included as well, so I’m not sure which branch to base the MR on to keep it clean.

Do you have a suggestion for which branch I should use as the base so the diff applies correctly or better maintainer can help us on this?

will_frank’s picture

@yusuf_khan I created a patch of the same changes for my code base which does apply correctly.
I've attached that patch file (pantheon_advanced_page_cache_mine.patch) as well as the patch from
your mr (pantheon_advanced_page_cache_yours.patch) and finally a side-by-side visual diff of the two
patches. I hope this helps. I've already said that the version of this module I'm using is Pantheon Advanced Page Cache 2.3.4
but I don't have any insight on which branch to use.

afinnarn’s picture

See https://github.com/pantheon-systems/pantheon_advanced_page_cache/pull/81

I'm not sure this issue queue is active anymore? "SITE-5197" linked to Jira, which I cannot authenticate to...but if PHP 8.5 deprecations are being worked on, wouldn't that include PHP 8.4?

afinnarn’s picture

I just posted https://www.drupal.org/project/pantheon_advanced_page_cache/issues/3606171 as I think this issue queue has outdated information, or not accurate when considering updates on GitHub. Not sure if I am right, but I am no longer going to look through these issues vs looking on GitHub.

metasim’s picture

Status: Needs review » Fixed

Thank you so much for your contributions.

Just cut a release 2.4.0 that fixes this issue.

Apologies for the slow responses in the issue queue, we are working on new processes to ensure that we stay on top of issues on drupal.org and github.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.