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

PHP version compatibility not checked? #295

Closed
JakeQZ opened this issue Nov 20, 2020 · 2 comments
Closed

PHP version compatibility not checked? #295

JakeQZ opened this issue Nov 20, 2020 · 2 comments

Comments

@JakeQZ
Copy link

JakeQZ commented Nov 20, 2020

In phive.xml I have this:

  <phar name="phpunit" version="^7.5.20 || ^9.4.3" installed="7.5.20" location="./tools/phpunit.phar" copy="true"/>

However, if I run phive update phpunit with PHP 7.1, it will nonetheless update PHPUnit to version 9 even though that release requires PHP 7.3.

@theseer theseer transferred this issue from phar-io/phar.io Nov 20, 2020
@theseer
Copy link
Member

theseer commented Nov 20, 2020

Phive has no means of knowing the version compatibility:

  • PHPUnit does not provide that in any maschine readable form in the phar, as in no https://github.com/phar-io/manifest is included as of yet. If it would, phive would at least refuse to install an incompatible one.

  • Even if it were to include it, without a central type of repository that has all versions available indexed (like composer's packagist), phive wouldn't know which version to install without downloading every version first - at least all that match the version specifications - and probably go from best (newest) down until it finds one that works...

We have a pending ticket #219 (comment) that has a draft idea on how conditional installs could work.

JakeQZ added a commit to MyIntervals/emogrifier that referenced this issue Nov 21, 2020
This is required to be able to test against PHP 8.  However, PHPUnit 9.x
requires PHP 7.3, so a different version of PHPUnit is required for different
testing environments.

The main change here is a step in the GitHub Action to conditionally update
PHPUnit via PHIVE for PHP >=7.3.  PHIVE does not yet have the ability for
conditional installs (see
phar-io/phive#295 (comment)) so the
script must check the PHP version before running the update.

PHIVE has also been added to the tools (self-referencing) as it is not available
by default to GitHub Actions.

Note: There are warnings from PHPUnit 9.x about use of deprecated `assert`
methods (which will be removed in PHPUnit 10.x).  However, these don't cause the
tests to fail, and the replacement methods are not available in PHPUnit 7.x
which is still required to test against PHP 7.1 and 7.2.
JakeQZ added a commit to MyIntervals/emogrifier that referenced this issue Nov 21, 2020
This is required to be able to test against PHP 8.  However, PHPUnit 9.x
requires PHP 7.3, so a different version of PHPUnit is required for different
testing environments.

The main change here is a step in the GitHub Action to conditionally update
PHPUnit via PHIVE for PHP >=7.3.  PHIVE does not yet have the ability for
conditional installs (see
phar-io/phive#295 (comment)) so the
script must check the PHP version before running the update.

PHIVE has also been added to the tools (self-referencing) as it is not available
by default to GitHub Actions.

Note: There are warnings from PHPUnit 9.x about use of deprecated `assert`
methods (which will be removed in PHPUnit 10.x).  However, these don't cause the
tests to fail, and the replacement methods are not available in PHPUnit 7.x
which is still required to test against PHP 7.1 and 7.2.

Part of #925/#926.
JakeQZ added a commit to MyIntervals/emogrifier that referenced this issue Nov 21, 2020
This is required to be able to test against PHP 8.  However, PHPUnit 9.x
requires PHP 7.3, so a different version of PHPUnit is required for different
testing environments.

The main change here is a step in the GitHub Action to conditionally update
PHPUnit via PHIVE for PHP >=7.3.  PHIVE does not yet have the ability for
conditional installs (see
phar-io/phive#295 (comment)) so the
script must check the PHP version before running the update.

PHIVE has also been added to the tools (self-referencing) as it is not available
by default to GitHub Actions.

Note: There are warnings from PHPUnit 9.x about use of deprecated `assert`
methods (which will be removed in PHPUnit 10.x).  However, these don't cause the
tests to fail, and the replacement methods are not available in PHPUnit 7.x
which is still required to test against PHP 7.1 and 7.2.

Part of #925/#926.
JakeQZ added a commit to MyIntervals/emogrifier that referenced this issue Nov 22, 2020
This is required to be able to test against PHP 8.  However, PHPUnit 9.x
requires PHP 7.3, so a different version of PHPUnit is required for different
testing environments.

The main change here is a step in the GitHub Action to conditionally update
PHPUnit via PHIVE for PHP >=7.3.  PHIVE does not yet have the ability for
conditional installs (see
phar-io/phive#295 (comment)) so the
script must check the PHP version before running the update.

PHIVE has also been added to the tools (self-referencing) as it is not available
by default to GitHub Actions.

Note: There are warnings from PHPUnit 9.x about use of deprecated `assert`
methods (which will be removed in PHPUnit 10.x).  However, these don't cause the
tests to fail, and the replacement methods are not available in PHPUnit 7.x
which is still required to test against PHP 7.1 and 7.2.

Part of #925/#926.
oliverklee pushed a commit to MyIntervals/emogrifier that referenced this issue Nov 22, 2020
This is required to be able to test against PHP 8.  However, PHPUnit 9.x
requires PHP 7.3, so a different version of PHPUnit is required for different
testing environments.

The main change here is a step in the GitHub Action to conditionally update
PHPUnit via PHIVE for PHP >=7.3.  PHIVE does not yet have the ability for
conditional installs (see
phar-io/phive#295 (comment)) so the
script must check the PHP version before running the update.

PHIVE has also been added to the tools (self-referencing) as it is not available
by default to GitHub Actions.

Note: There are warnings from PHPUnit 9.x about use of deprecated `assert`
methods (which will be removed in PHPUnit 10.x).  However, these don't cause the
tests to fail, and the replacement methods are not available in PHPUnit 7.x
which is still required to test against PHP 7.1 and 7.2.

Part of #925/#926.
@theseer
Copy link
Member

theseer commented Nov 30, 2020

Closing this as there is nothing to do.

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