Skip to content

Commit

Permalink
#3 Rename ProcessUi*** to UiProcess*** & Update CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
njoubert-cleverage committed Nov 20, 2024
1 parent 7e1eedd commit ac7806b
Show file tree
Hide file tree
Showing 76 changed files with 169 additions and 168 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ v2.0

* [#4](https://github.com/cleverage/ui-process-bundle/issues/4) Update composer : "doctrine/*" using same versions of doctrine-process-bundle.
Remove "sensio/framework-extra-bundle" & "symfony/flex". Update require-dev using "process-bundle" standard. Reinstall "symfony/debug-pack".
"symfony/*" from ^5.4 to ^6.4|^7.1 => Update changes on code. "league/flysystem-bundle" from ^2.2 to ^3.0" (same as flysystem-process-bundle).
"twig/extra-bundle" and "twig/intl-extra" to ^3.8
"symfony/*" from ^5.4 to ^6.4|^7.1 => Update changes on code.
* [#2](https://github.com/cleverage/ui-process-bundle/issues/2) Routes must be prefixed with the bundle alias => `cleverage_ui_process`
* [#2](https://github.com/cleverage/ui-process-bundle/issues/2) Update services according to Symfony best practices. Services should not use autowiring or autoconfiguration. Instead, all services should be defined explicitly.
Services must be prefixed with the bundle alias instead of using fully qualified class names => `cleverage_ui_process`
* [#3](https://github.com/cleverage/ui-process-bundle/issues/3) Rename process-ui-bundle to ui-process-bundle,
cleverage:process-ui:xxx to cleverage:ui-process:xxx, clever_age_process_ui to cleverage_ui_process and ProcessUi*** to UiProcess***

### Changes

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
],
"autoload": {
"psr-4": {
"CleverAge\\ProcessUiBundle\\": "src/"
"CleverAge\\UiProcessBundle\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"CleverAge\\ProcessUiBundle\\Tests\\": "tests/"
"CleverAge\\UiProcessBundle\\Tests\\": "tests/"
}
},
"require": {
Expand Down
2 changes: 1 addition & 1 deletion config/services/command.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
cleverage_ui_process.command.user_create:
class: CleverAge\ProcessUiBundle\Command\UserCreateCommand
class: CleverAge\UiProcessBundle\Command\UserCreateCommand
public: false
tags:
- { name: console.command }
Expand Down
2 changes: 1 addition & 1 deletion config/services/controller.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
services:
CleverAge\ProcessUiBundle\Controller\:
CleverAge\UiProcessBundle\Controller\:
resource: '../../src/Controller/'
autowire: true
autoconfigure: true
Expand Down
2 changes: 1 addition & 1 deletion config/services/event_subscriber.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
cleverage_ui_process.event_subscriber.process:
class: CleverAge\ProcessUiBundle\EventSubscriber\ProcessEventSubscriber
class: CleverAge\UiProcessBundle\EventSubscriber\ProcessEventSubscriber
public: false
tags:
- { name: 'kernel.event_subscriber' }
Expand Down
4 changes: 2 additions & 2 deletions config/services/http_value_resolver.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
services:
cleverage_ui_process.http_value_resolver.http_process_execute:
class: CleverAge\ProcessUiBundle\Http\ValueResolver\HttpProcessExecuteValueResolver
class: CleverAge\UiProcessBundle\Http\ValueResolver\HttpProcessExecuteValueResolver
public: false
arguments:
- '%upload_directory%'

cleverage_ui_process.http_value_resolver.process_configuration:
class: CleverAge\ProcessUiBundle\Http\ValueResolver\ProcessConfigurationValueResolver
class: CleverAge\UiProcessBundle\Http\ValueResolver\ProcessConfigurationValueResolver
public: false
arguments:
- '@cleverage_process.registry.process_configuration'
4 changes: 2 additions & 2 deletions config/services/manager.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
services:
cleverage_ui_process.manager.process_execution:
class: CleverAge\ProcessUiBundle\Manager\ProcessExecutionManager
class: CleverAge\UiProcessBundle\Manager\ProcessExecutionManager
public: false
arguments:
- '@cleverage_ui_process.repository.process_execution'

cleverage_ui_process.manager.process_configuration:
class: CleverAge\ProcessUiBundle\Manager\ProcessConfigurationsManager
class: CleverAge\UiProcessBundle\Manager\ProcessConfigurationsManager
public: false
arguments:
- '@cleverage_process.registry.process_configuration'
4 changes: 2 additions & 2 deletions config/services/message.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
services:
cleverage_ui_process.message.cron_process_message_handler:
class: CleverAge\ProcessUiBundle\Message\CronProcessMessageHandler
class: CleverAge\UiProcessBundle\Message\CronProcessMessageHandler
public: false
arguments:
- '@messenger.default_bus'

cleverage_ui_process.message.process_execute_handler:
class: CleverAge\ProcessUiBundle\Message\ProcessExecuteHandler
class: CleverAge\UiProcessBundle\Message\ProcessExecuteHandler
public: false
arguments:
- '@cleverage_process.manager.process'
Expand Down
4 changes: 2 additions & 2 deletions config/services/monolog_handler.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
services:
cleverage_ui_process.monolog_handler.doctrine_process:
class: CleverAge\ProcessUiBundle\Monolog\Handler\DoctrineProcessHandler
class: CleverAge\UiProcessBundle\Monolog\Handler\DoctrineProcessHandler
public: false
calls:
- [ setEntityManager, [ '@doctrine.orm.entity_manager' ] ]
- [ setProcessExecutionManager, [ '@cleverage_ui_process.manager.process_execution' ] ]

cleverage_ui_process.monolog_handler.process:
class: CleverAge\ProcessUiBundle\Monolog\Handler\ProcessHandler
class: CleverAge\UiProcessBundle\Monolog\Handler\ProcessHandler
public: false
arguments:
- '%kernel.logs_dir%'
Expand Down
4 changes: 2 additions & 2 deletions config/services/repository.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
services:
cleverage_ui_process.repository.process_execution:
class: CleverAge\ProcessUiBundle\Repository\ProcessExecutionRepository
class: CleverAge\UiProcessBundle\Repository\ProcessExecutionRepository
public: false
arguments:
- '@doctrine.orm.entity_manager'

cleverage_ui_process.repository.process_schedule:
class: CleverAge\ProcessUiBundle\Repository\ProcessScheduleRepository
class: CleverAge\UiProcessBundle\Repository\ProcessScheduleRepository
public: false
arguments:
- '@doctrine.orm.entity_manager'
Expand Down
2 changes: 1 addition & 1 deletion config/services/scheduler.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
cleverage_ui_process.scheduler.cron:
class: CleverAge\ProcessUiBundle\Scheduler\CronScheduler
class: CleverAge\UiProcessBundle\Scheduler\CronScheduler
public: false
arguments:
- '@cleverage_ui_process.repository.process_schedule'
Expand Down
2 changes: 1 addition & 1 deletion config/services/security.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
cleverage_ui_process.security.http_process_execution_authenticator:
class: CleverAge\ProcessUiBundle\Security\HttpProcessExecutionAuthenticator
class: CleverAge\UiProcessBundle\Security\HttpProcessExecutionAuthenticator
public: false
arguments:
- '@doctrine.orm.entity_manager'
Expand Down
8 changes: 4 additions & 4 deletions config/services/twig.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
services:
cleverage_ui_process.twig.log_level_extension:
class: CleverAge\ProcessUiBundle\Twig\Extension\LogLevelExtension
class: CleverAge\UiProcessBundle\Twig\Extension\LogLevelExtension
public: false
tags:
- { name: 'twig.extension' }

cleverage_ui_process.twig.md5_extension:
class: CleverAge\ProcessUiBundle\Twig\Extension\MD5Extension
class: CleverAge\UiProcessBundle\Twig\Extension\MD5Extension
public: false
tags:
- { name: 'twig.extension' }

cleverage_ui_process.twig.process_execution_extension:
class: CleverAge\ProcessUiBundle\Twig\Extension\ProcessExecutionExtension
class: CleverAge\UiProcessBundle\Twig\Extension\ProcessExecutionExtension
public: false
tags:
- { name: 'twig.extension' }

cleverage_ui_process.twig.process_execution_extension_runtime:
class: CleverAge\ProcessUiBundle\Twig\Runtime\ProcessExecutionExtensionRuntime
class: CleverAge\UiProcessBundle\Twig\Runtime\ProcessExecutionExtensionRuntime
public: false
arguments:
- '@cleverage_ui_process.repository.process_execution'
Expand Down
6 changes: 3 additions & 3 deletions config/services/validator.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
services:
cleverage_ui_process.validator.cron_expression_validator:
class: CleverAge\ProcessUiBundle\Validator\CronExpressionValidator
class: CleverAge\UiProcessBundle\Validator\CronExpressionValidator
public: false
tags:
- { name: 'validator.constraint_validator' }

cleverage_ui_process.validator.every_expression_validator:
class: CleverAge\ProcessUiBundle\Validator\EveryExpressionValidator
class: CleverAge\UiProcessBundle\Validator\EveryExpressionValidator
public: false
tags:
- { name: 'validator.constraint_validator' }

cleverage_ui_process.validator.is_valid_process_code:
class: CleverAge\ProcessUiBundle\Validator\IsValidProcessCodeValidator
class: CleverAge\UiProcessBundle\Validator\IsValidProcessCodeValidator
public: false
tags:
- { name: 'validator.constraint_validator' }
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ CleverAge\UiProcessBundle\CleverAgeUiProcessBundle::class => ['all' => true],

```yaml
ui-process-bundle:
resource: '@CleverAgeProcessUiBundle/src/Controller'
resource: '@CleverAgeUiProcessBundle/src/Controller'
type: attribute
```
* Run doctrine migration
* Create a user using `cleverage:ui-process:user-create` console.

Now you can access Process UI via http://your-domain.com/process
Now you can access UI Process via http://your-domain.com/process

## Features

### Launch process via http request
You can launch a process via http post request
First you need to generate a token via UI User edit form. The ProcessUi generate for you a auth token (keep it in secured area, it will display once).
First you need to generate a token via UI User edit form. The UiProcess generate for you a auth token (keep it in secured area, it will display once).

That's all, now you can launch a process via http post request

Expand Down
4 changes: 2 additions & 2 deletions src/Admin/Field/EnumField.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* file that was distributed with this source code.
*/

namespace CleverAge\ProcessUiBundle\Admin\Field;
namespace CleverAge\UiProcessBundle\Admin\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait;
Expand All @@ -25,6 +25,6 @@ public static function new(string $propertyName, ?string $label = null): self
return (new self())
->setProperty($propertyName)
->setLabel($label)
->setTemplatePath('@CleverAgeProcessUi/admin/field/enum.html.twig');
->setTemplatePath('@CleverAgeUiProcess/admin/field/enum.html.twig');
}
}
4 changes: 2 additions & 2 deletions src/Admin/Field/LogLevelField.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* file that was distributed with this source code.
*/

namespace CleverAge\ProcessUiBundle\Admin\Field;
namespace CleverAge\UiProcessBundle\Admin\Field;

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait;
Expand All @@ -25,6 +25,6 @@ public static function new(string $propertyName, ?string $label = null): self
return (new self())
->setProperty($propertyName)
->setLabel($label)
->setTemplatePath('@CleverAgeProcessUi/admin/field/log_level.html.twig');
->setTemplatePath('@CleverAgeUiProcess/admin/field/log_level.html.twig');
}
}
2 changes: 1 addition & 1 deletion src/Admin/Filter/LogProcessFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* file that was distributed with this source code.
*/

