phpvms/tests/ArchTest.php
Arthur Parienté 379a9b38cc
[8.x] feat: improve tests suite (#2166)
* wip

* fix simbrief tests

* more fixes

* run pint

* fix(tests): fake notifications in registration test

* refactor(tests): AI suggestions and performance improvements

* deprecation warning with PHP85

* fix(tests): fake notifications in access with valid invite test

* refactor(build): optimize autoload and remove unnecessary commands

* refactor(tests): update PHPUnit configuration and improve test structure

* refactor: put GeoJson under the right namespace
2026-03-18 16:35:19 -05:00

65 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
use App\Services\VersionService;
arch()->preset()->php();
// arch()->preset()->strict();
arch()->preset()->security()->ignoring(['assert', 'md5', 'sha1', VersionService::class]);
/*
Those settings are quite strict our codebase is just not ready for them yet
arch()->preset()->laravel()
->ignoring([
App\Providers\Filament\AdminPanelProvider::class,
App\Filament\Plugins\LanguageSwitcherPlugin::class,
]);
arch('strict types')
->expect('App')
->toUseStrictTypes();
arch('avoid open for extension')
->expect('App')
->classes()
->toBeFinal();
arch('ensure no extends')
->expect('App')
->classes()
->not->toBeAbstract();
arch('avoid mutation')
->expect('App')
->classes()
->toBeReadonly()
->ignoring([
'App\Data',
'App\Jobs',
'App\Filament',
'App\Livewire',
'App\Models',
'App\Providers',
]);
arch('avoid inheritance')
->expect('App')
->classes()
->toExtendNothing()
->ignoring([
'App\Data',
'App\Filament',
'App\Livewire',
'App\Models',
'App\Providers',
]);
arch('annotations')
->expect('App')
->toHavePropertiesDocumented()
->toHaveMethodsDocumented();
*/