From fc1fa26fccce3b3fb4c6ea6c155a65887052b487 Mon Sep 17 00:00:00 2001 From: Jason Adams Date: Tue, 7 Feb 2023 12:01:13 -0800 Subject: [PATCH] chore: prepare for 1.1.0 release --- src/Commands/SkipValidationRules.php | 2 +- src/Rules/Nullable.php | 10 ++++----- src/Rules/Optional.php | 10 ++++----- tests/unit/Rules/CurrencyTest.php | 4 ++-- tests/unit/Rules/EmailTest.php | 4 ++-- tests/unit/Rules/IntegerTest.php | 6 +++--- tests/unit/Rules/NullableTest.php | 2 +- tests/unit/Rules/NumericTest.php | 4 ++-- tests/unit/Rules/OptionalTest.php | 2 +- tests/unit/ValidationRuleSetTest.php | 32 ++++++++++++++-------------- tests/unit/ValidatorTest.php | 26 +++++++++++----------- 11 files changed, 51 insertions(+), 51 deletions(-) diff --git a/src/Commands/SkipValidationRules.php b/src/Commands/SkipValidationRules.php index 0802602..f3325e7 100644 --- a/src/Commands/SkipValidationRules.php +++ b/src/Commands/SkipValidationRules.php @@ -7,7 +7,7 @@ /** * Returning this command from ValidationRule::__invoke() tells the Validator to skip all subsequent rules. * - * @unreleased + * @since 1.1.0 */ class SkipValidationRules { diff --git a/src/Rules/Nullable.php b/src/Rules/Nullable.php index ab0d38f..ed061ef 100644 --- a/src/Rules/Nullable.php +++ b/src/Rules/Nullable.php @@ -13,12 +13,12 @@ * This rule skips further validation if the field is null. It is similar to Optional, but the only allowed value is * null. * - * @unreleased + * @since 1.1.0 */ class Nullable implements ValidationRule, ValidatesOnFrontEnd { /** - * @unreleased + * @since 1.1.0 */ public static function id(): string { @@ -26,7 +26,7 @@ public static function id(): string } /** - * @unreleased + * @since 1.1.0 */ public static function fromString(string $options = null): ValidationRule { @@ -34,7 +34,7 @@ public static function fromString(string $options = null): ValidationRule } /** - * @unreleased + * @since 1.1.0 * * @return SkipValidationRules|void */ @@ -46,7 +46,7 @@ public function __invoke($value, Closure $fail, string $key, array $values) } /** - * @unreleased + * @since 1.1.0 */ public function serializeOption() { diff --git a/src/Rules/Optional.php b/src/Rules/Optional.php index 5db6d8f..2b294e9 100644 --- a/src/Rules/Optional.php +++ b/src/Rules/Optional.php @@ -12,12 +12,12 @@ /** * This rule marks a field as optional and skips further validation if the rule is either null or an empty string. * - * @unreleased + * @since 1.1.0 */ class Optional implements ValidationRule, ValidatesOnFrontEnd { /** - * @unreleased + * @since 1.1.0 */ public static function id(): string { @@ -25,7 +25,7 @@ public static function id(): string } /** - * @unreleased + * @since 1.1.0 */ public static function fromString(string $options = null): ValidationRule { @@ -33,7 +33,7 @@ public static function fromString(string $options = null): ValidationRule } /** - * @unreleased + * @since 1.1.0 * * @return SkipValidationRules|void */ @@ -45,7 +45,7 @@ public function __invoke($value, Closure $fail, string $key, array $values) } /** - * @unreleased + * @since 1.1.0 */ public function serializeOption() { diff --git a/tests/unit/Rules/CurrencyTest.php b/tests/unit/Rules/CurrencyTest.php index 2a8902d..6838d8f 100644 --- a/tests/unit/Rules/CurrencyTest.php +++ b/tests/unit/Rules/CurrencyTest.php @@ -9,7 +9,7 @@ class CurrencyTest extends TestCase { /** - * @unreleased + * @since 1.1.0 * @dataProvider currencyProvider */ public function testCurrencyValidations($currency, $shouldPass) @@ -24,7 +24,7 @@ public function testCurrencyValidations($currency, $shouldPass) } /** - * @unreleased + * @since 1.1.0 */ public function currencyProvider(): array { diff --git a/tests/unit/Rules/EmailTest.php b/tests/unit/Rules/EmailTest.php index 618fdac..ffd40c6 100644 --- a/tests/unit/Rules/EmailTest.php +++ b/tests/unit/Rules/EmailTest.php @@ -10,7 +10,7 @@ class EmailTest extends TestCase { /** - * @unreleased + * @since 1.1.0 * * @dataProvider emailsProvider */ @@ -26,7 +26,7 @@ public function testEmailRule($email, bool $shouldBeValid) } /** - * @unreleased + * @since 1.1.0 * * @return array> */ diff --git a/tests/unit/Rules/IntegerTest.php b/tests/unit/Rules/IntegerTest.php index a9b57f1..7877eea 100644 --- a/tests/unit/Rules/IntegerTest.php +++ b/tests/unit/Rules/IntegerTest.php @@ -10,7 +10,7 @@ class IntegerTest extends TestCase { /** - * @unreleased + * @since 1.1.0 * * @dataProvider integersProvider */ @@ -26,7 +26,7 @@ public function testRuleValidatesIntegers($value, $pass) } /** - * @unreleased + * @since 1.1.0 */ public function testCastsToInteger() { @@ -35,7 +35,7 @@ public function testCastsToInteger() } /** - * @unreleased + * @since 1.1.0 */ public function integersProvider(): array { diff --git a/tests/unit/Rules/NullableTest.php b/tests/unit/Rules/NullableTest.php index 2fe8de2..8ab0fe5 100644 --- a/tests/unit/Rules/NullableTest.php +++ b/tests/unit/Rules/NullableTest.php @@ -11,7 +11,7 @@ class NullableTest extends TestCase { /** - * @unreleased + * @since 1.1.0 */ public function testNullableValidation() { diff --git a/tests/unit/Rules/NumericTest.php b/tests/unit/Rules/NumericTest.php index b333a64..0a5780a 100644 --- a/tests/unit/Rules/NumericTest.php +++ b/tests/unit/Rules/NumericTest.php @@ -9,7 +9,7 @@ class NumericTest extends TestCase { /** - * @unreleased + * @since 1.1.0 */ public function testShouldPassWhenValueIsNumeric() { @@ -22,7 +22,7 @@ public function testShouldPassWhenValueIsNumeric() } /** - * @unreleased + * @since 1.1.0 */ public function testShouldFailWhenValueIsNotNumeric() { diff --git a/tests/unit/Rules/OptionalTest.php b/tests/unit/Rules/OptionalTest.php index 77d8eac..59f6cbf 100644 --- a/tests/unit/Rules/OptionalTest.php +++ b/tests/unit/Rules/OptionalTest.php @@ -11,7 +11,7 @@ class OptionalTest extends TestCase { /** - * @unreleased + * @since 1.1.0 */ public function testNullableValidation() { diff --git a/tests/unit/ValidationRuleSetTest.php b/tests/unit/ValidationRuleSetTest.php index 37242cd..5ef4a4f 100644 --- a/tests/unit/ValidationRuleSetTest.php +++ b/tests/unit/ValidationRuleSetTest.php @@ -14,12 +14,12 @@ /** * @covers ValidationRuleSet * - * @unreleased + * @since 1.1.0 */ class ValidationRuleSetTest extends TestCase { /** - * @unreleased + * @since 1.1.0 */ public function testRulesCanBePassedAsStrings() { @@ -30,7 +30,7 @@ public function testRulesCanBePassedAsStrings() } /** - * @unreleased + * @since 1.1.0 */ public function testRulesCanBePassedAsInstances() { @@ -41,7 +41,7 @@ public function testRulesCanBePassedAsInstances() } /** - * @unreleased + * @since 1.1.0 */ public function testRulesCanBePassedAsClosures() { @@ -53,7 +53,7 @@ public function testRulesCanBePassedAsClosures() } /** - * @unreleased + * @since 1.1.0 */ public function testCheckingHasRule() { @@ -66,7 +66,7 @@ public function testCheckingHasRule() } /** - * @unreleased + * @since 1.1.0 */ public function testGettingARule() { @@ -79,7 +79,7 @@ public function testGettingARule() } /** - * @unreleased + * @since 1.1.0 */ public function testGettingAllRules() { @@ -90,7 +90,7 @@ public function testGettingAllRules() } /** - * @unreleased + * @since 1.1.0 */ public function testForgettingARule() { @@ -103,7 +103,7 @@ public function testForgettingARule() } /** - * @unreleased + * @since 1.1.0 */ public function testRulesCanBeSerializedToJson() { @@ -120,7 +120,7 @@ public function testRulesCanBeSerializedToJson() } /** - * @unreleased + * @since 1.1.0 */ public function testRulesAreIterable() { @@ -128,7 +128,7 @@ public function testRulesAreIterable() } /** - * @unreleased + * @since 1.1.0 */ public function testClosuresMustHaveAtLeastTwoParameters() { @@ -141,7 +141,7 @@ public function testClosuresMustHaveAtLeastTwoParameters() } /** - * @unreleased + * @since 1.1.0 */ public function testClosureMustHaveAtMostFourParameters() { @@ -154,7 +154,7 @@ public function testClosureMustHaveAtMostFourParameters() } /** - * @unreleased + * @since 1.1.0 */ public function testClosureSecondParameterMustBeClosure() { @@ -169,7 +169,7 @@ public function testClosureSecondParameterMustBeClosure() } /** - * @unreleased + * @since 1.1.0 */ public function testClosureThirdParameterMustBeString() { @@ -182,7 +182,7 @@ public function testClosureThirdParameterMustBeString() } /** - * @unreleased + * @since 1.1.0 */ public function testClosureFourthParameterMustBeArray() { @@ -195,7 +195,7 @@ public function testClosureFourthParameterMustBeArray() } /** - * @unreleased + * @since 1.1.0 */ private function getMockRulesRegister(): ValidationRulesRegistrar { diff --git a/tests/unit/ValidatorTest.php b/tests/unit/ValidatorTest.php index a4432bf..13b74b1 100644 --- a/tests/unit/ValidatorTest.php +++ b/tests/unit/ValidatorTest.php @@ -17,7 +17,7 @@ /** * @covers \StellarWP\Validation\Validator * - * @unreleased + * @since 1.1.0 */ class ValidatorTest extends TestCase { @@ -29,7 +29,7 @@ public function setUp(): void } /** - * @unreleased + * @since 1.1.0 */ public function testValidatorPasses() { @@ -49,7 +49,7 @@ public function testValidatorPasses() } /** - * @unreleased + * @since 1.1.0 */ public function testValidatorAcceptsArraysAsRules() { @@ -65,7 +65,7 @@ public function testValidatorAcceptsArraysAsRules() } /** - * @unreleased + * @since 1.1.0 */ public function testFailingValidations() { @@ -82,7 +82,7 @@ public function testFailingValidations() } /** - * @unreleased + * @since 1.1.0 */ public function testReturnsErrorsForFailedValidations() { @@ -100,7 +100,7 @@ public function testReturnsErrorsForFailedValidations() } /** - * @unreleased + * @since 1.1.0 */ public function testUsesLabelsWhenAvailableInErrorMessage() { @@ -121,7 +121,7 @@ public function testUsesLabelsWhenAvailableInErrorMessage() } /** - * @unreleased + * @since 1.1.0 */ public function testReturnsValidatedValues() { @@ -140,7 +140,7 @@ public function testReturnsValidatedValues() } /** - * @unreleased + * @since 1.1.0 */ public function testValuesWithoutRulesAreOmitted() { @@ -157,7 +157,7 @@ public function testValuesWithoutRulesAreOmitted() } /** - * @unreleased + * @since 1.1.0 */ public function testRuleArraysWithoutRulesAreConsideredOptional() { @@ -177,7 +177,7 @@ public function testRuleArraysWithoutRulesAreConsideredOptional() } /** - * @unreleased + * @since 1.1.0 */ public function testRulesWithSanitizationAreApplied() { @@ -196,7 +196,7 @@ public function testRulesWithSanitizationAreApplied() } /** - * @unreleased + * @since 1.1.0 */ public function testWithSkipValidationRulesSkipsRemainingRules() { @@ -215,7 +215,7 @@ public function testWithSkipValidationRulesSkipsRemainingRules() } /** - * @unreleased + * @since 1.1.0 */ public function testInvalidRulesThrowInvalidArgumentException() { @@ -234,7 +234,7 @@ public function testInvalidRulesThrowInvalidArgumentException() /** * Adds the validation register to the container, and adds a mock validation rule * - * @unreleased + * @since 1.1.0 */ private function mockValidationRulesRegister() {