Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat psr container #1

Merged
merged 9 commits into from Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions composer.json
Expand Up @@ -21,7 +21,7 @@
"require": {
"php": "^7.4|^8.0",
"httpsoft/http-emitter": "^1.0",
"psr/container": "^1.0",
"psr/container": "^1.0|^2.0",
"psr/http-message": "^1.0",
"psr/http-server-handler": "^1.0",
"psr/http-server-middleware": "^1.0"
Expand All @@ -30,8 +30,8 @@
"devanych/di-container": "^2.1",
"httpsoft/http-message": "^1.0",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.6",
"vimeo/psalm": "^4.9"
"squizlabs/php_codesniffer": "^3.7",
"vimeo/psalm": "^5.3"
},
"provide": {
"psr/http-message-implementation": "1.0",
Expand Down
File renamed without changes.
25 changes: 13 additions & 12 deletions phpunit.xml.dist
@@ -1,32 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.5/phpunit.xsd"
bootstrap="./vendor/autoload.php"
executionOrder="depends,defects"
bootstrap="vendor/autoload.php"
executionOrder="random"
beStrictAboutCoversAnnotation="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
convertWarningsToExceptions="true"
convertNoticesToExceptions="true"
convertErrorsToExceptions="true"
resolveDependencies="true"
stopOnFailure="false"
failOnWarning="true"
failOnRisky="true"
verbose="true"
colors="true"
>
<php>
<ini name="error_reporting" value="-1" />
<ini name="error_reporting" value="-1"/>
</php>

<testsuites>
<testsuite name="HttpSoft Runner Test Suite">
<directory>./tests/</directory>
<directory>tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
</phpunit>
8 changes: 6 additions & 2 deletions psalm.xml → psalm.xml.dist
@@ -1,11 +1,15 @@
<?xml version="1.0"?>
<psalm
errorLevel="1"
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"
findUnusedPsalmSuppress="true"
errorLevel="1"
>
<projectFiles>
<directory name="src" />
<directory name="src"/>
<ignoreFiles>
<directory name="vendor"/>
</ignoreFiles>
</projectFiles>
</psalm>
2 changes: 1 addition & 1 deletion tests/MiddlewareResolverTest.php
Expand Up @@ -300,7 +300,7 @@ public function get($id)
};
}

public function has($id)
public function has($id): bool
{
return array_key_exists($id, $this->dependencies);
}
Expand Down