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

Not working in PHP8.3.8 #19

Closed
maxakropolis opened this issue Jun 5, 2024 · 9 comments
Closed

Not working in PHP8.3.8 #19

maxakropolis opened this issue Jun 5, 2024 · 9 comments

Comments

@maxakropolis
Copy link

Tests fail with the following when using PHP8.3.8

BadMethodCallException: Call to undefined method Sinnbeck\DomAssertions\Asserts\AssertForm::getParser()

Adding

    protected function getParser(): DomParser
    {
        return $this->parser;
    }

to BaseAssert made it work, although what this indicates I don't know - perhaps that the magic __call method is being called rather than the methods in the traits?

@sinnbeck
Copy link
Owner

sinnbeck commented Jun 5, 2024

Hm interesting. I will try getting that set up so I can recreate the issue myself.

Edit: I upgraded to latest php version which seems to be 8.3.7? https://www.php.net/downloads.php#v8.3.7

@maxakropolis
Copy link
Author

Yeah - I assume the git action we use (shivammathur/setup-php@v2) is accidentally pulling in 8.3.8 RC1 (I've tested it locally with 8.3.8 RC1) to prove this.

So this is possibly an issue that will resolve itself but it might be something that needs addressing 🤷

@sinnbeck
Copy link
Owner

sinnbeck commented Jun 5, 2024

Sounds like it. But yeah it's weird that it uses RC instead of stable :) I will conciser installing the RC using docker to try and replicate it.

@sinnbeck
Copy link
Owner

sinnbeck commented Jun 6, 2024

I think this might be related: php/php-src#14480

@maxakropolis
Copy link
Author

Thanks @sinnbeck - I hoped it was a bug rather than intended behaviour. Hopefully that means we can all just sit on our hands and the problem will correct itself. We've forked a patched version for now to keep our CI working.

@sinnbeck
Copy link
Owner

sinnbeck commented Jun 7, 2024

So it seems they released it with the bug :/ I will start writing a fix for the package. Setting the method to public should fix it.

@sinnbeck
Copy link
Owner

sinnbeck commented Jun 7, 2024

Patch is live. https://github.com/sinnbeck/laravel-dom-assertions/releases/tag/v1.5.1

If this works for you I will close this issue :)

@maxakropolis
Copy link
Author

Yep - looking good here. Thank you very much 🎉

@sinnbeck
Copy link
Owner

sinnbeck commented Jun 7, 2024

Excellent to hear! Sorry I couldnt get a fix out sooner but I assumed that the bug would be fixed before release :) I will look into whether I should roll back the change in 8.3.9, but most like I wont

@sinnbeck sinnbeck closed this as completed Jun 7, 2024
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

No branches or pull requests

2 participants