djoos / Symfony-coding-standard

Development repository for the Symfony coding standard
MIT License
401 stars 102 forks source link

Cannot install squizlabs/php_codesniffer 3.x-dev after added conflict rule #136

Closed maryo closed 5 years ago

maryo commented 6 years ago

Hi. I'd like to install a dev version of codesniffer because of some new customisable sniff properties planned for 3.3.0.

    "require-dev": {
        "escapestudios/symfony2-coding-standard": "^3.2",
        "squizlabs/php_codesniffer": "3.x-dev"
    },

I also tried "squizlabs/php_codesniffer": "3.x-dev as 3.3.0" and "squizlabs/php_codesniffer": "dev-master as 3.3.0"

But the only version of this package I am able to install is "3.1.0" which is the last one without the conflict rule "squizlabs/php_codesniffer": "<3 || >=4" added by @stof. I am not sure whether it is intentional, a bug of this package or a bug in composer itself because 3.x-dev doesn't seem to me to be <3 or >= 4.

Problem 1
    - Conclusion: don't install escapestudios/symfony2-coding-standard 3.2.0
    - don't install squizlabs/php_codesniffer 3.x-dev|install squizlabs/php_codesniffer dev-master
    - remove squizlabs/php_codesniffer 3.x-dev|keep squizlabs/php_codesniffer dev-master
    - escapestudios/symfony2-coding-standard 3.x-dev conflicts with squizlabs/php_codesniffer[dev-master].
    - escapestudios/symfony2-coding-standard 3.x-dev conflicts with squizlabs/php_codesniffer[dev-master].
    - Installation request for escapestudios/symfony2-coding-standard ^3.2 -> satisfiable by escapestudios/symfony2-coding-standard[3.2.0, 3.x-dev].
    - Installation request for squizlabs/php_codesniffer 3.x-dev as 3.3.0 -> satisfiable by squizlabs/php_codesniffer[3.x-dev].
djoos commented 6 years ago

Hi @maryo,

thanks for reaching out - sorry for the delayed reply...

Not sure what is going on as the version you're trying to install is neither <3 nor >=4... So, if you were to make use of a Symfony-coding-standard version before the conflict got added (eg. 3.1.0) you are able to make use of _"squizlabs/phpcodesniffer": "3.x-dev"?

There seems to be some weirdness to "conflict", quickly reading through that issue thread, it seems we might need to update the conflict rule in the Symfony-coding-standard to "<3 || >=4 <999" to get this "fixed".

Thanks in advance for your feedback! David

maryo commented 6 years ago

@djoos Thanks for reply and explanation.

So, if you were to make use of a Symfony-coding-standard version before the conflict got added (eg. 3.1.0) you are able to make use of "squizlabs/php_codesniffer": "3.x-dev"?

Yes. I am. (But looks like squizlabs/php_codesniffer 3.3.0 is already released so I should be able to switch to the newest version of this repo again)

djoos commented 5 years ago

Closing this issue - please do give a shout if you require further information @maryo!