Skip to content

Commit

Permalink
minor #34 Add Psalm v4 (pamil)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.2-dev branch.

Discussion
----------



Commits
-------

d6a46ba Add Psalm v4
d317a2e Fix the build
  • Loading branch information
pamil committed Nov 5, 2020
2 parents df960be + d317a2e commit 3ff1beb
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
name: "PHP ${{ matrix.php }}"
name: "PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}"
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -43,6 +43,10 @@ jobs:
name: Composer validate
run: composer validate --strict --ansi

-
name: Run Psalm
run: vendor/bin/psalm src --no-progress

-
name: Run tests
run: vendor/bin/behat -f progress --strict -vvv --no-interaction --colors
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"symfony/filesystem": "^4.4 || ^5.1",
"symfony/process": "^4.4 || ^5.1"
},
"require-dev": {
"vimeo/psalm": "4.1.1"
},
"autoload": {
"psr-4": {
"FriendsOfBehat\\TestContext\\": "src/"
Expand Down
15 changes: 15 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<psalm
errorLevel="7"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
</psalm>
4 changes: 2 additions & 2 deletions src/Context/TestContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ public function itFails() { throw new \Behat\Behat\Tester\Exception\PendingExcep
*/
public function iRunBehat(): void
{
$this->process = new Process(sprintf('%s %s --strict -vvv --no-interaction --lang=en', self::$phpBin, escapeshellarg(BEHAT_BIN_PATH)));
$this->process->setWorkingDirectory(self::$workingDir);
/** @psalm-suppress UndefinedConstant */
$this->process = new Process([self::$phpBin, trim(escapeshellarg(BEHAT_BIN_PATH), "'"), '--strict', '-vvv', '--no-interaction', '--lang=en'], self::$workingDir);
$this->process->start();
$this->process->wait();
}
Expand Down

0 comments on commit 3ff1beb

Please sign in to comment.