这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions resources/tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -719,10 +719,11 @@
"links": {"%target-dir%/simple-phpunit": "simple-phpunit"}
},
"sh": {
"command": "simple-phpunit install"
"command": "simple-phpunit install && SYMFONY_PHPUNIT_VERSION=8.2 simple-phpunit install"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to run the install command twice?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, see https://travis-ci.com/jakzal/toolbox/jobs/208386006#L611

this ensures it installs both v7/v8 given the current defaults of SYMFONY_PHPUNIT_VERSION (which depends on PHP version) today.

So currently you can invoke

simple-phpunit # 7.4
SYMFONY_PHPUNIT_VERSION=7.4 simple-phpunit
SYMFONY_PHPUNIT_VERSION=8.2 simple-phpunit

without any additional installation required (that's what's solved here ultimately). Invoking any other version SYMFONY_PHPUNIT_VERSION=x.y ... will trigger a custom installation on user's side. Nevertheless, defaults should be sane; supporting the last 2 majors.

As of november 2019, when we'll install symfony/phpunit-bridge@4.4 we can remove it, unless we decide to keep phpunit v7 or any version wanted then.

Copy link
Contributor Author

@ro0NL ro0NL Jun 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one thing is invoking simple-phpunit without setting SYMFONY_PHPUNIT_VERSION anywhere, let's Symfony decide the defaults (they are now bumped in symfony/symfony#32059).

So perhaps we should always set SYMFONY_PHPUNIT_VERSION=7|8 simple-phpunit install explicit during install, and a default in the image as well when the user invokes simple-phpunit

this way Toolbox is in full control of the PHPUnit version defaults.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure it's big a deal for now, worst case simple-phpunit install && SYMFONY_PHPUNIT_VERSION=8.2 simple-phpunit install will install 8.2 twice, once symfony/symfony#32059 is merged upstream. Then we should clean it up.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have a look at this PR when I have a bit more time. Bare with me :)

}
},
"test": "simple-phpunit --version"
"test": "simple-phpunit --version",
"tags": ["exclude-php:7.1"]
},
{
"name": "testability",
Expand Down