Skip to content

Commit 9ed9e7c

Browse files
authored
Update package versions (#9)
1 parent 5144ea9 commit 9ed9e7c

File tree

5 files changed

+33
-25
lines changed

5 files changed

+33
-25
lines changed

.github/workflows/test.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,18 @@ permissions:
1111

1212
jobs:
1313
test:
14-
name: PHP ${{ matrix.php-versions }} Test ${{ matrix.composer-flags }}
14+
name: PHP ${{ matrix.php-versions }} - Symfony ${{ matrix.symfony }} - Test ${{ matrix.composer-flags }}
15+
env:
16+
SYMFONY_REQUIRE: ${{ matrix.symfony }}
1517
runs-on: ubuntu-latest
1618
strategy:
1719
matrix:
18-
php-versions: ['8.0', '8.1', '8.2']
19-
composer-flags: ['', '--prefer-lowest']
20+
php-versions: [ '8.1', '8.2', '8.3' ]
21+
symfony: [ '^6.2', '^7.0' ]
22+
composer-flags: [ '', '--prefer-lowest' ]
23+
exclude:
24+
- php-versions: 8.1
25+
symfony: '^7.0'
2026
steps:
2127
- uses: actions/checkout@v4
2228

@@ -26,6 +32,9 @@ jobs:
2632
php-version: ${{ matrix.php-versions }}
2733
coverage: none
2834

35+
- name: Add symfony flex
36+
run: composer global config --no-interaction allow-plugins.symfony/flex true && composer global require symfony/flex
37+
2938
- name: Validate composer.json and composer.lock
3039
run: composer validate
3140

@@ -44,7 +53,7 @@ jobs:
4453
- name: Setup PHP
4554
uses: shivammathur/setup-php@v2
4655
with:
47-
php-version: 8.2
56+
php-version: 8.3
4857
coverage: pcov
4958

5059
- name: Install dependencies
@@ -54,7 +63,7 @@ jobs:
5463
run: php -dpcov.enabled=1 -dpcov.exclude="~vendor~" vendor/bin/phpunit --testsuite unit --coverage-clover ./.coverage/coverage.xml
5564

5665
- name: Check coverage
57-
run: php vendor/bin/phpfci inspect ./.coverage/coverage.xml ./.coverage/phpfci.xml --exit-code-on-failure
66+
run: test ! -f ./.coverage/coverage.xml || php vendor/bin/phpfci inspect ./.coverage/coverage.xml --exit-code-on-failure --reportText
5867

5968
quality:
6069
name: Quality checks
@@ -65,7 +74,7 @@ jobs:
6574
- name: Setup PHP
6675
uses: shivammathur/setup-php@v2
6776
with:
68-
php-version: 8.0
77+
php-version: 8.1
6978
coverage: none
7079

7180
- name: Install dependencies

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.0-8892BF)](https://php.net/)
2-
[![Minimum Symfony Version](https://img.shields.io/badge/symfony-%3E%3D%206.0-brightgreen)](https://symfony.com/doc/current/validation.html)
3-
![Run checks](https://github.com/123inkt/symfony-console-validation/workflows/Run%checks/badge.svg)
1+
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%208.1-8892BF)](https://php.net/)
2+
[![Minimum Symfony Version](https://img.shields.io/badge/symfony-%3E%3D%206.2-brightgreen)](https://symfony.com/doc/current/validation.html)
3+
![Run checks](https://github.com/123inkt/symfony-console-validation/actions/workflows/test.yml/badge.svg)
44

55
# Symfony Console Validation
66
An input validation component for Symfony Console. Ease the validation of input arguments and options.
77

88
## Installation
99
Include the library as dependency in your own project via:
1010
```
11-
composer require "digitalrevolution/symfony-console-validation"
11+
composer require digitalrevolution/symfony-console-validation
1212
```
1313

1414
## Usage

composer.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
}
1212
},
1313
"require": {
14-
"php": ">=8.0",
14+
"php": ">=8.1",
1515
"digitalrevolution/symfony-validation-shorthand": "^1.0.4",
16-
"symfony/console": "^6.0",
17-
"symfony/validator": "^6.0"
16+
"symfony/console": "^6.2 || ^7.0",
17+
"symfony/validator": "^6.2 || ^7.0"
1818
},
1919
"require-dev": {
20-
"digitalrevolution/phpunit-file-coverage-inspection": "^v1.0",
20+
"digitalrevolution/phpunit-file-coverage-inspection": "^v2.0.0",
2121
"roave/security-advisories": "dev-latest",
2222
"squizlabs/php_codesniffer": "^3.6",
23-
"phpmd/phpmd": "@stable",
24-
"phpunit/phpunit": "^9.5",
25-
"phpstan/phpstan": "^1.4",
26-
"phpstan/phpstan-phpunit": "^1.0",
27-
"phpstan/phpstan-strict-rules": "^1.1",
28-
"phpstan/extension-installer": "^1.1"
23+
"phpmd/phpmd": "^2.14",
24+
"phpunit/phpunit": "^9.6",
25+
"phpstan/phpstan": "^1.10",
26+
"phpstan/phpstan-phpunit": "^1.3",
27+
"phpstan/phpstan-strict-rules": "^1.5",
28+
"phpstan/extension-installer": "^1.3"
2929
},
3030
"autoload": {
3131
"psr-4": {
@@ -40,7 +40,7 @@
4040
"scripts": {
4141
"check": ["@check:phpstan", "@check:phpmd", "@check:phpcs"],
4242
"check:phpstan": "phpstan analyse",
43-
"check:phpmd": "phpmd src,tests text phpmd.xml.dist --suffixes=php",
43+
"check:phpmd": "phpmd src,tests text phpmd.xml.dist --suffixes php",
4444
"check:phpcs": "phpcs src tests",
4545
"fix": "@fix:phpcbf",
4646
"fix:phpcbf": "phpcbf src tests",

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
44
bootstrap="vendor/autoload.php"
55
forceCoversAnnotation="true"
66
failOnRisky="true"

src/Constraint/InputConstraint.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ class InputConstraint extends Constraint
99
{
1010
public const WRONG_VALUE_TYPE = '67ff49d5-9a61-47ad-80f1-960fd2beab6f';
1111

12-
/** @var mixed */
13-
protected static $errorNames = [self::WRONG_VALUE_TYPE => 'WRONG_VALUE_TYPE',];
12+
protected const ERROR_NAMES = [self::WRONG_VALUE_TYPE => 'WRONG_VALUE_TYPE',];
1413

1514
public string $wrongTypeMessage = 'Expect value to be of type Symfony\Component\Console\Input\InputInterface';
1615

@@ -26,7 +25,7 @@ class InputConstraint extends Constraint
2625
* options?: Constraint|Constraint[]
2726
* }|null $options
2827
*/
29-
public function __construct($options = null)
28+
public function __construct(?array $options = null)
3029
{
3130
// make sure defaults are set
3231
$options = $options ?? [];

0 commit comments

Comments
 (0)