Skip to content

Commit

Permalink
Upgrade to phpunit 10 and psalm 4
Browse files Browse the repository at this point in the history
  • Loading branch information
jdrieghe committed Apr 20, 2023
1 parent 8af39aa commit cb55616
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
"symfony/yaml": "^4.0 || ^5.0 || ^6.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"vimeo/psalm": "^4.4",
"psalm/plugin-phpunit": "^0.15.1",
"friendsofphp/php-cs-fixer": "^3.8"
"phpunit/phpunit": "^10.1",
"vimeo/psalm": "^5.9",
"psalm/plugin-phpunit": "^0.18",
"friendsofphp/php-cs-fixer": "^3.16"
},
"autoload": {
"psr-4": {
Expand Down
20 changes: 6 additions & 14 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/</directory>
</testsuite>
</testsuites>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/</directory>
</testsuite>
</testsuites>
</phpunit>
4 changes: 2 additions & 2 deletions src/Composer/DependencyTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function getDependencies(bool $noDev): array
$license = $this->parser->getLicenseForPackage($package['name'], $noDev) ?? '';
$dependency = new Dependency($package['name'], $license);
if (isset($package['requires'])) {
/** @psalm-suppress MixedArgumentTypeCoercion */
/** @psalm-suppress ArgumentTypeCoercion */
foreach ($this->getSubDependencies($package['requires']) as $subDependency) {
$dependency->addDependency($subDependency);
}
Expand All @@ -52,7 +52,7 @@ private function getSubDependencies(array $subTree): array
foreach ($subTree as $subTreeItem) {
$subDependencies[] = $subTreeItem['name'];
if (isset($subTreeItem['requires'])) {
/** @psalm-suppress MixedArgumentTypeCoercion */
/** @psalm-suppress ArgumentTypeCoercion */
$subDependencies = array_merge($subDependencies, $this->getSubDependencies($subTreeItem['requires']));
}
}
Expand Down

0 comments on commit cb55616

Please sign in to comment.