Skip to content
CAI
Software that uses CAICheck a score

allysonsilva/laravel-artisan-domain-contexts

70.7

Strong · 9 November 2026

2.4k

lines of production code

PHP

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Laravel Artisan command generator that scaffolds classes, models, and policies. It provides tools for generating and managing code structures, with specific logic for namespace resolution and model qualification. The codebase has been updated to support Laravel 9.x, including compatibility adjustments for the Artisan console and test suite.

Behavioural changes

Refactor namespace resolution for generated classes and models

The command classes now use a more robust approach for determining namespaces. The \SeederMakeCommand\ implements a \rootNamespace\ method to correctly retrieve the application's root namespace. The \BuildClass\ trait's \getContextNamespace\ method now accepts an optional component folder argument to allow for more flexible namespace construction. Additionally, the \PolicyMakeCommand\ introduces a \qualifyModel\ method that intelligently resolves the fully qualified model class name, checking for existing namespaces, context options, and directory structures to ensure generated policies reference the correct model classes.

src/Commands · medium confidence

Updated Artisan console initialization for Laravel v9.x compatibility

The Artisan console initialization in src/Concerns/ArtisanConsoleTrait.php was modified to support Laravel v9.x. The change updates the console application setup by calling setContainerCommandLoader() on the resolved commands, ensuring compatibility with the new Laravel version.

src/Concerns · medium confidence

Updated documentation, CI configuration, and test behavior

The package documentation was expanded with a new 'Concepts' section explaining 'Domain' and 'Contexts', and the README table of contents was updated to include it. The CI configuration was modified: the .codacy.yml file was removed, and PHPStan was configured to ignore a specific generic class error in src/Commands/Concerns/InteractsWithChoices.php. Additionally, the PHPUnit configuration was changed to stopOnError and stopOnFailure, ensuring that test failures do not halt the test suite execution.

(repo-wide) · high confidence

Test coverage

Updated test suite for Laravel 9.x compatibility

The test suite was updated to support Laravel v9.x. This includes adding a new unit test for the \PolicyMakeCommand\ to verify model context handling, and refactoring existing tests in \CommandOptionsTest\, \FactoryMakeCommandTest\, \FreshCommandTest\, \MigrateCommandTest\, \MigrateMakeCommandTest\, \ModelMakeCommandTest\, and \RefreshCommandTest\ to align with Laravel 9.x changes, such as updated console output patterns and configuration defaults.

tests · high confidence

Dependencies

Upgrade Laravel framework and dev dependencies to support Laravel 9.x

The project now requires Laravel 9.x (up from 8.x) and updates dev dependencies including larastan to 2.0 and orchestra/testbench to 7.0. Additionally, composer configuration was updated to allow specific plugins and the unit test script was modified to explicitly set the memory limit.

(dependencies) · high confidence

Housekeeping

Whitespace adjustment in ClassIterator constructor

A blank line was added in the ClassIterator constructor, likely to improve code formatting or readability. This is a minor stylistic change with no impact on functionality.

src/Tools · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 69 → 71 (+1.7)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 93 → 93 (+0.0)
  • Maturity 57 → 61 (+3.7)
  • Readiness 69 → 69 (+0.0)
  • Security 86 → 86 (+0.0)

Findings

  • No change — the same findings as the prior survey.

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

allysonsilva/laravel-artisan-domain-contexts was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 9 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 36b67d0e92a69a18f57c2cdb40eb38c82590523e — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-bb0cb800cd0f.