Skip to content

Commit

Permalink
Merge branch 'release/2.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
IreneStr committed Apr 2, 2020
2 parents 42e4150 + 26e17a2 commit 0f6d2a1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ matrix:
# Check the code-style consistency of the xml files.
- diff -B --tabsize=4 ./Yoast/ruleset.xml <(xmllint --format "./Yoast/ruleset.xml")

# Check that the sniffs available are feature complete.
- composer check-complete

#### QUICK TEST STAGE ####
# This is a much quicker test which only runs the unit tests and linting against low/high
# supported PHP/PHPCS/WPCS combinations.
Expand All @@ -85,7 +88,7 @@ before_install:
# On stable PHPCS versions, allow for PHP deprecation notices.
# Unit tests don't need to fail on those for stable releases where those issues won't get fixed anymore.
- |
if [[ "$TRAVIS_BUILD_STAGE_NAME" != "Sniff" && $PHPCS_BRANCH != "dev-master" && $WPCS != "dev-develop" ]]; then
if [[ "${TRAVIS_BUILD_STAGE_NAME^}" != "Sniff" && $PHPCS_BRANCH != "dev-master" && $WPCS != "dev-develop" ]]; then
echo 'error_reporting = E_ALL & ~E_DEPRECATED' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
fi
Expand All @@ -97,7 +100,7 @@ before_install:
# Set the WPCS version to test against.
- composer require wp-coding-standards/wpcs:${WPCS} --no-update --no-suggest --no-scripts
- |
if [[ "$TRAVIS_BUILD_STAGE_NAME" != "Sniff" ]]; then
if [[ "${TRAVIS_BUILD_STAGE_NAME^}" != "Sniff" ]]; then
# For testing the YoastCS native sniffs, the rest of the packages aren't needed.
composer remove phpcompatibility/phpcompatibility-wp phpcompatibility/php-compatibility --no-update
fi
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).

### [2.0.2] - 2020-04-02

#### Changed
* PHPCS: The default value for the `minimum_supported_wp_version` property which is used by various WPCS sniffs has been updated to WP `5.3` (was `5.2`).


### [2.0.1] - 2020-02-06

#### Changed
Expand Down Expand Up @@ -71,7 +77,7 @@ This project adheres to [Semantic Versioning](https://semver.org/) and [Keep a C
* :warning: PHPCS: `Yoast.Files.FileName` sniff: the public `$exclude` property, which can be used to indicate which files to exclude from the file name versus object name check, has been renamed to `$excluded_files_strict_check`.
Custom repo specific rulesets using the property should be updates to reflect this change.
* PHPCS: The default setting for the minimum supported PHP version for repos using YoastCS is now PHP 5.6 (was 5.2).
* PHPCS: The default value for the `minimum_supported_wp_version` property which is used by various WPCS sniffs has been update to WP `5.2` (was `4.9`).
* PHPCS: The default value for the `minimum_supported_wp_version` property which is used by various WPCS sniffs has been updated to WP `5.2` (was `4.9`).
* Composer: Supported version of [PHP_CodeSniffer] has been changed from `^3.4.2` to `^3.5.0`.
Note: this makes the option `--filter=gitstaged` available which can be used in git `pre-commit` hooks to only check staged files.
* Composer: Supported version of [WordPressCS] has been changed from `^2.1.1` to `^2.2.0`.
Expand Down Expand Up @@ -369,6 +375,7 @@ Initial public release as a stand-alone package.
[DealerDirect Composer PHPCS plugin]: https://github.com/Dealerdirect/phpcodesniffer-composer-installer/releases
[Parallel-Lint]: https://packagist.org/packages/jakub-onderka/php-parallel-lint

[2.0.2]: https://github.com/Yoast/yoastcs/compare/2.0.1...2.0.2
[2.0.1]: https://github.com/Yoast/yoastcs/compare/2.0.0...2.0.1
[2.0.0]: https://github.com/Yoast/yoastcs/compare/1.3.0...2.0.0
[1.3.0]: https://github.com/Yoast/yoastcs/compare/1.2.2...1.3.0
Expand Down
2 changes: 1 addition & 1 deletion Yoast/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
Ref: https://github.com/WordPress/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#minimum-wp-version-to-check-for-usage-of-deprecated-functions-classes-and-function-parameters
-->
<properties>
<property name="minimum_supported_version" value="5.2"/>
<property name="minimum_supported_version" value="5.3"/>
</properties>

<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines"/>
Expand Down
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"roave/security-advisories": "dev-master",
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0",
"jakub-onderka/php-parallel-lint": "^1.0",
"jakub-onderka/php-console-highlighter": "^0.4"
"jakub-onderka/php-console-highlighter": "^0.4",
"phpcsstandards/phpcsdevtools": "^1.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand All @@ -53,6 +54,9 @@
],
"test": [
"@php ./vendor/phpunit/phpunit/phpunit --filter Yoast --bootstrap=\"./vendor/squizlabs/php_codesniffer/tests/bootstrap.php\" ./vendor/squizlabs/php_codesniffer/tests/AllTests.php"
],
"check-complete": [
"@php ./vendor/phpcsstandards/phpcsdevtools/bin/phpcs-check-feature-completeness ./Yoast"
]
}
}

0 comments on commit 0f6d2a1

Please sign in to comment.