Skip to content

Commit

Permalink
Drop PHP 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mmy742 committed Sep 22, 2021
1 parent b15be07 commit e453486
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 58 deletions.
7 changes: 0 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,3 @@ updates:
interval: monthly
open-pull-requests-limit: 10
versioning-strategy: increase
ignore:
- dependency-name: phpstan/phpstan
versions:
- 0.12.70
- dependency-name: phpunit/phpunit
versions:
- 8.5.14
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.2, 7.3, 7.4, 8.0]
php: [7.3, 7.4, 8.0]
experimental: [false]
include:
- php: 8.0
Expand All @@ -37,7 +37,7 @@ jobs:

- name: Static analysis
if: matrix.analysis
run: vendor/bin/phpstan analyse src
run: vendor/bin/phpstan

- name: Tests
run: vendor/bin/phpunit --coverage-clover clover.xml
Expand All @@ -47,5 +47,5 @@ jobs:
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer require php-coveralls/php-coveralls -n
composer require php-coveralls/php-coveralls -n -W
vendor/bin/php-coveralls --coverage_clover=clover.xml -v
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $ composer require slim/http
```

This will install the `slim/http` component and all required dependencies.
PHP 7.2, or newer, is required.
PHP 7.3, or newer, is required.

## Tests

Expand Down Expand Up @@ -64,12 +64,12 @@ $response = $response->withJson(['data' => [1, 2, 3]]);
```


## Example for Instantiating a Decorated Zend Diactoros Response
## Example for Instantiating a Decorated Laminas Diactoros Response
```php
<?php

use Zend\Diactoros\ResponseFactory;
use Zend\Diactoros\StreamFactory;
use Laminas\Diactoros\ResponseFactory;
use Laminas\Diactoros\StreamFactory;
use Slim\Http\Factory\DecoratedResponseFactory;

$responseFactory = new ResponseFactory();
Expand Down
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}
],
"require": {
"php": "^7.2 || ^8.0",
"php": "^7.3 || ^8.0",
"ext-SimpleXML": "*",
"ext-fileinfo": "*",
"ext-json": "*",
Expand All @@ -38,11 +38,10 @@
},
"require-dev": {
"adriansuter/php-autoload-override": "^1.2",
"laminas/laminas-diactoros": "^2.4",
"laminas/laminas-diactoros": "^2.8",
"nyholm/psr7": "^1.4",
"php-http/psr7-integration-tests": "dev-master",
"phpstan/phpstan": "^0.12.85",
"phpunit/phpunit": "^8.5 || ^9.3",
"phpstan/phpstan": "^0.12.99",
"squizlabs/php_codesniffer": "^3.6"
},
"autoload": {
Expand All @@ -63,7 +62,7 @@
],
"phpunit": "phpunit",
"phpcs": "phpcs",
"phpstan": "phpstan analyse src --memory-limit=-1"
"phpstan": "phpstan --memory-limit=-1"
},
"config": {
"sort-packages": true
Expand Down
2 changes: 2 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
parameters:
checkMissingIterableValueType: false
level: max
paths:
- src
14 changes: 7 additions & 7 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/8.5/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
colors="true"
bootstrap="tests/bootstrap.php"
>
<testsuites>
<testsuite name="Slim-Http Test Suite">
<directory>tests/</directory>
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
</phpunit>
30 changes: 0 additions & 30 deletions tests/Assets/PhpFunctionOverrides.php

This file was deleted.

2 changes: 0 additions & 2 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

$classLoader = require __DIR__ . '/../vendor/autoload.php';

//require __DIR__ . '/Assets/PhpFunctionOverrides.php';

Override::apply($classLoader, [
ServerRequest::class => [
'preg_split' => function (string $pattern, string $subject, int $limit = -1, int $flags = 0) {
Expand Down

0 comments on commit e453486

Please sign in to comment.