Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/improve-dri…
Browse files Browse the repository at this point in the history
…verinterface
  • Loading branch information
uuf6429 committed Nov 2, 2024
2 parents b966998 + 7e4edec commit 5d64be0
Show file tree
Hide file tree
Showing 42 changed files with 1,724 additions and 996 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
tab_width = 4
trim_trailing_whitespace = true

[.github/workflows/*.yml]
indent_size = 2
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/.github export-ignore
/tests export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
CONTRIBUTING.md export-ignore
phpdoc.ini.dist export-ignore
phpstan*.neon export-ignore
phpunit.xml.dist export-ignore
45 changes: 32 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,51 @@ defaults:
shell: bash

jobs:
check_composer:
name: Check composer.json
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: '8.2'
- run: composer validate --strict --no-check-lock

static_analysis:
name: Static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: '8.2'
- name: Install dependencies
run: composer update --ansi --no-progress --prefer-dist --no-interaction
- run: vendor/bin/phpstan analyze

tests:
name: Tests
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

strategy:
matrix:
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
composer_flags: [ '' ]
minimum_stability: [ '' ]
symfony_deprecations_helper: [ '' ]
include:
- php: '7.2'
composer_flags: '--prefer-lowest --prefer-stable'
symfony_deprecations_helper: weak
- php: '8.0'
minimum_stability: dev
- php: '7.4'
- php: '8.2'
minimum_stability: dev
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand All @@ -45,17 +66,15 @@ jobs:

- name: Configure for minimum stability
if: "${{ matrix.minimum_stability == 'dev' }}"
run: |
composer config minimum-stability dev
run: composer config minimum-stability dev

- name: Install dependencies
run: |
composer update ${{ matrix.composer_flags }}
run: composer update ${{ matrix.composer_flags }}

- name: Run tests
run: |
export SYMFONY_DEPRECATIONS_HELPER="${{ matrix.symfony_deprecations_helper }}"
vendor/bin/phpunit -v --coverage-clover=coverage.xml
env:
SYMFONY_DEPRECATIONS_HELPER: "${{ matrix.symfony_deprecations_helper }}"
run: vendor/bin/phpunit -v --coverage-clover=coverage.xml

- name: Upload coverage
uses: codecov/codecov-action@v3
Expand Down
22 changes: 22 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
1.12.0 / 2024-10-31
===================

Bug fixes:

* Explicitly mark method parameters with `null` default values as nullable to avoid deprecation notice in PHP 8.4

1.11.0 / 2023-12-09
===================

New features:

* Added support for `symfony/css-selector` 7
* Added constants for the supported key modifiers
* Improved types to help static analysis
* Added parameter types for most methods

Testsuite:

* Added CI jobs for PHP 8.2 and 8.3
* Added static analysis in our CI

1.10.0 / 2022-03-28
===================

Expand Down
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@

"require": {
"php": ">=7.2",
"symfony/css-selector": "^4.4 || ^5.0 || ^6.0"
"symfony/css-selector": "^4.4 || ^5.0 || ^6.0 || ^7.0"
},

"require-dev": {
"symfony/error-handler": "^4.4 || ^5.0 || ^6.0",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-phpunit": "^1.3",
"phpunit/phpunit": "^8.5.22 || ^9.5.11",
"symfony/phpunit-bridge": "^5.4 || ^6.0",
"symfony/error-handler": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/phpunit-bridge": "^5.4 || ^6.0 || ^7.0",
"jetbrains/phpstorm-attributes": "*"
},

Expand Down
16 changes: 16 additions & 0 deletions phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
parameters:
level: 8
paths:
- src
- tests
checkMissingIterableValueType: false
checkMissingCallableSignature: true
treatPhpDocTypesAsCertain: false
ignoreErrors:
- '#^Method Behat\\Mink\\Tests\\[^:]+Test(Case)?\:\:test\w*\(\) has no return type specified\.$#'
- '#^Method Behat\\Mink\\Tests\\[^:]+Test(Case)?\:\:provide\w*\(\) has no return type specified\.$#'
- '#^Method Behat\\Mink\\Tests\\[^:]+Test(Case)?\:\:get\w*\(\) has no return type specified\.$#'

includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
Loading

0 comments on commit 5d64be0

Please sign in to comment.