Config, DependencyInjection, HttpKernel), which may limit adoption in non-Symfony Laravel projects unless abstracted via a facade or service container bridge.bind(OGRNValidator::class, fn() => new OGRNValidator())).AppKernel.php dependency suggests it expects Symfony’s kernel. Laravel’s AppServiceProvider can emulate this via register().config package can be replaced with Laravel’s config() helper or a custom config loader.OGRNValidator without Symfony DI) and register them manually in Laravel’s container.GovernmentValidator::validateOGRN()) to decouple from Symfony.rubix/ml for validation) or commercial services (e.g., API-based validation) that could replace this?bind() or AppServiceProvider.config() or a custom config publisher.symfony/http-foundation or symfony/console packages.// app/Providers/AppServiceProvider.php
public function register()
{
$this->app->singleton(OGRNValidator::class, fn() => new OGRNValidator());
}
symfony/dependency-injection bridge.GovernmentBundleServiceProvider to emulate Symfony’s kernel.publishes() in AppServiceProvider.| Component | Compatibility | Workaround |
|---|---|---|
| Symfony DI | ❌ Incompatible without bridge | Use Laravel’s container or facade |
| Symfony Config | ❌ Incompatible | Replace with Laravel’s config() |
| PHP 7.4/8.0 | ✅ Compatible | Ensure x64 PHP |
| Laravel Validation | ✅ Compatible (via custom rules or Form Requests) | Extend FormRequest with validator methods |
| API/HTTP Layer | ✅ Compatible (if using Symfony HttpKernel) | Use Laravel’s Illuminate\Http instead |
validate() in controllers).composer.json or fork the repo.phpunit/fake-web-test-case).inn, ogrn, snils columns if queried frequently.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Invalid government ID accepted | Regulatory non-compliance | Strict validation + admin overrides |
| Validator logic breaks (e.g., new INN format) | False rejections/acceptances | Subscribe to official updates; test new formats |
| 32-bit PHP environment | Control-sum failures | Enforce x64 PHP in deployment |
| Package abandonment | Unmaintained code | Fork or replace with alternative |
GovernmentValidator::validateINN($inn)).php artisan government:validate command for bulk testing.config('features.government_validators') toHow can I help you explore Laravel packages today?