-
Notifications
You must be signed in to change notification settings - Fork 76
[POC/WIP] Start with a resource provider #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
return; | ||
} | ||
|
||
foreach ($this->discovery->findBindings('cmf/routes') as $binding) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not so nice to do this every request, we should add some caching here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we eagerly load all the routes in the resource tree into memory? What about depth > 1 routes? e.g. /cms/simple/*/**
This looks awesome :) |
does this block the 2.0 release? can it be added in 2.1 or is it too much of a BC break? |
@dbu it's not a BC break at all, adding new providers isn't a BC break... However, this feature requires Puli. All CMF 2.0 bundles require SonataDoctrinePhpcrAdminBundle 2.0, which requires Puli. So in some way, merging this feature in 2.0 or not, we all have to wait until Puli is stable to release CMF 2.0. |
ah, i thought it replaces the existing providers. great, then no blocker.
i hope we can solve this with the effort by max to move all admins to |
Yeah, but that means releasing CMF 2.0 without any stable admin integration. That seems a bit strange to me. |
not everybody uses/needs sonata admin, i would think, so still better than not releasing a version that works with symfony 3. |
we could also implement the resource repository / resource APIs natively in 2.0 until Puli stable, if we really had to - that would be enough for the tree browser / resource rest use case (although not for this PR which requires discovery etc). |
what do we do with this? is it a blocker for 2.0 or not? |
No, can be easily skipped and moved to 2.1. |
given that we removed puli as it seems not active anymore, i close this. |
Just to play around with fully implementing Puli in CMF 2.0. In the future, I think we can remove all persistence implementations and just only rely on resource (people will configure resource how to handle resources, e.g. with a filesystem, PHPCR, ORM, etc.).
This requires symfony-cmf/resource-bundle#16
Replaces #288. This PR uses Puli discovery to locate resources, this deprecates all basepath stuff (:tada:).
Example Config