Skip to content

Commit

Permalink
Fix some deps and Psalm errors
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Aug 16, 2024
1 parent b8a2140 commit fd70ea8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/vendor/
/composer.lock
/.phpunit.cache
/.phpunit.result.cache
/build/
/composer.lock
/vendor/
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"require-dev": {
"infection/infection": "^0.27.11",
"phpunit/phpunit": "^10.5",
"phpunit/phpunit": "^9.6",
"psalm/plugin-phpunit": "^0.19.0",
"setono/code-quality-pack": "^2.8.2",
"symfony/finder": "^5.4 || ^6.4 || ^7.0"
Expand Down
18 changes: 7 additions & 11 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" bootstrap="vendor/autoload.php"
colors="true" cacheDirectory=".phpunit.cache">
<coverage>
<report>
<clover outputFile="build/coverage.xml"/>
</report>
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true">
<coverage includeUncoveredFiles="true" processUncoveredFiles="true">
<include>
<directory suffix=".php">src/</directory>
</include>
</coverage>
<testsuites>
<testsuite name="CronBuilder Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
</phpunit>
1 change: 1 addition & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<directory name="tests"/>
<ignoreFiles>
<directory name="vendor"/>
<directory name="tests/cronjobs"/>
</ignoreFiles>
</projectFiles>
<plugins>
Expand Down
2 changes: 1 addition & 1 deletion tests/cronjobs/jobs.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
return static function (array $context): iterable {
yield new CronJob('0 0 * * *', '/usr/bin/php %release_path%/send-report.php', 'Run every day at midnight');

if ($context['env'] === 'prod') {
if ($context['env'] ?? '' === 'prod') {
yield new CronJob('0 0 * * *', '/usr/bin/php %release_path%/process.php');
}
};

0 comments on commit fd70ea8

Please sign in to comment.