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

Adding 'id' to DOMNodes with type string. #106

Merged
merged 2 commits into from
May 25, 2024
Merged

Conversation

devteam-emroc
Copy link

@devteam-emroc devteam-emroc commented Dec 7, 2023

Fixing the PHP8.3 type error "Cannot assign null to property DOMElement::$id of type string"


This change is Reviewable

Copy link

sonarqubecloud bot commented Dec 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@devteam-emroc
Copy link
Author

@voku would be great if we have a PHP8.3 compatibile version.

@acharron-hl
Copy link

acharron-hl commented Jan 16, 2024

@voku Any chance we could get a review on this and a release after?

In the meantime for anyone running into this issue, the following in your composer.json ought to be a workaround:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/devteam-emroc/simple_html_dom"
        }
    ],
    "require_dev": {
        "voku/simple_html_dom": "dev-php-83 as 4.8.8",
    }
}

@ConnectGrid
Copy link

ConnectGrid commented Jan 21, 2024

This fix involves adding a static class property:

protected static $stringDomNodes = [
    'id',
    'prefix',
    'content'
];

Would it make more sense to use an array constant?

protected const STRING_DOM_NODES = [ ... ];

Just a thought.

@repat
Copy link

repat commented Jan 30, 2024

@voku Could you please merge this?

@Brenneisen
Copy link

@voku The error is unfortunately blocking the update to PHP 8.3. Would it be possible for you to merge this shortly? Thank you!

Copy link

@acharron-hl acharron-hl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @devteam-emroc)

@voku voku merged commit b473c38 into voku:master May 25, 2024
5 checks passed
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.

6 participants