Skip to content

Commit 926db82

Browse files
committed
Upgrade PHPUnit
1 parent 46cd773 commit 926db82

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ jobs:
4545
if: steps.composer-cache.outputs.cache-hit != 'true'
4646
run: |
4747
composer config version 1.9.0
48-
${{ matrix.php >= 7.2 && matrix.php < 8 && matrix.setup == 'lowest' && 'composer require --no-update "phpunit/phpunit:^5.7.27||^6.5.14||^7.5.20" --no-interaction;' || '' }}
4948
composer update --prefer-dist ${{ matrix.setup != 'next' && format('--prefer-{0}', matrix.setup) || '' }} --no-progress ${{ matrix.php >= 8.1 && '--ignore-platform-req=php' || '' }} --no-interaction
5049
5150
- name: Prepare git config

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"friendsofphp/php-cs-fixer": "^2.15.0 || ^3.23.0",
3030
"nette/utils": "^3.2.10",
3131
"phan/phan": "^3.2.10 || ^5.4.2",
32-
"phpunit/phpunit": "^8.5.33 || ^9.6.11",
32+
"phpunit/phpunit": "^8.5.52 || ^9.6.34",
3333
"phpmd/phpmd": "^2.13.0",
3434
"phpstan/phpstan": "^0.11.15 || ^1.10.29",
3535
"squizlabs/php_codesniffer": "^3.7.2",

src/Phug/Split/Command/Analyze.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Analyze extends CommandBase
1616
*
1717
* Root project directory.
1818
*
19-
* @var string
19+
* @var truthy-string|false
2020
*/
2121
public $directory = '.';
2222

@@ -78,6 +78,7 @@ protected function calculatePackagesTree(Split $cli): bool
7878
return true;
7979
}
8080

81+
/** @psalm-suppress RiskyTruthyFalsyComparison */
8182
protected function getPackages(): iterable
8283
{
8384
if ($this->ast instanceof Traversable) {
@@ -121,6 +122,7 @@ protected function mapDirectories(string $directory, callable $callback): iterab
121122
}
122123
}
123124

125+
/** @return array{name: string, directory: string, children: array} */
124126
protected function getPackage(string $directory, array $data): array
125127
{
126128
return [

src/Phug/Split/Command/Dist.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ protected function distribute(Split $cli): bool
7878
return $cli->error('Unable to create output directory.');
7979
}
8080

81-
if (!preg_match('/^\* (.+)$/m', $this->git('branch', [], '2>&1') ?: '', $branch)) {
81+
if (!preg_match('/^\* (.+)$/m', (string) $this->git('branch', [], '2>&1') ?: '', $branch)) {
8282
return $cli->error('You must be on a branch in a git repository to run this command.');
8383
}
8484

8585
$branch = $branch[1];
8686

8787
if (substr($branch, 0, 18) === '(HEAD detached at ') {
88-
$branch = trim(explode("\n", $this->git('describe --contains --all HEAD', [], '2>&1') ?: '')[0]);
88+
$branch = trim(explode("\n", (string) $this->git('describe --contains --all HEAD', [], '2>&1') ?: '')[0]);
8989
}
9090

9191
foreach ($this->getPackages() as $package) {

0 commit comments

Comments
 (0)