Skip to content

Commit 5cb7f67

Browse files
authored
Merge pull request #44 from PHPCSStandards/develop
Release version 1.0.1
2 parents 0f0776e + 29c4bcf commit 5cb7f67

File tree

6 files changed

+51
-26
lines changed

6 files changed

+51
-26
lines changed

.travis.yml

+26-10
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ cache:
1111
# Cache directory for more recent Composer versions.
1212
- $HOME/.cache/composer/files
1313

14+
# Note: PHP 7.3, 7.4 and nightly are added via "jobs".
1415
php:
1516
- 5.4
1617
- 5.5
@@ -20,7 +21,7 @@ php:
2021
- 7.2
2122

2223
env:
23-
# `master`
24+
# PHPCS `master`
2425
- PHPCS_VERSION="dev-master" LINT=1
2526
# Lowest supported PHPCS version.
2627
- PHPCS_VERSION="3.0.2"
@@ -33,16 +34,16 @@ env:
3334
stages:
3435
- name: sniff
3536
- name: quicktest
36-
if: type = push AND branch NOT IN (master, develop)
37+
if: type = push AND branch NOT IN (stable, develop)
3738
- name: test
38-
if: branch IN (master, develop)
39+
if: branch IN (stable, develop)
3940

4041
jobs:
4142
fast_finish: true
4243
include:
4344
#### SNIFF STAGE ####
4445
- stage: sniff
45-
php: 7.3
46+
php: 7.4
4647
env: PHPCS_VERSION="dev-master"
4748
addons:
4849
apt:
@@ -67,7 +68,7 @@ jobs:
6768
# This is a much quicker test which only runs the unit tests and linting against the low/high
6869
# supported PHP/PHPCS combinations.
6970
- stage: quicktest
70-
php: 7.3
71+
php: 7.4
7172
env: PHPCS_VERSION="dev-master" LINT=1
7273
- stage: quicktest
7374
php: 7.2
@@ -93,12 +94,18 @@ jobs:
9394
# PHPCS is only compatible with PHP 7.4 as of version 3.5.0.
9495
- php: 7.4
9596
env: PHPCS_VERSION="3.5.0"
97+
98+
# Builds against unstable versions which are allowed to fail for now.
99+
- stage: test
100+
php: 7.4
101+
env: PHPCS_VERSION="4.0.x-dev"
96102
- php: "nightly"
97-
env: PHPCS_VERSION="n/a" LINT=1
103+
env: PHPCS_VERSION="dev-master" LINT=1
98104

99105
allow_failures:
100106
# Allow failures for unstable builds.
101107
- php: "nightly"
108+
- env: PHPCS_VERSION="4.0.x-dev"
102109

103110

104111
before_install:
@@ -108,15 +115,15 @@ before_install:
108115
# On stable PHPCS versions, allow for PHP deprecation notices.
109116
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
110117
- |
111-
if [[ "$TRAVIS_BUILD_STAGE_NAME" != "Sniff" && "$PHPCS_VERSION" != "dev-master" && "$PHPCS_VERSION" != "n/a" ]]; then
118+
if [[ "${TRAVIS_BUILD_STAGE_NAME^}" != "Sniff" && "$PHPCS_VERSION" != "dev-master" && "$PHPCS_VERSION" != "4.0.x-dev" ]]; then
112119
echo 'error_reporting = E_ALL & ~E_DEPRECATED' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
113120
fi
114121
115122
- export XMLLINT_INDENT=" "
116123

117124
# Set up test environment using Composer.
118125
- |
119-
if [[ "$TRAVIS_BUILD_STAGE_NAME" != "Sniff" ]]; then
126+
if [[ "${TRAVIS_BUILD_STAGE_NAME^}" != "Sniff" ]]; then
120127
# Remove the PHPCSDevCS dependency as it has different PHPCS requirements and would block installs.
121128
composer remove --dev phpcsstandards/phpcsdevcs --no-update --no-scripts
122129
fi
@@ -125,7 +132,7 @@ before_install:
125132
composer require --no-update --no-scripts squizlabs/php_codesniffer:${PHPCS_VERSION}
126133
fi
127134
- |
128-
if [[ "$TRAVIS_BUILD_STAGE_NAME" == "Sniff" || $PHPCS_VERSION == "n/a" ]]; then
135+
if [[ "${TRAVIS_BUILD_STAGE_NAME^}" == "Sniff" ]]; then
129136
# The sniff stage doesn't run the unit tests, so no need for PHPUnit.
130137
composer remove --dev phpunit/phpunit --no-update --no-scripts
131138
elif [[ "$PHPCS_VERSION" < "3.1.0" ]]; then
@@ -138,7 +145,16 @@ before_install:
138145
139146
# --prefer-dist will allow for optimal use of the travis caching ability.
140147
# The Composer PHPCS plugin takes care of setting the installed_paths for PHPCS.
141-
- composer install --prefer-dist --no-suggest
148+
- |
149+
if [[ $TRAVIS_PHP_VERSION == "nightly" ]]; then
150+
# Not all dependencies allow for installing on nightly yet, so ignore platform requirements.
151+
composer install --prefer-dist --no-suggest --ignore-platform-reqs
152+
elif [[ "$PHPCS_VERSION" == "4.0.x-dev" ]]; then
153+
# PHPCS 4.x does not ship by default with the base test case, so source is needed.
154+
composer install --prefer-source --no-suggest
155+
else
156+
composer install --prefer-dist --no-suggest
157+
fi
142158
143159
144160
script:

