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

Drop support for PHP 7.3 #191

Merged
merged 5 commits into from
Apr 6, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.3, 7.4, 8.0, 8.1]
php: [7.4, 8.0, 8.1]
experimental: [false]
include:
- php: 8.1
analysis: true

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

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

- name: Install dependencies with Composer
uses: ramsey/composer-install@v1
uses: ramsey/composer-install@v2

- name: Coding standards
if: matrix.analysis
Expand Down
2 changes: 1 addition & 1 deletion 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.3, or newer, is required.
PHP 7.4, or newer, is required.

## Tests

Expand Down
134 changes: 69 additions & 65 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,71 +1,75 @@
{
"name": "slim/http",
"type": "library",
"description": "Slim PSR-7 Object Decorators",
"keywords": ["psr7", "psr-7", "http"],
"homepage": "http://slimframework.com",
"license": "MIT",
"authors": [
{
"name": "Josh Lockhart",
"email": "hello@joshlockhart.com",
"homepage": "http://joshlockhart.com"
"name": "slim/http",
"type": "library",
"description": "Slim PSR-7 Object Decorators",
"keywords": [
"psr7",
"psr-7",
"http"
],
"homepage": "http://slimframework.com",
"license": "MIT",
"authors": [
{
"name": "Josh Lockhart",
"email": "hello@joshlockhart.com",
"homepage": "http://joshlockhart.com"
},
{
"name": "Andrew Smith",
"email": "a.smith@silentworks.co.uk",
"homepage": "http://silentworks.co.uk"
},
{
"name": "Rob Allen",
"email": "rob@akrabat.com",
"homepage": "http://akrabat.com"
},
{
"name": "Pierre Berube",
"email": "pierre@lgse.com",
"homepage": "http://www.lgse.com"
}
],
"require": {
"php": "^7.4 || ^8.0",
"ext-SimpleXML": "*",
"ext-fileinfo": "*",
"ext-json": "*",
"ext-libxml": "*",
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0"
},
{
"name": "Andrew Smith",
"email": "a.smith@silentworks.co.uk",
"homepage": "http://silentworks.co.uk"
"require-dev": {
"adriansuter/php-autoload-override": "^1.2",
"laminas/laminas-diactoros": "^2.8",
"nyholm/psr7": "^1.5",
"php-http/psr7-integration-tests": "dev-master",
"phpstan/phpstan": "^1.4",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.6"
},
{
"name": "Rob Allen",
"email": "rob@akrabat.com",
"homepage": "http://akrabat.com"
"autoload": {
"psr-4": {
"Slim\\Http\\": "src/"
}
},
{
"name": "Pierre Berube",
"email": "pierre@lgse.com",
"homepage": "http://www.lgse.com"
}
],
"require": {
"php": "^7.3 || ^8.0",
"ext-SimpleXML": "*",
"ext-fileinfo": "*",
"ext-json": "*",
"ext-libxml": "*",
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0"
},
"require-dev": {
"adriansuter/php-autoload-override": "^1.2",
"laminas/laminas-diactoros": "^2.8",
"nyholm/psr7": "^1.5",
"php-http/psr7-integration-tests": "dev-master",
"phpstan/phpstan": "^1.4",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.6"
},
"autoload": {
"psr-4": {
"Slim\\Http\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Slim\\Tests\\Http\\": "tests/"
"autoload-dev": {
"psr-4": {
"Slim\\Tests\\Http\\": "tests/"
}
},
"scripts": {
"test": [
"@phpunit",
"@phpcs",
"@phpstan"
],
"phpunit": "phpunit",
"phpcs": "phpcs",
"phpstan": "phpstan --memory-limit=-1"
},
"config": {
"sort-packages": true
}
},
"scripts": {
"test": [
"@phpunit",
"@phpcs",
"@phpstan"
],
"phpunit": "phpunit",
"phpcs": "phpcs",
"phpstan": "phpstan --memory-limit=-1"
},
"config": {
"sort-packages": true
}
}
10 changes: 2 additions & 8 deletions src/Factory/DecoratedResponseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,9 @@

class DecoratedResponseFactory implements ResponseFactoryInterface
{
/**
* @var ResponseFactoryInterface
*/
protected $responseFactory;
protected ResponseFactoryInterface $responseFactory;

/**
* @var StreamFactoryInterface
*/
protected $streamFactory;
protected StreamFactoryInterface $streamFactory;

/**
* @param ResponseFactoryInterface $responseFactory
Expand Down
5 changes: 1 addition & 4 deletions src/Factory/DecoratedServerRequestFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@

class DecoratedServerRequestFactory implements ServerRequestFactoryInterface
{
/**
* @var ServerRequestFactoryInterface
*/
protected $serverRequestFactory;
protected ServerRequestFactoryInterface $serverRequestFactory;

/**
* @param ServerRequestFactoryInterface $serverRequestFactory
Expand Down
5 changes: 1 addition & 4 deletions src/Factory/DecoratedUriFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@

class DecoratedUriFactory implements UriFactoryInterface
{
/**
* @var UriFactoryInterface
*/
protected $uriFactory;
protected UriFactoryInterface $uriFactory;

/**
* @param UriFactoryInterface $uriFactory
Expand Down
10 changes: 2 additions & 8 deletions src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,9 @@

class Response implements ResponseInterface
{
/**
* @var ResponseInterface
*/
protected $response;
protected ResponseInterface $response;

/**
* @var StreamFactoryInterface
*/
protected $streamFactory;
protected StreamFactoryInterface $streamFactory;

/**
* EOL characters used for HTTP response.
Expand Down
10 changes: 2 additions & 8 deletions src/ServerRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,9 @@

class ServerRequest implements ServerRequestInterface
{
/**
* @var ServerRequestInterface
*/
protected $serverRequest;
protected ServerRequestInterface $serverRequest;

/**
* @var array
*/
protected $bodyParsers;
protected array $bodyParsers;

/**
* @param ServerRequestInterface $serverRequest
Expand Down
5 changes: 1 addition & 4 deletions src/Uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@

class Uri implements UriInterface
{
/**
* @var UriInterface
*/
protected $uri;
protected UriInterface $uri;

/**
* @param UriInterface $uri
Expand Down
5 changes: 5 additions & 0 deletions tests/Psr7Integration/Laminas/UriTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@

class UriTest extends UriIntegrationTest
{
// https://datatracker.ietf.org/doc/html/rfc3986#section-3.3
protected $skippedTests = [
'testPathWithMultipleSlashes' => 'laminas-diactoros does not respect RFC3986.',
];

public static function setUpBeforeClass(): void
{
if (!defined('URI_FACTORY')) {
Expand Down