2025-07-08 15:59:04 +02:00

75 lines
2.8 KiB
Markdown

## v4.0.0 - 2025-07-08
### Feature
* ([#359](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/359)) Allow the merge of two accompanying period works
### Fixed
* ([#390](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/390)) Display the list of participant in the results, even if there is only one participant and that the search result display the requestor
* Fix admin entity edit actions for event admin entities and activity reason (category) entities
* Fix translations for social action fields in admin form: results, goals, evaluations
### DX
* Rewrite exports to run them asynchronously
**Schema Change**: Add columns or tables
* Allow TranslatableMessage in flash messages
### UX
* Improve labeling of fields in person resource creation form
**Release notes**
- Add new methods to serialize data using the rector rule
- Remove all references to the Request in filters, aggregators, filters. Actually, the most frequent occurence is `$security->getUser()`.
- Refactor manually the initializeQuery method
- Remove the injection of ExportManager into the constructor of each export element:
```diff
- class MyFormatter implements FormatterInterface
+ class MyFormatter implements FormatterInterface, \Chill\MainBundle\Export\ExportManagerAwareInterface
{
+ use \Chill\MainBundle\Export\Helper\ExportManagerAwareTrait;
- public function __construct(private ExportManager $exportmanager) {}
public function MyMethod(): void
{
- $this->exportManager->getFilter('alias');
+ $this->getExportManager()->getFilter('alias');
}
}
```
- configure messenger to handle export in a queue:
```diff
# config/packages/messenger.yaml
framework:
messenger:
routing:
+ 'Chill\MainBundle\Export\Messenger\ExportRequestGenerationMessage': priority
```
- add missing methods to exports, aggregators, filters, formatter:
```php
public function normalizeFormData(array $formData): array;
public function denormalizeFormData(array $formData, int $fromVersion): array;
```
There are rector rules to generate those methods:
- `Chill\Utils\Rector\Rector\ChillBundleAddNormalizationMethodsOnExportRector`
See:
```php
// upgrade chill exports
$rectorConfig->rules([\Chill\Utils\Rector\Rector\ChillBundleAddNormalizationMethodsOnExportRector::class]);
```
This rule will create most of the work necessary, but some manuals changes are still necessary:
- we must set manually the correct repository for method `denormalizeDoctrineEntity`;
- when the form data contains some entities, and the form type is not one of EntityType::class, PickUserDynamicType::class, PickUserLocationType::class, PickThirdpartyDynamicType::class, Select2CountryType::class, then we must handle the normalization manually (using the `\Chill\MainBundle\Export\ExportDataNormalizerTrait`)