Move query classes to storage module
This commit is contained in:
parent
7b05a6aa60
commit
bb12655ca8
7 changed files with 27 additions and 8 deletions
|
@ -2,11 +2,10 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service\Query;
|
||||
namespace Quintolin\Storage\Query;
|
||||
|
||||
use Quintolin\Storage\QueryResult\ReleaseNote;
|
||||
use DateTimeImmutable;
|
||||
use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
||||
use Quintolin\Storage\QueryResult\ReleaseNote;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
use Symfony\Component\Finder\SplFileInfo;
|
||||
|
||||
|
@ -15,7 +14,6 @@ use function sprintf;
|
|||
abstract readonly class AbstractReleaseNotesQuery
|
||||
{
|
||||
public function __construct(
|
||||
#[Autowire('%kernel.project_dir%/data/release-notes')]
|
||||
private string $projectDir,
|
||||
) {}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service\Query;
|
||||
namespace Quintolin\Storage\Query;
|
||||
|
||||
use Quintolin\Storage\QueryResult\ReleaseNote;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service\Query;
|
||||
namespace Quintolin\Storage\Query;
|
||||
|
||||
use Quintolin\Storage\QueryResult\ReleaseNote;
|
||||
|
18
website/config/modules/storage.yaml
Normal file
18
website/config/modules/storage.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
services:
|
||||
_defaults:
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
|
||||
Quintolin\Storage\Query\:
|
||||
resource: '../../../modules/storage/src/Query/'
|
||||
|
||||
Quintolin\Storage\Query\AbstractReleaseNotesQuery:
|
||||
abstract: true
|
||||
arguments:
|
||||
$projectDir: '%kernel.project_dir%/data/release-notes'
|
||||
|
||||
Quintolin\Storage\Query\LatestReleaseNoteQuery:
|
||||
parent: Quintolin\Storage\Query\AbstractReleaseNotesQuery
|
||||
|
||||
Quintolin\Storage\Query\ReleaseNotesQuery:
|
||||
parent: Quintolin\Storage\Query\AbstractReleaseNotesQuery
|
|
@ -1,3 +1,6 @@
|
|||
imports:
|
||||
- {resource: 'modules/storage.yaml'}
|
||||
|
||||
# This file is the entry point to configure your own services.
|
||||
# Files in the packages/ subdirectory configure your dependencies.
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Website;
|
||||
|
||||
use App\Service\Query\LatestReleaseNoteQuery;
|
||||
use Quintolin\Storage\Query\LatestReleaseNoteQuery;
|
||||
use Symfony\Bridge\Twig\Attribute\Template;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\Attribute\AsController;
|
||||
|
|
|
@ -4,7 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Website;
|
||||
|
||||
use App\Service\Query\ReleaseNotesQuery;
|
||||
use Quintolin\Storage\Query\ReleaseNotesQuery;
|
||||
use Symfony\Bridge\Twig\Attribute\Template;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\Attribute\AsController;
|
||||
|
|
Reference in a new issue