diff --git a/README.md b/README.md index a1647476..ae76b321 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ To exclude some tools from the listing multiple `--exclude-tag` options can be a The `--tag` option can be used to filter tools by tags. ``` -bin/toolbox.php list-tools --exclude-tag ~php7.3 --exclude-tag foo --tag bar +bin/toolbox.php list-tools --exclude-tag exclude-php:7.3 --exclude-tag foo --tag bar ``` ### Install tools @@ -132,7 +132,7 @@ To exclude some tools from the installation multiple `--exclude-tag` options can The `--tag` option can be used to filter tools by tags. ``` -bin/toolbox.php install --exclude-tag ~php7.3 --exclude-tag foo --tag bar +bin/toolbox.php install --exclude-tag exclude-php:7.3 --exclude-tag foo --tag bar ``` ### Test if installed tools are usable @@ -155,7 +155,7 @@ To exclude some tools from the generated test command multiple `--exclude-tag` o The `--tag` option can be used to filter tools by tags. ``` -bin/toolbox.php test --exclude-tag ~php7.3 --exclude-tag foo --tag bar +bin/toolbox.php test --exclude-tag exclude-php:7.3 --exclude-tag foo --tag bar ``` ### Tools definitions @@ -180,4 +180,4 @@ Tools can be tagged in order to enable grouping and filtering them. The tags below have a special meaning: * `pre-installation` - these tools will be installed before any other tools. -* `~php7.3`, `~php7.1` etc - used to exclude installation on the specified php version. +* `exclude-php:7.3`, `exclude-php:7.1` etc - used to exclude installation on the specified php version. diff --git a/resources/tools.json b/resources/tools.json index 9455f174..e94be81e 100644 --- a/resources/tools.json +++ b/resources/tools.json @@ -185,7 +185,7 @@ } }, "test": "php-cs-fixer list", - "tags": ["~php7.3"] + "tags": ["exclude-php:7.3"] }, { "name": "php-formatter", diff --git a/tests/Tool/FilterTest.php b/tests/Tool/FilterTest.php index c99c3108..9922345b 100644 --- a/tests/Tool/FilterTest.php +++ b/tests/Tool/FilterTest.php @@ -17,14 +17,14 @@ public function test_it_returns_true_if_no_excluded_tags_were_defined() public function test_it_returns_true_if_no_excluded_tags_match() { - $filter = new Filter(['~php:7.3'], []); + $filter = new Filter(['exclude-php:7.3'], []); $this->assertTrue($filter($this->tool(['phpspec', 'phpstan']))); } public function test_it_returns_true_if_tool_has_no_tags() { - $filter = new Filter(['~php:7.3'], []); + $filter = new Filter(['exclude-php:7.3'], []); $this->assertTrue($filter($this->tool([]))); } @@ -38,23 +38,23 @@ public function test_it_returns_true_if_neither_tool_nor_excluded_tags_were_defi public function test_it_returns_false_if_one_excluded_tag_matches() { - $filter = new Filter(['~php:7.3'], []); + $filter = new Filter(['exclude-php:7.3'], []); - $this->assertFalse($filter($this->tool(['phpspec', 'phpstan', '~php:7.3']))); + $this->assertFalse($filter($this->tool(['phpspec', 'phpstan', 'exclude-php:7.3']))); } public function test_it_returns_false_if_multiple_excluded_tags_match() { - $filter = new Filter(['~php:7.3', 'phpstan'], []); + $filter = new Filter(['exclude-php:7.3', 'phpstan'], []); - $this->assertFalse($filter($this->tool(['phpspec', 'phpstan', '~php:7.3']))); + $this->assertFalse($filter($this->tool(['phpspec', 'phpstan', 'exclude-php:7.3']))); } public function test_it_returns_false_if_all_excluded_tags_match() { - $filter = new Filter(['~php:7.3', 'phpspec', 'phpstan'], []); + $filter = new Filter(['exclude-php:7.3', 'phpspec', 'phpstan'], []); - $this->assertFalse($filter($this->tool(['phpspec', 'phpstan', '~php:7.3']))); + $this->assertFalse($filter($this->tool(['phpspec', 'phpstan', 'exclude-php:7.3']))); } public function test_it_returns_true_if_a_tag_matches()