test(arch): forbid Symfony framework and Laravel helpers in Application layer

This commit is contained in:
Jérémy Munsch 2026-08-17 09:22:18 +02:00
parent b0cd8d25a3
commit 7c0edb9507
Signed by: forge-joniko
GPG key ID: D7EFE2F5CB6CC0E4

View file

@ -33,9 +33,48 @@ describe('Application Architecture Rules', function (): void {
'App',
]);
arch('Application layer does not depend on Illuminate framework')
arch('Application layer does not depend on Illuminate or Symfony frameworks')
->expect('Application')
->not->toUse('Illuminate');
->not->toUse([
'Illuminate',
'Symfony',
]);
arch('Application layer does not use Laravel helper functions')
->expect('Application')
->not->toUse([
'abort',
'app',
'auth',
'asset',
'back',
'bcrypt',
'broadcast',
'cache',
'config',
'cookie',
'csrf_token',
'dd',
'dump',
'decrypt',
'dispatch',
'event',
'factory',
'logger',
'redirect',
'request',
'response',
'route',
'session',
'storage',
'url',
'throw_if',
'throw_unless',
'__',
'trans',
'trans_choice',
'view',
]);
arch('Application layer uses strict types')
->expect('Application')