Skip to content

Commit

Permalink
Merge pull request #1056 from spiral/singleton-interface
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralbot committed Jan 11, 2024
1 parent ce29df2 commit 47809f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/Bootloader/StemplerBootloader.php
Expand Up @@ -8,8 +8,8 @@
use Spiral\Boot\Bootloader\Bootloader;
use Spiral\Config\ConfiguratorInterface;
use Spiral\Config\Patch\Append;
use Spiral\Core\Attribute\Singleton;
use Spiral\Core\Container\Autowire;
use Spiral\Core\Container\SingletonInterface;
use Spiral\Stempler\Builder;
use Spiral\Stempler\Config\StemplerConfig;
use Spiral\Stempler\Directive;
Expand All @@ -28,7 +28,8 @@
/**
* Initiates stempler engine, it's cache and directives.
*/
final class StemplerBootloader extends Bootloader implements SingletonInterface
#[Singleton]
final class StemplerBootloader extends Bootloader
{
protected const SINGLETONS = [
StemplerEngine::class => [self::class, 'stemplerEngine'],
Expand Down
5 changes: 3 additions & 2 deletions src/Directive/RouteDirective.php
Expand Up @@ -5,14 +5,15 @@
namespace Spiral\Stempler\Directive;

use Psr\Container\ContainerInterface;
use Spiral\Core\Container\SingletonInterface;
use Spiral\Core\Attribute\Singleton;
use Spiral\Router\Exception\RouterException;
use Spiral\Router\Exception\UndefinedRouteException;
use Spiral\Router\RouterInterface;
use Spiral\Stempler\Exception\DirectiveException;
use Spiral\Stempler\Node\Dynamic\Directive;

final class RouteDirective extends AbstractDirective implements SingletonInterface
#[Singleton]
final class RouteDirective extends AbstractDirective
{
public function __construct(
private readonly ContainerInterface $container
Expand Down

0 comments on commit 47809f7

Please sign in to comment.