Skip to content

Commit 5bb3a63

Browse files
petrparolekf3l1x
authored andcommitted
updated PHPStan and codeception
1 parent a3c304f commit 5bb3a63

File tree

5 files changed

+14
-49
lines changed

5 files changed

+14
-49
lines changed

.github/workflows/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ jobs:
138138

139139
strategy:
140140
matrix:
141-
php-version: [ "7.1", "7.2", "7.3", "7.4", "8.0" ]
141+
php-version: [ "7.2", "7.3", "7.4", "8.0" ]
142142
operating-system: [ "ubuntu-latest" ]
143143
composer-args: [ "" ]
144144
include:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ csf:
1212
vendor/bin/codefixer src tests
1313

1414
phpstan:
15-
vendor/bin/phpstan analyse -l max -c phpstan.neon src
15+
vendor/bin/phpstan analyse -l 8 -c phpstan.neon src
1616

1717
tests:
1818
vendor/bin/codecept run

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@
1515
},
1616
"require-dev": {
1717
"codeception/codeception": "^4.1.20",
18-
"codeception/module-asserts": "^1.3.1",
19-
"codeception/module-phpbrowser": "^1.0.2",
18+
"codeception/module-asserts": "^1.3.1|^2.0",
19+
"codeception/module-phpbrowser": "^1.0.2|^2.0",
2020
"latte/latte": "^2.7",
21-
"nette/application": "~3.1.0",
21+
"nette/application": "~3.1.4",
2222
"nette/di": "^3.0",
2323
"nette/tester": "^2.3.2",
2424
"ninjify/nunjuck": "^0.3",
2525
"ninjify/qa": "^0.12",
26-
"phpstan/phpstan": "^0.12",
27-
"phpstan/phpstan-deprecation-rules": "^0.12",
28-
"phpstan/phpstan-nette": "^0.12",
29-
"phpstan/phpstan-strict-rules": "^0.12",
26+
"phpstan/phpstan": "^1.0",
27+
"phpstan/phpstan-deprecation-rules": "^1.0",
28+
"phpstan/phpstan-nette": "^1.0",
29+
"phpstan/phpstan-strict-rules": "^1.0",
3030
"webchemistry/testing-helpers": "^3.0.0"
3131
},
3232
"prefer-stable": true,

src/Wizard.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ public function getStepCounter(): StepCounter
122122
{
123123
$counter = 1;
124124
if ($this->stepCounter === null) {
125+
/** @phpstan-ignore-next-line $counter */
125126
for ($counter = 1; $counter < 1000; $counter++) {
126127
if (!method_exists($this, 'createStep' . $counter) && !$this->getComponent('step' . $counter, false)) {
127128
$counter--;

tests/_support/_generated/UnitTesterActions.php

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php //[STAMP] 7e6c6e8dff53d5c6d3b146271eb7b854
1+
<?php //[STAMP] 1c0e31bd853b62bc2c914e187b574323
22
namespace _generated;
33

44
// This class was automatically generated by build task
@@ -13,41 +13,6 @@ trait UnitTesterActions
1313
abstract protected function getScenario();
1414

1515

16-
/**
17-
* [!] Method is generated. Documentation taken from corresponding module.
18-
*
19-
* Handles and checks exception called inside callback function.
20-
* Either exception class name or exception instance should be provided.
21-
*
22-
* ```php
23-
* <?php
24-
* $I->expectException(MyException::class, function() {
25-
* $this->doSomethingBad();
26-
* });
27-
*
28-
* $I->expectException(new MyException(), function() {
29-
* $this->doSomethingBad();
30-
* });
31-
* ```
32-
* If you want to check message or exception code, you can pass them with exception instance:
33-
* ```php
34-
* <?php
35-
* // will check that exception MyException is thrown with "Don't do bad things" message
36-
* $I->expectException(new MyException("Don't do bad things"), function() {
37-
* $this->doSomethingBad();
38-
* });
39-
* ```
40-
*
41-
* @deprecated Use expectThrowable() instead
42-
* @param \Exception|string $exception
43-
* @param callable $callback
44-
* @see \Codeception\Module\Asserts::expectException()
45-
*/
46-
public function expectException($exception, $callback) {
47-
return $this->getScenario()->runStep(new \Codeception\Step\Action('expectException', func_get_args()));
48-
}
49-
50-
5116
/**
5217
* [!] Method is generated. Documentation taken from corresponding module.
5318
*
@@ -73,12 +38,11 @@ public function expectException($exception, $callback) {
7338
* });
7439
* ```
7540
*
76-
* @param \Throwable|string $throwable
77-
* @param callable $callback
41+
* @param Throwable|string $throwable
7842
* @see \Codeception\Module\Asserts::expectThrowable()
7943
*/
80-
public function expectThrowable($throwable, $callback) {
81-
return $this->getScenario()->runStep(new \Codeception\Step\Action('expectThrowable', func_get_args()));
44+
public function expectThrowable($throwable, callable $callback): void {
45+
$this->getScenario()->runStep(new \Codeception\Step\Action('expectThrowable', func_get_args()));
8246
}
8347

8448

0 commit comments

Comments
 (0)