Repository navigation
Testing and Compatibility
Composer declares PHP ~8.4.27 || ~8.5.12 and Illuminate ^12.0 || ^13.0. Test tooling uses Pest 4, Orchestra Testbench 10/11 and Pint. The PHP constraints preserve the owner's approved security patch floors; no deployed host runtime is established by a package's Composer constraint.
The following combinations were exercised in isolated official PHP CLI containers with PDO SQLite/PDO MySQL. Each combination was run against both SQLite 3.46.1 and MariaDB 11.8.9/InnoDB:
- PHP 8.4.27, Laravel 12.71.0, Testbench 10.12.0.
- PHP 8.5.12, Laravel 12.71.0, Testbench 10.12.0.
- PHP 8.4.27, Laravel 13.40.0, Testbench 11.3.0.
- PHP 8.5.12, Laravel 13.40.0, Testbench 11.3.0.
Pest version: 4.7.8. Pint version: 1.32.1. At initial commit e578c5c, the baseline suite had 70 passing SQLite tests / 317 assertions, and 71 passing MariaDB tests / 319 assertions. All eight combinations ran that initial suite, including its then-supported aliases, named/object team scopes and native publication. The subsequent owner-directed API simplification removes those aliases, adds revokeTeam() and moves the trait to Moztopia\Access\Traits\HasAccess; follow-up validation is recorded below.
The independent-process worker entry test is intentionally skipped in the parent process and executed inside each spawned worker. The MariaDB padding-mode regression is intentionally skipped on SQLite. Consequently SQLite reports two intentional skips and MariaDB one; no required behavioral test is skipped on its applicable engine.
Pint passes. Composer audit reports no known dependency advisories for the resolved final dependency set. Native Laravel PackageManifest discovery and the default user-model namespace were also verified independently using the actual Composer metadata. Initial composer validate passed with the then-expected missing-license warning, now resolved by the owner-approved MIT license. The owner subsequently authorized MIT; composer validate --strict now passes for the 0.9.0 release preparation. There is no claimed GitHub Actions run or automated CI workflow: these are local container verification results. Constraints do not prove every patch version, the oldest framework release in each line, or untested engines. MySQL server, PostgreSQL, SQL Server and binary UUID storage are not declared supported.
Official references: Laravel 12 release requirements, Laravel 13 release requirements, PHP security releases. Resolved Composer versions plus executed tests establish the concrete combinations above; documentation alone does not.
The final assign/revoke-only vocabulary and Traits\HasAccess namespace pass the full SQLite suite on PHP 8.4.27 and 8.5.12, Laravel 13.40.0: 58 tests / 263 assertions per run, with two explained intentional skips. The reduced count removes redundant alias variants; it does not remove the core scope/integrity scenarios. New tests verify revokeTeam() by name/model, repeated removal, permanent scoped-grant cleanup, preservation of other grants and the team itself, unknown-team failure, absence of removed aliases, and the new trait namespace. Pint passes. The earlier eight-combination results remain explicitly tied to the initial commit; MariaDB and Laravel 12 were not rerun for this follow-up, which delegates to the already-tested membership service and leaves the schema unchanged.
The Pest/Testbench suite covers global/team roles, direct/inherited permissions, global inheritance only with active membership, cross-team/user isolation, membership enforcement, removal/rejoin cleanup, independent grants, idempotency and safe revocation, unknown definitions, exact name rules, no implicit admin powers, UUIDv7 keys, host UUID relationships, raw-database assignment uniqueness and membership FKs, generated-key forgery rejection, role-set updates/rollback, deletions and cascades, reused-service isolation, Gate/policy behavior and actor-versus-target HTTP authorization. It verifies stable unique team names, mutable display labels, unknown-name failures, explicit assignment/revocation commands across scopes. It also executes native Artisan config/migration publication and installs the published migration.
Concurrency tests launch independent PHP processes against the same database. They deliberately hold a parent transaction, wait for workers' readiness barriers, verify workers remain blocked, then release the lock and assert the final state. Scenarios cover duplicate global/team role and permission grants, duplicate membership additions, grant-after-membership-removal rejection, and membership removal after a committed grant. These are real-engine race tests, not repeated sequential calls represented as concurrency proof.
Requirements: supported PHP, Composer 2, PDO SQLite, proc_open and permission to create temporary files/processes. Test dependencies are isolated from consumer runtime dependencies. No web server or Laravel application scaffold is needed.
composer install
composer validate
composer test
composer lintUse only disposable databases. The suite drops/recreates moztopia_access_* tables and access_test_users before every parent test. It must never point at an application database. SQLite defaults to :memory:; concurrency tests use temporary files with foreign keys enabled and a busy timeout.
Provision a dedicated MariaDB 11.8/InnoDB database named access_test with synthetic username/password access_test, enable pdo_mysql, then run:
ACCESS_DB_DRIVER=mysql ACCESS_DB_HOST=database ACCESS_DB_DATABASE=access_test composer testThese are fixed test-fixture credentials, not deployment defaults. Run PHP and MariaDB on an isolated Docker network without published host ports. Child processes inherit the selected database settings. Do not run Pest parallel mode against a single shared MariaDB test database.
To resolve each framework line independently while preserving the declared package constraints:
composer update orchestra/testbench laravel/framework --with-all-dependencies \
--with='orchestra/testbench:^10.0' --with='laravel/framework:^12.0'
composer test
composer update orchestra/testbench laravel/framework --with-all-dependencies \
--with='orchestra/testbench:^11.0' --with='laravel/framework:^13.0'
composer testRepeat on both supported PHP lines and databases when changing runtime compatibility or database integrity behavior. Composer lockfiles are intentionally ignored for this library. Re-resolving dependencies can select newer patches; record the actual versions after each run.
Copyright © 2026 Moztopia · Source · Licensing status · Security