yiisoft / config

Configuration management
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
31 stars 11 forks source link

Config rebuild ignore commit hash #149

Closed tomaszkane closed 11 months ago

tomaszkane commented 11 months ago

What steps will reproduce the problem?

What is the expected result?

What do you get instead?

Additional info

Q A
Version 1.3.0
PHP version 8.0
Operating system KDE Neon
tomaszkane commented 11 months ago

Or I do something wrong :-)

vjik commented 11 months ago

Seems, it's composer bug, because composer.lock contains this:

{
    "name": "yiisoft/form",
    "version": "dev-master",
    "source": {
        "type": "git",
        "url": "https://github.com/yiisoft/form.git",
        "reference": "1739d70f221fa720862f1563e1db801d2a80f014"
    },
    "dist": {
        "type": "zip",
        "url": "https://api.github.com/repos/yiisoft/form/zipball/1739d70f221fa720862f1563e1db801d2a80f014",
        "reference": "1739d70f221fa720862f1563e1db801d2a80f014",
        "shasum": ""
    },
    ...
    "extra": {
        "branch-alias": {
            "dev-master": "1.0.x-dev"
        },
        "config-plugin-options": {
            "source-directory": "config"
        },
        "config-plugin": {
            "params": "params.php",
            "bootstrap": "bootstrap.php",
            "di": "di.php"
        }
    },
    ...
},
vjik commented 11 months ago

It's documented:

Note: This feature has severe technical limitations, as the composer.json metadata will still be read from the branch name you specify before the hash. You should therefore only use this as a temporary solution during development to remediate transient issues, until you can switch to tagged releases. The Composer team does not actively support this feature and will not accept bug reports related to it.

See I have locked a dependency to a specific commit but get unexpected results.