Skip to content

Commit

Permalink
Merge pull request #3 from SignpostMarv/modify/php-versions
Browse files Browse the repository at this point in the history
Modify/php versions
  • Loading branch information
paragonie-security authored Jan 20, 2020
2 parents 6a02dce + 16e9503 commit f222adc
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ matrix:
- php: "7.1"
- php: "7.2"
- php: "7.3"
- php: "7.4"
- php: "nightly"
- php: "master"
allow_failures:
Expand Down
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"email": "[email protected]"
}
],
"config": {
"sort-packages": true
},
"autoload": {
"psr-4": {
"ParagonIE\\Corner\\": "src/"
Expand All @@ -19,10 +22,11 @@
}
},
"require": {
"php": "^7.1"
"php": "^7.1|^8"
},
"require-dev": {
"phpunit/phpunit": "^7",
"vimeo/psalm": "^2"
"psalm/plugin-phpunit": "<1",
"vimeo/psalm": "^3"
}
}
14 changes: 11 additions & 3 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
<?xml version="1.0"?>
<psalm
totallyTyped="false"
resolveFromConfigFile="true"
requireVoidReturnType="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config file:///mnt/share/corner/vendor/vimeo/psalm/config.xsd"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="src" />
<directory name="src"/>
<directory name="test"/>
<ignoreFiles>
<directory name="vendor" />
<directory name="vendor"/>
</ignoreFiles>
</projectFiles>
<issueHandlers>
</issueHandlers>
<plugins>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
</plugins>
</psalm>
8 changes: 4 additions & 4 deletions test/BasicTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
class BasicTest extends TestCase
{
public function testException()
public function testException() : void
{
try {
throw new FooException('test');
Expand All @@ -21,7 +21,7 @@ public function testException()
}
}

public function testError()
public function testError() : void
{
try {
throw new FooError('test');
Expand All @@ -32,7 +32,7 @@ public function testError()
}
}

public function testSnippet()
public function testSnippet() : void
{
try {
/** Canary string: 15f3456a04616adc5b42f3533d41a43aa2bad7eee2e914684ec86c3b84b71c61 */
Expand Down Expand Up @@ -86,7 +86,7 @@ public function testSnippet()
}
}

private function subcall()
private function subcall() : void
{
/** Canary string: 6115f3456a04616adc5b42f3533d41a43aa2bad7eee2e914684ec86c3b84b71c */
throw new FooException('test');
Expand Down

0 comments on commit f222adc

Please sign in to comment.