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

Cannot assign null to property DOMElement::$id of type string #168

Closed
JoomBall opened this issue Apr 29, 2024 · 8 comments
Closed

Cannot assign null to property DOMElement::$id of type string #168

JoomBall opened this issue Apr 29, 2024 · 8 comments

Comments

@JoomBall
Copy link

This library always gone very well to minimize HTML, but when updating PHP 8.3 I get this error: Cannot assign null to property DOMElement::$id of type string.

Any suggestion that may be happening? thank you so much

ERROR-HTMLCOMPRESSOR

@ani2life
Copy link

This issue is with the voku/simple_html_dom package that this package uses.
The bug has been known since last December, and a PR has been submitted, but a new version has yet to be released.
voku/HtmlMin#93

@JoomBall
Copy link
Author

Thanks for the response, I see that they haven't released a new version in more than a year.
Let's hope they update soon and continue with the project or we will have to find another alternative.

WyriHaximus added a commit that referenced this issue May 18, 2024
Also includes:
* QA set up bump
* Updated Makefile
* Updated test utilities
* Updated to new mocking package
* Centralized shared workflows

Refs: #168
WyriHaximus added a commit that referenced this issue May 18, 2024
Also includes:
* QA set up bump
* Updated Makefile
* Updated test utilities
* Updated to new mocking package
* Centralized shared workflows

Refs: #168
@WyriHaximus
Copy link
Owner

Just did #174 from my end to support PHP 8.3. But will have to wait for @voku's release before I will tag a new release with PHP 8.2+ support as it doesn't make sense without it. Also subscribed to voku/HtmlMin#93 to keep myself in the loop on this issue.

@Brenneisen
Copy link

@WyriHaximus With the latest tags from https://github.com/voku/simple_html_dom/releases/tag/4.8.9 and https://github.com/voku/HtmlMin/releases/tag/4.5.1 the problem should be solved. The issues are still open but the fix is already merged and released: voku/simple_html_dom#106. Is it possible to have a release here soon? Thank you!

@WyriHaximus
Copy link
Owner

@Brenneisen Will get a release out this weekend, not sure why Renovate isn't picking up the new releases weirdly enough

@JoomBall
Copy link
Author

JoomBall commented Jun 8, 2024

For me personally it has been working perfectly for more than a week, without giving any errors with PHP 8.3. after the last https://github.com/voku/simple_html_dom/releases/tag/4.8.9 update and last https://github.com/WyriHaximus/HtmlCompress/releases/tag/4.2.1.

@WyriHaximus
Copy link
Owner

@JoomBall Indeed a composer update should update those packages, but I'll bump them in the composer.json of this package as well to offer an 8.3 compatible version

@WyriHaximus
Copy link
Owner

Just tagged v4.3.0, will do some other updates and fixes the coming days but this should fix the most pressing issue.

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

4 participants