-
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.
Update wrapper release in composer.json (#7)
* update-composer-for-wrapper * Improve CI Co-authored-by: Eric COURTIAL <[email protected]>
- Loading branch information
1 parent
16b6bd2
commit 199d9c7
Showing
9 changed files
with
182 additions
and
23 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 |
---|---|---|
@@ -0,0 +1,102 @@ | ||
version: '2.1' | ||
executors: | ||
php7-2: | ||
docker: | ||
- image: php:7.2-alpine | ||
php7-3: | ||
docker: | ||
- image: php:7.3-alpine | ||
php7-4: | ||
docker: | ||
- image: php:7.4-alpine | ||
|
||
jobs: | ||
phpcs: | ||
parameters: | ||
executor: | ||
type: executor | ||
executor: << parameters.executor >> | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: composer-<< parameters.executor >>-{{ checksum "composer.json" }}-{{ checksum "composer.lock" }} | ||
- attach_workspace: | ||
at: . | ||
- run: | ||
name: Install alpine requirements for checkout | ||
command: apk add git openssh-client curl libzip-dev zip && docker-php-ext-install zip | ||
- run: | ||
name: composer | ||
command: | | ||
if [[ ! -f vendor/autoload.php ]]; then | ||
curl https://getcomposer.org/composer-stable.phar --location --silent --output /usr/bin/composer; \ | ||
chmod +x /usr/bin/composer; \ | ||
composer install --no-progress --no-interaction; \ | ||
fi | ||
- run: | ||
name: phpcs | ||
command: vendor/bin/phpcs -n | ||
|
||
phpstan: | ||
parameters: | ||
executor: | ||
type: executor | ||
executor: << parameters.executor >> | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: . | ||
- run: | ||
name: Install alpine requirements for checkout | ||
command: apk add git openssh-client curl libzip-dev zip && docker-php-ext-install zip | ||
- run: | ||
name: composer | ||
command: | | ||
if [[ ! -f vendor/autoload.php ]]; then | ||
curl https://getcomposer.org/composer-stable.phar --location --silent --output /usr/bin/composer; \ | ||
chmod +x /usr/bin/composer; \ | ||
composer install --no-progress --no-interaction; \ | ||
fi | ||
- run: | ||
name: phpstan | ||
command: vendor/bin/phpstan analyse | ||
|
||
phpunit: | ||
parameters: | ||
executor: | ||
type: executor | ||
executor: << parameters.executor >> | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: . | ||
- run: | ||
name: Install alpine requirements for checkout | ||
command: apk add git openssh-client curl libzip-dev zip && docker-php-ext-install zip | ||
- run: | ||
name: composer | ||
command: | | ||
if [[ ! -f vendor/autoload.php ]]; then | ||
curl https://getcomposer.org/composer-stable.phar --location --silent --output /usr/bin/composer; \ | ||
chmod +x /usr/bin/composer; \ | ||
composer install --no-progress --no-interaction; \ | ||
fi | ||
- run: | ||
name: phpunit | ||
command: vendor/bin/phpunit --testdox | ||
|
||
workflows: | ||
all-tests: | ||
jobs: | ||
- phpcs: | ||
matrix: | ||
parameters: | ||
executor: [php7-2, php7-3, php7-4] | ||
- phpstan: | ||
matrix: | ||
parameters: | ||
executor: [php7-2, php7-3, php7-4] | ||
- phpunit: | ||
matrix: | ||
parameters: | ||
executor: [php7-2, php7-3, php7-4] |
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 |
---|---|---|
|
@@ -4,3 +4,5 @@ | |
composer.lock | ||
.php_cs.cache | ||
.phpunit.result.cache | ||
# Symfo | ||
var/* |
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,19 +1,39 @@ | ||
<?php | ||
$finder = PhpCsFixer\Finder::create() | ||
->exclude('vendor') | ||
->exclude('config') | ||
->in(__DIR__) | ||
->exclude('tests') | ||
->exclude('vendor') | ||
->in(__DIR__) | ||
; | ||
|
||
$customRules = [ | ||
'@Symfony' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'concat_space' => ['spacing' => 'one'], | ||
'increment_style' => ['style' => 'post'], | ||
'declare_strict_types' => true, | ||
'phpdoc_summary' => false, | ||
]; | ||
|
||
$psr12Rules = [ | ||
'@PSR2' => true, | ||
'blank_line_after_opening_tag' => true, | ||
'braces' => ['allow_single_line_closure' => true], | ||
'compact_nullable_typehint' => true, | ||
'concat_space' => ['spacing' => 'one'], | ||
'declare_equal_normalize' => ['space' => 'none'], | ||
'function_typehint_space' => true, | ||
'new_with_braces' => true, | ||
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], | ||
'no_empty_statement' => true, | ||
'no_leading_import_slash' => true, | ||
'no_leading_namespace_whitespace' => true, | ||
'no_whitespace_in_blank_line' => true, | ||
'return_type_declaration' => ['space_before' => 'none'], | ||
'single_trait_insert_per_statement' => true, | ||
]; | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRules([ | ||
'@Symfony' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'concat_space' => ['spacing' => 'one'], | ||
'increment_style' => ['style' => 'post'], | ||
'declare_strict_types' => true, | ||
'phpdoc_summary' => false | ||
]) | ||
->setFinder($finder) | ||
->setRules($customRules + $psr12Rules) | ||
->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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
phpcs: | ||
vendor/bin/phpcs | ||
vendor/bin/phpcs -n | ||
|
||
phpcbf: | ||
vendor/bin/phpcbf | ||
|
||
phpstan: | ||
vendor/bin/phpstan clear-result-cache | ||
vendor/bin/phpstan analyse | ||
|
||
phpcsfixer: | ||
vendor/bin/php-cs-fixer fix --dry-run --allow-risky=yes | ||
vendor/bin/php-cs-fixer fix --dry-run --allow-risky=yes --diff | ||
|
||
test: | ||
vendor/bin/phpunit | ||
vendor/bin/phpunit --testdox | ||
|
||
infection: | ||
vendor/bin/infection |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"timeout": 10, | ||
"source": { | ||
"directories": [ | ||
"src" | ||
] | ||
}, | ||
"logs": { | ||
"text": "var/tmp-infection/infection.log", | ||
"summary": "var/tmp-infection/summary.log", | ||
"perMutator": "var/tmp-infection/per-mutator.md", | ||
"badge": { | ||
"branch": "master" | ||
} | ||
}, | ||
"mutators": { | ||
"@default": true | ||
}, | ||
"tmpDir": "var/tmp-infection", | ||
"testFramework":"phpunit", | ||
"testFrameworkOptions": "-vvv" | ||
} |
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,10 +1,13 @@ | ||
<?php | ||
|
||
/** | ||
* @author Wizacha DevTeam <[email protected]> | ||
* @copyright Copyright (c) Wizacha | ||
* @license Proprietary | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Wizacha\ElasticApmBundle\DependencyInjection\Compiler; | ||
|
||
use PhilKra\Agent; | ||
|
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