Skip to content

Commit

Permalink
Merge pull request #2 from chimeraphp/upgrade-libs
Browse files Browse the repository at this point in the history
Upgrade libs
  • Loading branch information
lcobucci authored Feb 26, 2019
2 parents 8974629 + 8781ce2 commit 30be238
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 34 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/.phpcs.cache
/composer.lock
/infection-log.txt
/.phpunit.result.cache
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
dist: trusty
dist: xenial
sudo: false
language: php

php:
- 7.2
- 7.3
- 7.4snapshot
- nightly

cache:
Expand All @@ -21,9 +23,8 @@ script:

jobs:
allow_failures:
- php: 7.4snapshot
- php: nightly
- env: STATIC_ANALYSIS=1
- env: MUTATION_TESTS=1

include:
- stage: Code Quality
Expand Down
21 changes: 10 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,21 @@
"sort-packages": true
},
"require": {
"php": "^7.2",
"chimera/foundation": "^0.1",
"php": "^7.2 || ^8.0",
"chimera/foundation": "^0.2@dev",
"lcobucci/content-negotiation-middleware": "^1.0",
"middlewares/negotiation": "^1.0",
"psr/http-server-middleware": "^1.0"
},
"require-dev": {
"doctrine/coding-standard": "^4.0",
"infection/infection": "dev-master@dev",
"phpstan/phpdoc-parser": "^0.3@dev",
"phpstan/phpstan": "^0.10@dev",
"phpstan/phpstan-phpunit": "^0.10@dev",
"phpstan/phpstan-strict-rules": "^0.10@dev",
"phpunit/phpunit": "^7.1",
"squizlabs/php_codesniffer": "^3.2",
"zendframework/zend-diactoros": "^1.7"
"infection/infection": "^0.12",
"lcobucci/coding-standard": "^2.0",
"phpstan/phpstan": "^0.11",
"phpstan/phpstan-deprecation-rules": "^0.11",
"phpstan/phpstan-phpunit": "^0.11",
"phpstan/phpstan-strict-rules": "^0.11",
"phpunit/phpunit": "^8.0",
"zendframework/zend-diactoros": "^2.0"
},
"autoload": {
"psr-4": {
Expand Down
20 changes: 1 addition & 19 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,5 @@
<file>src</file>
<file>tests</file>

<rule ref="Doctrine">
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment" />
</rule>

<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="newlinesCountBetweenOpenTagAndDeclare" value="1"/>
<property name="spacesCountAroundEqualsSign" value="0"/>
<property name="newlinesCountAfterDeclare" value="2"/>
</properties>
</rule>

<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing">
<properties>
<property name="spacesCountBeforeColon" value="0"/>
</properties>
</rule>

<rule ref="SlevomatCodingStandard.Commenting.DisallowOneLinePropertyDocComment" />
<rule ref="Lcobucci" />
</ruleset>
1 change: 1 addition & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
- vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/phpstan/phpstan-deprecation-rules/rules.neon

parameters:
level: 7
Expand Down
2 changes: 1 addition & 1 deletion src/RouteParamsExtraction.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct(RouteParamsExtractor $extractor)
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
return $handler->handle(
$request->withAttribute(__CLASS__, $this->extractor->getParams($request))
$request->withAttribute(self::class, $this->extractor->getParams($request))
);
}
}

0 comments on commit 30be238

Please sign in to comment.