File tree Expand file tree Collapse file tree 6 files changed +24
-15
lines changed
Expand file tree Collapse file tree 6 files changed +24
-15
lines changed Original file line number Diff line number Diff line change 1414 strategy :
1515 fail-fast : true
1616 matrix :
17- php-versions : ['8.0']
17+ php-versions : ['8.0', '8.1' ]
1818
1919 steps :
2020 - uses : actions/checkout@v2
Original file line number Diff line number Diff line change 99 },
1010 "require-dev" : {
1111 "phpunit/phpunit" : " ^9.0" ,
12- "friendsofphp/php-cs-fixer" : " ^2.0|^ 3.0" ,
13- "sebastian/phpcpd" : " ^5.0|^ 6.0" ,
12+ "friendsofphp/php-cs-fixer" : " ^3.0" ,
13+ "sebastian/phpcpd" : " ^6.0" ,
1414 "vimeo/psalm" : " ^4.0" ,
15- "psalm/plugin-phpunit" : " ^0.15.1 "
15+ "psalm/plugin-phpunit" : " ^0.16 "
1616 },
1717 "autoload" : {
1818 "psr-4" : {
2525 }
2626 },
2727 "scripts" : {
28- "test" : " vendor/bin/phpunit --configuration phpunit.xml.dist" ,
29- "coverage" : " vendor/bin/phpunit --configuration phpunit.xml.dist --coverage-html=tests/coverage" ,
30- "fixer" : " vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php -vv --allow-risky=yes" ,
28+ "test" : [
29+ " vendor/bin/phpunit --configuration phpunit.xml.dist"
30+ ],
31+ "coverage" : [
32+ " vendor/bin/phpunit --configuration phpunit.xml.dist --coverage-html=tests/coverage"
33+ ],
34+ "fixer" : [
35+ " vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php -vv --allow-risky=yes"
36+ ],
3137 "linter" : [
3238 " vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php -vv --allow-risky=yes --dry-run --stop-on-violation" ,
3339 " vendor/bin/phpcpd ./ --exclude vendor --exclude tests" ,
34- " vendor/bin/psalm --show-info=true"
40+ " vendor/bin/psalm --show-info=true --php-version=$(php -r \" echo phpversion(); \" ) "
3541 ]
3642 },
3743 "repositories" : [
Original file line number Diff line number Diff line change @@ -24,7 +24,11 @@ RUN docker-php-ext-install zip soap \
2424 && echo 'xdebug.mode=coverage' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
2525
2626
27+ <<<<<<< HEAD
28+ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=2.2.7 \
29+ =======
2730RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=2.1.8 \
31+ >>>>>>> origin/master
2832 && mkdir -p /.composer && chmod -Rf 777 /.composer
2933
3034
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" ?>
22<psalm
3- totallyTyped =" true"
43 cacheDirectory =" /tmp"
54 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
65 xmlns =" https://getpsalm.org/schema/config"
76 xsi : schemaLocation =" https://getpsalm.org/schema/config file:///var/www/vendor/vimeo/psalm/config.xsd"
87>
98 <projectFiles >
109 <directory name =" ./src" />
10+ <directory name =" ./tests" />
1111 <ignoreFiles >
1212 </ignoreFiles >
1313 </projectFiles >
1414
1515 <issueHandlers >
16+ <PropertyNotSetInConstructor errorLevel =" suppress" />
1617 </issueHandlers >
1718
1819 <plugins >
Original file line number Diff line number Diff line change @@ -50,9 +50,7 @@ public function remove(SplFileInfo|string $entity): void
5050 } elseif ($ splEntity ->isDir ()) {
5151 $ this ->iterateDirectory (
5252 $ splEntity ,
53- function (SplFileInfo $ file ): void {
54- $ this ->remove ($ file );
55- }
53+ fn (SplFileInfo $ file ): mixed => $ this ->remove ($ file )
5654 );
5755 $ this ->runPhpFunction (
5856 'rmdir ' ,
@@ -239,9 +237,7 @@ public function emptyDir(SplFileInfo|string $path): void
239237
240238 $ this ->iterateDirectory (
241239 $ dir ,
242- function (SplFileInfo $ entity ): void {
243- $ this ->remove ($ entity );
244- }
240+ fn (SplFileInfo $ file ): mixed => $ this ->remove ($ file )
245241 );
246242 }
247243
Original file line number Diff line number Diff line change 88use RecursiveDirectoryIterator ;
99use RecursiveIteratorIterator ;
1010use RuntimeException ;
11+ use SplFileInfo ;
1112
1213/**
1314 * Basic class for all tests in suite.
@@ -115,6 +116,7 @@ protected function removeDir(string $folderPath): void
115116 $ folderPath ,
116117 RecursiveDirectoryIterator::SKIP_DOTS
117118 );
119+ /** @var iterable<SplFileInfo> */
118120 $ files = new RecursiveIteratorIterator (
119121 $ it ,
120122 RecursiveIteratorIterator::CHILD_FIRST
You can’t perform that action at this time.
0 commit comments