Installation Add the bundle via Composer:
composer require ano/common-bundle
Register it in config/bundles.php (Symfony 4+):
return [
// ...
Ano\CommonBundle\AnoCommonBundle::class => ['all' => true],
];
First Use Case
The bundle lacks explicit documentation, but its util focus suggests common helpers. Check:
Ano\CommonBundle\DependencyInjection\.src/Ano/CommonBundle/ for reusable utilities (e.g., string manipulation, data masking).use Ano\CommonBundle\Utils\Anonymizer;
$anonymizer = $this->container->get('ano.anonymizer');
$maskedEmail = $anonymizer->maskEmail('user@example.com'); // Hypothetical method
Service Integration
AnoCommonBundle services) via dependency injection:
use Ano\CommonBundle\Service\CommonService;
class MyController {
public function __construct(private CommonService $commonService) {}
}
config/packages/ano_common.yaml (if supported).Utility Reuse
Anonymizable):
use Ano\CommonBundle\Traits\Anonymizable;
class User {
use Anonymizable;
public function anonymize(): void { /* ... */ }
}
$hashedValue = \Ano\CommonBundle\Utils\StringUtils::hash('sensitive-data');
Event Listeners
// config/services.yaml
services:
App\EventListener\AnonymizationListener:
tags:
- { name: 'kernel.event_listener', event: 'ano.common.event', method: 'onAnonymize' }
Undocumented Features
maskEmail are hypothetical—verify actual methods via IDE autocompletion or php artisan debug:container.Symfony Version Lock
"symfony/framework-bundle":"2.*"). Upgrade risks: May not support Symfony 5/6+ without patches.Missing Configuration
config/ directory in the repo implies default-only behavior. Customization may require extending classes directly.php bin/console debug:container | grep ano
$this->get('logger')->debug('Anonymization triggered', ['data' => $sensitiveData]);
Override Services
# config/services.yaml
services:
ano.common_service:
class: App\Service\CustomCommonService
decorates: 'ano.common_service'
Add New Utilities
Ano\CommonBundle\Utils with your own helpers, then publish via Composer.Event-Driven Extensions
$event = new \Ano\CommonBundle\Event\AnonymizationEvent($data);
$this->get('event_dispatcher')->dispatch($event, 'ano.common.event');
How can I help you explore Laravel packages today?