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

Installing the development version as a Composer dependency #1306

Open
aadmathijssen opened this issue Dec 2, 2021 · 2 comments
Open

Installing the development version as a Composer dependency #1306

aadmathijssen opened this issue Dec 2, 2021 · 2 comments

Comments

@aadmathijssen
Copy link

Hi,

I noticed that the latest official release/tag of this package is now almost two years old. Looking at the commits on the develop branch, I saw that a incredible amount of work has been done to improve checks for PHP 8.0 and older versions.

So I tried to install the latest dev-develop package as a dependency using the following command:

composer require "phpcompatibility/php-compatibility:dev-develop" --with-all-dependencies

However, this gave the following error after running :

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires phpcompatibility/php-compatibility dev-develop -> satisfiable by phpcompatibility/php-compatibility[dev-develop].
    - phpcompatibility/php-compatibility dev-develop requires phpcsstandards/phpcsutils ^1.0 -> found phpcsstandards/phpcsutils[dev-develop, 1.0.0-alpha1, 1.0.0-alpha2, 1.0.0-alpha3, 1.x-dev (alias of dev-develop)] but it does not match your minimum-stability.

This can be resolved by explicitly requiring the phpcsstandards/phpcsutils package with an alpha stability flag:

composer require "phpcompatibility/php-compatibility:dev-develop" "phpcsstandards/phpcsutils:@alpha" --with-all-dependencies

The main reason I created this issue was to inform other developers how they can use the development version as a Composer dependency in their project or as a global Composer dependency, so they can benefit from the improvements of this package when analysing their code incompatibilities.

I don't think anything should be changed in this repository (although creating a new stable release would be really nice :-) ), so feel free to close this issue.

@jrfnl
Copy link
Member

jrfnl commented Dec 3, 2021

@aadmathijssen Thanks for leaving this information here. I believe it may well help others who want to use the develop branch while waiting for the 10.0.0 release.

I'm going to leave the issue open for now to improve the chances of other people finding it.

And yes, would be lovely to be able to get back to finishing off the release. If only PHP would slow down for a moment so I could actually get some work done.

JonathanGawrych added a commit to JonathanGawrych/app-template that referenced this issue Aug 8, 2022
We have to move to develop rather than stable because there hasn't been
a release in 2 years, so php8 isn't supported. See this issue:
PHPCompatibility/PHPCompatibility#1306
@aadmathijssen
Copy link
Author

As of 04-01-2023, version 1.0.0 of the phpcsstandards/phpcsutils has been released, so from now the dev-develop version of the PHPCompatibility package can be installed as follows:

composer require --dev --with-all-dependencies "phpcompatibility/php-compatibility:dev-develop"

In situations where the package is installed via another dependency (as is the case for the ISAAC PHP_CodeSniffer Standard), this can be done using an inline alias:

composer require --dev --with-all-dependencies "phpcompatibility/php-compatibility:dev-develop as 9.3.5"

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

2 participants