docs: Doctrine section with Doctrine Behaviors and Doctrine Helper (uk + en)
en/docs/doctrine/doctrine-behaviors/known_issues/fixed.md
new file +17
ā0
1
+
# Fixed issues
2
+
3
+
Bugs from previous versions and the version in which they were fixed. Open issues are on the [Open issues](/docs/doctrine/doctrine-behaviors/known_issues/open) page.
4
+
5
+
<include>(.issues/typed-properties-uninitialized.md)
6
+
7
+
---
8
+
9
+
<include>(.issues/security-bundle-undeclared.md)
10
+
11
+
---
12
+
13
+
<include>(.issues/timestampable-uninitialized.md)
14
+
15
+
---
16
+
17
+
<include>(.issues/translatable-merge-cascade.md)
en/docs/doctrine/doctrine-behaviors/known_issues/.issues/typed-properties-uninitialized.md
new file +15
ā0
1
+
### `Typed property ⦠must not be accessed before initialization` in Blameable, Sluggable, SoftDeletable, Uuidable
2
+
3
+
:::success subtitle="Fixed in 2.0.0"
4
+
Affected versions: 1.0.1 ā 1.0.4.
5
+
:::
6
+
7
+
**Symptom.** `Error: Typed property App\Entity\X::$⦠must not be accessed before initialization`:
8
+
9
+
* Sluggable, Uuidable ā on `persist()` of a new entity (`generateSlug()`, `generateUuid()`);
10
+
* Blameable ā on `persist()` of a new entity when there is a user (`getCreatedBy()`), on `remove()` (`getDeletedBy()`), and for loaded entities with `NULL` in the column;
11
+
* SoftDeletable ā `isDeleted()` / `getDeletedAt()` of a new entity.
12
+
13
+
**Cause.** In 1.0.1 the trait properties became typed without default values (`protected string $slug;`, `protected UuidInterface|string|null $uuid;` etc.), and the methods read them before initialization.
14
+
15
+
**Fix.** In 2.0.0 the properties got default values (`null`, `''` for `slug`), Blameable a nullable type. On 1.0.x, for Sluggable, Uuidable and SoftDeletable you can initialize the properties in the entity constructor (`$this->slug = ''`, `$this->uuid = null`, `$this->deletedAt = null`); for Blameable ā use `BlameableMethodsTrait` and declare `createdBy` / `updatedBy` / `deletedBy` yourself with a nullable type.
en/docs/doctrine/doctrine-behaviors/known_issues/.issues/security-bundle-undeclared.md
new file +11
ā0
1
+
### The package did not declare the `symfony/security-bundle` dependency
2
+
3
+
:::success subtitle="Fixed in 2.0.0"
4
+
Affected versions: 1.0.0 ā 1.0.4.
5
+
:::
6
+
7
+
**Symptom.** In an application without `symfony/security-bundle` the container does not build: the `Ufo\DoctrineBehaviors\Provider\UserProvider` service cannot be autowired.
8
+
9
+
**Cause.** `UserProvider` depends on `Symfony\Bundle\SecurityBundle\Security`, while `composer.json` required only `symfony/security-core`.
10
+
11
+
**Fix.** In 2.0.0 `symfony/security-bundle` was added to `require`. On 1.0.x ā install it in the application.
en/docs/doctrine/doctrine-behaviors/known_issues/.issues/timestampable-uninitialized.md
new file +11
ā0
1
+
### Timestampable: error when saving a new entity
2
+
3
+
:::success subtitle="Fixed in 1.0.3"
4
+
Affected versions: 1.0.1 ā 1.0.2.
5
+
:::
6
+
7
+
**Symptom.** `persist()` + `flush()` of a new entity with `TimestampableTrait` ends with `Error: Typed property ā¦::$createdAt must not be accessed before initialization`.
8
+
9
+
**Cause.** `protected DateTimeInterface $createdAt;` has no default value, while `updateTimestamps()` checks `$this->createdAt === null`.
10
+
11
+
**Fix.** The properties are `?DateTimeInterface` with a `null` default ([PR #1](https://github.com/UFO-Tech/DoctrineBehaviors/pull/1)).
en/docs/doctrine/doctrine-behaviors/known_issues/.issues/translatable-merge-cascade.md
new file +11
ā0
1
+
### Translatable: invalid `merge` cascade in ORM 3
2
+
3
+
:::success subtitle="Fixed in 1.0.2"
4
+
Affected versions: 1.0.0 ā 1.0.1.
5
+
:::
6
+
7
+
**Symptom.** When loading metadata of entities with `TranslatableInterface` / `TranslationInterface`, Doctrine ORM 3 throws a `MappingException` about the invalid cascade option `merge`.
8
+
9
+
**Cause.** `TranslatableEventSubscriber` mapped the `translations` and `translatable` relations with `cascade: ['persist', 'merge', ā¦]`; ORM 3 allows only `persist`, `remove`, `refresh`, `detach`.
10
+
11
+
**Fix.** The `merge` cascade was removed.