-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from adriansuter/patch-slim4
Add Slim 4 support
- Loading branch information
Showing
13 changed files
with
425 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Enforce Unix newlines | ||
* text=lf | ||
|
||
# Exclude unused files | ||
# see: https://redd.it/2jzp6k | ||
/tests export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.travis.yml export-ignore | ||
/CONTRIBUTING.md export-ignore | ||
/phpcs.xml.dist export-ignore | ||
/phpstan.neon.dist export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/README.md export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
vendor | ||
/.idea | ||
/coverage | ||
/vendor | ||
.phpunit.result.cache | ||
composer.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,26 @@ | ||
language: php | ||
|
||
php: | ||
- 5.5 | ||
- 5.6 | ||
- 7.0 | ||
- 7.1 | ||
dist: trusty | ||
|
||
before_script: composer install | ||
matrix: | ||
include: | ||
- php: 7.2 | ||
- php: 7.3 | ||
- php: 7.4 | ||
env: ANALYSIS='true' | ||
- php: nightly | ||
allow_failures: | ||
- php: nightly | ||
|
||
script: phpunit --coverage-text | ||
before_script: | ||
- if [[ "$ANALYSIS" == 'true' ]]; then composer require php-coveralls/php-coveralls:^2.1.0 ; fi | ||
- composer install -n | ||
|
||
script: | ||
- if [[ "$ANALYSIS" != 'true' ]]; then vendor/bin/phpunit ; fi | ||
- if [[ "$ANALYSIS" == 'true' ]]; then vendor/bin/phpunit --coverage-clover clover.xml ; fi | ||
- if [[ "$ANALYSIS" == 'true' ]]; then vendor/bin/phpcs ; fi | ||
- if [[ "$ANALYSIS" == 'true' ]]; then vendor/bin/phpstan analyse src ; fi | ||
|
||
after_success: | ||
- if [[ "$ANALYSIS" == 'true' ]]; then vendor/bin/php-coveralls --coverage_clover=clover.xml -v ; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,51 @@ | ||
{ | ||
"name": "slim/http-cache", | ||
"type": "library", | ||
"description": "Slim Framework HTTP cache middleware and service provider", | ||
"keywords": ["slim","framework","middleware","cache"], | ||
"homepage": "http://slimframework.com", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Josh Lockhart", | ||
"email": "[email protected]", | ||
"homepage": "http://joshlockhart.com" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.5.0", | ||
"psr/http-message": "^1.0" | ||
}, | ||
"require-dev": { | ||
"slim/slim": "^3.0", | ||
"phpunit/phpunit": "^4.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Slim\\HttpCache\\": "src" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Slim\\HttpCache\\Tests\\": "tests" | ||
} | ||
"name": "slim/http-cache", | ||
"type": "library", | ||
"description": "Slim Framework HTTP cache middleware and service provider", | ||
"keywords": [ | ||
"slim", | ||
"framework", | ||
"middleware", | ||
"cache" | ||
], | ||
"homepage": "https://www.slimframework.com", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Josh Lockhart", | ||
"email": "[email protected]", | ||
"homepage": "http://joshlockhart.com" | ||
} | ||
], | ||
"require": { | ||
"php": "^7.2", | ||
"psr/http-message": "^1.0", | ||
"psr/http-server-middleware": "^1.0" | ||
}, | ||
"require-dev": { | ||
"slim/psr7": "^1.1", | ||
"phpunit/phpunit": "^8.5", | ||
"squizlabs/php_codesniffer": "^3.5", | ||
"phpstan/phpstan": "^0.12.28" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Slim\\HttpCache\\": "src" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Slim\\HttpCache\\Tests\\": "tests" | ||
} | ||
}, | ||
"scripts": { | ||
"test": [ | ||
"@phpcs", | ||
"@phpstan", | ||
"@phpunit" | ||
], | ||
"phpcs": "phpcs", | ||
"phpstan": "phpstan analyse src --memory-limit=-1", | ||
"phpunit": "phpunit" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="Slim coding standard"> | ||
<description>Slim coding standard</description> | ||
|
||
<!-- display progress --> | ||
<arg value="p"/> | ||
<!-- use colors in output --> | ||
<arg name="colors"/> | ||
|
||
<!-- inherit rules from: --> | ||
<rule ref="PSR2"/> | ||
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/> | ||
|
||
<!-- Paths to check --> | ||
<file>src</file> | ||
<file>tests</file> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
parameters: | ||
level: max | ||
inferPrivatePropertyTypeFromConstructor: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<phpunit backupGlobals="false" | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/8.5/phpunit.xsd" | ||
backupGlobals="false" | ||
backupStaticAttributes="false" | ||
beStrictAboutTestsThatDoNotTestAnything="true" | ||
beStrictAboutChangesToGlobalState="true" | ||
beStrictAboutOutputDuringTests="true" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
syntaxCheck="false" | ||
bootstrap="tests/bootstrap.php" | ||
> | ||
<testsuites> | ||
<testsuite name="Slim Test Suite"> | ||
<directory>tests/</directory> | ||
<testsuite name="Slim HttpCache Test Suite"> | ||
<directory>./tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist> | ||
<directory>src/</directory> | ||
<whitelist processUncoveredFilesFromWhitelist="true"> | ||
<directory>./src/</directory> | ||
</whitelist> | ||
</filter> | ||
<logging> | ||
<log | ||
type="coverage-html" | ||
target="./coverage" | ||
lowUpperBound="20" | ||
highLowerBound="50" | ||
/> | ||
</logging> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.