Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
15c538b
#40 - Mise à jour de la configuration pour PHP 8.5 et ajustements divers
xaviermarchegay Dec 9, 2025
aaa3ed4
#40 - update template syntax for compatibility with EasyAdmin 4
xaviermarchegay Dec 9, 2025
2d7a4cf
#40 - add EasyAdmin routes configuration file
xaviermarchegay Dec 9, 2025
7de4e8f
#40 - Mise à jour du code pour prendre en compte symfony 6, 7 et 8
xaviermarchegay Jan 12, 2026
a27635f
#40 - Mise à jour de la configuration des workflows pour PHP 8.5 et S…
xaviermarchegay Jan 12, 2026
3941542
#40 - Mise à jour de la version de doctrine-fixtures-bundle pour incl…
xaviermarchegay Jan 12, 2026
c225063
#40 - fix autowiring easyadmin
xaviermarchegay Feb 9, 2026
6620f2b
#40 - fix autowiring easyadmin
xaviermarchegay Feb 9, 2026
b8ffaa4
#40 - fix default options
xaviermarchegay Feb 9, 2026
bc008b2
Refactor LaunchAction to inject AdminContext as a method parameter
xaviermarchegay Feb 10, 2026
1ad75c1
fix: update process code retrieval from request query
xaviermarchegay Feb 10, 2026
0c03d26
#40 - add getter to fetch the process execution
xaviermarchegay Feb 17, 2026
7053342
#40 - linter
xaviermarchegay Feb 17, 2026
13995fb
#40 - fix injection admincontext
xaviermarchegay Feb 17, 2026
52829c9
#40 - fix monolog
xaviermarchegay Feb 17, 2026
938dda0
#40 - upgrade to EA 5
xaviermarchegay Apr 15, 2026
d50bc9e
#40 - fix php-cs-fixer
xaviermarchegay Apr 15, 2026
23ac5ec
#40 - add admin routes for showing and downloading logs; update log c…
xaviermarchegay Apr 16, 2026
6ee908c
#40 - fix easyadmin upgrade
xaviermarchegay Jun 29, 2026
4abff5a
#40 - linter
xaviermarchegay Jun 29, 2026
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
5 changes: 2 additions & 3 deletions .docker/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.4-fpm-alpine
FROM php:8.5-fpm-alpine

ARG UID
ARG GID
Expand All @@ -13,8 +13,7 @@ RUN apk update && apk add \
bash \
icu-dev \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl opcache \
&& docker-php-ext-enable opcache
&& docker-php-ext-install intl

RUN ln -s /usr/share/zoneinfo/Europe/Paris /etc/localtime \
&& sed -i "s/^;date.timezone =.*/date.timezone = Europe\/Paris/" $PHP_INI_DIR/php.ini
Expand Down
44 changes: 32 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ jobs:
- '8.2'
- '8.3'
- '8.4'
dependencies: [highest]
- '8.5'
dependencies: [highest, lowest]
allowed-to-fail: [false]
symfony-require: ['']
variant: [normal]
include:
- php-version: '8.1'
dependencies: highest
- php-version: '8.2'
dependencies: lowest
allowed-to-fail: false
symfony-require: 6.4.*
variant: symfony/symfony:"6.4.*"
Expand All @@ -41,8 +42,8 @@ jobs:
- php-version: '8.2'
dependencies: highest
allowed-to-fail: false
symfony-require: 7.3.*
variant: symfony/symfony:"7.3.*"
symfony-require: 7.4.*
variant: symfony/symfony:"7.4.*"
- php-version: '8.3'
dependencies: highest
allowed-to-fail: false
Expand All @@ -51,8 +52,8 @@ jobs:
- php-version: '8.3'
dependencies: highest
allowed-to-fail: false
symfony-require: 7.3.*
variant: symfony/symfony:"7.3.*"
symfony-require: 7.4.*
variant: symfony/symfony:"7.4.*"
- php-version: '8.4'
dependencies: highest
allowed-to-fail: false
Expand All @@ -61,12 +62,31 @@ jobs:
- php-version: '8.4'
dependencies: highest
allowed-to-fail: false
symfony-require: 7.3.*
variant: symfony/symfony:"7.3.*"

symfony-require: 7.4.*
variant: symfony/symfony:"7.4.*"
- php-version: '8.4'
dependencies: highest
allowed-to-fail: false
symfony-require: 8.*
variant: symfony/symfony:"8.*"
- php-version: '8.5'
dependencies: highest
allowed-to-fail: false
symfony-require: 6.4.*
variant: symfony/symfony:"6.4.*"
- php-version: '8.5'
dependencies: highest
allowed-to-fail: false
symfony-require: 7.4.*
variant: symfony/symfony:"7.4.*"
- php-version: '8.5'
dependencies: highest
allowed-to-fail: false
symfony-require: 8.*
variant: symfony/symfony:"8.*"
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
Expand All @@ -87,4 +107,4 @@ jobs:
#- name: Send coverage to Codecov
# uses: codecov/codecov-action@v4
# with:
# files: build/logs/clover.xml
# files: build/logs/clover.xml
8 changes: 5 additions & 3 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

