File tree Expand file tree Collapse file tree 9 files changed +2498
-732
lines changed
Expand file tree Collapse file tree 9 files changed +2498
-732
lines changed Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+
3+ use ApiClients \Tools \CsFixerConfig \PhpCsFixerConfig ;
4+ use PhpCsFixer \Config ;
5+
6+ return (function (): Config
7+ {
8+ $ paths = [
9+ __DIR__ . DIRECTORY_SEPARATOR . 'src ' ,
10+ __DIR__ . DIRECTORY_SEPARATOR . 'tests ' ,
11+ ];
12+
13+ return PhpCsFixerConfig::create ()
14+ ->setFinder (
15+ PhpCsFixer \Finder::create ()
16+ ->in ($ paths )
17+ ->append ($ paths )
18+ )
19+ ->setUsingCache (false )
20+ ;
21+ })();
Original file line number Diff line number Diff line change 11language : php
2- sudo : false
32
43# # Cache composer bits
54cache :
65 directories :
7- - $HOME/.composer/cache
8- - $HOME/.humbug
9-
10- # # PHP versions we test against
11- php :
12- - 7.0
13- - 7.1
14- - nightly
6+ - $HOME/.composer/cache/files
157
168# # Build matrix for lowest and highest possible targets
179matrix :
1810 include :
19- - php : 7.0
20- env : dependencies=lowest
21- - php : 7.1
22- env : dependencies=lowest
11+ - php : 7.2
12+ env :
13+ - qaExtended=true
14+ - dropPlatform=false
15+ - php : nightly
16+ env :
17+ - dropPlatform=false
18+ - php : 7.2
19+ env :
20+ - dependencies=lowest
21+ - dropPlatform=false
2322 - php : nightly
24- env : dependencies=lowest
25- - php : 7.0
26- env : dependencies=highest
27- - php : 7.1
28- env : dependencies=highest
23+ env :
24+ - dependencies=lowest
25+ - dropPlatform=false
26+ - php : 7.2
27+ env :
28+ - dependencies=highest
29+ - dropPlatform=false
2930 - php : nightly
30- env : dependencies=highest
31+ env :
32+ - dependencies=highest
33+ - dropPlatform=false
3134
3235# # Install or update dependencies
3336install :
37+ - composer validate
38+ - if [ -z "$dropPlatform" ]; then composer config --unset platform.php; fi;
39+ - if [ -z "$qaExtended" ]; then phpenv config-rm xdebug.ini || :; fi;
3440 - if [ -z "$dependencies" ]; then composer install --prefer-dist; fi;
3541 - if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest --prefer-dist -n; fi;
3642 - if [ "$dependencies" = "highest" ]; then composer update --prefer-dist -n; fi;
3743 - composer show
3844
3945# # Run the actual test
40- script : make ci
46+ script :
47+ - if [ -z "$qaExtended" ]; then make ci; fi;
48+ - if [ "$qaExtended" = "true" ]; then make ci-extended; fi;
4149
4250# # Gather coverage and set it to coverage servers
43- after_script : make ci-coverage
51+ after_script : if [ "$qaExtended" = "true" ]; then make ci-coverage; fi;
Original file line number Diff line number Diff line change 11all :
2- composer qa-all
2+ composer run-script qa-all --timeout=0
3+
4+ all-coverage :
5+ composer run-script qa-all-coverage --timeout=0
36
47ci :
5- composer qa-ci
8+ composer run-script qa-ci --timeout=0
9+
10+ ci-extended :
11+ composer run-script qa-ci-extended --timeout=0
612
713contrib :
8- composer qa-contrib
14+ composer run-script qa-contrib --timeout=0
915
1016init :
1117 composer ensure-installed
1218
1319cs :
1420 composer cs
1521
22+ cs-fix :
23+ composer cs-fix
24+
1625unit :
17- composer unit
26+ composer run-script unit --timeout=0
27+
28+ unit-coverage :
29+ composer run-script unit-coverage --timeout=0
1830
1931ci-coverage : init
2032 composer ci-coverage
Original file line number Diff line number Diff line change @@ -7,25 +7,15 @@ clone_folder: c:\projects\php-project-workspace
77environment :
88 matrix :
99 - dependencies : lowest
10- php_ver_target : 7.0
11- - dependencies : lowest
12- php_ver_target : 7.1
13- - dependencies : current
14- php_ver_target : 7.0
10+ php_ver_target : 7.2
1511 - dependencies : current
16- php_ver_target : 7.1
17- - dependencies : highest
18- php_ver_target : 7.0
12+ php_ver_target : 7.2
1913 - dependencies : highest
20- php_ver_target : 7.1
14+ php_ver_target : 7.2
2115
22- # # Cache composer, chocolatey and php bits
16+ # # Cache composer file
2317cache :
2418 - ' %LOCALAPPDATA%\Composer\files -> composer.lock'
25- - composer.phar
26- - C:\ProgramData\chocolatey\bin -> .appveyor.yml
27- - C:\ProgramData\chocolatey\lib -> .appveyor.yml
28- - c:\tools\php -> .appveyor.yml
2919
3020# # Set up environment varriables
3121init :
@@ -48,6 +38,7 @@ install:
4838 - IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
4939 - appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar
5040 - cd c:\projects\php-project-workspace
41+ - composer config --unset platform.php
5142 - IF %dependencies%==lowest appveyor-retry composer update --prefer-lowest --no-progress --profile -n
5243 - IF %dependencies%==current appveyor-retry composer install --no-progress --profile
5344 - IF %dependencies%==highest appveyor-retry composer update --no-progress --profile -n
Original file line number Diff line number Diff line change 11{
22 "name" : " api-clients/middleware-log" ,
3+ "description" : " Request/Response logging middleware" ,
34 "license" : " MIT" ,
45 "authors" : [
56 {
89 }
910 ],
1011 "require" : {
11- "php" : " ^7.0 " ,
12+ "php" : " ^7.2 " ,
1213 "api-clients/middleware" : " ^4.0" ,
1314 "psr/log" : " ^1.0"
1415 },
1516 "require-dev" : {
16- "api-clients/test-utilities" : " ^3.0.1 " ,
17+ "api-clients/test-utilities" : " ^5.1.0 " ,
1718 "guzzlehttp/psr7" : " ^1.3"
1819 },
1920 "autoload" : {
2728 }
2829 },
2930 "config" : {
30- "sort-packages" : true
31+ "sort-packages" : true ,
32+ "platform" : {
33+ "php" : " 7.2"
34+ }
3135 },
3236 "scripts" : {
3337 "ensure-installed" : " composer install --ansi -n -q" ,
3438 "cs" : [
3539 " @ensure-installed" ,
36- " phpcs --standard=PSR2 src/"
40+ " php-cs-fixer fix --config=.php_cs --ansi --dry-run --diff --verbose --allow-risky=yes --show-progress=estimating"
41+ ],
42+ "cs-fix" : [
43+ " @ensure-installed" ,
44+ " php-cs-fixer fix --config=.php_cs --ansi --verbose --allow-risky=yes --show-progress=estimating"
3745 ],
3846 "unit" : [
3947 " @ensure-installed" ,
40- " phpunit --colors=always -c phpunit.xml.dist --coverage-text --coverage-html covHtml"
48+ " phpunit --colors=always -c phpunit.xml.dist"
49+ ],
50+ "unit-coverage" : [
51+ " @ensure-installed" ,
52+ " phpunit --colors=always -c phpunit.xml.dist --coverage-text --coverage-html covHtml --coverage-clover ./build/logs/clover.xml"
53+ ],
54+ "lint-php" : [
55+ " @ensure-installed" ,
56+ " parallel-lint --exclude vendor ."
4157 ],
4258 "qa-all" : [
59+ " @lint-php" ,
4360 " @cs" ,
4461 " @unit"
4562 ],
63+ "qa-all-coverage" : [
64+ " @lint-php" ,
65+ " @cs" ,
66+ " @unit-coverage"
67+ ],
4668 "qa-windows" : [
69+ " @lint-php" ,
4770 " @cs" ,
4871 " @unit"
4972 ],
5073 "qa-ci" : [
51- " @qa-all"
74+ " @unit"
75+ ],
76+ "qa-ci-extended" : [
77+ " @qa-all-coverage"
5278 ],
5379 "qa-ci-windows" : [
5480 " @qa-windows"
You can’t perform that action at this time.
0 commit comments