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

Fix: avoid deprecated callable pattern in PHP 8.2 #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

justin-at-bounteous
Copy link

No description provided.

@damienwebdev
Copy link
Member

@justin-at-bounteous I like this! Can you add a test that exposes the original behavior? I added CI coverage for PHP 8.2. I would like to verify that this code is also backward-compatible with older PHP versions.

@justin-at-bounteous
Copy link
Author

I tried it with 8.1 as well. I think ::class should work from >=5.5

@damienwebdev
Copy link
Member

@justin-at-bounteous this package supports compatibility with Magento v2.3.7 which uses php 7.4. If you add a test highlighting the break of the old code against php 8.2, that will be enough to at least showcase how the fix would/wouldn't break on php7.4

@justin-at-bounteous
Copy link
Author

@damienwebdev UniqueExecutorTest is passing for me both with and without my change in place.

@damienwebdev
Copy link
Member

It should be sufficient to raise the error_reporting level to trigger a throw when the deprecation warning arises. This should not fail in 8.1, but fail in 8.2.

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.

2 participants