-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 1. Implemented the AsCommand attributes for final $defaultName 2. Removed support for PHP <8.0 3. Reworked the __construct methods to be on-par with php >=8.0 4. Removed all rferences to GetMasterRequest - using only getMainRequest now 5. Fixed custom_uploader.md documentation to use getMainRequest * Changed the ci.yml fot gihub actions * Ran php cs fixer for code style Reran testes, all passes * Updated php_cs_fixer to v4 Changed the config file to work with the new version Ran php_cs_fixer on codebase Tests still pass * Updated php_stan and config file * Updated php unit-brdge to v6.0.* * Add tyope hint var comment/Annotation to the $helper class * Fixe some more phpstan issues with regards to type hints and retur types * Some mroe php cs fixer changes * Removed unused sensio/framework-extra-bundle + updated symfony/phpunit-bridge version constraint * Allow Symfony 7 * Updated CI to test SF 6.2 - 7.0 * Fixes phpstan errors * Refactored phpstan fixes * Fix CI for prefer lowest run * Drop support for symfony/* ^4.4 * Fix CI for Yaml incompatibility --------- Co-authored-by: Johan Kasselman <[email protected]>
- Loading branch information
1 parent
34d2204
commit 594def5
Showing
69 changed files
with
365 additions
and
859 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,93 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: ~ | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*' | ||
pull_request: ~ | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
coding-style: | ||
name: Coding Style | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@2.9.0 | ||
with: | ||
php-version: 7.4 | ||
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo, zlib | ||
coverage: none | ||
coding-style: | ||
name: Coding Style | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.0 | ||
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo, zlib | ||
coverage: none | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install the dependencies | ||
run: composer install --no-interaction --no-suggest | ||
- name: Check the coding style | ||
run: vendor/bin/php-cs-fixer fix --diff --dry-run | ||
- name: Analyze the code | ||
run: vendor/bin/phpstan analyze src/ tests/ --level=max | ||
- name: Install the dependencies | ||
run: composer install --no-interaction | ||
|
||
tests: | ||
name: PHP ${{ matrix.php }} / SF ^${{ matrix.symfony }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [7.4, 8.0] | ||
symfony: [4.4, 5.4, 6.0] | ||
exclude: | ||
# Symfony 6.0 does not supports php <8.0 | ||
- php: 7.4 | ||
symfony: 6.0 | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/[email protected] | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo_mysql, zlib | ||
coverage: none | ||
- name: Check the coding style | ||
run: vendor/bin/php-cs-fixer fix --diff --dry-run | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Analyze the code | ||
run: vendor/bin/phpstan analyze | ||
|
||
- name: Install the dependencies | ||
run: | | ||
composer require symfony/framework-bundle:^${{ matrix.symfony }} symfony/http-foundation:^${{ matrix.symfony }} | ||
composer install --no-interaction --no-suggest | ||
- name: Run the unit tests | ||
run: vendor/bin/phpunit --colors=always | ||
tests: | ||
name: PHP ${{ matrix.php }} / SF ^${{ matrix.symfony }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [8.0, 8.1, 8.2] | ||
symfony: [5.4, 6.0, 6.1, 6.2, 6.3, 6.4, 7.0] | ||
exclude: | ||
- php: 8.0 | ||
symfony: 6.1 | ||
- php: 8.0 | ||
symfony: 6.2 | ||
- php: 8.0 | ||
symfony: 6.3 | ||
- php: 8.0 | ||
symfony: 6.4 | ||
- php: 8.0 | ||
symfony: 7.0 | ||
- php: 8.1 | ||
symfony: 7.0 | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo_mysql, zlib | ||
coverage: none | ||
|
||
prefer-lowest: | ||
name: Prefer Lowest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/[email protected] | ||
with: | ||
php-version: 7.4 | ||
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo_mysql, zlib | ||
coverage: none | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install the dependencies | ||
run: | | ||
composer require symfony/framework-bundle:^${{ matrix.symfony }} symfony/http-foundation:^${{ matrix.symfony }} symfony/yaml:^${{ matrix.symfony }} | ||
composer install --no-interaction --no-suggest | ||
- name: Install the dependencies | ||
run: composer update --prefer-lowest --prefer-stable --no-interaction --no-suggest | ||
- name: Run the unit tests | ||
run: vendor/bin/phpunit --colors=always | ||
- name: Run the unit tests | ||
run: vendor/bin/phpunit --colors=always | ||
|
||
prefer-lowest: | ||
name: Prefer Lowest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.0 | ||
extensions: dom, fileinfo, filter, gd, hash, intl, json, mbstring, pcre, pdo_mysql, zlib | ||
coverage: none | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install the dependencies | ||
run: composer update --prefer-lowest --prefer-stable --no-interaction | ||
|
||
- name: Run the unit tests | ||
run: vendor/bin/phpunit --colors=always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,44 @@ | ||
parameters: | ||
bootstrapFiles: | ||
- %rootDir%/../../../vendor/autoload.php | ||
|
||
excludes_analyse: | ||
level: 9 | ||
paths: | ||
- src | ||
- tests | ||
excludePaths: | ||
- src/DependencyInjection/Configuration.php | ||
- tests/App/cache | ||
- tests/App/logs | ||
- tests/App/var | ||
- var | ||
- vendor | ||
|
||
checkGenericClassInNonGenericObjectType: false | ||
checkMissingIterableValueType: false | ||
reportUnmatchedIgnoredErrors: false | ||
|
||
ignoreErrors: | ||
- '#Cannot cast mixed to int\.#' | ||
- '#Cannot call method addListener\(\) on mixed\.#' | ||
- '#Cannot call method getSize\(\) on mixed\.#' | ||
- '#Cannot call method maxSize\(\) on mixed\.#' | ||
- '#Cannot call method getPathname\(\) on mixed\.#' | ||
- '#Cannot call method getPath\(\) on mixed\.#' | ||
- '#Cannot call method getRealPath\(\) on mixed\.#' | ||
- '#Cannot call method getBasename\(\) on mixed\.#' | ||
- '#Method Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface::dispatch\(\) invoked with 2 parameters, 1 required\.#' | ||
- | ||
message: '#Cannot use array destructuring on array<int, string>\|false\.#' | ||
path: '%currentWorkingDirectory%/src/Controller/BlueimpController.php' | ||
- | ||
message: '#Binary operation "/" between string and int results in an error\.#' | ||
path: '%currentWorkingDirectory%/src/Controller/BlueimpController.php' | ||
- | ||
message: '#Dead catch - Gaufrette\\Exception\\FileNotFound is never thrown in the try block\.#' | ||
path: '%currentWorkingDirectory%/src/Uploader/Chunk/Storage/GaufretteStorage.php' | ||
- | ||
message: '#Parameter \#1 \$finfo of function finfo_file|finfo_close expects finfo, resource given\.#' | ||
path: '%currentWorkingDirectory%/src/Uploader/File/GaufretteFile.php' | ||
- | ||
message: '#Parameter \#2 ...\$values of function sprintf expects bool\|float\|int\|string\|null, mixed given\.#' | ||
path: '%currentWorkingDirectory%/src/Controller/PluploadController.php' | ||
- | ||
message: '#Parameter \#1 \$parameters of class Symfony\\Component\\HttpFoundation\\FileBag constructor expects array<Symfony\\Component\\HttpFoundation\\File\\UploadedFile>, array<int, Symfony\\Component\\HttpFoundation\\File\\UploadedFile\|null> given\.#' | ||
path: '%currentWorkingDirectory%/tests/Controller/FileBagExtractorTest.php' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.