Implement EntityManagerAwareTrait.
This commit is contained in:
parent
108872c6cb
commit
18ad4ad6ef
|
@ -281,7 +281,7 @@ return [
|
|||
// Symfony Serializer
|
||||
Symfony\Component\Serializer\Serializer::class => static function (
|
||||
Doctrine\Common\Annotations\Reader $reader,
|
||||
Doctrine\ORM\EntityManagerInterface $em
|
||||
App\Doctrine\ReloadableEntityManagerInterface $em,
|
||||
) {
|
||||
$classMetaFactory = new Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory(
|
||||
new Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader($reader)
|
||||
|
|
|
@ -4,13 +4,13 @@ declare(strict_types=1);
|
|||
|
||||
namespace App;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Enums\GlobalPermissions;
|
||||
use App\Enums\PermissionInterface;
|
||||
use App\Enums\StationPermissions;
|
||||
use App\Http\ServerRequest;
|
||||
use App\Traits\RequestAwareTrait;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\EventDispatcher\EventDispatcherInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
|
@ -26,7 +26,7 @@ final class Acl
|
|||
private ?array $actions;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly ReloadableEntityManagerInterface $em,
|
||||
private readonly EventDispatcherInterface $dispatcher
|
||||
) {
|
||||
$this->reload();
|
||||
|
|
|
@ -5,17 +5,17 @@ declare(strict_types=1);
|
|||
namespace App\Console\Command;
|
||||
|
||||
use App\Console\Command\Traits\PassThruProcess;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Environment;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
|
||||
abstract class AbstractDatabaseCommand extends CommandAbstract
|
||||
{
|
||||
use PassThruProcess;
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
protected Environment $environment,
|
||||
protected EntityManagerInterface $em
|
||||
protected Environment $environment
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ namespace App\Console\Command\Backup;
|
|||
use App\Console\Command\AbstractDatabaseCommand;
|
||||
use App\Entity;
|
||||
use App\Environment;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
@ -28,10 +27,9 @@ final class BackupCommand extends AbstractDatabaseCommand
|
|||
{
|
||||
public function __construct(
|
||||
Environment $environment,
|
||||
EntityManagerInterface $em,
|
||||
private readonly Entity\Repository\StorageLocationRepository $storageLocationRepo
|
||||
) {
|
||||
parent::__construct($environment, $em);
|
||||
parent::__construct($environment);
|
||||
}
|
||||
|
||||
protected function configure(): void
|
||||
|
|
|
@ -5,9 +5,9 @@ declare(strict_types=1);
|
|||
namespace App\Console\Command\Internal;
|
||||
|
||||
use App\Console\Command\CommandAbstract;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Radio\Adapters;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
@ -18,8 +18,9 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||
)]
|
||||
final class OnSslRenewal extends CommandAbstract
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Adapters $adapters,
|
||||
) {
|
||||
parent::__construct();
|
||||
|
|
|
@ -4,9 +4,9 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Console\Command;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Entity\Station;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
@ -19,8 +19,9 @@ use Symfony\Component\Console\Style\SymfonyStyle;
|
|||
)]
|
||||
final class ReprocessMediaCommand extends CommandAbstract
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Entity\Repository\StationRepository $stationRepo,
|
||||
) {
|
||||
parent::__construct();
|
||||
|
|
|
@ -5,11 +5,11 @@ declare(strict_types=1);
|
|||
namespace App\Console\Command;
|
||||
|
||||
use App\Container\ContainerAwareTrait;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Environment;
|
||||
use Doctrine\Common\DataFixtures\Executor\ORMExecutor;
|
||||
use Doctrine\Common\DataFixtures\Loader;
|
||||
use Doctrine\Common\DataFixtures\Purger\ORMPurger;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use RecursiveDirectoryIterator;
|
||||
use RecursiveIteratorIterator;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
|
@ -24,9 +24,9 @@ use Symfony\Component\Console\Style\SymfonyStyle;
|
|||
final class SetupFixturesCommand extends CommandAbstract
|
||||
{
|
||||
use ContainerAwareTrait;
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Environment $environment,
|
||||
) {
|
||||
parent::__construct();
|
||||
|
|
|
@ -5,10 +5,10 @@ declare(strict_types=1);
|
|||
namespace App\Console\Command\Sync;
|
||||
|
||||
use App\Cache\NowPlayingCache;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity\Repository\SettingsRepository;
|
||||
use App\Environment;
|
||||
use App\Lock\LockFactory;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
|
@ -23,14 +23,15 @@ use function random_int;
|
|||
)]
|
||||
final class NowPlayingCommand extends AbstractSyncCommand
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public final const MAX_CONCURRENT_PROCESSES = 5;
|
||||
|
||||
public function __construct(
|
||||
LockFactory $lockFactory,
|
||||
Environment $environment,
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly SettingsRepository $settingsRepo,
|
||||
private readonly NowPlayingCache $nowPlayingCache
|
||||
private readonly NowPlayingCache $nowPlayingCache,
|
||||
LockFactory $lockFactory,
|
||||
Environment $environment
|
||||
) {
|
||||
parent::__construct($lockFactory, $environment);
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@ declare(strict_types=1);
|
|||
namespace App\Console\Command\Users;
|
||||
|
||||
use App\Console\Command\CommandAbstract;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
@ -18,11 +18,7 @@ use Symfony\Component\Console\Style\SymfonyStyle;
|
|||
)]
|
||||
final class ListCommand extends CommandAbstract
|
||||
{
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
|
|
|
@ -5,9 +5,9 @@ declare(strict_types=1);
|
|||
namespace App\Console\Command\Users;
|
||||
|
||||
use App\Console\Command\CommandAbstract;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Http\RouterInterface;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
@ -20,8 +20,9 @@ use Symfony\Component\Console\Style\SymfonyStyle;
|
|||
)]
|
||||
final class LoginTokenCommand extends CommandAbstract
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Entity\Repository\UserLoginTokenRepository $loginTokenRepo,
|
||||
private readonly RouterInterface $router,
|
||||
) {
|
||||
|
|
|
@ -5,9 +5,9 @@ declare(strict_types=1);
|
|||
namespace App\Console\Command\Users;
|
||||
|
||||
use App\Console\Command\CommandAbstract;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Utilities;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
@ -20,11 +20,7 @@ use Symfony\Component\Console\Style\SymfonyStyle;
|
|||
)]
|
||||
final class ResetPasswordCommand extends CommandAbstract
|
||||
{
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
protected function configure(): void
|
||||
{
|
||||
|
|
|
@ -5,8 +5,8 @@ declare(strict_types=1);
|
|||
namespace App\Console\Command\Users;
|
||||
|
||||
use App\Console\Command\CommandAbstract;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
|
@ -19,8 +19,9 @@ use Symfony\Component\Console\Style\SymfonyStyle;
|
|||
)]
|
||||
final class SetAdministratorCommand extends CommandAbstract
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Entity\Repository\RolePermissionRepository $permsRepo,
|
||||
) {
|
||||
parent::__construct();
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Container;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use DI\Attribute\Inject;
|
||||
|
||||
trait EntityManagerAwareTrait
|
||||
{
|
||||
protected ReloadableEntityManagerInterface $em;
|
||||
|
||||
#[Inject]
|
||||
public function setEntityManager(ReloadableEntityManagerInterface $em): void
|
||||
{
|
||||
$this->em = $em;
|
||||
}
|
||||
|
||||
public function getEntityManager(): ReloadableEntityManagerInterface
|
||||
{
|
||||
return $this->em;
|
||||
}
|
||||
}
|
|
@ -4,18 +4,15 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Admin;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
final class RelaysAction
|
||||
{
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em
|
||||
) {
|
||||
}
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __invoke(
|
||||
ServerRequest $request,
|
||||
|
|
|
@ -4,7 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity\Interfaces\IdentifiableEntityInterface;
|
||||
use App\Exception\ValidationException;
|
||||
use App\Http\Response;
|
||||
|
@ -24,6 +24,8 @@ use Symfony\Component\Validator\Validator\ValidatorInterface;
|
|||
*/
|
||||
abstract class AbstractApiCrudController
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
/** @var class-string<TEntity> The fully-qualified (::class) class name of the entity being managed. */
|
||||
protected string $entityClass;
|
||||
|
||||
|
@ -31,7 +33,6 @@ abstract class AbstractApiCrudController
|
|||
protected string $resourceRouteName;
|
||||
|
||||
public function __construct(
|
||||
protected ReloadableEntityManagerInterface $em,
|
||||
protected Serializer $serializer,
|
||||
protected ValidatorInterface $validator
|
||||
) {
|
||||
|
|
|
@ -4,12 +4,12 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Admin;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Controller\Api\Traits\AcceptsDateRange;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\Paginator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
use const JSON_PRETTY_PRINT;
|
||||
|
@ -17,11 +17,7 @@ use const JSON_PRETTY_PRINT;
|
|||
final class AuditLogAction
|
||||
{
|
||||
use AcceptsDateRange;
|
||||
|
||||
public function __construct(
|
||||
protected EntityManagerInterface $em
|
||||
) {
|
||||
}
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __invoke(
|
||||
ServerRequest $request,
|
||||
|
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||
namespace App\Controller\Api\Admin;
|
||||
|
||||
use App\Cache\AzuraRelayCache;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Enums\StationPermissions;
|
||||
use App\Http\Response;
|
||||
|
@ -12,7 +13,6 @@ use App\Http\ServerRequest;
|
|||
use App\Radio\Adapters;
|
||||
use App\Radio\Enums\FrontendAdapters;
|
||||
use App\Radio\Enums\RemoteAdapters;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use OpenApi\Attributes as OA;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
|
@ -37,8 +37,9 @@ use Psr\Http\Message\ResponseInterface;
|
|||
]
|
||||
final class RelaysController
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Adapters $adapters,
|
||||
private readonly Entity\Repository\SettingsRepository $settingsRepo,
|
||||
private readonly AzuraRelayCache $azuraRelayCache
|
||||
|
|
|
@ -6,7 +6,6 @@ namespace App\Controller\Api\Admin;
|
|||
|
||||
use App\Acl;
|
||||
use App\Controller\Api\Traits\CanSortResults;
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
|
@ -142,13 +141,12 @@ final class RolesController extends AbstractAdminApiCrudController
|
|||
private readonly Entity\Role $superAdminRole;
|
||||
|
||||
public function __construct(
|
||||
ReloadableEntityManagerInterface $em,
|
||||
Serializer $serializer,
|
||||
ValidatorInterface $validator,
|
||||
Entity\Repository\RolePermissionRepository $permissionRepo,
|
||||
private readonly Acl $acl,
|
||||
) {
|
||||
parent::__construct($em, $serializer, $validator);
|
||||
parent::__construct($serializer, $validator);
|
||||
|
||||
$this->superAdminRole = $permissionRepo->ensureSuperAdministratorRole();
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ declare(strict_types=1);
|
|||
namespace App\Controller\Api\Admin;
|
||||
|
||||
use App\Controller\Api\AbstractApiCrudController;
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
|
@ -56,11 +55,10 @@ final class SettingsController extends AbstractApiCrudController
|
|||
|
||||
public function __construct(
|
||||
protected Entity\Repository\SettingsRepository $settingsRepo,
|
||||
ReloadableEntityManagerInterface $em,
|
||||
Serializer $serializer,
|
||||
ValidatorInterface $validator
|
||||
) {
|
||||
parent::__construct($em, $serializer, $validator);
|
||||
parent::__construct($serializer, $validator);
|
||||
}
|
||||
|
||||
public function listAction(
|
||||
|
|
|
@ -5,7 +5,6 @@ declare(strict_types=1);
|
|||
namespace App\Controller\Api\Admin\Stations;
|
||||
|
||||
use App\Controller\Api\Admin\StationsController;
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Environment;
|
||||
use App\Http\Response;
|
||||
|
@ -36,7 +35,6 @@ final class CloneAction extends StationsController
|
|||
Entity\Repository\StorageLocationRepository $storageLocationRepo,
|
||||
Entity\Repository\StationQueueRepository $queueRepo,
|
||||
Configuration $configuration,
|
||||
ReloadableEntityManagerInterface $reloadableEm,
|
||||
Serializer $serializer,
|
||||
ValidatorInterface $validator,
|
||||
private readonly Environment $environment
|
||||
|
@ -46,7 +44,6 @@ final class CloneAction extends StationsController
|
|||
$storageLocationRepo,
|
||||
$queueRepo,
|
||||
$configuration,
|
||||
$reloadableEm,
|
||||
$serializer,
|
||||
$validator
|
||||
);
|
||||
|
@ -152,25 +149,25 @@ final class CloneAction extends StationsController
|
|||
}
|
||||
};
|
||||
|
||||
$record = $this->reloadableEm->refetch($record);
|
||||
$record = $this->em->refetch($record);
|
||||
$this->cloneCollection($record->getPlaylists(), $newStation, $copier, $afterCloning);
|
||||
}
|
||||
|
||||
if (in_array(self::CLONE_MOUNTS, $toClone, true)) {
|
||||
$record = $this->reloadableEm->refetch($record);
|
||||
$record = $this->em->refetch($record);
|
||||
$this->cloneCollection($record->getMounts(), $newStation, $copier);
|
||||
} else {
|
||||
$newStation = $this->reloadableEm->refetch($newStation);
|
||||
$newStation = $this->em->refetch($newStation);
|
||||
$this->stationRepo->resetMounts($newStation);
|
||||
}
|
||||
|
||||
if (in_array(self::CLONE_REMOTES, $toClone, true)) {
|
||||
$record = $this->reloadableEm->refetch($record);
|
||||
$record = $this->em->refetch($record);
|
||||
$this->cloneCollection($record->getRemotes(), $newStation, $copier);
|
||||
}
|
||||
|
||||
if (in_array(self::CLONE_STREAMERS, $toClone, true)) {
|
||||
$record = $this->reloadableEm->refetch($record);
|
||||
$record = $this->em->refetch($record);
|
||||
|
||||
$afterCloning = function (
|
||||
Entity\StationStreamer $oldStreamer,
|
||||
|
@ -192,17 +189,17 @@ final class CloneAction extends StationsController
|
|||
}
|
||||
|
||||
if (in_array(self::CLONE_PERMISSIONS, $toClone, true)) {
|
||||
$record = $this->reloadableEm->refetch($record);
|
||||
$record = $this->em->refetch($record);
|
||||
$this->cloneCollection($record->getPermissions(), $newStation, $copier);
|
||||
}
|
||||
|
||||
if (in_array(self::CLONE_WEBHOOKS, $toClone, true)) {
|
||||
$record = $this->reloadableEm->refetch($record);
|
||||
$record = $this->em->refetch($record);
|
||||
$this->cloneCollection($record->getWebhooks(), $newStation, $copier);
|
||||
}
|
||||
|
||||
// Clear the EntityManager for later functions.
|
||||
$newStation = $this->reloadableEm->refetch($newStation);
|
||||
$newStation = $this->em->refetch($newStation);
|
||||
|
||||
$this->configuration->assignRadioPorts($newStation, true);
|
||||
|
||||
|
@ -225,7 +222,7 @@ final class CloneAction extends StationsController
|
|||
DeepCopy\DeepCopy $copier,
|
||||
?callable $afterCloning = null
|
||||
): void {
|
||||
$newStation = $this->reloadableEm->refetch($newStation);
|
||||
$newStation = $this->em->refetch($newStation);
|
||||
|
||||
foreach ($collection as $oldRecord) {
|
||||
/** @var Entity\Interfaces\StationCloneAwareInterface $newRecord */
|
||||
|
|
|
@ -5,7 +5,6 @@ declare(strict_types=1);
|
|||
namespace App\Controller\Api\Admin;
|
||||
|
||||
use App\Controller\Api\Traits\CanSortResults;
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Exception\ValidationException;
|
||||
use App\Http\Response;
|
||||
|
@ -147,11 +146,10 @@ class StationsController extends AbstractAdminApiCrudController
|
|||
protected Entity\Repository\StorageLocationRepository $storageLocationRepo,
|
||||
protected Entity\Repository\StationQueueRepository $queueRepo,
|
||||
protected Configuration $configuration,
|
||||
protected ReloadableEntityManagerInterface $reloadableEm,
|
||||
Serializer $serializer,
|
||||
ValidatorInterface $validator
|
||||
) {
|
||||
parent::__construct($reloadableEm, $serializer, $validator);
|
||||
parent::__construct($serializer, $validator);
|
||||
}
|
||||
|
||||
public function listAction(
|
||||
|
|
|
@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Admin;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
|
@ -137,11 +136,10 @@ final class StorageLocationsController extends AbstractAdminApiCrudController
|
|||
|
||||
public function __construct(
|
||||
private readonly Entity\Repository\StorageLocationRepository $storageLocationRepo,
|
||||
ReloadableEntityManagerInterface $em,
|
||||
Serializer $serializer,
|
||||
ValidatorInterface $validator
|
||||
) {
|
||||
parent::__construct($em, $serializer, $validator);
|
||||
parent::__construct($serializer, $validator);
|
||||
}
|
||||
|
||||
public function listAction(
|
||||
|
|
|
@ -4,7 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Frontend\Account;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
|
@ -12,10 +12,7 @@ use Psr\Http\Message\ResponseInterface;
|
|||
|
||||
final class DeleteTwoFactorAction
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ReloadableEntityManagerInterface $em,
|
||||
) {
|
||||
}
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __invoke(
|
||||
ServerRequest $request,
|
||||
|
|
|
@ -4,8 +4,8 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Frontend\Account;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Controller\Api\Admin\UsersController;
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity\Interfaces\EntityGroupsInterface;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
|
@ -17,13 +17,14 @@ use Symfony\Component\Validator\Validator\ValidatorInterface;
|
|||
|
||||
final class GetMeAction extends UsersController
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
ReloadableEntityManagerInterface $em,
|
||||
private readonly Avatar $avatar,
|
||||
Serializer $serializer,
|
||||
ValidatorInterface $validator,
|
||||
private readonly Avatar $avatar,
|
||||
) {
|
||||
parent::__construct($em, $serializer, $validator);
|
||||
parent::__construct($serializer, $validator);
|
||||
}
|
||||
|
||||
public function __invoke(
|
||||
|
|
|
@ -4,20 +4,21 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Frontend\Dashboard;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Enums\GlobalPermissions;
|
||||
use App\Enums\StationPermissions;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\SimpleCache\CacheInterface;
|
||||
|
||||
final class ChartsAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly CacheInterface $cache,
|
||||
private readonly Entity\Repository\SettingsRepository $settingsRepo
|
||||
) {
|
||||
|
|
|
@ -4,18 +4,19 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Frontend\Dashboard;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Enums\StationPermissions;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\Paginator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
final class StationsAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Entity\Repository\SettingsRepository $settingsRepo,
|
||||
private readonly Entity\ApiGenerator\NowPlayingApiGenerator $npApiGenerator
|
||||
) {
|
||||
|
|
|
@ -4,21 +4,17 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Internal;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Container\LoggerAwareTrait;
|
||||
use App\Entity\SftpUser;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
final class SftpAuthAction
|
||||
{
|
||||
use LoggerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em
|
||||
) {
|
||||
}
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __invoke(
|
||||
ServerRequest $request,
|
||||
|
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Internal;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Container\LoggerAwareTrait;
|
||||
use App\Entity\Repository\StorageLocationRepository;
|
||||
use App\Entity\SftpUser;
|
||||
|
@ -12,7 +13,6 @@ use App\Http\Response;
|
|||
use App\Http\ServerRequest;
|
||||
use App\Media\BatchUtilities;
|
||||
use App\Message\AddNewMediaMessage;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use League\Flysystem\PathPrefixer;
|
||||
use LogicException;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
@ -22,9 +22,9 @@ use Throwable;
|
|||
final class SftpEventAction
|
||||
{
|
||||
use LoggerAwareTrait;
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly MessageBus $messageBus,
|
||||
private readonly BatchUtilities $batchUtilities,
|
||||
private readonly StorageLocationRepository $storageLocationRepo
|
||||
|
|
|
@ -5,7 +5,6 @@ declare(strict_types=1);
|
|||
namespace App\Controller\Api\Stations;
|
||||
|
||||
use App\Controller\Api\Traits\HasScheduleDisplay;
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Exception\ValidationException;
|
||||
use App\Http\Response;
|
||||
|
@ -28,11 +27,10 @@ abstract class AbstractScheduledEntityController extends AbstractStationApiCrudC
|
|||
public function __construct(
|
||||
protected Entity\Repository\StationScheduleRepository $scheduleRepo,
|
||||
protected Scheduler $scheduler,
|
||||
ReloadableEntityManagerInterface $em,
|
||||
Serializer $serializer,
|
||||
ValidatorInterface $validator,
|
||||
) {
|
||||
parent::__construct($em, $serializer, $validator);
|
||||
parent::__construct($serializer, $validator);
|
||||
}
|
||||
|
||||
protected function renderEvents(
|
||||
|
|
|
@ -4,17 +4,18 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity\ApiGenerator\SongApiGenerator;
|
||||
use App\Entity\StationMedia;
|
||||
use App\Http\ServerRequest;
|
||||
use App\Paginator;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Cache\CacheItemPoolInterface;
|
||||
|
||||
abstract class AbstractSearchableListAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
protected readonly EntityManagerInterface $em,
|
||||
protected readonly SongApiGenerator $songApiGenerator,
|
||||
protected readonly CacheItemPoolInterface $psr6Cache,
|
||||
) {
|
||||
|
|
|
@ -4,12 +4,12 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations\Art;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\OpenApi;
|
||||
use App\Service\Flow;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use OpenApi\Attributes as OA;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
|
@ -42,9 +42,10 @@ use Psr\Http\Message\ResponseInterface;
|
|||
)]
|
||||
final class PostArtAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly Entity\Repository\StationMediaRepository $mediaRepo,
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Entity\Repository\StationMediaRepository $mediaRepo
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -4,19 +4,20 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations\BulkMedia;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity\Repository\CustomFieldRepository;
|
||||
use App\Entity\Repository\StationPlaylistRepository;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use League\Csv\Writer;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use RuntimeException;
|
||||
|
||||
final class DownloadAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly CustomFieldRepository $customFieldRepo,
|
||||
private readonly StationPlaylistRepository $playlistRepo,
|
||||
) {
|
||||
|
|
|
@ -4,12 +4,12 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations\BulkMedia;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Exception\ValidationException;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\Service\Flow;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use League\Csv\Reader;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
|
@ -22,6 +22,8 @@ use function str_starts_with;
|
|||
|
||||
final class UploadAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
private const ALLOWED_MEDIA_FIELDS = [
|
||||
'title',
|
||||
'artist',
|
||||
|
@ -38,7 +40,6 @@ final class UploadAction
|
|||
];
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Entity\Repository\CustomFieldRepository $customFieldRepo,
|
||||
private readonly Entity\Repository\StationPlaylistRepository $playlistRepo,
|
||||
private readonly Entity\Repository\StationPlaylistMediaRepository $spmRepo,
|
||||
|
|
|
@ -4,7 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations\Files;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Event\Radio\AnnotateNextSong;
|
||||
use App\Flysystem\ExtendedFilesystemInterface;
|
||||
|
@ -29,9 +29,10 @@ use Throwable;
|
|||
|
||||
final class BatchAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly BatchUtilities $batchUtilities,
|
||||
private readonly ReloadableEntityManagerInterface $em,
|
||||
private readonly MessageBus $messageBus,
|
||||
private readonly Adapters $adapters,
|
||||
private readonly EventDispatcherInterface $eventDispatcher,
|
||||
|
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations\Files;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Container\LoggerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Exception\CannotProcessMediaException;
|
||||
|
@ -12,15 +13,14 @@ use App\Http\Response;
|
|||
use App\Http\ServerRequest;
|
||||
use App\Media\MediaProcessor;
|
||||
use App\Service\Flow;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
final class FlowUploadAction
|
||||
{
|
||||
use LoggerAwareTrait;
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly MediaProcessor $mediaProcessor,
|
||||
private readonly Entity\Repository\StationPlaylistMediaRepository $spmRepo,
|
||||
) {
|
||||
|
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations\Files;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Controller\Api\Traits\CanSortResults;
|
||||
use App\Entity;
|
||||
use App\Flysystem\StationFilesystems;
|
||||
|
@ -14,7 +15,6 @@ use App\Media\MimeType;
|
|||
use App\Paginator;
|
||||
use App\Utilities;
|
||||
use Doctrine\Common\Collections\Criteria;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use League\Flysystem\StorageAttributes;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
@ -24,9 +24,9 @@ use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
|
|||
final class ListAction
|
||||
{
|
||||
use CanSortResults;
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly CacheInterface $cache,
|
||||
private readonly StationFilesystems $stationFilesystems
|
||||
) {
|
||||
|
|
|
@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Exception\ValidationException;
|
||||
use App\Flysystem\StationFilesystems;
|
||||
|
@ -159,11 +158,10 @@ final class FilesController extends AbstractStationApiCrudController
|
|||
private readonly Entity\Repository\StationPlaylistMediaRepository $playlistMediaRepo,
|
||||
private readonly MediaProcessor $mediaProcessor,
|
||||
private readonly StationFilesystems $stationFilesystems,
|
||||
ReloadableEntityManagerInterface $em,
|
||||
Serializer $serializer,
|
||||
ValidatorInterface $validator
|
||||
) {
|
||||
parent::__construct($em, $serializer, $validator);
|
||||
parent::__construct($serializer, $validator);
|
||||
}
|
||||
|
||||
public function listAction(
|
||||
|
|
|
@ -4,18 +4,15 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
final class GetQuotaAction
|
||||
{
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em
|
||||
) {
|
||||
}
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __invoke(
|
||||
ServerRequest $request,
|
||||
|
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||
namespace App\Controller\Api\Stations;
|
||||
|
||||
use App;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Controller\Api\Traits\AcceptsDateRange;
|
||||
use App\Doctrine\ReadOnlyBatchIteratorAggregate;
|
||||
use App\Entity;
|
||||
|
@ -13,7 +14,6 @@ use App\Http\Response;
|
|||
use App\Http\ServerRequest;
|
||||
use App\OpenApi;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\Query;
|
||||
use League\Csv\Writer;
|
||||
use OpenApi\Attributes as OA;
|
||||
|
@ -62,9 +62,9 @@ use RuntimeException;
|
|||
final class HistoryController
|
||||
{
|
||||
use AcceptsDateRange;
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Entity\ApiGenerator\SongHistoryApiGenerator $songHistoryApiGenerator,
|
||||
private readonly Environment $environment
|
||||
) {
|
||||
|
|
|
@ -4,11 +4,11 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\OpenApi;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use OpenApi\Attributes as OA;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
|
@ -50,8 +50,9 @@ use Psr\Http\Message\ResponseInterface;
|
|||
]
|
||||
final class IndexController
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Entity\ApiGenerator\StationApiGenerator $stationApiGenerator
|
||||
) {
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations\LiquidsoapConfig;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Event\Radio\WriteLiquidsoapConfiguration;
|
||||
use App\Http\Response;
|
||||
|
@ -16,8 +16,9 @@ use Throwable;
|
|||
|
||||
final class PutAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly ReloadableEntityManagerInterface $em,
|
||||
private readonly EventDispatcherInterface $eventDispatcher,
|
||||
private readonly Liquidsoap $liquidsoap,
|
||||
) {
|
||||
|
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Controller\Api\Traits\AcceptsDateRange;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
|
@ -11,7 +12,6 @@ use App\Http\ServerRequest;
|
|||
use App\OpenApi;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Doctrine\ORM\AbstractQuery;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use League\Csv\Writer;
|
||||
use OpenApi\Attributes as OA;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
@ -45,9 +45,9 @@ use RuntimeException;
|
|||
final class ListenersAction
|
||||
{
|
||||
use AcceptsDateRange;
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Entity\Repository\ListenerRepository $listenerRepo,
|
||||
private readonly Entity\Repository\StationMountRepository $mountRepo,
|
||||
private readonly Entity\Repository\StationRemoteRepository $remoteRepo,
|
||||
|
|
|
@ -5,7 +5,6 @@ declare(strict_types=1);
|
|||
namespace App\Controller\Api\Stations;
|
||||
|
||||
use App\Controller\Api\Traits\CanSortResults;
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\Router;
|
||||
|
@ -149,13 +148,12 @@ final class MountsController extends AbstractStationApiCrudController
|
|||
protected string $resourceRouteName = 'api:stations:mount';
|
||||
|
||||
public function __construct(
|
||||
ReloadableEntityManagerInterface $em,
|
||||
Serializer $serializer,
|
||||
ValidatorInterface $validator,
|
||||
private readonly Entity\Repository\StationMountRepository $mountRepo,
|
||||
private readonly Adapters $adapters,
|
||||
) {
|
||||
parent::__construct($em, $serializer, $validator);
|
||||
parent::__construct($serializer, $validator);
|
||||
}
|
||||
|
||||
public function listAction(
|
||||
|
|
|
@ -4,7 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations\Playlists;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity\Api\Status;
|
||||
use App\Entity\Repository\StationPlaylistRepository;
|
||||
use App\Entity\StationPlaylist;
|
||||
|
@ -19,9 +19,10 @@ use Psr\Http\Message\ResponseInterface;
|
|||
|
||||
final class CloneAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly StationPlaylistRepository $playlistRepo,
|
||||
private readonly ReloadableEntityManagerInterface $em,
|
||||
private readonly StationPlaylistRepository $playlistRepo
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations\Playlists;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity\Enums\PlaylistOrders;
|
||||
use App\Entity\Enums\PlaylistSources;
|
||||
use App\Entity\Repository\StationPlaylistRepository;
|
||||
|
@ -15,9 +15,10 @@ use Psr\Http\Message\ResponseInterface;
|
|||
|
||||
final class GetOrderAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly StationPlaylistRepository $playlistRepo,
|
||||
private readonly ReloadableEntityManagerInterface $em,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations\Playlists;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity\Api\Error;
|
||||
use App\Entity\Api\StationPlaylistImportResult;
|
||||
use App\Entity\Repository\StationPlaylistMediaRepository;
|
||||
|
@ -20,10 +20,11 @@ use Symfony\Component\Filesystem\Path;
|
|||
|
||||
final class ImportAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly StationPlaylistRepository $playlistRepo,
|
||||
private readonly StationPlaylistMediaRepository $spmRepo,
|
||||
private readonly ReloadableEntityManagerInterface $em,
|
||||
private readonly StationPlaylistMediaRepository $spmRepo
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ declare(strict_types=1);
|
|||
namespace App\Controller\Api\Stations;
|
||||
|
||||
use App\Controller\Api\AbstractApiCrudController;
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Enums\StationPermissions;
|
||||
use App\Flysystem\StationFilesystems;
|
||||
|
@ -186,14 +185,13 @@ final class PodcastEpisodesController extends AbstractApiCrudController
|
|||
protected string $resourceRouteName = 'api:stations:podcast:episode';
|
||||
|
||||
public function __construct(
|
||||
ReloadableEntityManagerInterface $em,
|
||||
Serializer $serializer,
|
||||
ValidatorInterface $validator,
|
||||
private readonly Entity\Repository\PodcastRepository $podcastRepository,
|
||||
private readonly Entity\Repository\PodcastEpisodeRepository $episodeRepository,
|
||||
private readonly StationFilesystems $stationFilesystems
|
||||
private readonly StationFilesystems $stationFilesystems,
|
||||
Serializer $serializer,
|
||||
ValidatorInterface $validator,
|
||||
) {
|
||||
parent::__construct($em, $serializer, $validator);
|
||||
parent::__construct($serializer, $validator);
|
||||
}
|
||||
|
||||
public function listAction(
|
||||
|
|
|
@ -4,11 +4,11 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations\Podcasts\Art;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\OpenApi;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use OpenApi\Attributes as OA;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
|
@ -36,9 +36,10 @@ use Psr\Http\Message\ResponseInterface;
|
|||
)]
|
||||
final class DeleteArtAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly Entity\Repository\PodcastRepository $podcastRepo,
|
||||
private readonly EntityManagerInterface $em,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -4,12 +4,12 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations\Podcasts\Art;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\OpenApi;
|
||||
use App\Service\Flow;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use OpenApi\Attributes as OA;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
|
@ -37,9 +37,10 @@ use Psr\Http\Message\ResponseInterface;
|
|||
)]
|
||||
final class PostArtAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly Entity\Repository\PodcastRepository $podcastRepo,
|
||||
private readonly EntityManagerInterface $em,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -4,11 +4,11 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations\Podcasts\Episodes\Art;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\OpenApi;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use OpenApi\Attributes as OA;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
|
@ -54,9 +54,10 @@ use Psr\Http\Message\ResponseInterface;
|
|||
)]
|
||||
final class DeleteArtAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly Entity\Repository\PodcastEpisodeRepository $episodeRepo,
|
||||
private readonly EntityManagerInterface $em,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -4,12 +4,12 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations\Podcasts\Episodes\Art;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\OpenApi;
|
||||
use App\Service\Flow;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use OpenApi\Attributes as OA;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
|
@ -44,9 +44,10 @@ use Psr\Http\Message\ResponseInterface;
|
|||
)]
|
||||
final class PostArtAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly Entity\Repository\PodcastEpisodeRepository $episodeRepo,
|
||||
private readonly EntityManagerInterface $em,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ declare(strict_types=1);
|
|||
namespace App\Controller\Api\Stations;
|
||||
|
||||
use App\Controller\Api\AbstractApiCrudController;
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Enums\StationPermissions;
|
||||
use App\Flysystem\StationFilesystems;
|
||||
|
@ -150,13 +149,12 @@ final class PodcastsController extends AbstractApiCrudController
|
|||
protected string $resourceRouteName = 'api:stations:podcast';
|
||||
|
||||
public function __construct(
|
||||
ReloadableEntityManagerInterface $em,
|
||||
private readonly Entity\Repository\PodcastRepository $podcastRepository,
|
||||
private readonly StationFilesystems $stationFilesystems,
|
||||
Serializer $serializer,
|
||||
ValidatorInterface $validator,
|
||||
private readonly Entity\Repository\PodcastRepository $podcastRepository,
|
||||
private readonly StationFilesystems $stationFilesystems
|
||||
) {
|
||||
parent::__construct($em, $serializer, $validator);
|
||||
parent::__construct($serializer, $validator);
|
||||
}
|
||||
|
||||
public function listAction(
|
||||
|
|
|
@ -98,14 +98,13 @@ final class QueueController extends AbstractStationApiCrudController
|
|||
protected string $resourceRouteName = 'api:stations:queue:record';
|
||||
|
||||
public function __construct(
|
||||
App\Doctrine\ReloadableEntityManagerInterface $em,
|
||||
Serializer $serializer,
|
||||
ValidatorInterface $validator,
|
||||
private readonly Entity\ApiGenerator\StationQueueApiGenerator $queueApiGenerator,
|
||||
private readonly Entity\Repository\StationQueueRepository $queueRepo,
|
||||
private readonly Queue $queue,
|
||||
Serializer $serializer,
|
||||
ValidatorInterface $validator
|
||||
) {
|
||||
parent::__construct($em, $serializer, $validator);
|
||||
parent::__construct($serializer, $validator);
|
||||
}
|
||||
|
||||
public function listAction(
|
||||
|
|
|
@ -4,18 +4,18 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations\Reports\Overview;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Controller\Api\Traits\AcceptsDateRange;
|
||||
use App\Entity\Enums\AnalyticsLevel;
|
||||
use App\Entity\Repository\SettingsRepository;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
abstract class AbstractReportAction
|
||||
{
|
||||
use AcceptsDateRange;
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
protected readonly SettingsRepository $settingsRepo,
|
||||
protected readonly EntityManagerInterface $em,
|
||||
protected readonly SettingsRepository $settingsRepo
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -8,17 +8,15 @@ use App\Entity;
|
|||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\Utilities\DateRange;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
final class BestAndWorstAction extends AbstractReportAction
|
||||
{
|
||||
public function __construct(
|
||||
Entity\Repository\SettingsRepository $settingsRepo,
|
||||
EntityManagerInterface $em,
|
||||
private readonly Entity\ApiGenerator\SongApiGenerator $songApiGenerator
|
||||
private readonly Entity\ApiGenerator\SongApiGenerator $songApiGenerator,
|
||||
Entity\Repository\SettingsRepository $settingsRepo
|
||||
) {
|
||||
parent::__construct($settingsRepo, $em);
|
||||
parent::__construct($settingsRepo);
|
||||
}
|
||||
|
||||
public function __invoke(
|
||||
|
|
|
@ -8,19 +8,17 @@ use App\Entity;
|
|||
use App\Entity\Repository\SettingsRepository;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
final class ByStream extends AbstractReportAction
|
||||
{
|
||||
public function __construct(
|
||||
SettingsRepository $settingsRepo,
|
||||
EntityManagerInterface $em,
|
||||
private readonly Entity\Repository\StationMountRepository $mountRepo,
|
||||
private readonly Entity\Repository\StationRemoteRepository $remoteRepo,
|
||||
private readonly Entity\Repository\StationHlsStreamRepository $hlsStreamRepo,
|
||||
SettingsRepository $settingsRepo,
|
||||
) {
|
||||
parent::__construct($settingsRepo, $em);
|
||||
parent::__construct($settingsRepo);
|
||||
}
|
||||
|
||||
public function __invoke(
|
||||
|
|
|
@ -8,18 +8,16 @@ use App\Entity;
|
|||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use stdClass;
|
||||
|
||||
final class ChartsAction extends AbstractReportAction
|
||||
{
|
||||
public function __construct(
|
||||
Entity\Repository\SettingsRepository $settingsRepo,
|
||||
EntityManagerInterface $em,
|
||||
private readonly Entity\Repository\AnalyticsRepository $analyticsRepo,
|
||||
Entity\Repository\SettingsRepository $settingsRepo,
|
||||
) {
|
||||
parent::__construct($settingsRepo, $em);
|
||||
parent::__construct($settingsRepo);
|
||||
}
|
||||
|
||||
public function __invoke(
|
||||
|
|
|
@ -4,18 +4,19 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations\Reports;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\Paginator;
|
||||
use Doctrine\ORM\AbstractQuery;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
final class RequestsController
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Entity\Repository\StationRequestRepository $requestRepo
|
||||
) {
|
||||
}
|
||||
|
|
|
@ -4,12 +4,12 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations\Reports;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\Service\MusicBrainz;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Throwable;
|
||||
|
||||
|
@ -18,8 +18,9 @@ use Throwable;
|
|||
*/
|
||||
final class SoundExchangeAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly MusicBrainz $musicBrainz
|
||||
) {
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ use App\Http\ServerRequest;
|
|||
use App\OpenApi;
|
||||
use App\Radio\AutoDJ\Scheduler;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use OpenApi\Attributes as OA;
|
||||
use Psr\Cache\CacheItemPoolInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
@ -48,12 +47,11 @@ use Psr\Http\Message\ResponseInterface;
|
|||
final class ListAction extends AbstractSearchableListAction
|
||||
{
|
||||
public function __construct(
|
||||
EntityManagerInterface $em,
|
||||
private readonly Scheduler $scheduler,
|
||||
SongApiGenerator $songApiGenerator,
|
||||
CacheItemPoolInterface $psr6Cache,
|
||||
private readonly Scheduler $scheduler
|
||||
) {
|
||||
parent::__construct($em, $songApiGenerator, $psr6Cache);
|
||||
parent::__construct($songApiGenerator, $psr6Cache);
|
||||
}
|
||||
|
||||
public function __invoke(
|
||||
|
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Api\Stations;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Exception\StationUnsupportedException;
|
||||
use App\Exception\Supervisor\NotRunningException;
|
||||
|
@ -13,7 +14,6 @@ use App\Nginx\Nginx;
|
|||
use App\OpenApi;
|
||||
use App\Radio\Adapters;
|
||||
use App\Radio\Configuration;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use OpenApi\Attributes as OA;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Throwable;
|
||||
|
@ -106,8 +106,9 @@ use Throwable;
|
|||
]
|
||||
final class ServicesController
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Configuration $configuration,
|
||||
private readonly Nginx $nginx,
|
||||
private readonly Adapters $adapters,
|
||||
|
|
|
@ -5,7 +5,6 @@ declare(strict_types=1);
|
|||
namespace App\Controller\Api\Stations\Streamers;
|
||||
|
||||
use App\Controller\Api\AbstractApiCrudController;
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Flysystem\StationFilesystems;
|
||||
use App\Http\Response;
|
||||
|
@ -25,11 +24,10 @@ final class BroadcastsController extends AbstractApiCrudController
|
|||
|
||||
public function __construct(
|
||||
private readonly StationFilesystems $stationFilesystems,
|
||||
ReloadableEntityManagerInterface $em,
|
||||
Serializer $serializer,
|
||||
ValidatorInterface $validator
|
||||
) {
|
||||
parent::__construct($em, $serializer, $validator);
|
||||
parent::__construct($serializer, $validator);
|
||||
}
|
||||
|
||||
public function listAction(
|
||||
|
|
|
@ -5,7 +5,6 @@ declare(strict_types=1);
|
|||
namespace App\Controller\Api\Stations;
|
||||
|
||||
use App\Controller\Api\Traits\CanSortResults;
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
|
@ -152,14 +151,13 @@ final class StreamersController extends AbstractScheduledEntityController
|
|||
protected string $resourceRouteName = 'api:stations:streamer';
|
||||
|
||||
public function __construct(
|
||||
private readonly Entity\Repository\StationStreamerRepository $streamerRepo,
|
||||
Entity\Repository\StationScheduleRepository $scheduleRepo,
|
||||
Scheduler $scheduler,
|
||||
ReloadableEntityManagerInterface $em,
|
||||
Serializer $serializer,
|
||||
ValidatorInterface $validator,
|
||||
private readonly Entity\Repository\StationStreamerRepository $streamerRepo,
|
||||
ValidatorInterface $validator
|
||||
) {
|
||||
parent::__construct($scheduleRepo, $scheduler, $em, $serializer, $validator);
|
||||
parent::__construct($scheduleRepo, $scheduler, $serializer, $validator);
|
||||
}
|
||||
|
||||
public function listAction(
|
||||
|
|
|
@ -4,19 +4,20 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Frontend\Account;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Exception\RateLimitExceededException;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\RateLimit;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Mezzio\Session\SessionCookiePersistenceInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
final class LoginAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly RateLimit $rateLimit,
|
||||
private readonly Entity\Repository\SettingsRepository $settingsRepo
|
||||
) {
|
||||
|
|
|
@ -4,19 +4,20 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Frontend\Account;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use InvalidArgumentException;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Throwable;
|
||||
|
||||
final class RecoverAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly Entity\Repository\UserLoginTokenRepository $loginTokenRepo,
|
||||
private readonly EntityManagerInterface $em
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -4,18 +4,15 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Frontend\Profile;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Enums\SupportedThemes;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
final class ThemeAction
|
||||
{
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em
|
||||
) {
|
||||
}
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __invoke(
|
||||
ServerRequest $request,
|
||||
|
|
|
@ -4,19 +4,16 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Frontend\PublicPages;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Exception\StationNotFoundException;
|
||||
use App\Exception\StationUnsupportedException;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
final class OnDemandAction
|
||||
{
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
) {
|
||||
}
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __invoke(
|
||||
ServerRequest $request,
|
||||
|
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Frontend;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Environment;
|
||||
use App\Exception\NotLoggedInException;
|
||||
|
@ -12,7 +13,6 @@ use App\Http\Response;
|
|||
use App\Http\ServerRequest;
|
||||
use App\Version;
|
||||
use App\VueComponent\StationFormComponent;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use InvalidArgumentException;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||
|
@ -20,8 +20,9 @@ use Throwable;
|
|||
|
||||
final class SetupController
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Entity\Repository\SettingsRepository $settingsRepo,
|
||||
private readonly Environment $environment,
|
||||
private readonly Entity\Repository\RolePermissionRepository $permissionRepo,
|
||||
|
|
|
@ -4,18 +4,19 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Stations;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Enums\StationFeatures;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\Media\MimeType;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
final class FilesAction
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Entity\Repository\CustomFieldRepository $customFieldRepo
|
||||
) {
|
||||
}
|
||||
|
|
|
@ -4,21 +4,22 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Controller\Stations;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Enums\StationPermissions;
|
||||
use App\Http\Response;
|
||||
use App\Http\ServerRequest;
|
||||
use App\Radio\Adapters;
|
||||
use App\VueComponent\NowPlayingComponent;
|
||||
use App\VueComponent\StationFormComponent;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
final class ProfileController
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
private const CSRF_NAMESPACE = 'stations_profile';
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly StationFormComponent $stationFormComponent,
|
||||
private readonly NowPlayingComponent $nowPlayingComponent,
|
||||
private readonly Adapters $adapters,
|
||||
|
|
|
@ -4,17 +4,14 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Doctrine\Messenger;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\Messenger\Event\WorkerMessageFailedEvent;
|
||||
use Symfony\Component\Messenger\Event\WorkerMessageHandledEvent;
|
||||
|
||||
final class ClearEntityManagerSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ReloadableEntityManagerInterface $em
|
||||
) {
|
||||
}
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
/**
|
||||
* @return mixed[]
|
||||
|
|
|
@ -4,18 +4,19 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Entity\ApiGenerator;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Http\Router;
|
||||
use App\Media\RemoteAlbumArt;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use GuzzleHttp\Psr7\UriResolver;
|
||||
use GuzzleHttp\Psr7\Utils;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
|
||||
final class SongApiGenerator
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Router $router,
|
||||
private readonly Entity\Repository\StationRepository $stationRepo,
|
||||
private readonly Entity\Repository\CustomFieldRepository $customFieldRepo,
|
||||
|
|
|
@ -4,17 +4,18 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Media;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Doctrine\ReadWriteBatchIteratorAggregate;
|
||||
use App\Entity;
|
||||
use App\Flysystem\ExtendedFilesystemInterface;
|
||||
use App\Utilities\File;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Throwable;
|
||||
|
||||
final class BatchUtilities
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Entity\Repository\StationMediaRepository $mediaRepo,
|
||||
private readonly Entity\Repository\UnprocessableMediaRepository $unprocessableMediaRepo,
|
||||
private readonly Entity\Repository\StorageLocationRepository $storageLocationRepo,
|
||||
|
|
|
@ -4,7 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Media;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity\Repository\StationMediaRepository;
|
||||
use App\Entity\Repository\StorageLocationRepository;
|
||||
use App\Entity\Repository\UnprocessableMediaRepository;
|
||||
|
@ -18,8 +18,9 @@ use Symfony\Component\Filesystem\Filesystem;
|
|||
|
||||
final class MediaProcessor
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly ReloadableEntityManagerInterface $em,
|
||||
private readonly StationMediaRepository $mediaRepo,
|
||||
private readonly UnprocessableMediaRepository $unprocessableMediaRepo,
|
||||
private readonly StorageLocationRepository $storageLocationRepo
|
||||
|
|
|
@ -4,9 +4,9 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Nginx;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Container\LoggerAwareTrait;
|
||||
use App\Entity\Station;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use JsonException;
|
||||
use NowPlaying\Result\Client;
|
||||
use NowPlaying\Result\Result;
|
||||
|
@ -14,11 +14,7 @@ use NowPlaying\Result\Result;
|
|||
final class HlsListeners
|
||||
{
|
||||
use LoggerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
) {
|
||||
}
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function updateNowPlaying(
|
||||
Result $np,
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
namespace App\Normalizer;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Normalizer\Attributes\DeepNormalize;
|
||||
use App\Normalizer\Exception\NoGetterAvailableException;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\Common\Util\ClassUtils;
|
||||
use Doctrine\Inflector\Inflector;
|
||||
use Doctrine\Inflector\InflectorFactory;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use ReflectionClass;
|
||||
use ReflectionProperty;
|
||||
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface;
|
||||
|
@ -23,7 +23,7 @@ final class DoctrineEntityNormalizer extends AbstractObjectNormalizer
|
|||
private readonly Inflector $inflector;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly ReloadableEntityManagerInterface $em,
|
||||
ClassMetadataFactoryInterface $classMetadataFactory = null,
|
||||
array $defaultContext = []
|
||||
) {
|
||||
|
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Radio;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Container\LoggerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Environment;
|
||||
|
@ -11,7 +12,6 @@ use App\Exception\Supervisor\AlreadyRunningException;
|
|||
use App\Exception\Supervisor\NotRunningException;
|
||||
use App\Exception\SupervisorException;
|
||||
use App\Http\Router;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\EventDispatcher\EventDispatcherInterface;
|
||||
use Supervisor\Exception\Fault;
|
||||
use Supervisor\Exception\SupervisorException as SupervisorLibException;
|
||||
|
@ -20,10 +20,10 @@ use Supervisor\SupervisorInterface;
|
|||
abstract class AbstractLocalAdapter
|
||||
{
|
||||
use LoggerAwareTrait;
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
protected Environment $environment,
|
||||
protected EntityManagerInterface $em,
|
||||
protected SupervisorInterface $supervisor,
|
||||
protected EventDispatcherInterface $dispatcher,
|
||||
protected Router $router,
|
||||
|
|
|
@ -4,17 +4,18 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Radio\AutoDJ;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Event\Radio\AnnotateNextSong;
|
||||
use App\Radio\Backend\Liquidsoap\ConfigWriter;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
final class Annotations implements EventSubscriberInterface
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Entity\Repository\StationQueueRepository $queueRepo,
|
||||
private readonly EventDispatcherInterface $eventDispatcher,
|
||||
) {
|
||||
|
|
|
@ -4,12 +4,12 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Radio\AutoDJ;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Container\LoggerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Event\Radio\BuildQueue;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Carbon\CarbonInterface;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Monolog\Handler\TestHandler;
|
||||
use Monolog\LogRecord;
|
||||
use Psr\EventDispatcher\EventDispatcherInterface;
|
||||
|
@ -22,9 +22,9 @@ use Psr\SimpleCache\CacheInterface;
|
|||
final class Queue
|
||||
{
|
||||
use LoggerAwareTrait;
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly CacheInterface $cache,
|
||||
private readonly EventDispatcherInterface $dispatcher,
|
||||
private readonly Entity\Repository\StationQueueRepository $queueRepo,
|
||||
|
|
|
@ -4,12 +4,12 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Radio\AutoDJ;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Container\LoggerAwareTrait;
|
||||
use App\Entity;
|
||||
use App\Event\Radio\BuildQueue;
|
||||
use App\Radio\PlaylistParser;
|
||||
use Carbon\CarbonInterface;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\SimpleCache\CacheInterface;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
|
@ -19,9 +19,9 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
|||
final class QueueBuilder implements EventSubscriberInterface
|
||||
{
|
||||
use LoggerAwareTrait;
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Scheduler $scheduler,
|
||||
private readonly DuplicatePrevention $duplicatePrevention,
|
||||
private readonly CacheInterface $cache,
|
||||
|
|
|
@ -4,8 +4,8 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Radio\AutoDJ;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Container\LoggerAwareTrait;
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Entity\Repository\StationPlaylistMediaRepository;
|
||||
use App\Entity\Repository\StationQueueRepository;
|
||||
|
@ -18,11 +18,11 @@ use Monolog\LogRecord;
|
|||
final class Scheduler
|
||||
{
|
||||
use LoggerAwareTrait;
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly StationPlaylistMediaRepository $spmRepo,
|
||||
private readonly StationQueueRepository $queueRepo,
|
||||
private readonly ReloadableEntityManagerInterface $em,
|
||||
private readonly StationQueueRepository $queueRepo
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
|
@ -4,15 +4,16 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Radio\Backend\Liquidsoap\Command;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Exception;
|
||||
use RuntimeException;
|
||||
|
||||
final class FeedbackCommand extends AbstractCommand
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Entity\Repository\StationQueueRepository $queueRepo,
|
||||
private readonly Entity\Repository\SongHistoryRepository $historyRepo
|
||||
) {
|
||||
|
|
|
@ -4,8 +4,8 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Radio\Backend\Liquidsoap;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Container\LoggerAwareTrait;
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Event\Radio\AnnotateNextSong;
|
||||
use App\Event\Radio\WriteLiquidsoapConfiguration;
|
||||
|
@ -22,10 +22,10 @@ use Throwable;
|
|||
final class PlaylistFileWriter implements EventSubscriberInterface
|
||||
{
|
||||
use LoggerAwareTrait;
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly EventDispatcherInterface $eventDispatcher,
|
||||
private readonly ReloadableEntityManagerInterface $em,
|
||||
private readonly Filesystem $fsUtils,
|
||||
private readonly Liquidsoap $liquidsoap
|
||||
) {
|
||||
|
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Radio;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Entity\Enums\PlaylistTypes;
|
||||
use App\Entity\Repository\StationPlaylistMediaRepository;
|
||||
use App\Entity\Station;
|
||||
|
@ -12,13 +13,14 @@ use App\Environment;
|
|||
use App\Exception;
|
||||
use App\Radio\Enums\BackendAdapters;
|
||||
use App\Radio\Enums\FrontendAdapters;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use RuntimeException;
|
||||
use Supervisor\Exception\SupervisorException;
|
||||
use Supervisor\SupervisorInterface;
|
||||
|
||||
final class Configuration
|
||||
{
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public const DEFAULT_PORT_MIN = 8000;
|
||||
public const DEFAULT_PORT_MAX = 8499;
|
||||
public const PROTECTED_PORTS = [
|
||||
|
@ -32,7 +34,6 @@ final class Configuration
|
|||
];
|
||||
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly Adapters $adapters,
|
||||
private readonly SupervisorInterface $supervisor,
|
||||
private readonly Environment $environment,
|
||||
|
|
|
@ -11,7 +11,6 @@ use App\Nginx\CustomUrls;
|
|||
use App\Radio\AbstractLocalAdapter;
|
||||
use App\Radio\Configuration;
|
||||
use App\Xml\Reader;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Exception;
|
||||
use GuzzleHttp\Client;
|
||||
use InvalidArgumentException;
|
||||
|
@ -26,17 +25,16 @@ use Supervisor\SupervisorInterface;
|
|||
abstract class AbstractFrontend extends AbstractLocalAdapter
|
||||
{
|
||||
public function __construct(
|
||||
Environment $environment,
|
||||
EntityManagerInterface $em,
|
||||
SupervisorInterface $supervisor,
|
||||
EventDispatcherInterface $dispatcher,
|
||||
Router $router,
|
||||
protected AdapterFactory $adapterFactory,
|
||||
protected Client $http_client,
|
||||
protected Entity\Repository\SettingsRepository $settingsRepo,
|
||||
protected Entity\Repository\StationMountRepository $stationMountRepo,
|
||||
Environment $environment,
|
||||
SupervisorInterface $supervisor,
|
||||
EventDispatcherInterface $dispatcher,
|
||||
Router $router
|
||||
) {
|
||||
parent::__construct($environment, $em, $supervisor, $dispatcher, $router);
|
||||
parent::__construct($environment, $supervisor, $dispatcher, $router);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,9 +4,9 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Radio\Remote;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Container\LoggerAwareTrait;
|
||||
use App\Entity;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use NowPlaying\AdapterFactory;
|
||||
|
@ -16,9 +16,9 @@ use NowPlaying\Result\Result;
|
|||
abstract class AbstractRemote
|
||||
{
|
||||
use LoggerAwareTrait;
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
protected EntityManagerInterface $em,
|
||||
protected Entity\Repository\SettingsRepository $settingsRepo,
|
||||
protected Client $http_client,
|
||||
protected AdapterFactory $adapterFactory
|
||||
|
|
|
@ -7,7 +7,6 @@ namespace App\Radio\Remote;
|
|||
use App\Cache\AzuraRelayCache;
|
||||
use App\Entity;
|
||||
use App\Environment;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Promise\Create;
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
|
@ -20,13 +19,12 @@ use NowPlaying\Result\Result;
|
|||
final class AzuraRelay extends AbstractRemote
|
||||
{
|
||||
public function __construct(
|
||||
EntityManagerInterface $em,
|
||||
private readonly AzuraRelayCache $azuraRelayCache,
|
||||
Entity\Repository\SettingsRepository $settingsRepo,
|
||||
Client $http_client,
|
||||
AdapterFactory $adapterFactory,
|
||||
private readonly AzuraRelayCache $azuraRelayCache
|
||||
) {
|
||||
parent::__construct($em, $settingsRepo, $http_client, $adapterFactory);
|
||||
parent::__construct($settingsRepo, $http_client, $adapterFactory);
|
||||
}
|
||||
|
||||
public function getNowPlayingAsync(Entity\StationRemote $remote, bool $includeClients = false): PromiseInterface
|
||||
|
|
|
@ -5,8 +5,8 @@ declare(strict_types=1);
|
|||
namespace App\Sync\NowPlaying\Task;
|
||||
|
||||
use App\Cache\NowPlayingCache;
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Container\LoggerAwareTrait;
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity\Api\NowPlaying\NowPlaying;
|
||||
use App\Entity\ApiGenerator\NowPlayingApiGenerator;
|
||||
use App\Entity\Repository\ListenerRepository;
|
||||
|
@ -30,6 +30,7 @@ use Symfony\Component\Messenger\MessageBus;
|
|||
final class NowPlayingTask implements NowPlayingTaskInterface, EventSubscriberInterface
|
||||
{
|
||||
use LoggerAwareTrait;
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
private readonly Adapters $adapters,
|
||||
|
@ -40,7 +41,6 @@ final class NowPlayingTask implements NowPlayingTaskInterface, EventSubscriberIn
|
|||
private readonly ListenerRepository $listenerRepo,
|
||||
private readonly SettingsRepository $settingsRepo,
|
||||
private readonly NowPlayingApiGenerator $nowPlayingApiGenerator,
|
||||
private readonly ReloadableEntityManagerInterface $em,
|
||||
private readonly HlsListeners $hlsListeners,
|
||||
) {
|
||||
}
|
||||
|
|
|
@ -4,19 +4,15 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Sync\Task;
|
||||
|
||||
use App\Container\EntityManagerAwareTrait;
|
||||
use App\Container\LoggerAwareTrait;
|
||||
use App\Doctrine\ReadWriteBatchIteratorAggregate;
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
|
||||
abstract class AbstractTask implements ScheduledTaskInterface
|
||||
{
|
||||
use LoggerAwareTrait;
|
||||
|
||||
public function __construct(
|
||||
protected ReloadableEntityManagerInterface $em
|
||||
) {
|
||||
}
|
||||
use EntityManagerAwareTrait;
|
||||
|
||||
public static function isLongTask(): bool
|
||||
{
|
||||
|
|
|
@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Sync\Task;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Flysystem\ExtendedFilesystemInterface;
|
||||
use App\Flysystem\StationFilesystems;
|
||||
|
@ -14,10 +13,8 @@ final class CheckFolderPlaylistsTask extends AbstractTask
|
|||
{
|
||||
public function __construct(
|
||||
private readonly Entity\Repository\StationPlaylistMediaRepository $spmRepo,
|
||||
private readonly StationFilesystems $stationFilesystems,
|
||||
ReloadableEntityManagerInterface $em
|
||||
private readonly StationFilesystems $stationFilesystems
|
||||
) {
|
||||
parent::__construct($em);
|
||||
}
|
||||
|
||||
public static function getSchedulePattern(): string
|
||||
|
|
|
@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Sync\Task;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Flysystem\Attributes\FileAttributes;
|
||||
use App\Flysystem\ExtendedFilesystemInterface;
|
||||
|
@ -30,10 +29,8 @@ final class CheckMediaTask extends AbstractTask
|
|||
private readonly Entity\Repository\UnprocessableMediaRepository $unprocessableMediaRepo,
|
||||
private readonly Entity\Repository\StorageLocationRepository $storageLocationRepo,
|
||||
private readonly MessageBus $messageBus,
|
||||
private readonly QueueManagerInterface $queueManager,
|
||||
ReloadableEntityManagerInterface $em,
|
||||
private readonly QueueManagerInterface $queueManager
|
||||
) {
|
||||
parent::__construct($em);
|
||||
}
|
||||
|
||||
public static function getSchedulePattern(): string
|
||||
|
|
|
@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Sync\Task;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Event\Radio\AnnotateNextSong;
|
||||
use App\Radio\Adapters;
|
||||
|
@ -17,10 +16,8 @@ final class CheckRequestsTask extends AbstractTask
|
|||
public function __construct(
|
||||
private readonly Entity\Repository\StationRequestRepository $requestRepo,
|
||||
private readonly Adapters $adapters,
|
||||
private readonly EventDispatcherInterface $dispatcher,
|
||||
ReloadableEntityManagerInterface $em
|
||||
private readonly EventDispatcherInterface $dispatcher
|
||||
) {
|
||||
parent::__construct($em);
|
||||
}
|
||||
|
||||
public static function getSchedulePattern(): string
|
||||
|
|
|
@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Sync\Task;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Environment;
|
||||
use App\Service\AzuraCastCentral;
|
||||
|
@ -16,10 +15,8 @@ final class CheckUpdatesTask extends AbstractTask
|
|||
|
||||
public function __construct(
|
||||
private readonly Entity\Repository\SettingsRepository $settingsRepo,
|
||||
private readonly AzuraCastCentral $azuracastCentral,
|
||||
ReloadableEntityManagerInterface $em,
|
||||
private readonly AzuraCastCentral $azuracastCentral
|
||||
) {
|
||||
parent::__construct($em);
|
||||
}
|
||||
|
||||
public static function getSchedulePattern(): string
|
||||
|
|
|
@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Sync\Task;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
|
||||
final class CleanupHistoryTask extends AbstractTask
|
||||
|
@ -14,9 +13,7 @@ final class CleanupHistoryTask extends AbstractTask
|
|||
private readonly Entity\Repository\SongHistoryRepository $historyRepo,
|
||||
private readonly Entity\Repository\StationQueueRepository $queueRepo,
|
||||
private readonly Entity\Repository\ListenerRepository $listenerRepo,
|
||||
ReloadableEntityManagerInterface $em,
|
||||
) {
|
||||
parent::__construct($em);
|
||||
}
|
||||
|
||||
public static function getSchedulePattern(): string
|
||||
|
|
|
@ -4,16 +4,13 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Sync\Task;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
|
||||
final class CleanupLoginTokensTask extends AbstractTask
|
||||
{
|
||||
public function __construct(
|
||||
private readonly Entity\Repository\UserLoginTokenRepository $loginTokenRepo,
|
||||
ReloadableEntityManagerInterface $em,
|
||||
) {
|
||||
parent::__construct($em);
|
||||
}
|
||||
|
||||
public static function getSchedulePattern(): string
|
||||
|
|
|
@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Sync\Task;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use Exception;
|
||||
use League\Flysystem\StorageAttributes;
|
||||
|
@ -15,9 +14,7 @@ final class CleanupStorageTask extends AbstractTask
|
|||
{
|
||||
public function __construct(
|
||||
private readonly Entity\Repository\StorageLocationRepository $storageLocationRepo,
|
||||
ReloadableEntityManagerInterface $em,
|
||||
) {
|
||||
parent::__construct($em);
|
||||
}
|
||||
|
||||
public static function getSchedulePattern(): string
|
||||
|
|
|
@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Sync\Task;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Radio\Adapters;
|
||||
use App\Radio\AutoDJ\Scheduler;
|
||||
use App\Radio\Backend\Liquidsoap;
|
||||
|
@ -13,11 +12,9 @@ use App\Radio\Enums\BackendAdapters;
|
|||
final class EnforceBroadcastTimesTask extends AbstractTask
|
||||
{
|
||||
public function __construct(
|
||||
ReloadableEntityManagerInterface $em,
|
||||
private readonly Scheduler $scheduler,
|
||||
private readonly Adapters $adapters,
|
||||
) {
|
||||
parent::__construct($em);
|
||||
}
|
||||
|
||||
public static function getSchedulePattern(): string
|
||||
|
|
|
@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Sync\Task;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
use Throwable;
|
||||
|
@ -18,10 +17,8 @@ final class MoveBroadcastsTask extends AbstractTask
|
|||
|
||||
public function __construct(
|
||||
private readonly Entity\Repository\StationStreamerBroadcastRepository $broadcastRepo,
|
||||
private readonly Entity\Repository\StorageLocationRepository $storageLocationRepo,
|
||||
ReloadableEntityManagerInterface $em,
|
||||
private readonly Entity\Repository\StorageLocationRepository $storageLocationRepo
|
||||
) {
|
||||
parent::__construct($em);
|
||||
}
|
||||
|
||||
public function run(bool $force = false): void
|
||||
|
|
|
@ -4,7 +4,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Sync\Task;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Entity;
|
||||
use App\Event\Radio\AnnotateNextSong;
|
||||
use App\Radio\Adapters;
|
||||
|
@ -19,10 +18,8 @@ final class QueueInterruptingTracks extends AbstractTask
|
|||
public function __construct(
|
||||
private readonly Queue $queue,
|
||||
private readonly Adapters $adapters,
|
||||
private readonly EventDispatcherInterface $eventDispatcher,
|
||||
ReloadableEntityManagerInterface $em,
|
||||
private readonly EventDispatcherInterface $eventDispatcher
|
||||
) {
|
||||
parent::__construct($em);
|
||||
}
|
||||
|
||||
public static function getSchedulePattern(): string
|
||||
|
|
|
@ -4,17 +4,14 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Sync\Task;
|
||||
|
||||
use App\Doctrine\ReloadableEntityManagerInterface;
|
||||
use App\Service\Acme;
|
||||
use Exception;
|
||||
|
||||
final class RenewAcmeCertTask extends AbstractTask
|
||||
{
|
||||
public function __construct(
|
||||
ReloadableEntityManagerInterface $em,
|
||||
private readonly Acme $acme
|
||||
) {
|
||||
parent::__construct($em);
|
||||
}
|
||||
|
||||
public static function getSchedulePattern(): string
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue