Skip to content

Commit

Permalink
Merge pull request #109 from buggregator/hotifx/attributes-reader
Browse files Browse the repository at this point in the history
Small fixes
  • Loading branch information
butschster authored Dec 4, 2023
2 parents 80c57f9 + 20fb85c commit 6e291e3
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ jobs:

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: ./
platforms: linux/amd64,linux/arm64
file: ./docker/Dockerfile
push: true
build-args:
Expand Down
2 changes: 1 addition & 1 deletion .rr-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '2.7'
version: '3'

rpc:
listen: tcp://127.0.0.1:6001
Expand Down
31 changes: 31 additions & 0 deletions app/src/Application/Bootloader/AttributesBootloader.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

declare(strict_types=1);

namespace App\Application\Bootloader;

use Doctrine\Common\Annotations\AnnotationReader;
use Spiral\Attributes\AttributeReader;
use Spiral\Attributes\Internal\Instantiator\NamedArgumentsInstantiator;
use Spiral\Attributes\ReaderInterface;
use Spiral\Boot\Bootloader\Bootloader;
use Spiral\Core\BinderInterface;

final class AttributesBootloader extends Bootloader
{
protected const DEPENDENCIES = [
\Spiral\Bootloader\Attributes\AttributesBootloader::class,
];

public function init(BinderInterface $binder): void
{
AnnotationReader::addGlobalIgnoredName('mixin');

$binder->bindSingleton(
ReaderInterface::class,
static fn(): ReaderInterface => new AttributeReader(
new NamedArgumentsInstantiator(),
),
);
}
}
2 changes: 2 additions & 0 deletions app/src/Application/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace App\Application;

use App\Application\Bootloader\AppBootloader;
use App\Application\Bootloader\AttributesBootloader;
use App\Application\Bootloader\HttpHandlerBootloader;
use App\Application\Bootloader\MongoDBBootloader;
use App\Application\Bootloader\PersistenceBootloader;
Expand Down Expand Up @@ -34,6 +35,7 @@ class Kernel extends \Spiral\Framework\Kernel
{
protected const SYSTEM = [
CoreBootloader::class,
AttributesBootloader::class,
TokenizerListenerBootloader::class,
DotenvBootloader::class,
];
Expand Down

0 comments on commit 6e291e3

Please sign in to comment.