DoctrineExtension/Sortable bug: cannot handle doctrine proxies properly
- Dominant language
- PHP
- Stars
- 156
- Forks
- 72
- Avg merge
- 12h 43m
- Merged PRs (30d)
- 203
Description
DoctrineExtension/Sortable triggers an error when rootContentNode is configured with orphanRemoval:true
```php
#[ORM\OneToOne(targetEntity: ColumnLayout::class, cascade: ['persist'], orphanRemoval: true)]
#[ORM\JoinColumn(nullable: false, unique: true)]
public ?ColumnLayout $rootContentNode = null;
```
Bug is registered in upstream repo: https://github.com/doctrine-extensions/DoctrineExtensions/issues/2510
Workaround currently implemented in https://github.com/ecamp/ecamp3/pull/2825/commits/22231efa27c74ea042c93fd3689cd934739e6385:
- no automatic orphanRemoval
- in data persisters, rootContentNodes are now manually loadend + removed (when deleting Activity, Category or Camp)
Sustainable solution:
- fix bug in upstream
- or get rid of Sortable
Contributor guide
Assessment
This issue has not been assessed yet.