Skip to content

Releases: AppsDevTeam/doctrine-forms

v2.4.1: Revert "Prevents overwriting existing relations"

01 Feb 11:30

Choose a tag to compare

This reverts commit e527f44aa1c8225db69e594855ea4946da0be35a.

v2.4.0: Prevents overwriting existing relations

22 Jan 11:01

Choose a tag to compare

Ensures that existing related entities are not overwritten when mapping form data to entities, specifically in to-many relationships.

It first checks if a component within the container represents a single identifier field. If it does, it attempts to find an existing entity using the identifier's value. Only if no such entity is found, a new entity is created. This prevents the creation of duplicate entities and ensures that existing relationships are maintained.

v2.3.2: Prevents duplicate entities in to-many collections

14 Jan 12:35

Choose a tag to compare

Ensures that entities are not added to to-many collections multiple times.

This prevents issues where the setter within `createEntity` might
automatically add the entity to the collection, leading to duplicates.

v2.3.1: Skips new entities in to-many relation deletion

10 Jan 13:45

Choose a tag to compare

Prevents attempting to delete new entities in to-many relations.
These entities are not yet persisted and should not be considered
for deletion.

v2.3.0: Adds deleted collection entity listener

10 Jan 13:13

Choose a tag to compare

Adds a listener to handle deletion of entities in to-many collections.

This change introduces a mechanism to properly delete entities
that are removed from a to-many collection during form processing.
It ensures that orphaned entities are removed from the database,
preventing data inconsistencies. It finds the instance of the listener if exists and calls its addDeletedEntity method to persist a deleted entity.
Also, the onAfterMapToForm method in BaseForm is updated to pass the entity to the event.

v2.2.3: Invokes initEntity with form values

04 Nov 06:51

Choose a tag to compare

Ensures that the `initEntity` method receives form values when it is invoked. This allows the method to use the form data to further initialize the entity.

v2.2.2: Improves Doctrine forms and entity handling

01 Nov 12:03

Choose a tag to compare

Updates dependencies, including PHP version and doctrine-components.

Refactors BaseForm and related interfaces to enhance entity handling and type safety, utilizing ADT\DoctrineComponents\Entities\Entity where appropriate.

Enhances overall robustness and maintainability of the Doctrine forms functionality.

v2.2.1: Adds BaseFormInterface

03 Oct 11:52

Choose a tag to compare

Introduces BaseFormInterface to define contract for form base classes.

This interface standardizes form initialization and entity mapping
processes, ensuring consistency and facilitating extension.

v2.2.0: Allows mapping to a different entity

14 Sep 07:28

Choose a tag to compare

The `mapToEntity` function now accepts an optional entity parameter.
This enables mapping form data to an entity other than the one
initially associated with the form, providing greater flexibility
in data handling.

v2.1.7: Handles entity creation and persistence

04 Jun 09:14

Choose a tag to compare

Streamlines entity creation by allowing either a callable or a 'createEntity' method to be used.

Ensures the entity is persisted after creation and initialization, improving data management.