Commit Graph
4 Commits
Author SHA1 Message Date
dgarcia 574b034d4c docs: explain how to enable the pre-commit hook
Tests / PHP 8.4 (push) Failing after 5m37s
2026-11-15 11:08:22 -03:00
dgarcia 0e756e45c7 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.
2026-11-15 10:58:11 -03:00
dgarcia f9010e2c63 test: split unit and integration suites and add coverage config
Tests / PHP 8.3 (push) Failing after 3m42s
Tests / PHP 8.4 (push) Failing after 2m31s
- Create tests/Integration/ConnectionTest.php, skipped unless CAMELIA_TEST_HOST,
  CAMELIA_TEST_DATABASE and CAMELIA_TEST_USER are set, so composer test:integration
  no longer fails on a missing directory.
- Move coverage reports to phpunit.coverage.xml.dist: a coverage driver is optional and
  failOnWarning would turn its absence into a failed gate.
- Add a composer coverage script and document the requirement.
- Exclude development-only files from the distribution archive via export-ignore.
- Add a Gitea Actions workflow running composer check on PHP 8.3 and 8.4.
- Align the README title with the package name and add Packagist and CI badges.
2026-11-15 10:21:11 -03:00
dgarcia 66e93e3070 feat: initial commit of camelia/orm
Attribute-mapped Active Record ORM for MariaDB/MySQL over PDO.

- Attribute-driven metadata: TableName, PrimaryKey, AutoIncrement, Column,
  Guarded, Ignore, Required, Enum, Nullable, Length, Precision, Unique,
  UniqueGroup, Index, MaxLength.
- Relationship mapping: BelongsTo, HasOne, HasMany, BelongsToMany with
  batched eager loading and a 3-level depth limit.
- Orm entry point with fromArray, fromPdo, fromEnv and nested transactions.
- Immutable Query with Cond operators and GroupCond grouping.
- Repository read and write API, pagination, and typed exception hierarchy.
- Declares PHP >=8.3; Mago and PHPStan pin the parser to 8.3.
- MIT license.
2026-11-15 10:14:22 -03:00