Skip to content

Commit

Permalink
feat!: add pathCallback filter to all finders
Browse files Browse the repository at this point in the history
  • Loading branch information
alekitto committed Feb 11, 2024
1 parent 84f8533 commit 3a405f0
Show file tree
Hide file tree
Showing 33 changed files with 981 additions and 493 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cscheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: "8.0"
php-version: "8.1"
tools: cs2pr

- name: Install Composer dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: "8.1"
php-version: "8.3"
tools: cs2pr

- name: Install Composer dependencies
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ jobs:
- windows-latest

php_version:
- '8.0'
- '8.1'
- '8.2'
- '8.3'

composer_flags:
- ''
Expand All @@ -41,14 +42,14 @@ jobs:
custom-cache-suffix: $(date -u "+%Y-%m")

- run: vendor/bin/phpunit
if: ${{ matrix.php_version != '8.0' }}
if: ${{ matrix.php_version != '8.2' }}
- run: vendor/bin/phpunit --coverage-clover coverage.xml
if: ${{ matrix.php_version == '8.0' }}
if: ${{ matrix.php_version == '8.2' }}
env:
XDEBUG_MODE: coverage

- name: Upload coverage to Codecov
if: ${{ matrix.php_version == '8.0' }}
if: ${{ matrix.php_version == '8.2' }}
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,7 @@ You can filter classes using the methods exposed by `FinderInterface`:
- `in(array $dirs)`: Searches only in given directories.
- `inNamespace(array $namespaces)`: Searches only in given namespaces.
- `filter(callable $callback)`: Custom filtering callback.

#### Specific finder filters

##### RecursiveFinder

- `fileFilter(callable $callback)`: Custom filtering callback for loading files.
- `pathFilter(callable $callback)`: Custom filtering callback for loading files.


## License
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"minimum-stability": "stable",
"require": {
"php": "^8.0",
"php": "^8.1",
"thecodingmachine/safe": "^1.0 || ^2.0"
},
"require-dev": {
Expand All @@ -25,7 +25,7 @@
"phpunit/phpunit": "^9.5",
"roave/security-advisories": "dev-master",
"solido/php-coding-standards": "dev-master",
"symfony/error-handler": "^5.0 || ^6.0"
"symfony/error-handler": "^5.0 || ^6.0 || ^7.0"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit 3a405f0

Please sign in to comment.