pekral/arch-app-services
A structured application-services layer for Laravel that keeps controllers thin by moving use-case logic into dedicated, testable service classes with a consistent architecture.
NoHttpExceptionsInActionsAndDataValidatorsRule into NoHttpExceptionsInActionsRule and NoHttpExceptionsInDataValidatorsRule is a product statement: HTTP concerns are banned in both the action layer and the validation layer, and each can be scoped independently via actionNamespaces / dataValidatorNamespaces. Teams can now adopt one rule without the other — useful for incremental rollouts where validators are already cleaned up but actions are not.Consider adoption when:
NoHttpExceptionsInActionsAndDataValidatorsRule outright. Budget a pin-and-upgrade discipline (exact versions, a scheduled upgrade ticket per release) rather than floating constraints.phpstan/ namespace if the package stalls.Look elsewhere when:
Migration note for existing adopters: replace the single service registration with the two new ones. ignoreErrors entries keyed on the existing identifiers keep working, so suppression baselines do not need rewriting — the migration cost is confined to the Neon/PHPStan config file.
To executives: We are evaluating a small Laravel package that converts our architectural standards into automated CI checks. The business case is defect prevention and onboarding speed: instead of relying on reviewers to catch layering violations, the build fails. Cost is low (a dev dependency), risk is bounded (pin the version, rules are replaceable in-house), and the current release is pre-1.0 — so the recommendation is a scoped pilot on one service, not a platform-wide mandate.
To engineering: This gives us enforced Actions/Data Validators separation, Result-based error handling, and explicit transaction boundaries, all caught by PHPStan rather than in review. 0.5.1 splits the old combined rule into two independently scoped rules (NoHttpExceptionsInActionsRule, NoHttpExceptionsInDataValidatorsRule) configured by namespace — so we can roll out per layer. It is a breaking change on a patch version: pin exactly, and expect to touch phpstan.neon on upgrades. Existing ignoreErrors identifiers still apply. Recommend a one-service pilot with the rules at error level, and only then a shared config package for the rest of the estate.
How can I help you explore Laravel packages today?