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 GH-8038: DOM extension reflection version is incorrect #17702

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Feb 4, 2025

It doesn't appear to be reasonable to pretend that nothing in the DOM API would have changed in the last 21 years, and it's also not that reasonable to pretend that we would thoroughly bump that version in the future. Thus we go with the common convention to use the PHP_VERSION for bundled extensions.


It might also make sense to rename to PHP_DOM_VERSION or something.

It doesn't appear to be reasonable to pretend that nothing in the DOM
API would have changed in the last 21 years, and it's also not that
reasonable to pretend that we would thoroughly bump that version in the
future.  Thus we go with the common convention to use the `PHP_VERSION`
for bundled extensions.
@cmb69 cmb69 linked an issue Feb 4, 2025 that may be closed by this pull request
@cmb69 cmb69 marked this pull request as ready for review February 4, 2025 21:54
@cmb69 cmb69 requested a review from nielsdos as a code owner February 4, 2025 21:54
@nielsdos
Copy link
Member

nielsdos commented Feb 4, 2025

I considered this at one point, but I don't know how this will interact with composer.json requirements. If you look for 20031129 in GitHub you can see hits of the form ext-dom: "20031129". If we change the version to 8.5, how will that affect them? 8.5<20031129 so I suppose this will give problems?

@cmb69
Copy link
Member Author

cmb69 commented Feb 4, 2025

If you look for 20031129 in GitHub you can see hits of the form ext-dom: "20031129".

Oh, I have not thought about this. However, if you can't untangle the knot, use brute force.

@TimWolla
Copy link
Member

TimWolla commented Feb 5, 2025

If you look for 20031129 in GitHub you can see hits of the form ext-dom: "20031129"

This specific variant pins to an exact version. To require “any higher version” you would need >=20031129 or similar. See:

{
    "type": "project",
    "require": {
        "php": "8.1.*||8.2.*||8.3.*||8.4.*",
        "ext-dom": "20031128"
    },
    "config": {
        "platform": {
            "php": "8.1.99"
        }
    }
}

(note the 28 instead of 29 at the end):

No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires PHP extension ext-dom 20031128 (exact version match: 20031128, 20031128.0, 20031128.0.0 or 20031128.0.0.0) but it has the wrong version installed (20031129).

@cmb69
Copy link
Member Author

cmb69 commented Feb 5, 2025

The question is also whether these have been results of composer.json or composer.lock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOM extension reflection version is incorrect
3 participants