diff --git a/.changes/unreleased/DX-20250401-144728.yaml b/.changes/unreleased/DX-20250401-144728.yaml deleted file mode 100644 index a08ba1760..000000000 --- a/.changes/unreleased/DX-20250401-144728.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: DX -body: Allow TranslatableMessage in flash messages -time: 2025-04-01T14:47:28.814268801+02:00 -custom: - Issue: "" - SchemaChange: No schema change diff --git a/.changes/unreleased/DX-20250407-121010.yaml b/.changes/unreleased/DX-20250407-121010.yaml deleted file mode 100644 index 1f8a0496a..000000000 --- a/.changes/unreleased/DX-20250407-121010.yaml +++ /dev/null @@ -1,71 +0,0 @@ -kind: DX -body: | - Rewrite exports to run them asynchronously - -changelog: | - - 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`) - - - - - - - - - time: 2025-04-07T12:10:10.682561327+02:00 -custom: - Issue: "" - SchemaChange: Add columns or tables diff --git a/.changes/unreleased/Feature-20250211-142243.yaml b/.changes/unreleased/Feature-20250211-142243.yaml deleted file mode 100644 index 4f0b25e88..000000000 --- a/.changes/unreleased/Feature-20250211-142243.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Feature -body: Allow the merge of two accompanying period works -time: 2025-02-11T14:22:43.134106669+01:00 -custom: - Issue: "359" - SchemaChange: No schema change diff --git a/.changes/unreleased/Fixed-20250604-165550.yaml b/.changes/unreleased/Fixed-20250604-165550.yaml deleted file mode 100644 index 0544c9402..000000000 --- a/.changes/unreleased/Fixed-20250604-165550.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Fixed -body: Display the list of participant in the results, even if there is only one participant and that the search result display the requestor -time: 2025-06-04T16:55:50.107852336+02:00 -custom: - Issue: "390" - SchemaChange: No schema change diff --git a/.changes/unreleased/Fixed-20250611-164623.yaml b/.changes/unreleased/Fixed-20250611-164623.yaml deleted file mode 100644 index 8bb956c34..000000000 --- a/.changes/unreleased/Fixed-20250611-164623.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Fixed -body: Fix admin entity edit actions for event admin entities and activity reason (category) entities -time: 2025-06-11T16:46:23.113506434+02:00 -custom: - Issue: "" - SchemaChange: No schema change diff --git a/.changes/unreleased/Fixed-20250702-135534.yaml b/.changes/unreleased/Fixed-20250702-135534.yaml deleted file mode 100644 index 75a911301..000000000 --- a/.changes/unreleased/Fixed-20250702-135534.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Fixed -body: 'Fix translations for social action fields in admin form: results, goals, evaluations' -time: 2025-07-02T13:55:34.599050626+02:00 -custom: - Issue: "" - SchemaChange: No schema change diff --git a/.changes/unreleased/UX-20250617-192650.yaml b/.changes/unreleased/UX-20250617-192650.yaml deleted file mode 100644 index 810758b10..000000000 --- a/.changes/unreleased/UX-20250617-192650.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: UX -body: Improve labeling of fields in person resource creation form -time: 2025-06-17T19:26:50.599703116+02:00 -custom: - Issue: "" - SchemaChange: No schema change diff --git a/.changes/v4.0.0.md b/.changes/v4.0.0.md new file mode 100644 index 000000000..6063736a8 --- /dev/null +++ b/.changes/v4.0.0.md @@ -0,0 +1,74 @@ +## 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`) + + diff --git a/CHANGELOG.md b/CHANGELOG.md index a00af6c44..834120aea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,81 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## 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`) + + + ## v3.12.1 - 2025-06-30 ### Fixed * Fix loading of the list of documents