refactor!: require PHP 8.4
Tests / PHP 8.4 (push) Failing after 5m34s

Drop support for PHP 8.3 and lower. The package now declares >=8.4, and CI runs
only on 8.4.

- composer.json: require php >=8.4.
- mago.toml: php-version = "8.4", matching the minimum supported version.
- phpstan.neon: phpVersion 80400.
- Upgrade phpstan/phpstan to ^2.3: 1.x cannot parse `new Foo()->bar()`, which the
  8.4 formatter now emits.
- Fix the type errors PHPStan 2 reports: class-string<static> variance,
  optional array offsets in fromEnvironment, list vs array for PdoConnection::$lru,
  ReflectionClass<Model> docblocks, Repository made covariant in T, and a redundant
  null comparison in validateRelationPath.
- CI: single PHP 8.4 job using the php:8.4-cli container instead of setup-php,
  which failed with a TLS handshake timeout on the runner.

BREAKING CHANGE: PHP 8.4 is now required.
This commit is contained in:
dgarcia committed 2026-11-15 10:58:11 -03:00
1 parent c15015d809
commit 0e756e45c7
20 files changed
+97 -107

No files matched your search

+4 -4
View File
@@ -8,7 +8,7 @@
Lightweight attribute-mapped Active Record ORM for MariaDB/MySQL over PDO.
- **Package:** `camelia/orm` · **Namespace:** `Camelia\Orm`
- **PHP** `>=8.3`, extensions `pdo_mysql` and `mbstring`
- **PHP** `>=8.4`, extensions `pdo_mysql` and `mbstring`
- **Runtime dependencies:** `psr/log` (PSR-3, optional usage). `brick/math` is a suggestion for
`BigDecimal` properties.
@@ -140,12 +140,12 @@ Configuration:
|---|---|
| `mago.toml` | formatter, linter, analyzer |
| `mago-baseline.toml` | accepted analyzer findings (values coming from PDO) |
| `phpstan.neon` | level 8, `phpVersion: 80300` |
| `phpstan.neon` | level 8, `phpVersion: 80400` |
| `phpunit.xml.dist` | unit suite |
| `phpunit.integration.xml.dist` | integration suite, skipped without `CAMELIA_TEST_DSN` |
`mago.toml` pins `php-version = "8.3"`. Do not raise it to 8.4: with 8.4 the formatter emits
`new Foo()->bar()`, which the package cannot ship because it promises PHP 8.3 support.
`mago.toml` pins `php-version = "8.4"`, matching the minimum supported version, so `mago fmt` and
the runtime agree on which syntax the package may ship.
## License