Skip to content

Commit 1e7ee02

Browse files
authored
Merge pull request #555 from armanist/issue/532-php-8-baseline
Issue/532 php 8 baseline
2 parents 861bfd6 + 4cc45d6 commit 1e7ee02

451 files changed

Lines changed: 1196 additions & 3765 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/php.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
matrix:
1717
operating-system: [ ubuntu-latest ]
18-
php-versions: [ '7.4', '8.0', '8.1' ]
18+
php-versions: [ '8.0', '8.1', '8.2' ]
1919
redis-version: [ 6 ]
2020

2121
runs-on: ${{ matrix.operating-system }}
@@ -67,4 +67,3 @@ jobs:
6767
uses: codecov/codecov-action@v4
6868
with:
6969
token: ${{ secrets.CODECOV_TOKEN }}
70-

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Thumbs.db
1717
# =========================
1818
/tests/_root/shared/store/*
1919
/tests/_root/cron-tests/
20+
/tests/_root/cache/data/*
21+
!/tests/_root/cache/data/.gitkeep
2022
/coverage/
2123
*.log
2224

@@ -26,4 +28,4 @@ Thumbs.db
2628
/.php-cs-fixer.cache
2729
/.phpunit.result.cache
2830
/.phpunit.cache
29-
/.cache/
31+
/.cache/

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## [3.0.3] - 2026-06-28
2+
3+
### Changed
4+
- **BREAKING:** Raised the minimum supported PHP version from `7.4` to `8.0` (#532)
5+
- Updated CI coverage to test PHP `8.0`, `8.1`, and `8.2` (#532)
6+
- Raised the static analysis baseline to PHPStan level `8` with PHP `8.0` target settings (#532)
7+
- Kept Rector aligned to the PHP 8 baseline and applied bounded PHP 8-safe modernization updates (#532)
8+
- Simplified the standard framework file banner across core sources, templates, and affected tests (#532)
9+
10+
### Notes
11+
- OpenAPI metadata remains on Doctrine-style annotations for now because the currently used `swagger-php` attribute scanning path requires PHP `8.1+`; `doctrine/annotations` is intentionally retained on the PHP `8.0` baseline (#532)
12+
113
## [3.0.0] - 2026-05-28
214

315
Upgrade guide: https://github.com/softberg/quantum-php-docs/blob/master/v3.0/upgrade-guide.md

CONTRIBUTING.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,13 @@ composer phpstan
7373
composer cs:check
7474
```
7575

76-
6. Commit and push your branch:
76+
6. Run Rector dry-run
77+
78+
```bash
79+
composer rector:check
80+
```
81+
82+
7. Commit and push your branch:
7783

7884
```bash
7985
git commit -m "[#123] Add SoftDeletes trait for models"
@@ -105,13 +111,13 @@ Notes:
105111
## Testing
106112

107113
Quantum uses **PHPUnit** for tests. If you add new features, make sure they include unit tests — especially for database or HTTP-related components. For in-memory testing, use SQLite in-memory databases (for example, in tests using IdiormDbal).
108-
All contributions must also pass **PHPStan** (static analysis) and **PHP-CS-Fixer** (code style) checks.
114+
All contributions must also pass **PHPStan** (static analysis), **PHP-CS-Fixer** (code style), and **Rector** dry-run checks.
109115

110116
---
111117

112118
## Code Guidelines
113119

114-
- PHP 7.4+ compatibility is required.
120+
- PHP 8.0+ compatibility is required.
115121
- Keep class responsibilities clear — avoid bloated classes.
116122
- Follow the existing directory structure
117123
- Always document public methods.

composer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@
1616
{
1717
"name": "Arman Ag",
1818
"email": "arman@quantumphp.io"
19+
},
20+
{
21+
"name": "Contributors",
22+
"homepage": "https://github.com/quantum-php/framework/contributors"
1923
}
2024
],
2125
"require": {
22-
"php": "^7.4 || ^8.0",
26+
"php": "^8.0",
2327
"ext-pdo": "*",
2428
"ext-curl": "*",
2529
"ext-json": "*",

phpstan.neon.dist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
parameters:
2-
phpVersion: 70400
3-
level: 7
2+
phpVersion: 80000
3+
level: 8
44

55
paths:
66
- src
@@ -13,4 +13,4 @@ parameters:
1313
checkUninitializedProperties: true
1414

1515
checkDynamicProperties: false
16-
treatPhpDocTypesAsCertain: false
16+
treatPhpDocTypesAsCertain: false

rector.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
declare(strict_types=1);
44

55
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
6+
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
67
use Rector\TypeDeclaration\Rector\ClassMethod\StrictStringParamConcatRector;
78
use Rector\Set\ValueObject\LevelSetList;
89
use Rector\Set\ValueObject\SetList;
@@ -20,6 +21,7 @@
2021
DeclareStrictTypesRector::class,
2122
])
2223
->withSkip([
24+
ClassPropertyAssignToConstructorPromotionRector::class,
2325
StrictStringParamConcatRector::class => [
2426
__DIR__ . '/src/Database/Adapters/Idiorm/Statements/Criteria.php',
2527
],

src/App/Adapters/AppAdapter.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,8 @@
44

55
/**
66
* Quantum PHP Framework
7-
*
8-
* An open source software development framework for PHP
9-
*
10-
* @package Quantum
11-
* @author Arman Ag. <arman@quantumphp.io>
12-
* @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org)
13-
* @link https://quantumphp.io/
14-
* @since 3.0.0
7+
* An open-source software development framework for PHP
8+
* @link https://quantumphp.io
159
*/
1610

1711
namespace Quantum\App\Adapters;

src/App/Adapters/ConsoleAppAdapter.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,8 @@
44

55
/**
66
* Quantum PHP Framework
7-
*
8-
* An open source software development framework for PHP
9-
*
10-
* @package Quantum
11-
* @author Arman Ag. <arman@quantumphp.io>
12-
* @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org)
13-
* @link https://quantumphp.io/
14-
* @since 3.0.0
7+
* An open-source software development framework for PHP
8+
* @link https://quantumphp.io
159
*/
1610

1711
namespace Quantum\App\Adapters;

src/App/Adapters/WebAppAdapter.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,8 @@
44

55
/**
66
* Quantum PHP Framework
7-
*
8-
* An open source software development framework for PHP
9-
*
10-
* @package Quantum
11-
* @author Arman Ag. <arman@quantumphp.io>
12-
* @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org)
13-
* @link https://quantumphp.io/
14-
* @since 3.0.0
7+
* An open-source software development framework for PHP
8+
* @link https://quantumphp.io
159
*/
1610

1711
namespace Quantum\App\Adapters;

0 commit comments

Comments
 (0)