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.