symfony / symfony/maker-bundle
Creating a relation to an entity without __toString breaks
Open
Nobody has claimed this yet.
Bug
- Dominant language
- PHP
- Stars
- 3.4k
- Forks
- 427
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 20
Description
Steps to reproduce:
- Create an entity with
make:entity - Create another entity, and give it a relation to the first entity
- run
make:crudfor the entity. - visit
/<enity>/new
You will be presented with the following error.
.
The solution would be, to aks what property should be used to display the other entity, when creating a relation to a entity, not implementing __toString.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with make:entity, a relation, and make:crud, then visit the generated entity's /new page. Trace the generated relation field and determine how its display property should be selected; done means the form works for related entities without __toString.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100