/*
* This file is part of the CleverAge/UiProcessBundle package.
*
Expand All @@ -24,9 +26,8 @@

return (new PhpCsFixer\Config())
->setRules([
'@PHP71Migration' => true,
'@PHP82Migration' => true,
'@PHPUnit75Migration:risky' => true,
'@PHP8x2Migration' => true,
'@PHPUnit7x5Migration:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'@DoctrineAnnotation' => true,
Expand All @@ -35,6 +36,7 @@
'header_comment' => ['header' => $fileHeaderComment],
'modernize_strpos' => true,
'get_class_to_class_keyword' => true,
'declare_strict_types' => true,
])
->setRiskyAllowed(true)
->setFinder(
Expand Down
48 changes: 24 additions & 24 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{
"name": "Xavier Marchegay",
"email": "xmarchegay@clever-age.com",
"role": "Developer"
"role": "Lead Developer"
}
],
"autoload": {
Expand All @@ -36,41 +36,41 @@
}
},
"require": {
"php": ">=8.1",
"php": ">=8.2",
"ext-ctype": "*",
"ext-iconv": "*",
"cleverage/process-bundle": "^4.0",
"doctrine/common": "^3.0",
"doctrine/dbal": "^2.9 || ^3.0",
"doctrine/doctrine-bundle": "^2.5",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.9 || ^3.0",
"dragonmantank/cron-expression": "^3.4",
"easycorp/easyadmin-bundle": "^4.8",
"symfony/doctrine-messenger": "^6.4|^7.3",
"symfony/dotenv": "^6.4|^7.3",
"symfony/messenger": "^6.4|^7.3",
"symfony/runtime": "^6.4|^7.3",
"symfony/scheduler": "^6.4|^7.3",
"symfony/string": "^6.4|^7.3",
"symfony/uid": "^6.4|^7.3"
"cleverage/process-bundle": "^5.0",
"doctrine/common": "^3.5",
"doctrine/dbal": "^3.10 || ^4.4",
"doctrine/doctrine-bundle": "^2.18 || ^3.1",
"doctrine/doctrine-migrations-bundle": "^3.7 || ^4",
"doctrine/orm": "^2.20 || ^3.5",
"dragonmantank/cron-expression": "^3.6",
"easycorp/easyadmin-bundle": "^5",
"symfony/doctrine-messenger": "^6.4 || ^7.4 || ^8",
"symfony/dotenv": "^6.4 || ^7.4 || ^8",
"symfony/messenger":"^6.4 || ^7.4 || ^8",
"symfony/runtime": "^6.4 || ^7.4 || ^8",
"symfony/scheduler": "^6.4 || ^7.4 || ^8",
"symfony/string":"^6.4 || ^7.4 || ^8",
"symfony/uid": "^6.4 || ^7.4 || ^8"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.4",
"doctrine/doctrine-fixtures-bundle": "^3 || ^4",
"friendsofphp/php-cs-fixer": "*",
"phpstan/extension-installer": "*",
"phpstan/phpstan": "*",
"phpstan/phpstan-doctrine": "*",
"phpstan/phpstan-symfony": "*",
"phpunit/phpunit": "<10.0",
"phpunit/phpunit": "*",
"rector/rector": "*",
"roave/security-advisories": "dev-latest",
"symfony/browser-kit": "^6.4|^7.3",
"symfony/css-selector": "^6.4|^7.3",
"symfony/debug-bundle": "^6.4|^7.3",
"symfony/browser-kit": "^6.4 || ^7.4 || ^8",
"symfony/css-selector": "^6.4 || ^7.4 || ^8",
"symfony/debug-bundle": "^6.4 || ^7.4 || ^8",
"symfony/maker-bundle": "^1.31",
"symfony/web-profiler-bundle": "^6.4|^7.3",
"vincentlanglet/twig-cs-fixer": "^3.3"
"symfony/web-profiler-bundle": "^6.4 || ^7.4 || ^8",
"vincentlanglet/twig-cs-fixer": "^3.11"
},
"conflict": {
"symfony/twig-bridge": "7.2.0",
Expand Down
3 changes: 3 additions & 0 deletions config/routes/easyadmin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
easyadmin:
resource: .
type: easyadmin.routes
21 changes: 8 additions & 13 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/12.0/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheResultFile=".phpunit.cache/test-results"
cacheDirectory=".phpunit.cache"
executionOrder="depends,defects"
forceCoversAnnotation="true"
beStrictAboutCoversAnnotation="true"
requireCoverageMetadata="true"
beStrictAboutCoverageMetadata="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
convertDeprecationsToExceptions="true"
failOnRisky="true"
failOnWarning="true"
verbose="true">
failOnWarning="true">
<testsuites>
<testsuite name="default">
<directory>tests</directory>
</testsuite>
</testsuites>

<coverage cacheDirectory=".phpunit.cache/code-coverage"
processUncoveredFiles="true">
<source>
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
</phpunit>
</source>
</phpunit>
6 changes: 3 additions & 3 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
use Rector\ValueObject\PhpVersion;

return RectorConfig::configure()
->withPhpVersion(PhpVersion::PHP_84)
->withPhpVersion(PhpVersion::PHP_85)
->withPaths([
__DIR__.'/src',
__DIR__.'/tests',
])
->withPhpSets(php81: true)
->withPhpSets(php82: true)
// here we can define, what prepared sets of rules will be applied
->withComposerBased(doctrine: true)
->withPreparedSets(deadCode: true, codeQuality: true, doctrineCodeQuality: true, symfonyCodeQuality: true)
->withAttributesSets(symfony: true, doctrine: true)
->withSets([
LevelSetList::UP_TO_PHP_81,
LevelSetList::UP_TO_PHP_82,
SymfonySetList::SYMFONY_64,
SymfonySetList::SYMFONY_CODE_QUALITY,
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
Expand Down
3 changes: 2 additions & 1 deletion src/Admin/Field/ContextField.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait;
use Symfony\Contracts\Translation\TranslatableInterface;

class ContextField implements FieldInterface
{
use FieldTrait;

public static function new(string $propertyName, ?string $label = null): self
public static function new(string $propertyName, TranslatableInterface|string|bool|null $label = null): self
{
return (new self())
->setProperty($propertyName)
Expand Down
3 changes: 2 additions & 1 deletion src/Admin/Field/EnumField.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait;
use Symfony\Contracts\Translation\TranslatableInterface;

class EnumField implements FieldInterface
{
use FieldTrait;

public static function new(string $propertyName, ?string $label = null): self
public static function new(string $propertyName, TranslatableInterface|string|bool|null $label = null): self
{
return (new self())
->setProperty($propertyName)
Expand Down
3 changes: 2 additions & 1 deletion src/Admin/Field/LogLevelField.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@

use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface;
use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait;
use Symfony\Contracts\Translation\TranslatableInterface;

class LogLevelField implements FieldInterface
{
use FieldTrait;

public static function new(string $propertyName, ?string $label = null): self
public static function new(string $propertyName, TranslatableInterface|string|bool|null $label = null): self
{
return (new self())
->setProperty($propertyName)
Expand Down
1 change: 1 addition & 0 deletions src/CleverAgeUiProcessBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

class CleverAgeUiProcessBundle extends Bundle
{
#[\Override]
public function getPath(): string
{
return \dirname(__DIR__);
Expand Down
8 changes: 6 additions & 2 deletions src/Controller/Admin/LogRecordCrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public static function getEntityFqcn(): string
return LogRecord::class;
}

#[\Override]
public function configureFields(string $pageName): iterable
{
return [
Expand All @@ -65,11 +66,13 @@ public function configureFields(string $pageName): iterable
];
}

#[\Override]
public function configureCrud(Crud $crud): Crud
{
return $crud->showEntityActionsInlined()->setPaginatorPageSize(250);
}

#[\Override]
public function configureActions(Actions $actions): Actions
{
return Actions::new()
Expand All @@ -85,19 +88,20 @@ public function configureActions(Actions $actions): Actions
->add(Crud::PAGE_DETAIL, 'index');
}

#[\Override]
public function configureFilters(Filters $filters): Filters
{
$id = $this->requestStack->getMainRequest()?->query->all('filters')['process']['value'] ?? null;
$processList = $this->processConfigurationsManager->getPublicProcesses();
$processList = array_map(fn (ProcessConfiguration $cfg) => $cfg->getCode(), $processList);
$processList = array_map(static fn (ProcessConfiguration $cfg) => $cfg->getCode(), $processList);

return $filters->add(
LogProcessFilter::new('Process', $processList, $id)
)->add(
ChoiceFilter::new('level')
->setTranslatableChoices(array_combine(
Level::VALUES,
array_map(fn ($value) => 'enum.log_level.'.strtolower((string) $value), Level::NAMES)
array_map(static fn ($value) => 'enum.log_level.'.strtolower((string) $value), Level::NAMES)
))
->setFormTypeOption('translation_domain', 'enums'),
)->add('message')->add('context')->add('createdAt');
Expand Down
Loading
Loading