Skip to content

Commit 4fd2e30

Browse files
authored
Merge pull request #430 from PHPCSStandards/develop
Release 1.0.1
2 parents 1d014df + 71851b6 commit 4fd2e30

36 files changed

+184
-301
lines changed

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ This projects adheres to [Keep a CHANGELOG](https://keepachangelog.com/) and use
99

1010
_Nothing yet._
1111

12+
## [1.0.1] - 2023-01-05
13+
14+
### Changed
15+
16+
#### Other
17+
18+
* Composer: The version requirements for the [Composer PHPCS plugin] have been widened to allow for version 1.0.0. [#428]
19+
Please ensure you run `composer update phpcsstandards/phpcsutils --with-dependencies` to benefit from this.
20+
* Removed the references to pre-1.0.0 QA releases from the docs. [#425]
21+
* Various small housekeeping and maintainance updates. Thanks [@szepeviktor] for contributing.
22+
23+
[#425]: https://github.com/PHPCSStandards/PHPCSUtils/pull/425
24+
[#428]: https://github.com/PHPCSStandards/PHPCSUtils/pull/428
25+
1226

1327
## [1.0.0] - 2023-01-04
1428

@@ -765,6 +779,7 @@ This initial alpha release contains the following utility classes:
765779

766780

767781
[Unreleased]: https://github.com/PHPCSStandards/PHPCSUtils/compare/stable...HEAD
782+
[1.0.1]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.0...1.0.1
768783
[1.0.0]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.0-rc1...1.0.0
769784
[1.0.0-rc1]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.0-alpha4...1.0.0-rc1
770785
[1.0.0-alpha4]: https://github.com/PHPCSStandards/PHPCSUtils/compare/1.0.0-alpha3...1.0.0-alpha4
@@ -802,4 +817,5 @@ This initial alpha release contains the following utility classes:
802817
[`UseStatements`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-UseStatements.html
803818
[`Variables`]: https://phpcsutils.com/phpdoc/classes/PHPCSUtils-Utils-Variables.html
804819

805-
[@GaryJones]: https://github.com/GaryJones
820+
[@GaryJones]: https://github.com/GaryJones
821+
[@szepeviktor]: https://github.com/szepeviktor

PHPCSUtils/AbstractSniffs/AbstractArrayDeclarationSniff.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
* Abstract sniff to easily examine all parts of an array declaration.
2525
*
2626
* @since 1.0.0
27-
* @since 1.0.0-alpha4 Dropped support for PHPCS < 3.7.1.
2827
*/
2928
abstract class AbstractArrayDeclarationSniff implements Sniff
3029
{

PHPCSUtils/BackCompat/BCFile.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
* @see \PHP_CodeSniffer\Files\File Original source of these utility methods.
6464
*
6565
* @since 1.0.0
66-
* @since 1.0.0-alpha4 Dropped support for PHPCS < 3.7.1.
6766
*/
6867
final class BCFile
6968
{
@@ -155,8 +154,6 @@ public static function getDeclarationName(File $phpcsFile, $stackPtr)
155154
* @see \PHPCSUtils\Utils\FunctionDeclarations::getParameters() PHPCSUtils native improved version.
156155
*
157156
* @since 1.0.0
158-
* @since 1.0.0-alpha2 Added support for PHP 7.4 arrow functions.
159-
* @since 1.0.0-alpha4 Added support for PHP 8.0 identifier name tokens.
160157
*
161158
* @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
162159
* @param int $stackPtr The position in the stack of the function token

PHPCSUtils/BackCompat/BCTokens.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
* the token arrays returned by this class.
4343
*
4444
* @since 1.0.0
45-
* @since 1.0.0-alpha4 Dropped support for PHPCS < 3.7.1.
4645
*
4746
* @method static array arithmeticTokens() Tokens that represent arithmetic operators.
4847
* @method static array assignmentTokens() Tokens that represent assignments.

PHPCSUtils/BackCompat/Helper.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
*
2020
* PHP_CodeSniffer cross-version compatibility helper.
2121
*
22-
* @since 1.0.0 The initial methods in this class have been ported over from
23-
* the external PHPCompatibility & WPCS standards.
24-
* @since 1.0.0-alpha4 Dropped support for PHPCS < 3.7.1.
22+
* @since 1.0.0 The initial methods in this class have been ported over from
23+
* the external PHPCompatibility & WPCS standards.
2524
*/
2625
final class Helper
2726
{
@@ -143,7 +142,7 @@ public static function getTabWidth(File $phpcsFile)
143142
* Get the applicable (file) encoding as passed to PHP_CodeSniffer from the
144143
* command-line or the ruleset.
145144
*
146-
* @since 1.0.0-alpha3
145+
* @since 1.0.0
147146
*
148147
* @param \PHP_CodeSniffer\Files\File|null $phpcsFile Optional. The current file being processed.
149148
*

PHPCSUtils/Exceptions/InvalidTokenArray.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
/**
1616
* Exception thrown when an non-existent token array is requested.
1717
*
18-
* @since 1.0.0-alpha4
18+
* @since 1.0.0
1919
*/
2020
final class InvalidTokenArray extends RuntimeException
2121
{
2222

2323
/**
2424
* Create a new invalid token array exception with a standardized text.
2525
*
26-
* @since 1.0.0-alpha4
26+
* @since 1.0.0
2727
*
2828
* @param string $name The name of the token array requested.
2929
*

PHPCSUtils/Exceptions/TestFileNotFound.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
* Exception thrown when the UtilityMethodTestCase::getTargetToken() method is run without a
1717
* tokenized test case file being available.
1818
*
19-
* @since 1.0.0-alpha4
19+
* @since 1.0.0
2020
*/
2121
final class TestFileNotFound extends BadMethodCallException
2222
{
2323

2424
/**
2525
* Create a new "test file not found" exception with a standardized text.
2626
*
27-
* @since 1.0.0-alpha4
27+
* @since 1.0.0
2828
*
2929
* @param string $message The Exception message to throw.
3030
* @param int $code The Exception code.

PHPCSUtils/Exceptions/TestMarkerNotFound.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
/**
1616
* Exception thrown when a delimiter comment can not be found in a test case file.
1717
*
18-
* @since 1.0.0-alpha4
18+
* @since 1.0.0
1919
*/
2020
final class TestMarkerNotFound extends OutOfBoundsException
2121
{
2222

2323
/**
2424
* Create a new "test marker not found" exception with a standardized text.
2525
*
26-
* @since 1.0.0-alpha4
26+
* @since 1.0.0
2727
*
2828
* @param string $marker The delimiter comment.
2929
* @param string $file The file in which the delimiter was not found.

PHPCSUtils/Exceptions/TestTargetNotFound.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
/**
1616
* Exception thrown when a test target token can not be found in a test case file.
1717
*
18-
* @since 1.0.0-alpha4
18+
* @since 1.0.0
1919
*/
2020
final class TestTargetNotFound extends OutOfBoundsException
2121
{
2222

2323
/**
2424
* Create a new "test target token not found" exception with a standardized text.
2525
*
26-
* @since 1.0.0-alpha4
26+
* @since 1.0.0
2727
*
2828
* @param string $marker The delimiter comment.
2929
* @param string $content The (optional) target token content.

PHPCSUtils/Internal/Cache.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,26 @@ final class Cache
5757
*
5858
* Don't forget to always turn the cache back on in a `tear_down()` method!
5959
*
60+
* @since 1.0.0
61+
*
6062
* @var bool
6163
*/
6264
public static $enabled = true;
6365

6466
/**
6567
* Results cache.
6668
*
69+
* @since 1.0.0
70+
*
6771
* @var array<int, array<string, array>> Format: $cache[$loop][$fileName][$key][$id] = mixed $value;
6872
*/
6973
private static $cache = [];
7074

7175
/**
7276
* Check whether a result has been cached for a certain utility function.
7377
*
78+
* @since 1.0.0
79+
*
7480
* @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
7581
* @param string $key The key to identify a particular set of results.
7682
* It is recommended to pass __METHOD__ to this parameter.
@@ -98,6 +104,8 @@ public static function isCached(File $phpcsFile, $key, $id)
98104
/**
99105
* Retrieve a previously cached result for a certain utility function.
100106
*
107+
* @since 1.0.0
108+
*
101109
* @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
102110
* @param string $key The key to identify a particular set of results.
103111
* It is recommended to pass __METHOD__ to this parameter.
@@ -130,6 +138,8 @@ public static function get(File $phpcsFile, $key, $id)
130138
/**
131139
* Retrieve all previously cached results for a certain utility function and a certain file.
132140
*
141+
* @since 1.0.0
142+
*
133143
* @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
134144
* @param string $key The key to identify a particular set of results.
135145
* It is recommended to pass __METHOD__ to this parameter.
@@ -157,6 +167,8 @@ public static function getForFile(File $phpcsFile, $key)
157167
/**
158168
* Cache the result for a certain utility function.
159169
*
170+
* @since 1.0.0
171+
*
160172
* @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.
161173
* @param string $key The key to identify a particular set of results.
162174
* It is recommended to pass __METHOD__ to this parameter.
@@ -194,6 +206,8 @@ public static function set(File $phpcsFile, $key, $id, $value)
194206
/**
195207
* Clear the cache.
196208
*
209+
* @since 1.0.0
210+
*
197211
* @return void
198212
*/
199213
public static function clear()

0 commit comments

Comments
 (0)