Skip to content

Commit

Permalink
Merge pull request #499 from ergebnis/fix/php7.4
Browse files Browse the repository at this point in the history
Fix: Drop support for PHP 7.4
  • Loading branch information
localheinz committed Apr 30, 2023
2 parents 0e8a6f5 + 06d4ace commit 65df44c
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 188 deletions.
11 changes: 4 additions & 7 deletions .github/settings.yml
Expand Up @@ -14,13 +14,10 @@ branches:
required_approving_review_count: 1
required_status_checks:
contexts:
- "Code Coverage (7.4, locked)"
- "Coding Standards (7.4, locked)"
- "Dependency Analysis (7.4, locked)"
- "Static Code Analysis (7.4, locked)"
- "Tests (7.4, highest)"
- "Tests (7.4, locked)"
- "Tests (7.4, lowest)"
- "Code Coverage (8.0, locked)"
- "Coding Standards (8.0, locked)"
- "Dependency Analysis (8.0, locked)"
- "Static Code Analysis (8.0, locked)"
- "Tests (8.0, highest)"
- "Tests (8.0, locked)"
- "Tests (8.0, lowest)"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/integrate.yaml
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"

dependencies:
- "locked"
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"

dependencies:
- "locked"
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"

dependencies:
- "locked"
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.0"
- "8.1"

Expand Down Expand Up @@ -232,7 +232,7 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"

dependencies:
- "locked"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/renew.yaml
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
php-version:
- "7.4"
- "8.0"

dependencies:
- "locked"
Expand Down
Binary file modified .phive/composer-require-checker
Binary file not shown.
2 changes: 1 addition & 1 deletion .phive/phars.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="composer-require-checker" version="^2.1.0" installed="2.1.0" location="./.phive/composer-require-checker" copy="true"/>
<phar name="composer-require-checker" version="^3.8.0" installed="3.8.0" location="./.phive/composer-require-checker" copy="true"/>
</phive>
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -12,6 +12,7 @@ For a full diff see [`1.0.0...main`][1.0.0...main].

- Dropped support for PHP 7.2 ([#496]), by [@localheinz]
- Dropped support for PHP 7.3 ([#498]), by [@localheinz]
- Dropped support for PHP 7.4 ([#499]), by [@localheinz]

## [`1.0.0`][1.0.0]

Expand Down Expand Up @@ -454,6 +455,7 @@ For a full diff see [`362c7ea...0.1.0`][362c7ea...0.1.0].
[#395]: https://github.com/ergebnis/phpstan-rules/pull/395
[#496]: https://github.com/ergebnis/phpstan-rules/pull/496
[#498]: https://github.com/ergebnis/phpstan-rules/pull/498
[#499]: https://github.com/ergebnis/phpstan-rules/pull/498

[@ergebnis]: https://github.com/ergebnis
[@Great-Antique]: https://github.com/Great-Antique
Expand Down
7 changes: 3 additions & 4 deletions composer.json
Expand Up @@ -20,7 +20,7 @@
"source": "https://github.com/ergebnis/phpstan-rules"
},
"require": {
"php": "~7.4.0 || ~8.0.0 || ~8.1.0",
"php": "~8.0.0 || ~8.1.0",
"ext-mbstring": "*",
"nikic/php-parser": "^4.2.3",
"phpstan/phpstan": "^1.0.0"
Expand All @@ -37,8 +37,7 @@
"phpunit/phpunit": "^8.5.26",
"psalm/plugin-phpunit": "~0.16.1",
"psr/container": "^1.0.0",
"vimeo/psalm": "^4.22",
"zendframework/zend-servicemanager": "^2.0.0"
"vimeo/psalm": "^4.22"
},
"autoload": {
"psr-4": {
Expand All @@ -56,7 +55,7 @@
"infection/extension-installer": true
},
"platform": {
"php": "7.4.29"
"php": "8.0.27"
},
"preferred-install": "dist",
"sort-packages": true
Expand Down
99 changes: 3 additions & 96 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

This file was deleted.

This file was deleted.

Expand Up @@ -18,7 +18,6 @@
use Ergebnis\PHPStan\Rules\Test\Integration\AbstractTestCase;
use PHPStan\Rules\Rule;
use Psr\Container;
use Zend\ServiceManager;

/**
* @internal
Expand Down Expand Up @@ -78,16 +77,6 @@ public function provideCasesWhereAnalysisShouldFail(): iterable
9,
],
],
'anonymous-class-with-method-with-parameter-with-service-locator-interface-as-type-declaration' => [
__DIR__ . '/../../Fixture/Methods/NoParameterWithContainerTypeDeclarationRule/Failure/anonymous-class-with-method-with-parameter-with-service-locator-interface-as-type-declaration.php',
[
\sprintf(
'Method __construct() in anonymous class has a parameter $container with a type declaration of %s, but containers should not be injected.',
ServiceManager\ServiceLocatorInterface::class
),
11,
],
],
'class-implementing-container-interface-with-method-with-parameter-with-self-as-type-declaration' => [
__DIR__ . '/../../Fixture/Methods/NoParameterWithContainerTypeDeclarationRule/Failure/ClassImplementingContainerInterfaceWithMethodWithParameterWithSelfAsTypeDeclaration.php',
[
Expand Down Expand Up @@ -132,17 +121,6 @@ public function provideCasesWhereAnalysisShouldFail(): iterable
9,
],
],
'class-with-method-with-parameter-with-service-locator-interface-as-type-declaration' => [
__DIR__ . '/../../Fixture/Methods/NoParameterWithContainerTypeDeclarationRule/Failure/ClassWithMethodWithParameterWithServiceLocatorInterfaceAsTypeDeclaration.php',
[
\sprintf(
'Method %s::method() has a parameter $container with a type declaration of %s, but containers should not be injected.',
Fixture\Methods\NoParameterWithContainerTypeDeclarationRule\Failure\ClassWithMethodWithParameterWithServiceLocatorInterfaceAsTypeDeclaration::class,
ServiceManager\ServiceLocatorInterface::class
),
11,
],
],
'interface-with-method-with-parameter-with-container-interface-as-type-declaration' => [
__DIR__ . '/../../Fixture/Methods/NoParameterWithContainerTypeDeclarationRule/Failure/InterfaceWithMethodWithParameterWithContainerInterfaceAsTypeDeclaration.php',
[
Expand All @@ -154,17 +132,6 @@ public function provideCasesWhereAnalysisShouldFail(): iterable
11,
],
],
'interface-with-method-with-parameter-with-service-locator-interface-as-type-declaration' => [
__DIR__ . '/../../Fixture/Methods/NoParameterWithContainerTypeDeclarationRule/Failure/InterfaceWithMethodWithParameterWithServiceLocatorInterfaceAsTypeDeclaration.php',
[
\sprintf(
'Method %s::method() has a parameter $container with a type declaration of %s, but containers should not be injected.',
Fixture\Methods\NoParameterWithContainerTypeDeclarationRule\Failure\InterfaceWithMethodWithParameterWithServiceLocatorInterfaceAsTypeDeclaration::class,
ServiceManager\ServiceLocatorInterface::class
),
11,
],
],
];

foreach ($paths as $description => [$path, $error]) {
Expand All @@ -181,7 +148,6 @@ protected function getRule(): Rule
$this->createReflectionProvider(),
[
Container\ContainerInterface::class,
ServiceManager\ServiceLocatorInterface::class,
]
);
}
Expand Down

0 comments on commit 65df44c

Please sign in to comment.