Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Latest
------

## Changes
* [#180](https://github.com/cleverage/ui-process-bundle/issues/180) Define the public API (Symfony BC promise, as [cleverage/process-bundle#279](https://github.com/cleverage/process-bundle/issues/279)): `ProcessExecutionManager`, `ProcessExecutionRepository`, `ProcessScheduleRepository`, `ProcessExecuteMessage`, `ProcessExecutionNotification` and `CleverAgeUiProcessBundle` are marked `@final since 3.3`, they will be `final` in 4.0: extending them triggers a deprecation with the Symfony `DebugClassLoader`. The entities stay open (overriding them: [#37](https://github.com/cleverage/ui-process-bundle/issues/37)). The infrastructure classes are marked `@internal`: the extension, `Configuration`, the commands, the controllers, the EasyAdmin fields and filters, the form types, the Messenger handlers, the Monolog handlers, `HttpProcessExecuteValueResolver`, `HttpProcessExecutionAuthenticator`, `ProcessExecutionStopChecker`, `CronScheduler`, `ProcessEventSubscriber` and the Twig extensions, runtimes and components.
* [#179](https://github.com/cleverage/ui-process-bundle/issues/179) `CleverAgeUiProcessExtension::findServices()` loads the service definition files with a glob pattern instead of a `Finder` (same files, as [cleverage/process-bundle#271](https://github.com/cleverage/process-bundle/issues/271)). Add tests.
* [#172](https://github.com/cleverage/ui-process-bundle/issues/172) Prefix the route names of the bundle with `cleverage_ui_process_`, as required by the Symfony best practices for bundles: `cleverage_ui_process_login`, `cleverage_ui_process_logout`, `cleverage_ui_process_list`, `cleverage_ui_process_launch`, `cleverage_ui_process_http_execute`, and the dashboard `cleverage_ui_process`, so that the routes generated by EasyAdmin for the CRUD pages are `cleverage_ui_process_<crud>_<action>`. The former names (`process`, `process_<crud>_<action>`, `process_login`, `process_logout`, `process_list`, `process_launch`, `http_process_execute`) are deprecated route aliases (new `config/routes/deprecated_aliases.yaml`, loaded by the documented import, and internal `DeprecatedEasyAdminRouteAliasLoader` for the routes generated by EasyAdmin), removed in 4.0; `?routeName=<former name>` URLs keep working. Document that `easyadmin.routes` generates the routes of every dashboard. Update documentation and UPGRADE.md, add tests.
* [#166](https://github.com/cleverage/ui-process-bundle/issues/166) Doctrine ORM 2: the entities have readonly properties (since v3.2), which the legacy proxies of ORM 2 cannot handle (`Cannot unset readonly property ... from scope Proxies\__CG__\...` when an entity proxy is loaded). The container compilation now fails with an explicit message when ORM 2 is used without `doctrine.orm.enable_lazy_ghost_objects: true` (new internal `CheckDoctrineLazyGhostObjectsPass`); nothing changes with ORM 3. Update documentation, add tests.
Expand Down
3 changes: 3 additions & 0 deletions src/Admin/Field/ContextField.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @internal
*/
class ContextField implements FieldInterface
{
use FieldTrait;
Expand Down
3 changes: 3 additions & 0 deletions src/Admin/Field/EnumField.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @internal
*/
class EnumField implements FieldInterface
{
use FieldTrait;
Expand Down
3 changes: 3 additions & 0 deletions src/Admin/Field/LogLevelField.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @internal
*/
class LogLevelField implements FieldInterface
{
use FieldTrait;
Expand Down
3 changes: 3 additions & 0 deletions src/Admin/Filter/LogProcessFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
use EasyCorp\Bundle\EasyAdminBundle\Form\Type\ComparisonType;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
* @internal
*/
class LogProcessFilter implements FilterInterface
{
use FilterTrait;
Expand Down
3 changes: 3 additions & 0 deletions src/Admin/Filter/ProcessExecutionDurationFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
use EasyCorp\Bundle\EasyAdminBundle\Filter\FilterTrait;
use EasyCorp\Bundle\EasyAdminBundle\Form\Filter\Type\NumericFilterType;

/**
* @internal
*/
class ProcessExecutionDurationFilter implements FilterInterface
{
use FilterTrait;
Expand Down
3 changes: 3 additions & 0 deletions src/CleverAgeUiProcessBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;

/**
* @final since 3.3
*/
class CleverAgeUiProcessBundle extends Bundle
{
#[\Override]
Expand Down
2 changes: 2 additions & 0 deletions src/Command/PurgeLogsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
* "logs.file_max_days" days, both overridable by the "logs" option of each process. The process executions are kept.
*
* DBAL queries are used: the log records are deleted by batches, without loading them.
*
* @internal
*/
#[AsCommand(
name: 'cleverage:ui-process:purge-logs',
Expand Down
3 changes: 3 additions & 0 deletions src/Command/UserCreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Validator\ValidatorInterface;

/**
* @internal
*/
#[AsCommand(
name: 'cleverage:ui-process:user-create',
description: 'Command to create a new admin into database for ui process.'
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/LogRecordCrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

/**
* @extends AbstractCrudController<LogRecord>
*
* @internal
*/
#[IsGranted('ROLE_USER')]
class LogRecordCrudController extends AbstractCrudController
Expand Down
3 changes: 3 additions & 0 deletions src/Controller/Admin/Process/LaunchAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\Uid\Uuid;

/**
* @internal
*/
#[Route(
'/process/launch',
name: 'cleverage_ui_process_launch',
Expand Down
3 changes: 3 additions & 0 deletions src/Controller/Admin/Process/ListAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;

/**
* @internal
*/
#[Route('/process/list', name: 'cleverage_ui_process_list')]
#[IsGranted('ROLE_USER')]
class ListAction extends AbstractController
Expand Down
3 changes: 3 additions & 0 deletions src/Controller/Admin/ProcessDashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\Translation\LocaleSwitcher;

/**
* @internal
*/
#[IsGranted('ROLE_USER')]
#[AdminDashboard(routePath: '/process', routeName: 'cleverage_ui_process')]
class ProcessDashboardController extends AbstractDashboardController
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/ProcessExecutionCrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@

/**
* @extends AbstractCrudController<ProcessExecution>
*
* @internal
*/
#[IsGranted('ROLE_USER')]
class ProcessExecutionCrudController extends AbstractCrudController
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/ProcessScheduleCrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@

/**
* @extends AbstractCrudController<ProcessSchedule>
*
* @internal
*/
#[IsGranted('ROLE_USER')]
class ProcessScheduleCrudController extends AbstractCrudController
Expand Down
3 changes: 3 additions & 0 deletions src/Controller/Admin/Security/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;

/**
* @internal
*/
class LoginController extends AbstractController
{
#[Route('/process/login', name: 'cleverage_ui_process_login')]
Expand Down
3 changes: 3 additions & 0 deletions src/Controller/Admin/Security/LogoutController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;

/**
* @internal
*/
class LogoutController extends AbstractController
{
public function __construct(private readonly Security $security)
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/Admin/UserCrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

/**
* @extends AbstractCrudController<User>
*
* @internal
*/
#[IsGranted('ROLE_USER')]
class UserCrudController extends AbstractCrudController
Expand Down
3 changes: 3 additions & 0 deletions src/Controller/ProcessExecuteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Component\Validator\Validator\ValidatorInterface;

/**
* @internal
*/
#[IsGranted('ROLE_USER')]
#[Route(path: '/http/process/execute', name: 'cleverage_ui_process_http_execute', methods: ['POST'])]
class ProcessExecuteController extends AbstractController
Expand Down
3 changes: 3 additions & 0 deletions src/DependencyInjection/CleverAgeUiProcessExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\Notifier\NotifierInterface;

/**
* @internal
*/
final class CleverAgeUiProcessExtension extends Extension implements PrependExtensionInterface
{
public function load(array $configs, ContainerBuilder $container): void
Expand Down
3 changes: 3 additions & 0 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;

/**
* @internal
*/
class Configuration implements ConfigurationInterface
{
public function __construct(private readonly string $env)
Expand Down
3 changes: 3 additions & 0 deletions src/EventSubscriber/ProcessEventSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
use Symfony\Component\Uid\Uuid;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;

/**
* @internal
*/
final readonly class ProcessEventSubscriber implements EventSubscriberInterface
{
public function __construct(
Expand Down
3 changes: 3 additions & 0 deletions src/Form/Type/LaunchType.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* @internal
*/
/** @template-extends AbstractType<array<string, mixed>> */
class LaunchType extends AbstractType
{
Expand Down
3 changes: 3 additions & 0 deletions src/Form/Type/ProcessContextType.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Validator\Constraints\NotBlank;

/**
* @internal
*/
/** @template-extends AbstractType<null> */
class ProcessContextType extends AbstractType
{
Expand Down
3 changes: 3 additions & 0 deletions src/Http/ValueResolver/HttpProcessExecuteValueResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata;
use Symfony\Component\Serializer\SerializerInterface;

/**
* @internal
*/
#[AsTargetedValueResolver('http_process_execution')]
readonly class HttpProcessExecuteValueResolver implements ValueResolverInterface
{
Expand Down
3 changes: 3 additions & 0 deletions src/Manager/ProcessExecutionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use CleverAge\UiProcessBundle\Repository\ProcessExecutionRepository;
use Symfony\Contracts\Service\ResetInterface;

/**
* @final since 3.3
*/
class ProcessExecutionManager implements ResetInterface
{
private ?ProcessExecution $currentProcessExecution = null;
Expand Down
3 changes: 3 additions & 0 deletions src/Message/CronProcessMessageHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
use Symfony\Component\Messenger\MessageBusInterface;

/**
* @internal
*/
#[AsMessageHandler]
final readonly class CronProcessMessageHandler
{
Expand Down
3 changes: 3 additions & 0 deletions src/Message/ProcessExecuteHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use CleverAge\UiProcessBundle\Monolog\Handler\ProcessHandler;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;

/**
* @internal
*/
#[AsMessageHandler]
readonly class ProcessExecuteHandler
{
Expand Down
3 changes: 3 additions & 0 deletions src/Message/ProcessExecuteMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

namespace CleverAge\UiProcessBundle\Message;

/**
* @final since 3.3
*/
readonly class ProcessExecuteMessage
{
/**
Expand Down
3 changes: 3 additions & 0 deletions src/Monolog/Handler/DoctrineProcessHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
use Monolog\Level;
use Monolog\LogRecord;

/**
* @internal
*/
class DoctrineProcessHandler extends AbstractProcessingHandler
{
/** @var ArrayCollection<int, LogRecord> */
Expand Down
3 changes: 3 additions & 0 deletions src/Monolog/Handler/ProcessHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use Monolog\Level;
use Monolog\LogRecord;

/**
* @internal
*/
class ProcessHandler extends StreamHandler
{
private Level $reportIncrementLevel = Level::Warning;
Expand Down
2 changes: 2 additions & 0 deletions src/Notifier/ProcessExecutionNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

/**
* Notification sent at the end of a process execution.
*
* @final since 3.3
*/
class ProcessExecutionNotification extends Notification
{
Expand Down
2 changes: 2 additions & 0 deletions src/Repository/ProcessExecutionRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
* @method ProcessExecution|null findOneBy(mixed[] $criteria, string[] $orderBy = null)
* @method ProcessExecution[] findAll()
* @method ProcessExecution[] findBy(mixed[] $criteria, string[] $orderBy = null, $limit = null, $offset = null)
*
* @final since 3.3
*/
class ProcessExecutionRepository extends EntityRepository
{
Expand Down
2 changes: 2 additions & 0 deletions src/Repository/ProcessScheduleRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
* @method ProcessSchedule|null findOneBy(mixed[] $criteria, string[] $orderBy = null)
* @method ProcessSchedule[] findAll()
* @method ProcessSchedule[] findBy(mixed[] $criteria, string[] $orderBy = null, $limit = null, $offset = null)
*
* @final since 3.3
*/
class ProcessScheduleRepository extends EntityRepository
{
Expand Down
3 changes: 3 additions & 0 deletions src/Scheduler/CronScheduler.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
use Symfony\Component\Scheduler\ScheduleProviderInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface;

/**
* @internal
*/
readonly class CronScheduler implements ScheduleProviderInterface
{
public function __construct(
Expand Down
3 changes: 3 additions & 0 deletions src/Security/HttpProcessExecutionAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport;

/**
* @internal
*/
class HttpProcessExecutionAuthenticator extends AbstractAuthenticator
{
public function __construct(private readonly EntityManagerInterface $entityManager)
Expand Down
2 changes: 2 additions & 0 deletions src/StopChecker/ProcessExecutionStopChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
*
* DBAL queries are used: no ORM query per item, and the entity manager may have been cleared or closed by the process
* tasks.
*
* @internal
*/
class ProcessExecutionStopChecker implements ProcessStopCheckerInterface
{
Expand Down
3 changes: 3 additions & 0 deletions src/Twig/Components/BootstrapModal.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

namespace CleverAge\UiProcessBundle\Twig\Components;

/**
* @internal
*/
class BootstrapModal
{
public ?string $id = null;
Expand Down
3 changes: 3 additions & 0 deletions src/Twig/Extension/LogLevelExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;

/**
* @internal
*/
class LogLevelExtension extends AbstractExtension
{
#[\Override]
Expand Down
3 changes: 3 additions & 0 deletions src/Twig/Extension/MD5Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;

/**
* @internal
*/
class MD5Extension extends AbstractExtension
{
#[\Override]
Expand Down
3 changes: 3 additions & 0 deletions src/Twig/Extension/ProcessExecutionExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;

/**
* @internal
*/
class ProcessExecutionExtension extends AbstractExtension
{
#[\Override]
Expand Down
Loading
Loading