Skip to content

Commit a99705b

Browse files
authored
Merge pull request #191 from nbayramberdiyev/drop_php7.3
Drop support for PHP 7.3
2 parents 1e87e3f + a3d0c07 commit a99705b

10 files changed

+87
-105
lines changed

.github/workflows/tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
php: [7.3, 7.4, 8.0, 8.1]
13+
php: [7.4, 8.0, 8.1]
1414
experimental: [false]
1515
include:
1616
- php: 8.1
1717
analysis: true
1818

1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v2
21+
uses: actions/checkout@v3
2222

2323
- name: Set up PHP ${{ matrix.php }}
2424
uses: shivammathur/setup-php@v2
@@ -27,7 +27,7 @@ jobs:
2727
coverage: xdebug
2828

2929
- name: Install dependencies with Composer
30-
uses: ramsey/composer-install@v1
30+
uses: ramsey/composer-install@v2
3131

3232
- name: Coding standards
3333
if: matrix.analysis

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $ composer require slim/http
1717
```
1818

1919
This will install the `slim/http` component and all required dependencies.
20-
PHP 7.3, or newer, is required.
20+
PHP 7.4, or newer, is required.
2121

2222
## Tests
2323

composer.json

+69-65
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,75 @@
11
{
2-
"name": "slim/http",
3-
"type": "library",
4-
"description": "Slim PSR-7 Object Decorators",
5-
"keywords": ["psr7", "psr-7", "http"],
6-
"homepage": "http://slimframework.com",
7-
"license": "MIT",
8-
"authors": [
9-
{
10-
"name": "Josh Lockhart",
11-
"email": "[email protected]",
12-
"homepage": "http://joshlockhart.com"
2+
"name": "slim/http",
3+
"type": "library",
4+
"description": "Slim PSR-7 Object Decorators",
5+
"keywords": [
6+
"psr7",
7+
"psr-7",
8+
"http"
9+
],
10+
"homepage": "http://slimframework.com",
11+
"license": "MIT",
12+
"authors": [
13+
{
14+
"name": "Josh Lockhart",
15+
"email": "[email protected]",
16+
"homepage": "http://joshlockhart.com"
17+
},
18+
{
19+
"name": "Andrew Smith",
20+
"email": "[email protected]",
21+
"homepage": "http://silentworks.co.uk"
22+
},
23+
{
24+
"name": "Rob Allen",
25+
"email": "[email protected]",
26+
"homepage": "http://akrabat.com"
27+
},
28+
{
29+
"name": "Pierre Berube",
30+
"email": "[email protected]",
31+
"homepage": "http://www.lgse.com"
32+
}
33+
],
34+
"require": {
35+
"php": "^7.4 || ^8.0",
36+
"ext-SimpleXML": "*",
37+
"ext-fileinfo": "*",
38+
"ext-json": "*",
39+
"ext-libxml": "*",
40+
"psr/http-factory": "^1.0",
41+
"psr/http-message": "^1.0"
1342
},
14-
{
15-
"name": "Andrew Smith",
16-
"email": "[email protected]",
17-
"homepage": "http://silentworks.co.uk"
43+
"require-dev": {
44+
"adriansuter/php-autoload-override": "^1.2",
45+
"laminas/laminas-diactoros": "^2.8",
46+
"nyholm/psr7": "^1.5",
47+
"php-http/psr7-integration-tests": "dev-master",
48+
"phpstan/phpstan": "^1.4",
49+
"phpunit/phpunit": "^9.5",
50+
"squizlabs/php_codesniffer": "^3.6"
1851
},
19-
{
20-
"name": "Rob Allen",
21-
"email": "[email protected]",
22-
"homepage": "http://akrabat.com"
52+
"autoload": {
53+
"psr-4": {
54+
"Slim\\Http\\": "src/"
55+
}
2356
},
24-
{
25-
"name": "Pierre Berube",
26-
"email": "[email protected]",
27-
"homepage": "http://www.lgse.com"
28-
}
29-
],
30-
"require": {
31-
"php": "^7.3 || ^8.0",
32-
"ext-SimpleXML": "*",
33-
"ext-fileinfo": "*",
34-
"ext-json": "*",
35-
"ext-libxml": "*",
36-
"psr/http-factory": "^1.0",
37-
"psr/http-message": "^1.0"
38-
},
39-
"require-dev": {
40-
"adriansuter/php-autoload-override": "^1.2",
41-
"laminas/laminas-diactoros": "^2.8",
42-
"nyholm/psr7": "^1.5",
43-
"php-http/psr7-integration-tests": "dev-master",
44-
"phpstan/phpstan": "^1.4",
45-
"phpunit/phpunit": "^9.5",
46-
"squizlabs/php_codesniffer": "^3.6"
47-
},
48-
"autoload": {
49-
"psr-4": {
50-
"Slim\\Http\\": "src/"
51-
}
52-
},
53-
"autoload-dev": {
54-
"psr-4": {
55-
"Slim\\Tests\\Http\\": "tests/"
57+
"autoload-dev": {
58+
"psr-4": {
59+
"Slim\\Tests\\Http\\": "tests/"
60+
}
61+
},
62+
"scripts": {
63+
"test": [
64+
"@phpunit",
65+
"@phpcs",
66+
"@phpstan"
67+
],
68+
"phpunit": "phpunit",
69+
"phpcs": "phpcs",
70+
"phpstan": "phpstan --memory-limit=-1"
71+
},
72+
"config": {
73+
"sort-packages": true
5674
}
57-
},
58-
"scripts": {
59-
"test": [
60-
"@phpunit",
61-
"@phpcs",
62-
"@phpstan"
63-
],
64-
"phpunit": "phpunit",
65-
"phpcs": "phpcs",
66-
"phpstan": "phpstan --memory-limit=-1"
67-
},
68-
"config": {
69-
"sort-packages": true
70-
}
7175
}

src/Factory/DecoratedResponseFactory.php

+2-8
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,9 @@
1717

1818
class DecoratedResponseFactory implements ResponseFactoryInterface
1919
{
20-
/**
21-
* @var ResponseFactoryInterface
22-
*/
23-
protected $responseFactory;
20+
protected ResponseFactoryInterface $responseFactory;
2421

25-
/**
26-
* @var StreamFactoryInterface
27-
*/
28-
protected $streamFactory;
22+
protected StreamFactoryInterface $streamFactory;
2923

3024
/**
3125
* @param ResponseFactoryInterface $responseFactory

src/Factory/DecoratedServerRequestFactory.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@
1717

1818
class DecoratedServerRequestFactory implements ServerRequestFactoryInterface
1919
{
20-
/**
21-
* @var ServerRequestFactoryInterface
22-
*/
23-
protected $serverRequestFactory;
20+
protected ServerRequestFactoryInterface $serverRequestFactory;
2421

2522
/**
2623
* @param ServerRequestFactoryInterface $serverRequestFactory

src/Factory/DecoratedUriFactory.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616

1717
class DecoratedUriFactory implements UriFactoryInterface
1818
{
19-
/**
20-
* @var UriFactoryInterface
21-
*/
22-
protected $uriFactory;
19+
protected UriFactoryInterface $uriFactory;
2320

2421
/**
2522
* @param UriFactoryInterface $uriFactory

src/Response.php

+2-8
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,9 @@
3636

3737
class Response implements ResponseInterface
3838
{
39-
/**
40-
* @var ResponseInterface
41-
*/
42-
protected $response;
39+
protected ResponseInterface $response;
4340

44-
/**
45-
* @var StreamFactoryInterface
46-
*/
47-
protected $streamFactory;
41+
protected StreamFactoryInterface $streamFactory;
4842

4943
/**
5044
* EOL characters used for HTTP response.

src/ServerRequest.php

+2-8
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,9 @@
3636

3737
class ServerRequest implements ServerRequestInterface
3838
{
39-
/**
40-
* @var ServerRequestInterface
41-
*/
42-
protected $serverRequest;
39+
protected ServerRequestInterface $serverRequest;
4340

44-
/**
45-
* @var array
46-
*/
47-
protected $bodyParsers;
41+
protected array $bodyParsers;
4842

4943
/**
5044
* @param ServerRequestInterface $serverRequest

src/Uri.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414

1515
class Uri implements UriInterface
1616
{
17-
/**
18-
* @var UriInterface
19-
*/
20-
protected $uri;
17+
protected UriInterface $uri;
2118

2219
/**
2320
* @param UriInterface $uri

tests/Psr7Integration/Laminas/UriTest.php

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222

2323
class UriTest extends UriIntegrationTest
2424
{
25+
// https://datatracker.ietf.org/doc/html/rfc3986#section-3.3
26+
protected $skippedTests = [
27+
'testPathWithMultipleSlashes' => 'laminas-diactoros does not respect RFC3986.',
28+
];
29+
2530
public static function setUpBeforeClass(): void
2631
{
2732
if (!defined('URI_FACTORY')) {

0 commit comments

Comments
 (0)