Files
kupshop/bundles/KupShop/KupShopBundle/Attribute/OverrideService.php
2025-08-02 16:30:27 +02:00

22 lines
428 B
PHP

<?php
declare(strict_types=1);
namespace KupShop\KupShopBundle\Attribute;
/**
* Overrides existing DI service by current class and excludes current class from DI to avoid duplicate services.
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class OverrideService
{
public function __construct(private readonly string $service)
{
}
public function getService(): string
{
return $this->service;
}
}