symfony-cmf / resource-bundle Goto Github PK
View Code? Open in Web Editor NEWResource Location for CMF documents based on Puli
Home Page: https://cmf.symfony.com
Resource Location for CMF documents based on Puli
Home Page: https://cmf.symfony.com
As with Sylius prefix with the vendor then the repository type preceded by a slash: doctrine/phpcr-odm
, puli/filesystem
If no repositories have been configured then the following error is given if the "default" is requested:
You have requested a non-existent service "cmf_resource.repository.default".
It should say that:
The CMF currnetly uses basepath
to indicate paths in the CR repository. It would follow then that we use basedir
to indicate filesystem paths. But I generally think we should always use underscores - base_path
and base_dir
.
Use resource-name instead of resource-alias in this bundle.
Currently the functional tests for PHPCR-ODM and PHPCR are in the other bundle. We should move them here.
Should the repository registry use a configured default if null
is given as the repository name?
The Doctrine connection registry would behave like this.
It would make more sense for the configuration to be:
repository:
repository_1:
type: doctrine_phpcr_odm
basepath: /foo/bar
repository_2:
type: filesystem
basedir: /tmp/foo
Rather than the somewhat inverted:
repository:
doctrine_phpcr_odm:
repository_1:
basepath: /foo/bar
The reason it is as it is is because it allows us to have strict configuration. But .. It also limits the extensibility of the bundle so it is probably better to have loose validation in the DI and strict validation at "runtime".
When moving a node to a parent, that doesn't respect that node as a valid children, should not be possible. Those requests should be declined.
What do you think of configuring a default repository: One that will be used when the repository name parameter is omitted.
At the moment, anything using the ResourceBundle needs to know the repository name. As this name is purely based on the runtime configuration, every bundle needing something from the ResourceBundle is required to have a configuration option for this option.
In the case of the treeBrowserBundle, this would mean that anyone using the tree form type needs to know the repository name.
I think it would be much easier to have a default repository (are there many use-cases for multiple repositories?).
This could be done by either having a convention that the default repository is called default
:
cmf_resource:
repositories:
default:
# ...
Or a new option can be added:
cmf_resource:
default_repository_name: phpcrodm
repositories:
phpcrodm:
# ...
/cc @dantleech
PHP 7.3.6
$ composer show --latest 'symfony/*'
symfony/assetic-bundle v2.8.2 v2.8.2 Integrates Assetic into Symfony2
Package symfony/assetic-bundle is abandoned, you should avoid using it. Use symfony/webpack-encore-pack instead.
symfony/http-client v4.3.2 v4.3.2 Symfony HttpClient component
symfony/http-client-contracts v1.1.5 v1.1.5 Generic abstractions related t...
symfony/mime v4.3.2 v4.3.2 A library to manipulate MIME m...
symfony/monolog-bundle v2.12.1 v3.4.0 Symfony MonologBundle
symfony/polyfill-apcu v1.11.0 v1.11.0 Symfony polyfill backporting a...
symfony/polyfill-ctype v1.11.0 v1.11.0 Symfony polyfill for ctype fun...
symfony/polyfill-intl-icu v1.11.0 v1.11.0 Symfony polyfill for intl's IC...
symfony/polyfill-intl-idn v1.11.0 v1.11.0 Symfony polyfill for intl's id...
symfony/polyfill-mbstring v1.11.0 v1.11.0 Symfony polyfill for the Mbstr...
symfony/polyfill-php54 v1.11.0 v1.11.0 Symfony polyfill backporting s...
symfony/polyfill-php55 v1.11.0 v1.11.0 Symfony polyfill backporting s...
symfony/polyfill-php56 v1.11.0 v1.11.0 Symfony polyfill backporting s...
symfony/polyfill-php70 v1.11.0 v1.11.0 Symfony polyfill backporting s...
symfony/polyfill-php72 v1.11.0 v1.11.0 Symfony polyfill backporting s...
symfony/polyfill-php73 v1.11.0 v1.11.0 Symfony polyfill backporting s...
symfony/polyfill-util v1.11.0 v1.11.0 Symfony utilities for portabil...
symfony/security-acl v3.0.2 v3.0.2 Symfony Security Component - A...
symfony/swiftmailer-bundle v2.6.7 v3.2.8 Symfony SwiftmailerBundle
symfony/symfony v2.8.51 v4.3.2 The Symfony PHP framework
$ composer show --latest 'symfony-cmf/*'
symfony-cmf/block-bundle 2.1.1 2.1.1
symfony-cmf/content-bundle 2.1.0 2.1.0
symfony-cmf/core-bundle 2.1.1 2.1.1
symfony-cmf/menu-bundle 2.2.0 2.2.0
symfony-cmf/resource 1.1.0 1.1.0
symfony-cmf/resource-bundle 1.1.0 1.1.0
symfony-cmf/resource-rest-bundle 1.1.0 1.1.0
symfony-cmf/routing 2.1.0 2.1.0
symfony-cmf/routing-auto 2.1.0 2.1.0
symfony-cmf/routing-auto-bundle 2.1.0 2.1.0
symfony-cmf/routing-bundle 2.1.1 2.1.1
symfony-cmf/slugifier-api 2.0.0 2.0.0
symfony-cmf/sonata-phpcr-admin-integration-bundle 1.1.0 1.1.0
symfony-cmf/symfony-cmf 2.1.0 2.1.0
symfony-cmf/tree-browser-bundle 2.1.1 2.1.1
$ composer show --latest 'sonata-project/*'
sonata-project/admin-bundle 3.51.0 3.51.0 The missing Symfony Admin Generator
sonata-project/block-bundle 3.15.0 3.15.0 Symfony SonataBlockBundle
sonata-project/cache 2.0.1 2.0.1 Cache library
sonata-project/core-bundle 3.17.0 3.17.0 Symfony SonataCoreBundle
sonata-project/datagrid-bundle 2.4.0 3.0.0 Symfony SonataDatagridBundle
sonata-project/doctrine-extensions 1.3.0 1.3.0 Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.9.0 3.9.0 Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/doctrine-phpcr-admin-bundle 2.2.0 2.2.0 Symfony Sonata / Integrate Doctrine PHPCR into the SonataAdminBundle
sonata-project/exporter 2.0.1 2.0.1 Lightweight Exporter library
sonata-project/translation-bundle 2.4.1 2.4.1 SonataTranslationBundle
Hi,
I am updating bundles to switch to symfony 3 but I catch an error:
[Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]
The service "sonata.admin.doctrine_phpcr.tree_controller" has a dependency
on a non-existent parameter "cmf_resource.repositories.default_name".
Where can I set this parameter ?
When I add the parameter into my config file, I get another error.
cmf_resource:
repositories:
default:
type: doctrine/phpcr-odm
[Symfony\Component\DependencyInjection\Exception\InvalidArgumentException]
There is no extension able to load the configuration for "cmf_resource"
I don't know where to look ... and the link to the documentation doesn't work:
https://symfony.com/doc/master/cmf/bundles/resource-rest/index.html
I have already reset the cache and reinstall all bundles.
Does someone have an idea?
Thank you!
When #29 is merged, then I think it would make sense to add a command for debugging /describing resources, e.g.
$ ./bin/console debug:cmf-resource /path/to/resource --repository=default
name: Foobar
type: phpcr
payload_type: nt:foobar
description:
link_edit_html: /edit/foobar/1234
link_list_html: /foobars
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.