namespace CleverAge\ProcessUiBundle\Admin\Filter;
namespace CleverAge\UiProcessBundle\Admin\Filter;

use Doctrine\ORM\QueryBuilder;
use EasyCorp\Bundle\EasyAdminBundle\Contracts\Filter\FilterInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
* file that was distributed with this source code.
*/

namespace CleverAge\ProcessUiBundle;
namespace CleverAge\UiProcessBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class CleverAgeProcessUiBundle extends Bundle
class CleverAgeUiProcessBundle extends Bundle
{
public function getPath(): string
{
Expand Down
6 changes: 3 additions & 3 deletions src/Command/UserCreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* file that was distributed with this source code.
*/

namespace CleverAge\ProcessUiBundle\Command;
namespace CleverAge\UiProcessBundle\Command;

use CleverAge\ProcessUiBundle\Entity\User;
use CleverAge\UiProcessBundle\Entity\User;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
Expand All @@ -31,7 +31,7 @@

#[AsCommand(
name: 'cleverage:ui-process:user-create',
description: 'Command to create a new admin into database for process ui.'
description: 'Command to create a new admin into database for ui process.'
)]
class UserCreateCommand extends Command
{
Expand Down
12 changes: 6 additions & 6 deletions src/Controller/Admin/LogRecordCrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
* file that was distributed with this source code.
*/

namespace CleverAge\ProcessUiBundle\Controller\Admin;
namespace CleverAge\UiProcessBundle\Controller\Admin;

use CleverAge\ProcessBundle\Configuration\ProcessConfiguration;
use CleverAge\ProcessUiBundle\Admin\Field\LogLevelField;
use CleverAge\ProcessUiBundle\Admin\Filter\LogProcessFilter;
use CleverAge\ProcessUiBundle\Entity\LogRecord;
use CleverAge\ProcessUiBundle\Manager\ProcessConfigurationsManager;
use CleverAge\UiProcessBundle\Admin\Field\LogLevelField;
use CleverAge\UiProcessBundle\Admin\Filter\LogProcessFilter;
use CleverAge\UiProcessBundle\Entity\LogRecord;
use CleverAge\UiProcessBundle\Manager\ProcessConfigurationsManager;
use EasyCorp\Bundle\EasyAdminBundle\Config\Action;
use EasyCorp\Bundle\EasyAdminBundle\Config\Actions;
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
Expand Down Expand Up @@ -53,7 +53,7 @@ public function configureFields(string $pageName): iterable
TextField::new('message')->setMaxLength(512),
DateTimeField::new('createdAt')->setFormat('Y/M/dd H:mm:ss'),
ArrayField::new('context')
->setTemplatePath('@CleverAgeProcessUi/admin/field/array.html.twig')
->setTemplatePath('@CleverAgeUiProcess/admin/field/array.html.twig')
->onlyOnDetail(),
BooleanField::new('contextIsEmpty', 'Has context info ?')
->onlyOnIndex()
Expand Down
12 changes: 6 additions & 6 deletions src/Controller/Admin/Process/LaunchAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
* file that was distributed with this source code.
*/

namespace CleverAge\ProcessUiBundle\Controller\Admin\Process;
namespace CleverAge\UiProcessBundle\Controller\Admin\Process;

use CleverAge\ProcessBundle\Configuration\ProcessConfiguration;
use CleverAge\ProcessUiBundle\Entity\User;
use CleverAge\ProcessUiBundle\Form\Type\LaunchType;
use CleverAge\ProcessUiBundle\Manager\ProcessConfigurationsManager;
use CleverAge\ProcessUiBundle\Message\ProcessExecuteMessage;
use CleverAge\UiProcessBundle\Entity\User;
use CleverAge\UiProcessBundle\Form\Type\LaunchType;
use CleverAge\UiProcessBundle\Manager\ProcessConfigurationsManager;
use CleverAge\UiProcessBundle\Message\ProcessExecuteMessage;
use EasyCorp\Bundle\EasyAdminBundle\Config\Asset;
use EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
Expand Down Expand Up @@ -95,7 +95,7 @@ public function __invoke(
$context->getAssets()->addJsAsset(Asset::fromEasyAdminAssetPackage('field-collection.js')->getAsDto());

return $this->render(
'@CleverAgeProcessUi/admin/process/launch.html.twig',
'@CleverAgeUiProcess/admin/process/launch.html.twig',
[
'form' => $form->createView(),
]
Expand Down
6 changes: 3 additions & 3 deletions src/Controller/Admin/Process/ListAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* file that was distributed with this source code.
*/

namespace CleverAge\ProcessUiBundle\Controller\Admin\Process;
namespace CleverAge\UiProcessBundle\Controller\Admin\Process;

use CleverAge\ProcessUiBundle\Manager\ProcessConfigurationsManager;
use CleverAge\UiProcessBundle\Manager\ProcessConfigurationsManager;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
Expand All @@ -26,7 +26,7 @@ class ListAction extends AbstractController
public function __invoke(ProcessConfigurationsManager $processConfigurationsManager): Response
{
return $this->render(
'@CleverAgeProcessUi/admin/process/list.html.twig',
'@CleverAgeUiProcess/admin/process/list.html.twig',
[
'processes' => $processConfigurationsManager->getPublicProcesses(),
]
Expand Down
8 changes: 4 additions & 4 deletions src/Controller/Admin/Process/UploadAndExecuteAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
* file that was distributed with this source code.
*/

namespace CleverAge\ProcessUiBundle\Controller\Admin\Process;
namespace CleverAge\UiProcessBundle\Controller\Admin\Process;

use CleverAge\ProcessBundle\Configuration\ProcessConfiguration;
use CleverAge\ProcessBundle\Configuration\TaskConfiguration;
use CleverAge\ProcessUiBundle\Form\Type\ProcessUploadFileType;
use CleverAge\ProcessUiBundle\Message\ProcessExecuteMessage;
use CleverAge\UiProcessBundle\Form\Type\ProcessUploadFileType;
use CleverAge\UiProcessBundle\Message\ProcessExecuteMessage;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpFoundation\File\UploadedFile;
Expand Down Expand Up @@ -72,7 +72,7 @@ public function __invoke(
}

return $this->render(
'@CleverAgeProcessUi/admin/process/upload_and_execute.html.twig',
'@CleverAgeUiProcess/admin/process/upload_and_execute.html.twig',
[
'form' => $form->createView(),
]
Expand Down
Loading

0 comments on commit ac7806b

Please sign in to comment.