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

phpUnitBridge - 5.1.0 - Undefined index: versions - php 7.4.5 #37086

Closed
ybenhssaien opened this issue Jun 3, 2020 · 1 comment · Fixed by #37095
Closed

phpUnitBridge - 5.1.0 - Undefined index: versions - php 7.4.5 #37086

ybenhssaien opened this issue Jun 3, 2020 · 1 comment · Fixed by #37095

Comments

@ybenhssaien
Copy link
Contributor

ybenhssaien commented Jun 3, 2020

Symfony version(s) affected: 4.4.8

Description
Working with Symfony 4.4.8 and PHP 7.4.5, having thoses errors after upgrading symfony/phpunit-bridge to 5.1.0 :

  • Notice: Undefined index: versions in /var/www/html/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php on line 185
  • Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php on line 185
  • sh: 1: composer: not found

image

How to reproduce

  1. Install PHP 7.4.5
  2. Install Symfony 4.4.8
  3. Install phpunit-bridge 5.1.0
  4. Run bin/phpunit

Possible Solution

Additional context

Works fine with only downgrading phpunit-bridge to 5.0.8

  • Composer version 1.10.5
    image
@mariusbuescher
Copy link

mariusbuescher commented Jun 4, 2020

symfony/phpunit-bridge Version 3.4.41 has similar problems.

It also completely ignores the SYMFONY_PHPUNIT_VERSION environment variable as well as the automatically determined PHPUnit version from the PHP environment. It currently tries to install PHPUnit in version 9.1.x under all circumstances.

This is also reproducable with PHP versions prior to 7.4.

nicolas-grekas added a commit that referenced this issue Jun 4, 2020
…er show" cannot be parsed (nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Fix undefined index when output of "composer show" cannot be parsed

…nnot be parsed

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #37086
| License       | MIT
| Doc PR        | -

Commits
-------

d3f9b7f [PhpUnitBridge] Fix undefined index when output of "composer show" cannot be parsed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants