-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from answear/refactor-php-81
refactor PHP 8.1
- Loading branch information
Showing
20 changed files
with
163 additions
and
279 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
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 |
---|---|---|
|
@@ -11,7 +11,8 @@ jobs: | |
strategy: | ||
matrix: | ||
php-version: | ||
- "7.4" | ||
- "8.1" | ||
- "8.2" | ||
|
||
steps: | ||
- name: "Checkout" | ||
|
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,5 +1,5 @@ | ||
/vendor/ | ||
\.php_cs\.cache | ||
\.php-cs-fixer\.cache | ||
.phpunit.result.cache | ||
composer.lock | ||
/.idea |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
$config = new PhpCsFixer\Config(); | ||
|
||
$finder = $config->getFinder() | ||
->exclude( | ||
[ | ||
'vendor', | ||
] | ||
) | ||
->in(__DIR__); | ||
|
||
return $config | ||
->setRules( | ||
[ | ||
'@Symfony' => true, | ||
'strict_param' => false, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'concat_space' => ['spacing' => 'one'], | ||
'phpdoc_align' => [], | ||
'phpdoc_summary' => false, | ||
'void_return' => false, | ||
'phpdoc_var_without_name' => false, | ||
'phpdoc_to_comment' => false, | ||
'single_line_throw' => false, | ||
'modernize_types_casting' => true, | ||
'function_declaration' => false, | ||
'ordered_imports' => [ | ||
'imports_order' => [ | ||
'class', | ||
'function', | ||
'const', | ||
], | ||
'sort_algorithm' => 'alpha', | ||
], | ||
'phpdoc_separation' => ['skip_unlisted_annotations' => true], | ||
'nullable_type_declaration' => true, | ||
'nullable_type_declaration_for_default_null_value' => true, | ||
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'parameters']], | ||
] | ||
); |
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,50 +1,53 @@ | ||
{ | ||
"name": "answear/inpost-pickup-point-bundle", | ||
"description": "API Client for Inpost.", | ||
"type": "symfony-bundle", | ||
"license": "MIT", | ||
"require": { | ||
"php": ">=7.4", | ||
"ext-json": "*", | ||
"guzzlehttp/guzzle": "^6.0", | ||
"marc-mabe/php-enum": "^3.0|^4.3", | ||
"symfony/http-kernel": "^4.4|^5.0", | ||
"symfony/serializer": "^4.4|^5.0", | ||
"webmozart/assert": "^1.3" | ||
}, | ||
"require-dev": { | ||
"roave/security-advisories": "dev-master", | ||
"phpunit/phpunit": "^8.4", | ||
"symfony/phpunit-bridge": "^5.0", | ||
"phpro/grumphp": "^0.20", | ||
"friendsofphp/php-cs-fixer": "^2.16", | ||
"phpstan/phpstan": "^0.12.32", | ||
"phpstan/phpstan-webmozart-assert": "^0.12.2" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Answear\\InpostBundle\\": "src/" | ||
"name": "answear/inpost-pickup-point-bundle", | ||
"description": "API Client for Inpost.", | ||
"type": "symfony-bundle", | ||
"license": "MIT", | ||
"require": { | ||
"php": "^8.1", | ||
"ext-json": "*", | ||
"guzzlehttp/guzzle": "^6.0", | ||
"phpstan/phpstan-deprecation-rules": "^1.1", | ||
"symfony/http-kernel": "^6.0", | ||
"symfony/serializer": "^6.0", | ||
"webmozart/assert": "^1.11" | ||
}, | ||
"require-dev": { | ||
"friendsofphp/php-cs-fixer": "^3.48", | ||
"phpro/grumphp": "^2.4", | ||
"phpstan/phpstan": "^1.10.57", | ||
"phpstan/phpstan-webmozart-assert": "^1.2.4", | ||
"phpunit/phpunit": "^10.5", | ||
"roave/security-advisories": "dev-master", | ||
"symfony/phpunit-bridge": "6.1.*" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Answear\\InpostBundle\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Answear\\InpostBundle\\Tests\\": "tests/" | ||
} | ||
}, | ||
"scripts": { | ||
"post-install-cmd": [ | ||
"GrumPHP\\Composer\\DevelopmentIntegrator::integrate" | ||
], | ||
"post-update-cmd": [ | ||
"GrumPHP\\Composer\\DevelopmentIntegrator::integrate" | ||
] | ||
}, | ||
"extra": { | ||
"grumphp": { | ||
"config-default-path": "grumphp.yaml" | ||
} | ||
}, | ||
"config": { | ||
"sort-packages": true, | ||
"allow-plugins": { | ||
"phpro/grumphp": true | ||
} | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Answear\\InpostBundle\\Tests\\": "tests/" | ||
} | ||
}, | ||
"scripts": { | ||
"post-install-cmd": [ | ||
"GrumPHP\\Composer\\DevelopmentIntegrator::integrate" | ||
], | ||
"post-update-cmd": [ | ||
"GrumPHP\\Composer\\DevelopmentIntegrator::integrate" | ||
] | ||
}, | ||
"extra": { | ||
"grumphp": { | ||
"config-default-path": "grumphp.yaml" | ||
} | ||
}, | ||
"config": { | ||
"sort-packages": true | ||
} | ||
} |
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,7 +1,13 @@ | ||
includes: | ||
- vendor/phpstan/phpstan-webmozart-assert/extension.neon | ||
- vendor/phpstan/phpstan-deprecation-rules/rules.neon | ||
|
||
parameters: | ||
level: 5 | ||
checkNullables: true | ||
checkUnionTypes: true | ||
treatPhpDocTypesAsCertain: false | ||
paths: | ||
- %rootDir%/../../../src | ||
- %rootDir%/../../../src | ||
excludePaths: | ||
- tests/* |
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.