Skip to content

Refresh routes when an entity is created#1038

Merged
dunglas merged 2 commits into
api-platform:2.0from
dunglas:router_resource
Apr 8, 2017
Merged

Refresh routes when an entity is created#1038
dunglas merged 2 commits into
api-platform:2.0from
dunglas:router_resource

Conversation

@dunglas

@dunglas dunglas commented Apr 7, 2017

Copy link
Copy Markdown
Member
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets api-platform/api-platform#268, #1004
License MIT
Doc PR n/a

@dunglas
dunglas force-pushed the router_resource branch 2 times, most recently from af7eda5 to 58c6055 Compare April 7, 2017 13:08
@soyuka

soyuka commented Apr 7, 2017

Copy link
Copy Markdown
Member

I'm wondering, what does this fix? Why do we need this? Has this an impact on performances? I remember an issue on the subject but can't put my hand on it anymore :|

@dunglas

dunglas commented Apr 7, 2017

Copy link
Copy Markdown
Member Author

When you download the distribution and and add an entity you got a 404 error if you don't clear the cache. I need to test if this patch fix this.

@soyuka

soyuka commented Apr 7, 2017

Copy link
Copy Markdown
Member

Hmm, clearing the cache should be the developer's work no? I'm not sure that it's a good idea to do it on the fly.

@dunglas

dunglas commented Apr 8, 2017

Copy link
Copy Markdown
Member Author

@soyuka we already do that (here and in Symfony) in dev mode for everything. It's definitely a bug to miss this specific case.

@dunglas

dunglas commented Apr 8, 2017

Copy link
Copy Markdown
Member Author

I've just tried it on a real world project, and it works as expected.

@dunglas
dunglas merged commit fc27a91 into api-platform:2.0 Apr 8, 2017
@dunglas
dunglas deleted the router_resource branch April 8, 2017 11:06
hoangnd25 pushed a commit to hoangnd25/core that referenced this pull request Feb 23, 2018
Refresh routes when an entity is created
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.

4 participants