Skip to content

Commit a1ad87d

Browse files
committed
Fix CI
1 parent 0f8dced commit a1ad87d

23 files changed

Lines changed: 89 additions & 53 deletions

.github/workflows/grumphp.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ jobs:
6262
- name: Run the tests on Windows
6363
if: runner.os == 'Windows'
6464
run: php vendor/bin/grumphp run --no-interaction --testsuite=windows
65+
continue-on-error: ${{ matrix.php-versions == '8.5' }} # Psalm is not there yet
6566
- name: Run the tests on unix
6667
if: runner.os != 'Windows'
6768
run: php vendor/bin/grumphp run --no-interaction --testsuite=ci
68-
continue-on-error: ${{ matrix.php-versions == '8.5' && matrix.composer-deps == 'lowest' }}
69+
continue-on-error: ${{ matrix.php-versions == '8.5' }} # Psalm is not there yet
6970
- name: Run paratest outside of grumphp
70-
run: php ./vendor/bin/paratest --testsuite=E2E -f --verbose
71+
run: php ./vendor/bin/paratest --testsuite=E2E --functional --verbose

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ install:
7979
test_script:
8080
- ps: cd $Env:project_directory
8181
- php ./bin/grumphp run --testsuite=windows --no-interaction
82-
- php ./vendor/bin/paratest --testsuite=E2E -f --verbose
82+
- php ./vendor/bin/paratest --testsuite=E2E --functional --verbose

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
"php-cs-fixer/shim": "^3.88",
4646
"php-parallel-lint/php-parallel-lint": "^1.3",
4747
"phpspec/phpspec": "^8.0",
48-
"phpspec/prophecy-phpunit": "^2.2",
48+
"phpspec/prophecy": "^1.23",
49+
"phpspec/prophecy-phpunit": "^2.4",
4950
"phpunit/phpunit": "^11.5"
5051
},
5152
"suggest": {

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

grumphp.yml.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ grumphp:
1616
no_check_lock: true
1717
composer_normalize:
1818
use_standalone: true
19-
composer_validate_autoload: ~
2019
yamllint:
2120
parse_custom_tags: true
2221
ignore_patterns:

phive.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="psalm" version="^6.13.0" installed="6.13.1" location="./tools/psalm" copy="true"/>
4-
<phar name="phpcs" version="^4.0.0" installed="4.0.0" location="./tools/phpcs" copy="true"/>
5-
<phar name="phpcbf" version="^4.0.0" installed="4.0.0" location="./tools/phpcbf" copy="true"/>
6-
<phar name="composer-normalize" version="^2.48.0" installed="2.48.2" location="./tools/composer-normalize" copy="true"/>
3+
<phar name="psalm" version="^6.13.0" installed="6.13.1" location="./tools/psalm.phar" copy="true"/>
4+
<phar name="phpcs" version="^4.0.0" installed="4.0.0" location="./tools/phpcs.phar" copy="true"/>
5+
<phar name="phpcbf" version="^4.0.0" installed="4.0.0" location="./tools/phpcbf.phar" copy="true"/>
6+
<phar name="composer-normalize" version="^2.48.0" installed="2.48.2" location="./tools/composer-normalize.phar" copy="true"/>
77
</phive>

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
colors="true"
77
displayDetailsOnTestsThatTriggerWarnings="true"
88
failOnWarning="true"
9-
failOnPhpunitWarning="true">
9+
>
1010
<php>
1111
<ini name="error_reporting" value="-1" />
1212
</php>

psalm.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
findUnusedBaselineEntry="false"
99
findUnusedCode="false"
1010
ensureOverrideAttribute="false"
11+
ignoreInternalFunctionFalseReturn="true"
12+
ignoreInternalFunctionNullReturn="true"
1113
>
1214
<projectFiles>
1315
<directory name="src" />
@@ -25,5 +27,10 @@
2527
<directory name="src/" />
2628
</errorLevel>
2729
</RiskyTruthyFalsyComparison>
30+
<ClassMustBeFinal>
31+
<errorLevel type="suppress">
32+
<directory name="src/" />
33+
</errorLevel>
34+
</ClassMustBeFinal>
2835
</issueHandlers>
2936
</psalm>

src/Event/Event.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,7 @@
55
namespace GrumPHP\Event;
66

77
use Symfony\Contracts\EventDispatcher\Event as SymfonyEventContract;
8-
use Symfony\Component\EventDispatcher\Event as SymfonyLegacyEvent;
98

10-
// @codingStandardsIgnoreStart
11-
if (class_exists(SymfonyEventContract::class)) {
12-
class Event extends SymfonyEventContract
13-
{
14-
}
15-
} else {
16-
class Event extends SymfonyLegacyEvent
17-
{
18-
}
9+
class Event extends SymfonyEventContract
10+
{
1911
}
20-
// @codingStandardsIgnoreEnd

src/Task/CloverCoverage.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ public function run(ContextInterface $context): TaskResultInterface
131131
return TaskResult::createSkipped($this, $context);
132132
}
133133

134-
$coverage = round(($checkedElements / $totalElements) * 100, 2);
134+
$coverage = (float) ($checkedElements / $totalElements);
135+
$coverage = round($coverage * 100.0, 2);
135136

136137
if ($coverage < $minimumLevel) {
137138
$message = sprintf(
@@ -157,7 +158,7 @@ public function run(ContextInterface $context): TaskResultInterface
157158
}
158159

159160
/**
160-
* @return array{'totalElements': int, 'checkedElements': int}
161+
* @return array{totalElements: int, checkedElements: int}
161162
*
162163
* @throws FileNotFoundException
163164
*/

0 commit comments

Comments
 (0)