Skip to content

Commit 680cee1

Browse files
committed
Refactor ScreenManager for improved command execution
- Remove screen:run command
1 parent ebfd361 commit 680cee1

File tree

10 files changed

+166
-291
lines changed

10 files changed

+166
-291
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ jobs:
100100
php-version: 8.4
101101
tools: infection
102102
- uses: ramsey/composer-install@v3
103-
- run: infection --min-msi=53 --min-covered-msi=95 --threads=4
103+
- run: |
104+
infection --min-msi=32 --min-covered-msi=59 "--threads=$(nproc)"
104105
env:
105106
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,8 @@ soure_code_screen:
6060
command: [ "php", "bin/console", "messenger:consume", "async", "--limit", "10", "-vv" ]
6161
worker1:
6262
command: [ "php", "bin/console", "messenger:consume", "async", "--limit", "10", "-vv" ]
63-
```
63+
```
64+
65+
## Development
66+
67+
**Note:** To run infection threaded the tests are written to be random, this causes to generate a lot of log files in the `tests/app/var/log` directory.

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
],
1212
"require": {
1313
"php": ">=8.3",
14-
"ext-pcntl": "*",
1514
"psr/log": "^3.0",
1615
"symfony/config": "^7.1",
1716
"symfony/console": "^7.1",

phpstan-baseline.neon

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ parameters:
77
path: tests/BundleInitializationTest.php
88

99
-
10-
message: '#^Method SoureCode\\Bundle\\Screen\\Tests\\Manager\\ScreenManagerTest\:\:createKernel\(\) has parameter \$options with no value type specified in iterable type array\.$#'
11-
identifier: missingType.iterableValue
10+
message: '#^Parameter \#1 \$baseDirectory of class SoureCode\\Bundle\\Screen\\Manager\\ScreenManager constructor expects string, string\|false given\.$#'
11+
identifier: argument.type
1212
count: 1
1313
path: tests/Manager/ScreenManagerTest.php
1414

1515
-
16-
message: '#^Method SoureCode\\Bundle\\Screen\\Tests\\Manager\\ScreenManagerTest\:\:getScreenManager\(\) should return SoureCode\\Bundle\\Screen\\Manager\\ScreenManager but returns object\.$#'
17-
identifier: return.type
16+
message: '#^Parameter \#2 \$haystack of method PHPUnit\\Framework\\Assert\:\:assertStringContainsString\(\) expects string, string\|null given\.$#'
17+
identifier: argument.type
1818
count: 1
1919
path: tests/Manager/ScreenManagerTest.php
2020

2121
-
22-
message: '#^Parameter \#2 \$haystack of method PHPUnit\\Framework\\Assert\:\:assertStringContainsString\(\) expects string, string\|null given\.$#'
22+
message: '#^Parameter \#2 \$screenDefinitions of class SoureCode\\Bundle\\Screen\\Provider\\ArrayScreenProvider constructor expects array\<string, array\{command\: list\<string\>\}\>, array\{echoTest\: array\{command\: array\{''echo'', string\}\}, daemonTest\: array\{command\: array\{''sleep'', int\}\}\} given\.$#'
2323
identifier: argument.type
2424
count: 1
2525
path: tests/Manager/ScreenManagerTest.php

scripts/ci.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ kyx composer-unused
1919
FORCED_PHP_VERSION=8.3 kyx php-cs-fixer fix --dry-run --show-progress=dots --using-cache=no --verbose
2020
kyx phpstan analyse --memory-limit=512M --ansi --no-progress --error-format=table
2121
vendor/bin/phpunit
22-
kyx infection "-j$(nproc)"
22+
kyx infection "--threads=$(nproc)"
23+
24+
# clear logs
25+
rm -r "${PROJECT_DIRECTORY}/tests/app/var/log" || true
2326

2427
popd >/dev/null

src/Command/ScreenRunCommand.php

Lines changed: 0 additions & 160 deletions
This file was deleted.

0 commit comments

Comments
 (0)