-
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.
Upgrade to Laravel 11 and PHPUnit 11 --------- Co-authored-by: Jose Manuel Cardona <josemanuel.cardona@softonic.com>
- Loading branch information
1 parent
d30c18f
commit 5e45417
Showing
9 changed files
with
159 additions
and
119 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 |
---|---|---|
@@ -1,35 +1,36 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__ . '/src') | ||
->in(__DIR__ . '/tests'); | ||
->in(__DIR__.'/src') | ||
->in(__DIR__.'/tests'); | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setRules([ | ||
'@PSR2' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'concat_space' => ['spacing' => 'one'], | ||
'new_with_braces' => true, | ||
'no_blank_lines_after_phpdoc' => true, | ||
'no_empty_phpdoc' => true, | ||
'no_empty_comment' => true, | ||
'no_leading_import_slash' => true, | ||
'no_trailing_comma_in_singleline_array' => true, | ||
'no_unused_imports' => true, | ||
'ordered_imports' => ['imports_order' => null, 'sort_algorithm' => 'alpha'], | ||
'phpdoc_add_missing_param_annotation' => ['only_untyped' => true], | ||
'phpdoc_align' => true, | ||
'phpdoc_no_empty_return' => true, | ||
'phpdoc_order' => true, | ||
'phpdoc_scalar' => true, | ||
'phpdoc_to_comment' => true, | ||
'psr_autoloading' => true, | ||
'return_type_declaration' => ['space_before' => 'none'], | ||
'single_blank_line_before_namespace' => true, | ||
'single_quote' => true, | ||
'space_after_semicolon' => true, | ||
'ternary_operator_spaces' => true, | ||
'trailing_comma_in_multiline' => true, | ||
'trim_array_spaces' => true, | ||
'whitespace_after_comma_in_array' => true, | ||
'@PSR2' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'concat_space' => ['spacing' => 'one'], | ||
'new_with_parentheses' => true, | ||
'no_blank_lines_after_phpdoc' => true, | ||
'no_empty_phpdoc' => true, | ||
'no_empty_comment' => true, | ||
'no_leading_import_slash' => true, | ||
'no_trailing_comma_in_singleline' => true, | ||
'no_unused_imports' => true, | ||
'ordered_imports' => ['imports_order' => null, 'sort_algorithm' => 'alpha'], | ||
'phpdoc_add_missing_param_annotation' => ['only_untyped' => true], | ||
'phpdoc_align' => true, | ||
'phpdoc_no_empty_return' => true, | ||
'phpdoc_order' => true, | ||
'phpdoc_scalar' => true, | ||
'phpdoc_to_comment' => true, | ||
'psr_autoloading' => true, | ||
'return_type_declaration' => ['space_before' => 'none'], | ||
'blank_lines_before_namespace' => true, | ||
'single_quote' => true, | ||
'space_after_semicolon' => true, | ||
'ternary_operator_spaces' => true, | ||
'trailing_comma_in_multiline' => true, | ||
'trim_array_spaces' => true, | ||
'whitespace_after_comma_in_array' => true, | ||
]) | ||
->setFinder($finder); |
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,35 @@ | ||
version: '3.8' | ||
|
||
services: | ||
composer: | ||
php: | ||
volumes: | ||
- ./:/app | ||
image: composer:2.2 | ||
|
||
install: | ||
volumes: | ||
- ./:/app | ||
image: composer:2.2 | ||
command: composer install --ignore-platform-req=ext-sockets | ||
|
||
update: | ||
volumes: | ||
- ./:/app | ||
image: composer:2.2 | ||
command: composer update --ignore-platform-req=ext-sockets | ||
|
||
phpunit: | ||
volumes: | ||
- ./:/app | ||
image: composer:2.2 | ||
command: composer phpunit | ||
|
||
test: | ||
volumes: | ||
- ./:/app | ||
image: composer:2.2 | ||
command: composer run tests | ||
|
||
fixcs: | ||
volumes: | ||
- ./:/app | ||
build: ./ | ||
image: composer:2.2 | ||
command: composer run fix-cs |
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,33 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<phpunit bootstrap="vendor/autoload.php" | ||
backupGlobals="false" | ||
backupStaticAttributes="false" | ||
colors="true" | ||
verbose="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false"> | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
colors="true" | ||
displayDetailsOnTestsThatTriggerDeprecations="true" | ||
displayDetailsOnTestsThatTriggerErrors="true" | ||
displayDetailsOnTestsThatTriggerNotices="true" | ||
displayDetailsOnTestsThatTriggerWarnings="true"> | ||
|
||
<testsuites> | ||
<testsuite name="Laravel Queue Job"> | ||
<directory>tests</directory> | ||
<testsuite name="All"> | ||
<directory>./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">src</directory> | ||
</whitelist> | ||
</filter> | ||
|
||
<logging> | ||
<log type="junit" target="build/report.junit.xml"/> | ||
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/> | ||
<log type="coverage-text" target="build/coverage.txt"/> | ||
<log type="coverage-clover" target="build/clover.xml"/> | ||
</logging> | ||
|
||
</phpunit> |
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.