CHANGELOG.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,22 @@ This projects adheres to [Keep a CHANGELOG](http://keepachangelog.com/) and uses
1010
_Nothing yet._
1111

1212

13+
## [1.0.1] - 2020-06-28
14+
15+
### Changed
16+
* The `master` branch has been renamed to `stable`.
17+
* The version requirements for the [Dealerdirect Composer PHPCS plugin] have been widened to allow installation of releases from the `0.7.x` range, which brings compatibility with Composer 2.0.
18+
* Miscellaneous updates to the development environment and CI scripts.
19+
20+
1321
## 1.0.0 - 2020-02-12
1422

1523
Initial release containing:
1624
* Feature completeness checking tool for PHPCS sniffs.
1725
* A `PHPCSDebug` standard to help debugging sniffs.
1826

1927

20-
[Unreleased]: https://github.com/PHPCSStandards/PHPCSDevTools/compare/1.0.0...HEAD
28+
[Unreleased]: https://github.com/PHPCSStandards/PHPCSDevTools/compare/master...HEAD
29+
[1.0.1]: https://github.com/PHPCSStandards/PHPCSDevTools/compare/1.0.0...1.0.1
2130

31+
[Dealerdirect Composer PHPCS plugin]: https://github.com/Dealerdirect/phpcodesniffer-composer-installer/

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PHPCSDevTools for developers of PHP_CodeSniffer sniffs
22
=====================================================
33

44
[![Latest Stable Version](https://poser.pugx.org/phpcsstandards/phpcsdevtools/v/stable)](https://packagist.org/packages/phpcsstandards/phpcsdevtools)
5-
[![Travis Build Status](https://travis-ci.com/PHPCSStandards/PHPCSDevTools.svg?branch=master)](https://travis-ci.com/PHPCSStandards/PHPCSDevTools/branches)
5+
[![Travis Build Status](https://travis-ci.com/PHPCSStandards/PHPCSDevTools.svg?branch=stable)](https://travis-ci.com/PHPCSStandards/PHPCSDevTools/branches)
66
[![Release Date of the Latest Version](https://img.shields.io/github/release-date/PHPCSStandards/PHPCSDevTools.svg?maxAge=1800)](https://github.com/PHPCSStandards/PHPCSDevTools/releases)
77
:construction:
88
[![Latest Unstable Version](https://img.shields.io/badge/unstable-dev--develop-e68718.svg?maxAge=2419200)](https://packagist.org/packages/phpcsstandards/phpcsdevtools#dev-develop)
@@ -12,7 +12,7 @@ PHPCSDevTools for developers of PHP_CodeSniffer sniffs
1212
[![Minimum PHP Version](https://img.shields.io/packagist/php-v/phpcsstandards/phpcsdevtools.svg?maxAge=3600)](https://packagist.org/packages/phpcsstandards/phpcsdevtools)
1313
[![Tested on PHP 5.4 to nightly](https://img.shields.io/badge/tested%20on-PHP%205.4%20|%205.5%20|%205.6%20|%207.0%20|%207.1%20|%207.2%20|%207.3%20|%207.4%20|%20nightly-brightgreen.svg?maxAge=2419200)](https://travis-ci.com/PHPCSStandards/PHPCSDevTools)
1414

15-
[![License: LGPLv3](https://poser.pugx.org/phpcsstandards/phpcsdevtools/license)](https://github.com/PHPCSStandards/PHPCSDevTools/blob/master/LICENSE)
15+
[![License: LGPLv3](https://poser.pugx.org/phpcsstandards/phpcsdevtools/license)](https://github.com/PHPCSStandards/PHPCSDevTools/blob/stable/LICENSE)
1616
![Awesome](https://img.shields.io/badge/awesome%3F-yes!-brightgreen.svg)
1717

1818

@@ -43,7 +43,7 @@ composer require --dev phpcsstandards/phpcsdevtools:^1.0
4343

4444
If you work on several different sniff repos, you may want to install this toolset globally:
4545
```bash
46-
composer global require phpcsstandards/phpcsdevtools:^1.0
46+
composer global require --dev phpcsstandards/phpcsdevtools:^1.0
4747
```
4848

4949
Composer will automatically install dependencies and register the PHPCSDebug standard with PHP_CodeSniffer using the [DealerDirect Composer PHPCS plugin](https://github.com/Dealerdirect/phpcodesniffer-composer-installer/).
@@ -59,7 +59,7 @@ Composer will automatically install dependencies and register the PHPCSDebug sta
5959
```bash
6060
phpcs --config-set installed_paths /path/to/PHPCSDevTools
6161
```
62-
**Warning**: :warning: The `installed_paths` command overwrites any previously set `installed_paths`. If you have previously set `installed_paths` for other external standards, run `phpcs --config-show` first and then run the `installed_paths` command with all the paths you need separated by comma's, i.e.:
62+
:warning: **Warning**: The `installed_paths` command overwrites any previously set `installed_paths`. If you have previously set `installed_paths` for other external standards, run `phpcs --config-show` first and then run the `installed_paths` command with all the paths you need separated by comma's, i.e.:
6363
```bash
6464
phpcs --config-set installed_paths /path/1,/path/2,/path/3
6565
```
@@ -70,9 +70,9 @@ Features
7070

7171
### Checking whether all sniffs in a PHPCS standard are feature complete
7272

73-
You can now easily check whether each and every sniff in your standard is accompanied by a documentation XML file (warning) as well as unit test files (error).
73+
You can now check whether each and every sniff in your standard is accompanied by a documentation XML file (warning) as well as unit test files (error).
7474

75-
To use the tool, run it from the root of the your standards repo like so:
75+
To use the tool, run it from the root of your standards repo like so:
7676
```bash
7777
# When installed as a project dependency:
7878
vendor/bin/phpcs-check-feature-completeness
@@ -122,7 +122,7 @@ Once this project is installed, you will see a new `PHPCSDebug` ruleset in the l
122122
For now, this standard only contains one sniff: `PHPCSDebug.Debug.TokenList`.
123123
This sniff will display compact, but detailed information about the tokens found in a (test case) file.
124124

125-
This sniff is compatible with PHPCS 3.0+.
125+
This sniff is compatible with PHPCS 3.0.2+.
126126

127127
Typical usage:
128128
* Set up a test case file for a new sniff you intend to write.
@@ -172,7 +172,7 @@ PHPCS itself can also display similar information using the `-vv` or `-vvv` verb
172172

173173
Contributing
174174
-------
175-
Contributions to this project are welcome. Just clone the repo, branch off from `develop`, make your changes, commit them and send in a pull request.
175+
Contributions to this project are welcome. Clone this repository, branch off from `develop`, make your changes, commit them and send in a pull request.
176176

177177
If unsure whether the changes you are proposing would be welcome, open an issue first to discuss your proposal.
178178

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.0
1+
1.0.1

composer.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@
2222
"require" : {
2323
"php" : ">=5.4",
2424
"squizlabs/php_codesniffer" : "^3.0.2",
25-
"dealerdirect/phpcodesniffer-composer-installer" : "^0.3 || ^0.4.1 || ^0.5 || ^0.6.2"
25+
"dealerdirect/phpcodesniffer-composer-installer" : "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7"
2626
},
2727
"require-dev" : {
2828
"roave/security-advisories" : "dev-master",
2929
"phpunit/phpunit" : "^4.5 || ^5.0 || ^6.0 || ^7.0",
30-
"jakub-onderka/php-parallel-lint": "^1.0",
31-
"jakub-onderka/php-console-highlighter": "^0.4",
32-
"phpcsstandards/phpcsdevcs": "^1.0.0"
30+
"php-parallel-lint/php-parallel-lint": "^1.0",
31+
"php-parallel-lint/php-console-highlighter": "^0.5",
32+
"phpcsstandards/phpcsdevcs": "^1.0"
3333
},
3434
"bin": [
3535
"bin/phpcs-check-feature-completeness"
3636
],
3737
"scripts" : {
3838
"lint": [
39-
"@php ./vendor/jakub-onderka/php-parallel-lint/parallel-lint . -e php --exclude vendor --exclude .git"
39+
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --exclude vendor --exclude .git"
4040
],
4141
"check-cs": [
4242
"@php ./vendor/squizlabs/php_codesniffer/bin/phpcs"

phpunit-bootstrap.php

-1
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,4 @@
7979
\putenv("PHPCS_IGNORE_TESTS={$standardsToIgnoreString}");
8080

8181
// Clean up.
82-
unset($ds, $phpcsDir, $composerPHPCSPath);
8382
unset($ds, $phpcsDir, $composerPHPCSPath, $allStandards, $standardsToIgnore, $standard, $standardsToIgnoreString);

0 commit comments

Comments
 (0)