Skip to content

Commit

Permalink
Drop php version support (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
reinfi authored Feb 20, 2025
1 parent 78b155d commit 430e561
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 20 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,13 @@ jobs:
fail-fast: false
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
deps:
- "highest"
include:
- php-version: "7.4"
- php-version: "8.1"
deps: "lowest"

steps:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ composer require brick/varexporter

### Requirements

This library requires PHP 7.4 or later.
This library requires PHP 8.1 or later.

For PHP 7.2 & 7.3 compatibility, you can use version `0.3`. For PHP 7.1, you can use version `0.2`. Note that [these PHP versions are EOL](http://php.net/supported-versions.php) and not supported anymore. If you're still using one of these PHP versions, you should consider upgrading as soon as possible.
For PHP 7.4, you can use version `0.5`. For PHP 7.2 & 7.3 compatibility, you can use version `0.3`. Note that [these PHP versions are EOL](http://php.net/supported-versions.php) and not supported anymore. If you're still using one of these PHP versions, you should consider upgrading as soon as possible.

### Project status & release process

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"license": "MIT",
"require": {
"php": "^7.4 || ^8.0",
"php": "^8.1",
"nikic/php-parser": "^5.0"
},
"require-dev": {
Expand Down
2 changes: 0 additions & 2 deletions src/Internal/ObjectExporter/SetStateExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ private function getObjectVars(object $object, array $path) : array
$name = substr($name, $pos + 1);
}

assert($name !== false);

if (array_key_exists($name, $result)) {
$className = get_class($object);

Expand Down
12 changes: 0 additions & 12 deletions tests/ExportClosureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,6 @@ public function testExportClosureWithUseClosure(): void

public function testExportArrowFunction(): void
{
if (version_compare(PHP_VERSION, '7.4.0') < 0) {
$this->markTestSkipped("Arrow functions aren't supported in PHP " . PHP_VERSION);
}

$var = [fn ($planet) => 'hello ' . $planet]; // Wrapping in array for valid syntax PHP <7.4

$expected = <<<'PHP'
Expand All @@ -226,10 +222,6 @@ function ($planet) {

public function testExportArrowFunctionWithContext(): void
{
if (version_compare(PHP_VERSION, '7.4.0') < 0) {
$this->markTestSkipped("Arrow functions aren't supported in PHP " . PHP_VERSION);
}

$greet = 'hello';

$var = [fn ($planet) => $greet . ' ' . $planet];
Expand All @@ -243,10 +235,6 @@ public function testExportArrowFunctionWithContext(): void

public function testExportArrowFunctionWithContextVarAsVar(): void
{
if (version_compare(PHP_VERSION, '7.4.0') < 0) {
$this->markTestSkipped("Arrow functions aren't supported in PHP " . PHP_VERSION);
}

$greet = 'hello';

$var = [fn ($planet) => $greet . ' ' . $planet];
Expand Down

0 comments on commit 430e561

Please sign in to comment.