Skip to content

Conversation

Korbeil
Copy link
Contributor

@Korbeil Korbeil commented Jan 20, 2021

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tickets ???
License MIT
Doc PR api-platform/docs#...

I had some issues to understand this error with some entities that have a lot of sub-entities. To make this easier to understand, just add the resource to the exception and it became way easier 😄

Copy link
Member

@alanpoulain alanpoulain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible, can you modify the CHANGELOG too?
It will be merged after the 2.6 release.

@alanpoulain
Copy link
Member

It seems test failures are related.

@Korbeil Korbeil force-pushed the better-exception branch 2 times, most recently from 100a9c2 to 94af267 Compare January 20, 2021 11:15
@Korbeil Korbeil changed the title [UX] Better Doctrine exceptions [DoctrineBridge][UX] Better Doctrine exceptions Jan 20, 2021
@Korbeil Korbeil force-pushed the better-exception branch 3 times, most recently from 54ceb14 to 4744153 Compare January 20, 2021 13:31
@Korbeil Korbeil force-pushed the better-exception branch 4 times, most recently from 29406ba to 6940916 Compare January 20, 2021 16:51
Base automatically changed from master to main January 23, 2021 21:59
@alanpoulain
Copy link
Member

After some thinking, shouldn't we just use:

(new \ReflectionClass($resourceClass))->getShortName();

instead of introducing a new dependency?

@Korbeil
Copy link
Contributor Author

Korbeil commented Feb 15, 2021

After some thinking, shouldn't we just use:

(new \ReflectionClass($resourceClass))->getShortName();

instead of introducing a new dependency?

Since we can modify resource short-name, it's possible it won't be the same as given in related resource. I think we need this dependency here.

@alanpoulain alanpoulain merged commit e68be3b into api-platform:main Feb 16, 2021
@alanpoulain
Copy link
Member

Thank you @Korbeil.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants