Milestones:
Author:
Assignee:
Created:
Last Updated:

doctrine

phpcr-odm-documentation: Pulls 0/0, Issues: 0/0

DoctrinePHPCRBundle

Travis Build Status Latest Stable Version Total Downloads
  • 236 [WIP] Support UUID as a choice value for DocumentType not assigned

    #236 [WIP] Support UUID as a choice value for DocumentType

    Created by koemeet at 22.11.2015 - 06:11, last updated at 09.12.2015 - 12:12

    I am trying to make the DocumentType support UUIDs too (useful for API's). It is very hacky in my opinion, maybe someone else with more experience could lead me into the right direction.

    Related issue #103

  • 157 [POC] Generate node types command not assigned

    #157 [POC] Generate node types command

    Created by dantleech at 20.07.2014 - 09:07, last updated at 22.09.2015 - 08:09

    This is just a quick sketch of a command to generate CND files (just namespaces and names, no properties / children definitions).

    In general binding document classes to node types will enable much more efficient filtering and selecting (e.g. SELECT * FROM MyBundle:Article WHERE title = "foobar")

    Obviously there is quite a large scope here, but just to follow on from what was the issue where we discussed this?

    Next steps: - [ ] Add configuration option to automatically assign node types to documents - [ ] Provide node type migrate command (?)

  • 265 Bundle shutdown fails if a managed document was deleted in another session not assigned

    #265 Bundle shutdown fails if a managed document was deleted in another session

    Created by pamil at 16.12.2016 - 12:12, last updated at 09.08.2017 - 11:08

    Background

    I'm using Behat to set up the database and then perform some actions using web interface.

    1. Scenario starts
    2. It creates a document (using first PHPCR session)
    3. It deletes this document (using second PHPCR session)
    4. Scenario ends
    5. Kernel connected with the first session gets rebooted and fails on DoctrinePHPCRBundle::shutdown() (exactly DoctrinePHPCRBundle::clearDocumentManagers())

    Stacktrace (from Lakion/SyliusCmsBundle#9):

      [PHPCR\InvalidItemStateException]
      Item /cms/routes/krzysztof-krawczyk is deleted
    
    
    Exception trace:
     () at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/Item.php:640
     Jackalope\Item->checkState() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/Node.php:835
     Jackalope\Node->getIdentifier() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/ObjectManager.php:1110
     Jackalope\ObjectManager->refresh() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/Session.php:463
     Jackalope\Session->refresh() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:3201
     Doctrine\ODM\PHPCR\UnitOfWork->clear() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/DocumentManager.php:883
     Doctrine\ODM\PHPCR\DocumentManager->clear() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-bundle/DoctrinePHPCRBundle.php:159
     Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle->clearDocumentManagers() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-bundle/DoctrinePHPCRBundle.php:141
     Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle->shutdown() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:152
     Symfony\Component\HttpKernel\Kernel->shutdown() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/friends-of-behat/symfony-extension/src/Listener/KernelRebooter.php:47
    

    Benchmark

    Being caused by DoctrinePHPCRBundle::clearDocumentManagers(), I made a benchmark whether adding it was a good move in the first place (as it refreshes all managed documents on kernel shutdown, not useful 😿 ).

    Benchmark source.

    Results

    Memory usage:
    Using gc_collect_cycles() after kernel shutdown Not using gc_collect_cycles() after kernel shutdown
    Calling DoctrinePHPCRBundle::clearDocumentManagers() 61.5MB 65.3MB
    Not calling DoctrinePHPCRBundle::clearDocumentManagers() 49.6MB 57.6MB
    Calling DoctrinePHPCRBundle::clearDocumentManagers(), but without refreshing session 49.5MB 53.3MB

    With execution time being similar, I guess this call does not do what's expected from it.

    Solutions

    1. Remove DoctrinePHPCRBundle::clearDocumentManagers()
    2. Do not refresh managed documents in UnitOfWork::clear()

    I can help with the first solution, as the second one needs much deeper knowledge in PHPCR-ODM.

  • 172 ParamConverter for PHPCR id (path) and uuid not assigned

    #172 ParamConverter for PHPCR id (path) and uuid

    Created by dbu at 21.10.2014 - 05:10, last updated at 10.08.2015 - 09:08

    we should look into the ORM ParamConverter and see if we can use the same converter for phpcr-odm or build a similar one.

  • 124 use uuid validator of symfony not assigned

    #124 use uuid validator of symfony

    Created by dbu at 01.03.2014 - 05:03, last updated at 18.09.2015 - 11:09

    this uuid validator could be interesting https://github.com/symfony/symfony/commit/3ab2dd7076950f7c3b3ff6ce7f68e5ed2872d448

    needs to be an optional dependency however, its only in symfony 2.5

  • 103 add support for uuid in phpcr_document not assigned

    #103 add support for uuid in phpcr_document

    Created by dbu at 16.12.2013 - 10:12, last updated at 22.11.2015 - 06:11

    the form type phpcr_document uses the "id" which is the phpcr path. it would be nice if optionally it could also use the uuid instead.

    looking at Doctrine\Bundle\PHPCRBundle\Form\Type\DocumentType and its base class and PhpcrOdmQueryBuilderLoader i don't even see who or what determines the id.

    Some discussion can be found in #147

  • 89 Solution for translated fields form type dantleech

    #89 Solution for translated fields form type

    Created by dantleech at 15.10.2013 - 09:10, last updated at 14.03.2015 - 03:03
    Assigned to dantleech

    Some candidates / ideas: - http://knpbundles.com/a2lix/TranslationFormBundle - https://gist.github.com/2437078

  • 62 doctrine:phpcr:jackrabbit read config options from symfony configuration not assigned

    #62 doctrine:phpcr:jackrabbit read config options from symfony configuration

    Created by ivan1986 at 06.05.2013 - 02:05, last updated at 01.03.2014 - 06:03

    jackrabbit have host and port options support in symfony configs please

  • 236 [WIP] Support UUID as a choice value for DocumentType not assigned

    #236 [WIP] Support UUID as a choice value for DocumentType

    Created by koemeet at 22.11.2015 - 06:11, last updated at 09.12.2015 - 12:12

    I am trying to make the DocumentType support UUIDs too (useful for API's). It is very hacky in my opinion, maybe someone else with more experience could lead me into the right direction.

    Related issue #103

  • 157 [POC] Generate node types command not assigned

    #157 [POC] Generate node types command

    Created by dantleech at 20.07.2014 - 09:07, last updated at 22.09.2015 - 08:09

    This is just a quick sketch of a command to generate CND files (just namespaces and names, no properties / children definitions).

    In general binding document classes to node types will enable much more efficient filtering and selecting (e.g. SELECT * FROM MyBundle:Article WHERE title = "foobar")

    Obviously there is quite a large scope here, but just to follow on from what was the issue where we discussed this?

    Next steps: - [ ] Add configuration option to automatically assign node types to documents - [ ] Provide node type migrate command (?)

  • 265 Bundle shutdown fails if a managed document was deleted in another session not assigned

    #265 Bundle shutdown fails if a managed document was deleted in another session

    Created by pamil at 16.12.2016 - 12:12, last updated at 09.08.2017 - 11:08

    Background

    I'm using Behat to set up the database and then perform some actions using web interface.

    1. Scenario starts
    2. It creates a document (using first PHPCR session)
    3. It deletes this document (using second PHPCR session)
    4. Scenario ends
    5. Kernel connected with the first session gets rebooted and fails on DoctrinePHPCRBundle::shutdown() (exactly DoctrinePHPCRBundle::clearDocumentManagers())

    Stacktrace (from Lakion/SyliusCmsBundle#9):

      [PHPCR\InvalidItemStateException]
      Item /cms/routes/krzysztof-krawczyk is deleted
    
    
    Exception trace:
     () at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/Item.php:640
     Jackalope\Item->checkState() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/Node.php:835
     Jackalope\Node->getIdentifier() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/ObjectManager.php:1110
     Jackalope\ObjectManager->refresh() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/Session.php:463
     Jackalope\Session->refresh() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:3201
     Doctrine\ODM\PHPCR\UnitOfWork->clear() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/DocumentManager.php:883
     Doctrine\ODM\PHPCR\DocumentManager->clear() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-bundle/DoctrinePHPCRBundle.php:159
     Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle->clearDocumentManagers() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-bundle/DoctrinePHPCRBundle.php:141
     Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle->shutdown() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:152
     Symfony\Component\HttpKernel\Kernel->shutdown() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/friends-of-behat/symfony-extension/src/Listener/KernelRebooter.php:47
    

    Benchmark

    Being caused by DoctrinePHPCRBundle::clearDocumentManagers(), I made a benchmark whether adding it was a good move in the first place (as it refreshes all managed documents on kernel shutdown, not useful 😿 ).

    Benchmark source.

    Results

    Memory usage:
    Using gc_collect_cycles() after kernel shutdown Not using gc_collect_cycles() after kernel shutdown
    Calling DoctrinePHPCRBundle::clearDocumentManagers() 61.5MB 65.3MB
    Not calling DoctrinePHPCRBundle::clearDocumentManagers() 49.6MB 57.6MB
    Calling DoctrinePHPCRBundle::clearDocumentManagers(), but without refreshing session 49.5MB 53.3MB

    With execution time being similar, I guess this call does not do what's expected from it.

    Solutions

    1. Remove DoctrinePHPCRBundle::clearDocumentManagers()
    2. Do not refresh managed documents in UnitOfWork::clear()

    I can help with the first solution, as the second one needs much deeper knowledge in PHPCR-ODM.

  • 172 ParamConverter for PHPCR id (path) and uuid not assigned

    #172 ParamConverter for PHPCR id (path) and uuid

    Created by dbu at 21.10.2014 - 05:10, last updated at 10.08.2015 - 09:08

    we should look into the ORM ParamConverter and see if we can use the same converter for phpcr-odm or build a similar one.

  • 124 use uuid validator of symfony not assigned

    #124 use uuid validator of symfony

    Created by dbu at 01.03.2014 - 05:03, last updated at 18.09.2015 - 11:09

    this uuid validator could be interesting https://github.com/symfony/symfony/commit/3ab2dd7076950f7c3b3ff6ce7f68e5ed2872d448

    needs to be an optional dependency however, its only in symfony 2.5

  • 103 add support for uuid in phpcr_document not assigned

    #103 add support for uuid in phpcr_document

    Created by dbu at 16.12.2013 - 10:12, last updated at 22.11.2015 - 06:11

    the form type phpcr_document uses the "id" which is the phpcr path. it would be nice if optionally it could also use the uuid instead.

    looking at Doctrine\Bundle\PHPCRBundle\Form\Type\DocumentType and its base class and PhpcrOdmQueryBuilderLoader i don't even see who or what determines the id.

    Some discussion can be found in #147

  • 89 Solution for translated fields form type dantleech

    #89 Solution for translated fields form type

    Created by dantleech at 15.10.2013 - 09:10, last updated at 14.03.2015 - 03:03
    Assigned to dantleech

    Some candidates / ideas: - http://knpbundles.com/a2lix/TranslationFormBundle - https://gist.github.com/2437078

  • 62 doctrine:phpcr:jackrabbit read config options from symfony configuration not assigned

    #62 doctrine:phpcr:jackrabbit read config options from symfony configuration

    Created by ivan1986 at 06.05.2013 - 02:05, last updated at 01.03.2014 - 06:03

    jackrabbit have host and port options support in symfony configs please

phpcr-odm

Travis Build Status Latest Stable Version Total Downloads
  • 734 references by uuid not assigned

    #734 references by uuid

    Created by ElectricMaxxx at 17.01.2017 - 10:01, last updated at 19.01.2017 - 08:01

    This should wrap up #493

    didn't implement the stuff, commented in code not to change.

    But there are still the Questions of @dbu

    I go top to button through the text/conversation, cause it is really hard to remember what the purpose was, even for me :-)

  • 702 [WIP] Add mapping to index reference collection by node name not assigned

    #702 [WIP] Add mapping to index reference collection by node name

    Created by koemeet at 18.04.2016 - 03:04, last updated at 17.01.2017 - 09:01

    Fixes #701 - [ ] Implement annotations and YAML driver - [ ] Restrict it only to only reference-many collections?

  • 683 Add failing test case proofing #682 not assigned

    #683 Add failing test case proofing #682

    Created by wouterj at 09.01.2016 - 12:01, last updated at 10.01.2016 - 09:01

    /cc @dbu

  • 665 Failing test for issue #657 (calling find before flush) not assigned

    #665 Failing test for issue #657 (calling find before flush)

    Created by dantleech at 09.10.2015 - 07:10, last updated at 14.10.2015 - 05:10

    Failing test for issue #657

  • 662 failing test for calling same with empty string not assigned

    #662 failing test for calling same with empty string

    Created by uwej711 at 30.09.2015 - 10:09, last updated at 08.10.2015 - 11:10

    this simple tests fails when using jackrabbit - not sure what the expected behaviour is, let's have a look at the spec?

  • 661 add failing test for #659 not assigned

    #661 add failing test for #659

    Created by uwej711 at 18.09.2015 - 11:09, last updated at 11.10.2015 - 09:10

    so there a two conditions to make that test fail 1. add an preUpdate Listener to the parent class 2. make sure the parents ChildrenCollection is initialized without either one of these conditions the test passes!

  • 620 Preserve order of operations dantleech

    #620 Preserve order of operations

    Created by dantleech at 25.03.2015 - 11:03, last updated at 13.05.2015 - 09:05
    Assigned to dantleech

    This PR is aiming to preserve the order of operations, it tries to do this whilst preserving the current behavior as much as possible. - Everytime an INSERT, MOVE or DELETE is made, we add an Operation to the TreeOperationQueue - No such action is taken for REORDER or UPDATE

    When flush is called: - The execute* methods are called with batches of operations, e.g. INSERT, INSERT, INSERT would be a single batch, however INSERT, INSERT, MOVE, INSERT would be three batches, so that the move is executed after the first 2 inserts.

  • 607 Demonstrate expected behaviour for QueryBuilder::setLocale not assigned

    #607 Demonstrate expected behaviour for QueryBuilder::setLocale

    Created by uwej711 at 06.03.2015 - 11:03, last updated at 11.05.2015 - 10:05

    Failing test for issue #605

    I would expect setLocale on the QueryBuilder would return the found document in the specified locale

  • 585 [WIP] Field slugifier id generator dantleech

    #585 [WIP] Field slugifier id generator

    Created by dantleech at 22.12.2014 - 06:12, last updated at 20.06.2016 - 02:06
    Assigned to dantleech

    Just an idea of how this might work.

  • 493 allow to add uuid as id to proxies not assigned

    #493 allow to add uuid as id to proxies

    Created by ElectricMaxxx at 20.05.2014 - 11:05, last updated at 17.01.2017 - 08:01

    As described in: https://gist.github.com/ElectricMaxxx/68a7d033a6357e757329 i would wish to create proxies (after calling $dm->getReference('MyClassName', 'uuid');) with the uuid as the id. This PR will make it possible that the request on the backend is able to handle the uuid. Normally $session->getNode($id); will fetch the node. Now there will be a check if the $id is an uuid and fetch the node by $session->getNodeByIdentifier($id); , which is able to look for a node by its uuid.

    I tried to create more tests for those documents that live as proxies in the UoW, but i do not get it to solve the mocking and i do not know if it is clever to do so, cause if i would mock some implementation depending, we would lose the decoupled view on the backend.

  • 396 [POC/RFC] Operations queue dantleech

    #396 [POC/RFC] Operations queue

    Created by dantleech at 25.12.2013 - 11:12, last updated at 23.03.2015 - 05:03
    Assigned to dantleech

    This is an experiment for an operations queue which unities the seperate scheduledInserts, scheduledUpdates, scheduledReorders, etc. into a single queue.

    This enables persistance operations to be committed out in the order in which they were programmed.

    This makes sense for move, reorder and delete operations which can have multiple entries in the stack for a given document. It makes less sense for "update" because the changeset is not recorded for each operation ("persist") but is calculated once before comitting.

    Lots of test fails here and this is not necessarily the solution we need, just an experiment.

  • 277 Reorder with rename test dantleech

    #277 Reorder with rename test

    Created by dantleech at 17.04.2013 - 02:04, last updated at 13.05.2015 - 09:05
    Assigned to dantleech

    This is a failing test, is it valid behavior?

  • 247 Child version test not assigned

    #247 Child version test

    Created by fazy at 20.02.2013 - 04:02, last updated at 01.07.2014 - 04:07

    As discussed here: https://groups.google.com/forum/?fromgroups=#!topic/symfony-cmf-devs/--3J2hbMsa8

    I've created failing test cases to show how I expect versioning to work with a node type child definition "on version copy".

    In effect I'm expecting versions to be 'in sync' with this method, so that when creating a version of the parent, a new version of the child is also created; When reverting the parent, any changes to the child are also reverted.

    I could be wrong of course, and I'm not 100% sure my node type is correct...

    Also, there's probably a better place to load the node type definition, but I don't think it's ready to go in the standard fixtures.

  • 779 QueryBuilder throws InvalidQueryException if node path contains '-<num>e' not assigned

    #779 QueryBuilder throws InvalidQueryException if node path contains '-<num>e'

    Created by SalvatorePollaci at 21.03.2018 - 04:03, last updated at 22.03.2018 - 08:03

    When querying for children of node with path which contains -<num>e, Query Builder throws InvalidQueryException.

    $path = '/cms/site1/routes/it/home/test-1e';
    $qb = $this->manager->createQueryBuilder();
                    $qb->fromDocument(AutoRoute::class, 'a');
                    $qb->where()->child($path, 'a');
                    $out = $qb->getQuery()->execute();
    

    STEP 1: /vendor/jackalope/jackalope-jackrabbit/src/Jackalope/Transport/Jackrabbit/Client.php line 888 $querystring = $query->getStatement();

    $querystring has value:

    SELECT * FROM [nt:unstructured] AS a WHERE (ISCHILDNODE(a, [/cms/site1/routes/it/home/test-1e]) AND (a.[phpcr:class] = 'MyCompany\Bundle\CMSBundle\Document\CMS\AutoRoute' OR a.[phpcr:classparents] = 'MyCompany\Bundle\CMSBundle\Document\CMS\AutoRoute'))
    

    STEP 2: /vendor/jackalope/jackalope-jackrabbit/src/Jackalope/Transport/Jackrabbit/Request.php line 529 $response = $curl->exec();

    $response has value:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?><D:error xmlns:D="DAV:"><dcr:exception xmlns:dcr="http://www.day.com/jcr/webdav/1.0"><dcr:class>javax.jcr.query.InvalidQueryException</dcr:class><dcr:message>Query:
    SELECT * FROM [nt:unstructured] AS a WHERE (ISCHILDNODE(a, [/cms/site1/routes/it/home/test-(*)1e]) AND (a.[phpcr:class] = 'MyCompany\Bundle\CMSBundle\Document\CMS\AutoRoute' OR a.[phpcr:classparents] = 'MyCompany\Bundle\CMSBundle\Document\CMS\AutoRoute'))</dcr:message></dcr:exception></D:error>
    

    As you can see above, it seems that someone is adding '(*)' to the JCR query.

    This only happens if node's path contains -<num>e.

    Does anyone have any solutions?

  • 754 Cannot remove nodes with autogenerated @Nodename not assigned

    #754 Cannot remove nodes with autogenerated @Nodename

    Created by mreiche at 06.09.2017 - 05:09, last updated at 08.09.2017 - 03:09

    I have an abstract document:

    /**
     * @MappedSuperclass(
     *     referenceable=true,
     *     mixins={"mix:created", "mix:lastModified"}
     * )
     */
    abstract class AbstractDocument {
        /**
         * @Id
         */
        private $id;
        /**
         * @Uuid()
         */
        private $uuid;
        /**
         * @ParentDocument(cascade={"persist"})
         */
        private $parent;
    }
    

    Which has no Nodename-property, which means, the local name and id were auto generated. When removing such a document:

    $dm = $this->getDocumentManager();
    $rootDoc = $dm->find(null,'/');
    /** @var AbstractDocument[] $children */
    $children = $rootDoc->getChildren();
    foreach ($children as $child) {
        echo $child->getUuid()."\n";
        $dm->remove($child);
    }
    $dm->flush();
    

    I get the following exception. Doctrine\ODM\PHPCR\PHPCRException: Cannot move/copy children by assignment as it would be ambiguous. Please use the DocumentManager::move() or PHPCR\Session::copy() operations for this: Topic@000000005c2f88550000000079d0359f (/454625409)

    Reference: https://stackoverflow.com/questions/46077197/doctrine-phpcr-how-to-remove-children-from-the-root-document/46077719

  • 745 Binding string with apostrophe using QueryBuilder->literal() crash query not assigned

    #745 Binding string with apostrophe using QueryBuilder->literal() crash query

    Created by stopsopa at 02.06.2017 - 10:06, last updated at 20.04.2018 - 10:04

    Error like:

    image

    When query is build like:

    image

    Fixed in my case:

    image

    but i think it should do this automatically internally. Or there should be method to bind explicitly data like in regular doctrine project:

    http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/query-builder.html#binding-parameters-to-your-query

  • 727 Allow serialized objects? not assigned

    #727 Allow serialized objects?

    Created by dantleech at 27.10.2016 - 10:10, last updated at 27.10.2016 - 10:10

    Currently if you want to store an object as a property of a document, you need to map it as a child document

    Doctrine ORM has the option to store ojects as serialized PHP, this is can be more desireable than mapping a child document for performance reasons.

    So I would propose something like:

    /**
     * @PHPCRODM\Field(type="php_object")
     */
    

    (FTR Doctrine ORM uses object, not sure if that would be better here).

    Alternatively we could make it possible for users to implement custom types (I don't think this is already possible?).

  • 726 Support for custom ID generator not assigned

    #726 Support for custom ID generator

    Created by dantleech at 10.10.2016 - 02:10, last updated at 11.10.2016 - 10:10

    I would like to automatically name a node based on a given prefix then an auto-generated numeric suffix, e.g.:

    node1/
        foobar-0/
        foobar-1/
        foobar-2/
    

    This allows children to be mapped and accessed as an array (e.g. @Children(filter=foobar-*).

    This is not currently possible with event listeners as, on update, the child node name is required and the generator is invoked before the event is fired.

    It would seem better to me to use a custom generator for this purpose. Doctrine allows a mapping for @CustomIdGenerator:

        /**
         * @Id @Column(type="string") @GeneratedValue(strategy="CUSTOM")
         * @CustomIdGenerator(class="stdClass")
         */
        public $id;
    

    I don't really see why this cannot be a service, but we could at least copy this in the PHPCR-ODM.

  • 715 [RFC] Collection Field Type not assigned

    #715 [RFC] Collection Field Type

    Created by dantleech at 23.07.2016 - 12:07, last updated at 27.10.2016 - 10:10

    I wonder if it would be possible to create a field type which would map a collection of child nodes to the property.

    $image1 = new Image();
    // ...
    $geolocation1 = new Geolocation();
    // ...
    $page = new Page();
    $page->title = "My Homepage";
    $page->images = [ $image1, $image2 ];
    $page->geolocations = [ $gelolocation1, $geolocation2, ... ];
    

    The difference between this and the @Children mapping is that these children would be directly related to the property, and stored in PHPCR as follows:

    my-page/
        title: My Homepage
        some-ns:image-0/
            ...
        some-ns:image-1/
            ...
    
        some-ns:geolocation-0/
            ...
        some-ns:geolocation-1/
            ...
    
  • 705 make it easier to query multiple documents without a join not assigned

    #705 make it easier to query multiple documents without a join

    Created by lsmith77 at 19.05.2016 - 02:05, last updated at 10.04.2017 - 01:04

    Building a query like the following:

    SELECT * FROM [nt:unstructured] AS a
                   WHERE (
                    [phpcr:class] = 'AppBundle\Document\Article’ OR 
                    [phpcr:class] = 'AppBundle\Document\Video’  OR
                    [phpcr:class] = 'AppBundle\Document\Crew’
                 )
                        AND 
                ( 
                    a.tags LIKE '%tag1%’ OR
                    a.tags LIKE '%tag2%’ OR
                    a.tags LIKE '%tag3%’
                )
    

    Maybe we could introduce a new method $from->documents() to be able to define that the [phpcr:class] filtering should be done on a set of documents?

    wdyt @dantleech ?

  • 704 multilanguage and sylius not assigned

    #704 multilanguage and sylius

    Created by dbu at 19.04.2016 - 08:04, last updated at 28.07.2016 - 04:07

    follow up of #703

    @steffenbrem lets continue the discussion here, and keep #703 for the bug you found.

    when we built the phpcr-odm multilanguage system, the main goal was that translations are transparent for your model and for the application using it. you set the locale on the document manager (e.g. in a request listener) and from then on all code can act as if there was no translations, and just "happen" to end up with the correct language. this turned out to be quite powerful while being really simple to use.

    what exactly do you need? you can query the document manager to fetch all available locales of a document.

    i would love to find a way so that sylius can use phpcr-odm multilanguage directly, rather than build a custom solution on top of it.

    did you look at the "child" strategy for translation? then you get a specific node per language. maybe we could find a way to expose those better, for applications that want to work on multiple languages at the same time, if that is what sylius wants to do.

  • 703 Cannot change nodename and add new reference to collection. Fails with 409, PathNotFoundException. not assigned

    #703 Cannot change nodename and add new reference to collection. Fails with 409, PathNotFoundException.

    Created by koemeet at 18.04.2016 - 03:04, last updated at 19.04.2016 - 08:04

    You cannot update the nodename of a document and add a new reference in the same transaction. To illustrate the issue better, I have the following code example:

    $page = $dm->find(null, $object->getId());
    
    $page->setName('helloo');
    
    $translation = new PageTranslation();
    $translation->setLocale('nl_NL');
    $translation->setTitle('Over ons');
    $translation->setBody('Content voor over ons');
    $page->addTranslation($translation);
    
    $dm->persist($page);
    $dm->flush();
    

    When running the above code, it will throw the following exception:

    PHPCR\PathNotFoundException: HTTP 409: /workspaces/525/channels/658/pages/helloo/nl_NL
    

    I am not sure if this is a problem in the phpcr-odm project or an issue with the jackalope-jackrabbit transport layer.

  • 682 Selecting nodes based on association doesn't work not assigned

    #682 Selecting nodes based on association doesn't work

    Created by wouterj at 31.12.2015 - 01:12, last updated at 09.01.2016 - 12:01

    According to the documentation this code should work to select a node based on an association:

    $number = $dm->find('MyProject\Domain\Phonenumber', '/path/to/phone/number');
    $user = $dm->getRepository('MyProject\Domain\User')->findOneBy(array('phone' => $number->getUuid()));
    

    However, when using this code to get a MenuNode documentation with a specific content object, I get an error: The code

    $dm = $this->get('doctrine_phpcr')->getManager();
    $contentUuid = $dm->getPhpcrSession()->getItem('/cms/content/home')->getPropertyValue('jcr:uuid');
    
    $dm->getRepository(MenuNode::class)->findOneBy(['content' => $contentUuid]);
    

    The error

    Cannot use association property "content" of class "...\MenuNode" as a dynamic operand

    The docs seem to be incorrect.

    More importantly, I can't find a way to select the node. The QueryBuilder can't help with this either.

  • 676 sqlite does not support RIGHT JOIN: problem with child translation strategy query not assigned

    #676 sqlite does not support RIGHT JOIN: problem with child translation strategy query

    Created by dbu at 08.12.2015 - 08:12, last updated at 03.02.2017 - 07:02

    a couple of tests fail when running jackalope-doctrine-dbal with sqlite instead of postgres / mysql

    the problem is with ChildTranslationStrategy::alterQueryForTranslation that does a QueryObjectModelConstantsInterface::JCR_JOIN_TYPE_RIGHT_OUTER to join a node with its translation child node.

    Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'SELECT n0.path AS n0_path, n0.identifier AS n0_identifier, n0.props AS n0_props, n1.path AS n1_path, n1.identifier AS n1_identifier, n1.props AS n1_props FROM phpcr_nodes n0 RIGHT JOIN phpcr_nodes n1 ON ( n0.workspace_name = n1.workspace_name AND n1.type IN ('nt:base', 'nt:unstructured', 'rep:root', 'phpcr:cms_profile', 'nt:activity', 'nt:address', 'nt:childNodeDefinition', 'nt:configuration', 'nt:frozenNode', 'nt:hierarchyNode', 'nt:file', 'nt:folder', 'nt:linkedFile', 'rep:Authorizable', 'rep:Group', 'rep:User', 'rep:AuthorizableFolder', 'test:protected_property_test', 'test:protected_property_test2', 'nt:nodeType', 'nt:propertyDefinition', 'nt:query', 'nt:resource', 'nt:version', 'nt:versionHistory', 'nt:versionLabels', 'nt:versionedChild', 'rep:ACE', 'rep:DenyACE', 'rep:GrantACE', 'rep:AccessControl', 'rep:PrincipalAccessControl', 'rep:Activities', 'rep:Configurations', 'rep:Members', 'rep:Policy', 'rep:ACL', 'rep:nodeTypes', 'rep:system', 'rep:versionStorage', 'phpcr:managed') AND (n1.path LIKE CONCAT(n0.path, '/%') AND n1.depth = n0.depth + 1) ) WHERE n0.workspace_name = ? AND n0.type IN ('nt:unstructured', 'rep:root', 'phpcr:cms_profile') AND ((EXTRACTVALUE(n1.props, 'count(//sv:property[@sv:name="topic"]/sv:value[text()="Not Exist"]) > 0') AND (EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name="phpcr:class"]/sv:value[text()="Doctrine\Tests\Models\Translation\ChildTranslationArticle"]) > 0') OR EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name="phpcr:classparents"]/sv:value[text()="Doctrine\Tests\Models\Translation\ChildTranslationArticle"]) > 0'))) AND n1.namespace || (CASE n1.namespace WHEN '' THEN '' ELSE ':' END) || n1.local_name = 'http://www.doctrine-project.org/projects/phpcr_odm/phpcr_locale:en')' with params ["default"]:

    SQLSTATE[HY000]: General error: 1 RIGHT and FULL OUTER JOINs are not currently supported

    options i see: - ignore - the problem has been present since 14.2.2014 - try to find a solution on the jackalope-doctrine-dbal level to work around the limitation - try to detect the problem in phpcr-odm and output a more specific warning (use other database or attribute translation)

    also, should we run the tests with sqlite and postgres to detect such issues?

  • 670 re-add DocumentManager::transactional() not assigned

    #670 re-add DocumentManager::transactional()

    Created by lsmith77 at 04.11.2015 - 04:11, last updated at 01.12.2015 - 09:12

    see https://github.com/doctrine/phpcr-odm/pull/669

  • 659 Changing the name of a node results in deletion not move not assigned

    #659 Changing the name of a node results in deletion not move

    Created by uwej711 at 14.09.2015 - 02:09, last updated at 05.04.2017 - 09:04

    I found this while trying to rename a route (from the RoutingBundle) with setName, the cause is a bit difficult to describe ...

    First you need a parent with mapped children, say /cms/routes/zn, the child /cms/routes/zn/page-1 will be renamed to page-2 with setName.

    The UnitOfWork correctly detects the move of /cms/routes/zn/page-1 to /cms/routes/zn/page-2. But it also creates a change for /cms/routes/zn because it adds an empty reordering in https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L1422 or https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L1424. the resulting executeUpdates for /cms/routes/zn triggers another computeChangeset for that node in https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L2482, which then results in a deletion of /cms/routes/zn/page-1.

    Only adding the reodering if the array in https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L1420 has count > 0 solves that very special case for me but if your parent node has other changes it will break anyway.

    Hope this is somehow clear ...

    Cheers Uwe

  • 658 Query builder seems unable to produce a fully working left join not assigned

    #658 Query builder seems unable to produce a fully working left join

    Created by sarcher at 06.09.2015 - 09:09, last updated at 06.11.2015 - 09:11

    I am attempting to use a LEFT JOIN behavior on child documents, but it seems to be impossible based on what I've seen.

    I have the following situation: - Tree of documents of the class Product - Documents may have one or more children of the class ProductDetail - Attempting to design a search query which includes data from these details

    Take the following query builder as an example:

    $searchTerm = '12345';
    
    $query = $queryBuilder
        ->fromDocument('Path\To\Product', 'p')
        ->addJoinLeftOuter()
            ->right()->document('Path\To\ProductDetail', 'pd')->end()
            ->condition()->child('pd', 'p')->end()
        ->end();
        ->andWhere()
            ->orX()
                ->like()->localName('p')->literal('%' . $searchTerm . '%')->end();
                ->andX()
                    ->eq()->field('pd.type')->literal('title')->end()
                    ->fullTextSearch('pd.content', $searchTerm)
                ->end()
            ->end()
        ->end()
        ->getQuery();
    

    Now, PHPCR-ODM produces a JCR-SQL2 query like:

    SELECT * 
    FROM [nt:unstructured] AS p 
    LEFT OUTER JOIN [nt:unstructured] AS pd ON ISCHILDNODE(pd, p) 
    WHERE (((LOCALNAME(p) LIKE '%12345%' OR (pd.type = 'title' AND CONTAINS(pd.content, '12345'))) 
      AND (p.[phpcr:class] = 'Path\To\Product' OR p.[phpcr:classparents] = 'Path\To\Product'))
      AND (pd.[phpcr:class] = 'Path\To\ProductDetail' OR pd.[phpcr:classparents] = 'Path\To\ProductDetail'))
    

    This all works as expected, if and only if the Product nodes contain at least one ProductDetail child -- in other words, it seems to behave as an INNER JOIN. Any Product node that has no such child will not be included in the results of the query, because of two things: 1. The query is specifying SELECT * rather than SELECT p.*, which is requiring a result for the pd alias 2. The query is appending an AND clause at the end, which will only match if the alias pd is present and of the appropriate class

    The query that I actually want is this:

    SELECT p.* 
    FROM [nt:unstructured] AS p 
    LEFT OUTER JOIN [nt:unstructured] AS pd ON ISCHILDNODE(pd, p) 
    WHERE (((LOCALNAME(p) LIKE '%12345%' OR (pd.type = 'title' AND CONTAINS(pd.content, '12345'))) 
      AND (p.[phpcr:class] = 'Path\To\Product' OR p.[phpcr:classparents] = 'Path\To\Product')))
    

    This works as one would expect a LEFT JOIN to, delivering results whose node names match "12345" regardless of whether or not they contain one or more ProductDetail children.

    What I cannot figure out is if it is possible to get to my desired query; is it? This seems to be a bug, but perhaps I am misunderstanding the intent here.

    If this is intended, is there a workaround to achieve what I am trying to do? I realize I could just pass the JCR-SQL2 query to the session (my environment uses Jackrabbit) and then manually invoke hydration, but that seems a bit ugly. :)

  • 657 Regression when persisting object ID and changing the locale not assigned

    #657 Regression when persisting object ID and changing the locale

    Created by dantleech at 29.08.2015 - 12:08, last updated at 08.10.2015 - 09:10

    A test has been added in the RoutingAutoBundle which seems to reveal a regression introduced in 83863d7e460c112aff1497abc4fdfb9c7b93cde2.

    Failure is as follows

    1) Symfony\Cmf\Bundle\RoutingAutoBundle\Tests\Functional\EventListener\AutoRouteListenerTest::testMultilangArticleRemainsSameLocale
    Undefined index: path
    
    /home/daniel/www/symfony-cmf/RoutingAutoBundle/vendor/symfony/phpunit-bridge/DeprecationErrorHandler.php:40
    /home/daniel/www/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:1604
    /home/daniel/www/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:1123
    /home/daniel/www/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:2157
    /home/daniel/www/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/DocumentManager.php:949
    /home/daniel/www/symfony-cmf/RoutingAutoBundle/Tests/Functional/EventListener/AutoRouteListenerTest.php:288
    

    Where path is the name of the property mapped as the @Id.

    /cc @lsmith77 @WouterJ

  • 654 Children not persisted when created in doctrine event listener not assigned

    #654 Children not persisted when created in doctrine event listener

    Created by dbu at 10.08.2015 - 09:08, last updated at 10.08.2015 - 09:08

    @petforsberg reported originally in https://github.com/doctrine/DoctrinePHPCRBundle/issues/179

    Within my app, when I create an Article, app auto-generates a News for it. Both (Article and News) have their own children-nodes attached (always). The workflow looks like this: 1. persist Article 2. Doctrine EventListener - Article postPersist: create children, and set their Parent as Article 3. Doctrine EventListener - Article postPersist: EventDispatcher -> generate News (creates new News document inside the other service) 4. persist News (in the same service) 5. Doctrine EventListener - News postPersist: create children, and set their Parent as News

    Points 1-4 work well. But children persisted to another persisted Document - News - seem to be not persisted at all. I checked everything, it took me like 4 hours or so. Everything looks fine, objects are created, persisted, they exist... until I do flush. Then News children-elements disappear.

    Do you know why does it happen?

    Forgot to mention: when I create a bare News (not auto-generated in the nested Doctrine events), it is created without a problem, with its children.

  • 653 Setting parent document to a Generic Node created on-the-fly in a prePersist listener causes PHPCRException not assigned

    #653 Setting parent document to a Generic Node created on-the-fly in a prePersist listener causes PHPCRException

    Created by kminh at 24.07.2015 - 08:07, last updated at 26.07.2015 - 04:07

    Hello,

    I'm trying to "move" a new (yes a new) document (Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route) to another node by using setParentDocument in a prePersist event listener.

    The target node is created on the fly if it's not there, using NodeHelper::createPath (I only need a generic target node).

        public function prePersist(LifecycleEventArgs $args)
        {
            $route = $args->getObject();
            $dm = $args->getObjectManager();
    
            if ($route instanceof Route) {
                $localeNodePath = $this->routeRoot . '/' . $this->locale;
    
                if (!$localeNode = $dm->find(null, $localeNodePath)) {
                    $session = $dm->getPhpcrSession();
                    $localeNode = NodeHelper::createPath($session, $localeNodePath);
    
                    /* $session->save(); I believe this is not needed? */ 
                }
    
                $route->setParentDocument($localeNode);
            }
        }
    

    The exception message is Document is not managed and has no id ....

    Perhaps this is caused by the fact that the target node is created on the fly, but even calling $session->save doesn't help.

    Any insight is greatly appreciated.

  • 628 Performance issue with getParent and maybe other things not assigned

    #628 Performance issue with getParent and maybe other things

    Created by dantleech at 09.04.2015 - 04:04, last updated at 10.08.2015 - 08:08

    I noticed that if you map the @ParentDocument it seems that the parent node is eagerly loaded:

    https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L550

    This is, I suppose, so that we know which class to create a proxy for, but obviously it almost defeats the point of creating a Proxy in the first place.

    Doctrine ORM doesn't have this issue I guess. Any thoughts?

  • 623 Find solution for explicit localization when using the document manager not assigned

    #623 Find solution for explicit localization when using the document manager

    Created by dantleech at 29.03.2015 - 09:03, last updated at 04.07.2015 - 12:07

    The document manager currently has one localization aware method - findTranslation, which is the localized analogue of find There does not exist an analogue for ``findMany` and the query builder does not support localizing results.

    Other methods that could be localized: - getReferrers - getReference (?) - getChildren - getDocumentsByPhpcrQuery

    Repository classes also have methods which could be localized.

    Possible solutions - Do nothing and deprecate findTranslation: The user must change global state by changing the locale of the locale chooser. - Make the DocumentManager localizable through a localize method which returns a localized clone of the DocumentManager. - Add explicit translated methods: getTranslatedReferrers, findTranslatedMany - Add additional, optional, $locale argument to all existing localizable methods.

  • 612 Not possible to map references as translated fields. dantleech

    #612 Not possible to map references as translated fields.

    Created by dantleech at 15.03.2015 - 10:03, last updated at 15.03.2015 - 11:03
    Assigned to dantleech

    Currently it is not possible to map references (@ReferenceOne, @ReferenceMany) as translated fields. This should be possible I think.

  • 611 Loading translations does not cascade to children when there is a document in the hierarchy without translatable fields not assigned

    #611 Loading translations does not cascade to children when there is a document in the hierarchy without translatable fields

    Created by uwej711 at 12.03.2015 - 02:03, last updated at 04.07.2015 - 12:07

    When you have a container block with no translated fields doLoadTranslation will not load the proper translations of the children of that container due to https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L3384

    So I have to put a dummy translated field and a locale to the container to make it work.

  • 610 New children are always appended and not inserted at the right position not assigned

    #610 New children are always appended and not inserted at the right position

    Created by uwej711 at 12.03.2015 - 01:03, last updated at 04.07.2015 - 12:07

    Adding a new object to the children of a document inserts the new object always at the end of the children regardless of the position of the new child in the collection. In comparison to that, reordering existing children in the collection has the desired effect (if the backend supports ordered children).

    Will try to create a failing test.

  • 605 QueryBuilder::setLocale has no effect for HYDRATE_DOCUMENT not assigned

    #605 QueryBuilder::setLocale has no effect for HYDRATE_DOCUMENT

    Created by uwej711 at 06.03.2015 - 12:03, last updated at 21.03.2015 - 06:03

    in DocumentManager::getDocumentsByPhpcrQuery the locale of the query is ignored.

  • 595 QueryBuilder : lt() on datetime does not exclude current object not assigned

    #595 QueryBuilder : lt() on datetime does not exclude current object

    Created by Peekmo at 16.02.2015 - 12:02, last updated at 04.07.2015 - 12:07

    Hello.

    I have a problem with a filter in the query builder on a datetime field. I want the object with the date just before the given one, and the query returns an object with the same datetime (exactly the same)

        public function getPreviousNews(News $news)
        {
            $qb = $this->createQueryBuilder('news');
            $qb->where()->lt()->field('news.date')->literal($news->getDate())->end(); // Here
            $qb->orderBy()->desc()->field('news.date');
            $qb->setMaxResults(1);
    
            try {
                return $qb->getQuery()->getSingleResult();
            } catch (\Exception $ex) {
                return null;
            }
        }
    

    Query generated

    SELECT * FROM [nt:unstructured] AS news WHERE (news.date < CAST('1996-02-16T10:20:39.000+01:00' AS DATE) AND (news.[phpcr:class] = 'xxx\AppBundle\Document\News' OR news.[phpcr:classparents] = 'xxx\AppBundle\Document\News')) ORDER BY news.date DESC
    

    And var_dump of the datetime from the object that I get

    object(DateTime)#1573 (3) { ["date"]=> string(26) "1996-02-16 10:20:39.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" } 
    

    The problem does not appears with gt() method.

    Thank you !

  • 588 use sprintf in MappingException not assigned

    #588 use sprintf in MappingException

    Created by lsmith77 at 09.01.2015 - 04:01, last updated at 10.01.2015 - 12:01

    see https://github.com/doctrine/phpcr-odm/pull/587

  • 584 RFC: Enforce UUIDs on mutable documents not assigned

    #584 RFC: Enforce UUIDs on mutable documents

    Created by Ocramius at 13.12.2014 - 12:12, last updated at 18.12.2014 - 05:12

    What

    As per discussion with @dantleech, the current UnitOfWork identity map is very messy, and unlikely to be compatible with the upcoming Ocramius/ChangeSet rework.

    Why

    There are also some cases where identifier changes in the current strategy cause problems, such as: - loading an object /foo/bar - moving it to /foo/baz - adding a new object /foo/bar - flushing

    As well as other conditions where race conditions in a single flush may happen.

    Solution

    Therefore, I suggest that the ODM enforces UUID mixins on nodes: - documents and node types registered by the ODM always have a UUID mixin - UUID is not required to be hydrated into the object - documents and node types NOT registered by the ODM are not required to have an UUID mixin, but may not be modified (read-only is enforced, and changing the documents causes exceptions on flush())

  • 575 refactor to no longer use right join not assigned

    #575 refactor to no longer use right join

    Created by lsmith77 at 24.10.2014 - 09:10, last updated at 24.10.2014 - 09:10

    right join are currently not supported by all RDBMS and so Jackalope Doctrine DBAL may fail due to its current implementation

    https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/Translation/TranslationStrategy/ChildTranslationStrategy.php#L167

    will lead to a right join in Doctrine DBAL https://github.com/jackalope/jackalope-doctrine-dbal/blob/master/src/Jackalope/Transport/DoctrineDBAL/Query/QOMWalker.php#L322

    of course we could also try to convert right joins to left joins in jackalope Doctrine DBAL

  • 561 add handling for disabling of child ordering not assigned

    #561 add handling for disabling of child ordering

    Created by lsmith77 at 10.09.2014 - 12:09, last updated at 11.09.2014 - 10:09

    see http://www.day.com/specs/jcr/2.0/23_Orderable_Child_Nodes.html

    in general support for child ordering tends to increase overhead in most implementations, so it may be disabled or not even supported.

  • 551 optimize translation prefetch not assigned

    #551 optimize translation prefetch

    Created by dbu at 18.08.2014 - 08:08, last updated at 25.08.2014 - 04:08

    follow-up of https://github.com/doctrine/phpcr-odm/pull/549/files#r16331850 , can only be done once https://github.com/jackalope/jackalope/issues/239 is fixed.

  • 532 Documents created by an EventSubscriber are not persisted not assigned

    #532 Documents created by an EventSubscriber are not persisted

    Created by asiragusa at 27.07.2014 - 10:07, last updated at 05.12.2014 - 05:12

    In my EventSubscriber I am creating a new Document on the preUpdate or prePersist events.

        public function prePersist(LifecycleEventArgs $args) {
            $doc = new Document();
            // initialization here ...
            $args->getObjectManager()->persist($doc);
        }
    

    This Document is not persisted as the changesets are calculated before the event is fired. Moreover the inserts are flushed before that the update event is fired, so there isn't a simple solution, as all the pre- events should be fired during the changesets calculation.

    Solving this issue obviously involves an important refactoring of the UnifOfWork and maybe can cause some BC breaks.

    A temporary fix for me can be to listen for the preFlush event (that is fired before the changeset calculation), but this means that I will have to manually calculate the changesets and look for the instance of the Document I want to observe (see #531 ). What I don't like about this is that this EventListener will be fired for every flush operation of the DocumentManager and it can slow down the entire application.

    What do you think about?

  • 531 DocumentListeners not assigned

    #531 DocumentListeners

    Created by asiragusa at 27.07.2014 - 01:07, last updated at 28.07.2014 - 12:07

    Doctrine ORM allows to define listeners for specific Entities (http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html#entity-listeners). Is it possible to do the same thing with PHPCR-ODM?

  • 504 Bug with translations and early exit not assigned

    #504 Bug with translations and early exit

    Created by dantleech at 15.06.2014 - 09:06, last updated at 10.08.2014 - 05:08

    Just for the record there seems to be a bug with the new early exist in the UOW#commit relating to updating translations, but not able to figure it out right now.

  • 461 [RFC] make it possible to persist serializeable objects in document not assigned

    #461 [RFC] make it possible to persist serializeable objects in document

    Created by ElectricMaxxx at 31.03.2014 - 12:03, last updated at 09.04.2014 - 09:04

    While handling with the SeoMetadata in symfony-cmf/seo-bundle, @WouterJ and i came to the conclusion that it would be nice to do have that behavior: https://github.com/symfony-cmf/SeoBundle/blob/master/Doctrine/Phpcr/SeoMetadataListener.php

    somehow as an new field type in the phpcr-odm. This would be cool for flat value objects. Behind the scenes the phpcr-odm can serialize into an array to persist it as it is done with assoc field and back.

  • 447 Nodenames in Children collection with filter not assigned

    #447 Nodenames in Children collection with filter

    Created by dbu at 06.03.2014 - 06:03, last updated at 29.09.2014 - 01:09

    in #446 i add validation on the Child mapping so that you can't misuse that field to persist a document that is not attached to that field.

    we could do the same in the Children, check the name with the filter that is set on the mapping and refuse a name that does not match. could save quite some confusion when somebody is getting it wrong.

    whats more, related to #358 we could integrate with autoname strategy by passing along a name hint that will match the filter. so for example if my filter is block* the namehint would be "block" so that i can actually use children and autoname documents together. this is a special case anyways, so i guess checking what type of id generator this is and call a specific method should be ok, do you agree? at the same time i would love to fix #358 and define precedence if both the document and the children mapping indicate a name hint. i think the children collection hint should win in that case, over the hint on the id. (its more sane to have hints from the children mapping than fixed on a document class anyways i think)

  • 444 [QueryBuilder] Allow comparisons with referenceable objects not assigned

    #444 [QueryBuilder] Allow comparisons with referenceable objects

    Created by dantleech at 28.02.2014 - 05:02, last updated at 02.10.2014 - 02:10

    I think it is. AFAIK the way to do this current is:

    $qb->where()->eq()->field('c.address')->literal($address->getUuid());
    

    We could do something like:

    $qb->where()->eq()->field('c.address')->uuidOf($address);
    

    Or automatically cast referenceable objects to uuids:

    $qb->where()->eq()->field('c.address')->literal($address);
    

    But that looks wierd.

  • 443 implement configurable change tracking not assigned

    #443 implement configurable change tracking

    Created by lsmith77 at 28.02.2014 - 04:02, last updated at 10.03.2014 - 08:03

    http://www.doctrine-project.org/docs/orm/2.2/en/reference/change-tracking-policies.html

  • 442 add support for "eventual migrations" not assigned

    #442 add support for "eventual migrations"

    Created by lsmith77 at 28.02.2014 - 04:02, last updated at 28.02.2014 - 04:02

    https://doctrine-mongodb-odm.readthedocs.org/en/latest/reference/migrating-schemas.html

  • 441 have a strategy for ReferenceOne/Many PATH to make it relative not assigned

    #441 have a strategy for ReferenceOne/Many PATH to make it relative

    Created by dbu at 28.02.2014 - 04:02, last updated at 01.03.2014 - 10:03

    this is a follow-up of #116

    i think a user might need to attach his own strategy to the document manager. we could call this path_relative= and provide "max" that string-compares the target path and the node path and puts as few ../ as necessary. but again this does not block this pull request.

  • 440 figure out how to handle dangling weak/path ReferenceOne/Many properties not assigned

    #440 figure out how to handle dangling weak/path ReferenceOne/Many properties

    Created by dbu at 28.02.2014 - 04:02, last updated at 31.03.2014 - 08:03

    this is a follow-up of #116

    the problem is: what happens when a ReferenceOne path or weak reference property points to something non-existing? is the property null? is the currently invalid reference removed on save or kept (which would make sense, in case the node at path appears later). but if it is usually kept, how can we delete it if we want?

  • 431 cleanup exception messages: exception factory methods not assigned

    #431 cleanup exception messages: exception factory methods

    Created by dbu at 15.02.2014 - 02:02, last updated at 29.09.2014 - 01:09

    By now there are a lot of exception messages spread all over the code. They should be moved to factory methods of the respective exception classes, and cleaned to be consistent. Some of the exceptions already are in factory methods.

  • 430 support custom id strategies not assigned

    #430 support custom id strategies

    Created by dbu at 15.02.2014 - 02:02, last updated at 29.09.2014 - 01:09

    see also #358 which is about improving the autoname id strategy. see for example https://github.com/doctrine/doctrine2/pull/206

    note that "id" for phpcr-odm is the phpcr path. so this is not the same as the uuid generator closure introduced in #401.

  • 429 support for parameter binding in query builder not assigned

    #429 support for parameter binding in query builder

    Created by dbu at 15.02.2014 - 02:02, last updated at 15.02.2014 - 02:02

    depends on https://github.com/jackalope/jackalope/issues/59

  • 428 hydrate query result to array not assigned

    #428 hydrate query result to array

    Created by dbu at 15.02.2014 - 02:02, last updated at 15.02.2014 - 02:02

    a query can currently return documents or phpcr nodes. it would be useful to also allow to return arrays of the selected values.

  • 427 query result caching not assigned

    #427 query result caching

    Created by dbu at 15.02.2014 - 02:02, last updated at 12.07.2017 - 08:07

    caching query results could improve the performance significantly.

    once done, also update DoctrinePHPCRBundle to integrate the cache with symfony.

  • 426 UnitOfWork::isScheduled... not assigned

    #426 UnitOfWork::isScheduled...

    Created by dbu at 15.02.2014 - 02:02, last updated at 29.09.2014 - 01:09

    as discussed in https://github.com/doctrine/phpcr-odm/pull/268 we should implement UnitOfWork::isScheduledDocument and isScheduledFor* other than isScheduledForInsert.

  • 425 implement Query::iterate not assigned

    #425 implement Query::iterate

    Created by dbu at 15.02.2014 - 02:02, last updated at 02.08.2015 - 07:08

    Implement the Query->iterate method which will return an IteratableResultSet as per the ORM.

  • 420 provide migrating document class on DocumentManager too not assigned

    #420 provide migrating document class on DocumentManager too

    Created by dbu at 14.02.2014 - 01:02, last updated at 11.07.2014 - 10:07

    there is now a command to migrate a document from one class to an other, but this would be useful functionality through code as well.

    https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/Tools/Console/Command/DocumentMigrateClassCommand.php

  • 417 Support nested associative arrays not assigned

    #417 Support nested associative arrays

    Created by dantleech at 10.02.2014 - 05:02, last updated at 19.03.2015 - 08:03

    It should be possible to have an array type which automatically creates a structure, e.g

    class Site {
        /**
         * @PHPCR\AssocArray()
         */
         protected $preferences;
    }
    

    Then automatically map that to a PHPCR structure:

    /site
        preferences/
             - jcr:primaryType  = phpcr:associative_array
             - key1 = value 
             key2/
                 - key3: = value
                 - key4: = value
                 key5/
    
  • 392 class cache? and referrers cache? not assigned

    #392 class cache? and referrers cache?

    Created by dbu at 15.12.2013 - 09:12, last updated at 28.12.2013 - 11:12

    while investigating a website using phpcr-odm, i found that after setting a depth of 2 there are two things left that lead to a lot of unnecessary requests: - parent / single child annotations always lead to getting that parent or child (parent won't be pre-fetched, child sometimes also not). the problem is that we do not know the class of the target, and thus can not create the correct proxy without having the node. i see 2 options: - we could allow to specify the class in the mapping. this is not always possible, and even if it is we might miss that a child / parent is of a subclass of the configured class. not very cool. - we could build a (persisted) cache of path => fqn class to build proxies without loading the node. this will however degrade performance if many of the child proxy are accessed (not with status quo, but i am preparing a PR to collect all child and the parent and fetch them with getNodes) - referrers resolution has to be done with NodeInterface::getReferrers - PHPCR seems to offer no way to batch that, even if we would know this is going to happen. i wonder if we could cache that across requests as well. probably this should be cached on jackalope level, rather than in the odm, to be sure we properly invalidate when needed.

    any thoughts?

  • 382 add tests for is[Single|Collection]ValuedAssociation not assigned

    #382 add tests for is[Single|Collection]ValuedAssociation

    Created by lsmith77 at 05.12.2013 - 09:12, last updated at 13.07.2015 - 02:07

    relates to https://github.com/doctrine/phpcr-odm/pull/380 and https://github.com/doctrine/phpcr-odm/pull/381

  • 361 Add generate documents command not assigned

    #361 Add generate documents command

    Created by wouterj at 17.10.2013 - 12:10, last updated at 07.02.2014 - 07:02

    Both the ORM and MongoDB ODM have a command which creates getters and setters, based on the mapping data. The PHPCR ODM should also provide something this command.

    I'm in doubt what the command name should be. The ORM uses orm:generate:entities and the MongoDB ODM uses odm:generate:documents. Some suggestions: - odm:generate:documents (duplicate, but it's the most logical) - phpcr:generate:documents (simple and descriptive, but sounds like it's something from phpcr/phpcr and not doctrine/phpcr-odm) - phpcr-odm:generate:documents (best option, but a very long command)

    For the last 2 suggestions, I would prefer to rename the MongoDB ODM command too.

    I'll start working on this one, but I would like to discuss the best name.

  • 358 autoname id strategy tuning not assigned

    #358 autoname id strategy tuning

    Created by dbu at 12.10.2013 - 01:10, last updated at 02.10.2014 - 02:10

    The autoname id strategy could use some tweaks: - [ ] A way to specify an optional nameHint for addNodeAutoNamed - [ ] The strategy should check if there is a nodename field mapped on the document and if that is non-empty and only generate a name if the field is not set. - [ ] We could add a way to slugify other fields, for example using the symfony ExpressionLanguage. that would be phpcr-odm only and not use the phpcr way of autocreating a nodename.

  • 734 references by uuid not assigned

    #734 references by uuid

    Created by ElectricMaxxx at 17.01.2017 - 10:01, last updated at 19.01.2017 - 08:01

    This should wrap up #493

    didn't implement the stuff, commented in code not to change.

    But there are still the Questions of @dbu

    I go top to button through the text/conversation, cause it is really hard to remember what the purpose was, even for me :-)

  • 702 [WIP] Add mapping to index reference collection by node name not assigned

    #702 [WIP] Add mapping to index reference collection by node name

    Created by koemeet at 18.04.2016 - 03:04, last updated at 17.01.2017 - 09:01

    Fixes #701 - [ ] Implement annotations and YAML driver - [ ] Restrict it only to only reference-many collections?

  • 683 Add failing test case proofing #682 not assigned

    #683 Add failing test case proofing #682

    Created by wouterj at 09.01.2016 - 12:01, last updated at 10.01.2016 - 09:01

    /cc @dbu

  • 665 Failing test for issue #657 (calling find before flush) not assigned

    #665 Failing test for issue #657 (calling find before flush)

    Created by dantleech at 09.10.2015 - 07:10, last updated at 14.10.2015 - 05:10

    Failing test for issue #657

  • 662 failing test for calling same with empty string not assigned

    #662 failing test for calling same with empty string

    Created by uwej711 at 30.09.2015 - 10:09, last updated at 08.10.2015 - 11:10

    this simple tests fails when using jackrabbit - not sure what the expected behaviour is, let's have a look at the spec?

  • 661 add failing test for #659 not assigned

    #661 add failing test for #659

    Created by uwej711 at 18.09.2015 - 11:09, last updated at 11.10.2015 - 09:10

    so there a two conditions to make that test fail 1. add an preUpdate Listener to the parent class 2. make sure the parents ChildrenCollection is initialized without either one of these conditions the test passes!

  • 620 Preserve order of operations dantleech

    #620 Preserve order of operations

    Created by dantleech at 25.03.2015 - 11:03, last updated at 13.05.2015 - 09:05
    Assigned to dantleech

    This PR is aiming to preserve the order of operations, it tries to do this whilst preserving the current behavior as much as possible. - Everytime an INSERT, MOVE or DELETE is made, we add an Operation to the TreeOperationQueue - No such action is taken for REORDER or UPDATE

    When flush is called: - The execute* methods are called with batches of operations, e.g. INSERT, INSERT, INSERT would be a single batch, however INSERT, INSERT, MOVE, INSERT would be three batches, so that the move is executed after the first 2 inserts.

  • 607 Demonstrate expected behaviour for QueryBuilder::setLocale not assigned

    #607 Demonstrate expected behaviour for QueryBuilder::setLocale

    Created by uwej711 at 06.03.2015 - 11:03, last updated at 11.05.2015 - 10:05

    Failing test for issue #605

    I would expect setLocale on the QueryBuilder would return the found document in the specified locale

  • 585 [WIP] Field slugifier id generator dantleech

    #585 [WIP] Field slugifier id generator

    Created by dantleech at 22.12.2014 - 06:12, last updated at 20.06.2016 - 02:06
    Assigned to dantleech

    Just an idea of how this might work.

  • 493 allow to add uuid as id to proxies not assigned

    #493 allow to add uuid as id to proxies

    Created by ElectricMaxxx at 20.05.2014 - 11:05, last updated at 17.01.2017 - 08:01

    As described in: https://gist.github.com/ElectricMaxxx/68a7d033a6357e757329 i would wish to create proxies (after calling $dm->getReference('MyClassName', 'uuid');) with the uuid as the id. This PR will make it possible that the request on the backend is able to handle the uuid. Normally $session->getNode($id); will fetch the node. Now there will be a check if the $id is an uuid and fetch the node by $session->getNodeByIdentifier($id); , which is able to look for a node by its uuid.

    I tried to create more tests for those documents that live as proxies in the UoW, but i do not get it to solve the mocking and i do not know if it is clever to do so, cause if i would mock some implementation depending, we would lose the decoupled view on the backend.

  • 396 [POC/RFC] Operations queue dantleech

    #396 [POC/RFC] Operations queue

    Created by dantleech at 25.12.2013 - 11:12, last updated at 23.03.2015 - 05:03
    Assigned to dantleech

    This is an experiment for an operations queue which unities the seperate scheduledInserts, scheduledUpdates, scheduledReorders, etc. into a single queue.

    This enables persistance operations to be committed out in the order in which they were programmed.

    This makes sense for move, reorder and delete operations which can have multiple entries in the stack for a given document. It makes less sense for "update" because the changeset is not recorded for each operation ("persist") but is calculated once before comitting.

    Lots of test fails here and this is not necessarily the solution we need, just an experiment.

  • 277 Reorder with rename test dantleech

    #277 Reorder with rename test

    Created by dantleech at 17.04.2013 - 02:04, last updated at 13.05.2015 - 09:05
    Assigned to dantleech

    This is a failing test, is it valid behavior?

  • 247 Child version test not assigned

    #247 Child version test

    Created by fazy at 20.02.2013 - 04:02, last updated at 01.07.2014 - 04:07

    As discussed here: https://groups.google.com/forum/?fromgroups=#!topic/symfony-cmf-devs/--3J2hbMsa8

    I've created failing test cases to show how I expect versioning to work with a node type child definition "on version copy".

    In effect I'm expecting versions to be 'in sync' with this method, so that when creating a version of the parent, a new version of the child is also created; When reverting the parent, any changes to the child are also reverted.

    I could be wrong of course, and I'm not 100% sure my node type is correct...

    Also, there's probably a better place to load the node type definition, but I don't think it's ready to go in the standard fixtures.

  • 779 QueryBuilder throws InvalidQueryException if node path contains '-<num>e' not assigned

    #779 QueryBuilder throws InvalidQueryException if node path contains '-<num>e'

    Created by SalvatorePollaci at 21.03.2018 - 04:03, last updated at 22.03.2018 - 08:03

    When querying for children of node with path which contains -<num>e, Query Builder throws InvalidQueryException.

    $path = '/cms/site1/routes/it/home/test-1e';
    $qb = $this->manager->createQueryBuilder();
                    $qb->fromDocument(AutoRoute::class, 'a');
                    $qb->where()->child($path, 'a');
                    $out = $qb->getQuery()->execute();
    

    STEP 1: /vendor/jackalope/jackalope-jackrabbit/src/Jackalope/Transport/Jackrabbit/Client.php line 888 $querystring = $query->getStatement();

    $querystring has value:

    SELECT * FROM [nt:unstructured] AS a WHERE (ISCHILDNODE(a, [/cms/site1/routes/it/home/test-1e]) AND (a.[phpcr:class] = 'MyCompany\Bundle\CMSBundle\Document\CMS\AutoRoute' OR a.[phpcr:classparents] = 'MyCompany\Bundle\CMSBundle\Document\CMS\AutoRoute'))
    

    STEP 2: /vendor/jackalope/jackalope-jackrabbit/src/Jackalope/Transport/Jackrabbit/Request.php line 529 $response = $curl->exec();

    $response has value:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?><D:error xmlns:D="DAV:"><dcr:exception xmlns:dcr="http://www.day.com/jcr/webdav/1.0"><dcr:class>javax.jcr.query.InvalidQueryException</dcr:class><dcr:message>Query:
    SELECT * FROM [nt:unstructured] AS a WHERE (ISCHILDNODE(a, [/cms/site1/routes/it/home/test-(*)1e]) AND (a.[phpcr:class] = 'MyCompany\Bundle\CMSBundle\Document\CMS\AutoRoute' OR a.[phpcr:classparents] = 'MyCompany\Bundle\CMSBundle\Document\CMS\AutoRoute'))</dcr:message></dcr:exception></D:error>
    

    As you can see above, it seems that someone is adding '(*)' to the JCR query.

    This only happens if node's path contains -<num>e.

    Does anyone have any solutions?

  • 754 Cannot remove nodes with autogenerated @Nodename not assigned

    #754 Cannot remove nodes with autogenerated @Nodename

    Created by mreiche at 06.09.2017 - 05:09, last updated at 08.09.2017 - 03:09

    I have an abstract document:

    /**
     * @MappedSuperclass(
     *     referenceable=true,
     *     mixins={"mix:created", "mix:lastModified"}
     * )
     */
    abstract class AbstractDocument {
        /**
         * @Id
         */
        private $id;
        /**
         * @Uuid()
         */
        private $uuid;
        /**
         * @ParentDocument(cascade={"persist"})
         */
        private $parent;
    }
    

    Which has no Nodename-property, which means, the local name and id were auto generated. When removing such a document:

    $dm = $this->getDocumentManager();
    $rootDoc = $dm->find(null,'/');
    /** @var AbstractDocument[] $children */
    $children = $rootDoc->getChildren();
    foreach ($children as $child) {
        echo $child->getUuid()."\n";
        $dm->remove($child);
    }
    $dm->flush();
    

    I get the following exception. Doctrine\ODM\PHPCR\PHPCRException: Cannot move/copy children by assignment as it would be ambiguous. Please use the DocumentManager::move() or PHPCR\Session::copy() operations for this: Topic@000000005c2f88550000000079d0359f (/454625409)

    Reference: https://stackoverflow.com/questions/46077197/doctrine-phpcr-how-to-remove-children-from-the-root-document/46077719

  • 745 Binding string with apostrophe using QueryBuilder->literal() crash query not assigned

    #745 Binding string with apostrophe using QueryBuilder->literal() crash query

    Created by stopsopa at 02.06.2017 - 10:06, last updated at 20.04.2018 - 10:04

    Error like:

    image

    When query is build like:

    image

    Fixed in my case:

    image

    but i think it should do this automatically internally. Or there should be method to bind explicitly data like in regular doctrine project:

    http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/query-builder.html#binding-parameters-to-your-query

  • 727 Allow serialized objects? not assigned

    #727 Allow serialized objects?

    Created by dantleech at 27.10.2016 - 10:10, last updated at 27.10.2016 - 10:10

    Currently if you want to store an object as a property of a document, you need to map it as a child document

    Doctrine ORM has the option to store ojects as serialized PHP, this is can be more desireable than mapping a child document for performance reasons.

    So I would propose something like:

    /**
     * @PHPCRODM\Field(type="php_object")
     */
    

    (FTR Doctrine ORM uses object, not sure if that would be better here).

    Alternatively we could make it possible for users to implement custom types (I don't think this is already possible?).

  • 726 Support for custom ID generator not assigned

    #726 Support for custom ID generator

    Created by dantleech at 10.10.2016 - 02:10, last updated at 11.10.2016 - 10:10

    I would like to automatically name a node based on a given prefix then an auto-generated numeric suffix, e.g.:

    node1/
        foobar-0/
        foobar-1/
        foobar-2/
    

    This allows children to be mapped and accessed as an array (e.g. @Children(filter=foobar-*).

    This is not currently possible with event listeners as, on update, the child node name is required and the generator is invoked before the event is fired.

    It would seem better to me to use a custom generator for this purpose. Doctrine allows a mapping for @CustomIdGenerator:

        /**
         * @Id @Column(type="string") @GeneratedValue(strategy="CUSTOM")
         * @CustomIdGenerator(class="stdClass")
         */
        public $id;
    

    I don't really see why this cannot be a service, but we could at least copy this in the PHPCR-ODM.

  • 715 [RFC] Collection Field Type not assigned

    #715 [RFC] Collection Field Type

    Created by dantleech at 23.07.2016 - 12:07, last updated at 27.10.2016 - 10:10

    I wonder if it would be possible to create a field type which would map a collection of child nodes to the property.

    $image1 = new Image();
    // ...
    $geolocation1 = new Geolocation();
    // ...
    $page = new Page();
    $page->title = "My Homepage";
    $page->images = [ $image1, $image2 ];
    $page->geolocations = [ $gelolocation1, $geolocation2, ... ];
    

    The difference between this and the @Children mapping is that these children would be directly related to the property, and stored in PHPCR as follows:

    my-page/
        title: My Homepage
        some-ns:image-0/
            ...
        some-ns:image-1/
            ...
    
        some-ns:geolocation-0/
            ...
        some-ns:geolocation-1/
            ...
    
  • 705 make it easier to query multiple documents without a join not assigned

    #705 make it easier to query multiple documents without a join

    Created by lsmith77 at 19.05.2016 - 02:05, last updated at 10.04.2017 - 01:04

    Building a query like the following:

    SELECT * FROM [nt:unstructured] AS a
                   WHERE (
                    [phpcr:class] = 'AppBundle\Document\Article’ OR 
                    [phpcr:class] = 'AppBundle\Document\Video’  OR
                    [phpcr:class] = 'AppBundle\Document\Crew’
                 )
                        AND 
                ( 
                    a.tags LIKE '%tag1%’ OR
                    a.tags LIKE '%tag2%’ OR
                    a.tags LIKE '%tag3%’
                )
    

    Maybe we could introduce a new method $from->documents() to be able to define that the [phpcr:class] filtering should be done on a set of documents?

    wdyt @dantleech ?

  • 704 multilanguage and sylius not assigned

    #704 multilanguage and sylius

    Created by dbu at 19.04.2016 - 08:04, last updated at 28.07.2016 - 04:07

    follow up of #703

    @steffenbrem lets continue the discussion here, and keep #703 for the bug you found.

    when we built the phpcr-odm multilanguage system, the main goal was that translations are transparent for your model and for the application using it. you set the locale on the document manager (e.g. in a request listener) and from then on all code can act as if there was no translations, and just "happen" to end up with the correct language. this turned out to be quite powerful while being really simple to use.

    what exactly do you need? you can query the document manager to fetch all available locales of a document.

    i would love to find a way so that sylius can use phpcr-odm multilanguage directly, rather than build a custom solution on top of it.

    did you look at the "child" strategy for translation? then you get a specific node per language. maybe we could find a way to expose those better, for applications that want to work on multiple languages at the same time, if that is what sylius wants to do.

  • 703 Cannot change nodename and add new reference to collection. Fails with 409, PathNotFoundException. not assigned

    #703 Cannot change nodename and add new reference to collection. Fails with 409, PathNotFoundException.

    Created by koemeet at 18.04.2016 - 03:04, last updated at 19.04.2016 - 08:04

    You cannot update the nodename of a document and add a new reference in the same transaction. To illustrate the issue better, I have the following code example:

    $page = $dm->find(null, $object->getId());
    
    $page->setName('helloo');
    
    $translation = new PageTranslation();
    $translation->setLocale('nl_NL');
    $translation->setTitle('Over ons');
    $translation->setBody('Content voor over ons');
    $page->addTranslation($translation);
    
    $dm->persist($page);
    $dm->flush();
    

    When running the above code, it will throw the following exception:

    PHPCR\PathNotFoundException: HTTP 409: /workspaces/525/channels/658/pages/helloo/nl_NL
    

    I am not sure if this is a problem in the phpcr-odm project or an issue with the jackalope-jackrabbit transport layer.

  • 682 Selecting nodes based on association doesn't work not assigned

    #682 Selecting nodes based on association doesn't work

    Created by wouterj at 31.12.2015 - 01:12, last updated at 09.01.2016 - 12:01

    According to the documentation this code should work to select a node based on an association:

    $number = $dm->find('MyProject\Domain\Phonenumber', '/path/to/phone/number');
    $user = $dm->getRepository('MyProject\Domain\User')->findOneBy(array('phone' => $number->getUuid()));
    

    However, when using this code to get a MenuNode documentation with a specific content object, I get an error: The code

    $dm = $this->get('doctrine_phpcr')->getManager();
    $contentUuid = $dm->getPhpcrSession()->getItem('/cms/content/home')->getPropertyValue('jcr:uuid');
    
    $dm->getRepository(MenuNode::class)->findOneBy(['content' => $contentUuid]);
    

    The error

    Cannot use association property "content" of class "...\MenuNode" as a dynamic operand

    The docs seem to be incorrect.

    More importantly, I can't find a way to select the node. The QueryBuilder can't help with this either.

  • 676 sqlite does not support RIGHT JOIN: problem with child translation strategy query not assigned

    #676 sqlite does not support RIGHT JOIN: problem with child translation strategy query

    Created by dbu at 08.12.2015 - 08:12, last updated at 03.02.2017 - 07:02

    a couple of tests fail when running jackalope-doctrine-dbal with sqlite instead of postgres / mysql

    the problem is with ChildTranslationStrategy::alterQueryForTranslation that does a QueryObjectModelConstantsInterface::JCR_JOIN_TYPE_RIGHT_OUTER to join a node with its translation child node.

    Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'SELECT n0.path AS n0_path, n0.identifier AS n0_identifier, n0.props AS n0_props, n1.path AS n1_path, n1.identifier AS n1_identifier, n1.props AS n1_props FROM phpcr_nodes n0 RIGHT JOIN phpcr_nodes n1 ON ( n0.workspace_name = n1.workspace_name AND n1.type IN ('nt:base', 'nt:unstructured', 'rep:root', 'phpcr:cms_profile', 'nt:activity', 'nt:address', 'nt:childNodeDefinition', 'nt:configuration', 'nt:frozenNode', 'nt:hierarchyNode', 'nt:file', 'nt:folder', 'nt:linkedFile', 'rep:Authorizable', 'rep:Group', 'rep:User', 'rep:AuthorizableFolder', 'test:protected_property_test', 'test:protected_property_test2', 'nt:nodeType', 'nt:propertyDefinition', 'nt:query', 'nt:resource', 'nt:version', 'nt:versionHistory', 'nt:versionLabels', 'nt:versionedChild', 'rep:ACE', 'rep:DenyACE', 'rep:GrantACE', 'rep:AccessControl', 'rep:PrincipalAccessControl', 'rep:Activities', 'rep:Configurations', 'rep:Members', 'rep:Policy', 'rep:ACL', 'rep:nodeTypes', 'rep:system', 'rep:versionStorage', 'phpcr:managed') AND (n1.path LIKE CONCAT(n0.path, '/%') AND n1.depth = n0.depth + 1) ) WHERE n0.workspace_name = ? AND n0.type IN ('nt:unstructured', 'rep:root', 'phpcr:cms_profile') AND ((EXTRACTVALUE(n1.props, 'count(//sv:property[@sv:name="topic"]/sv:value[text()="Not Exist"]) > 0') AND (EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name="phpcr:class"]/sv:value[text()="Doctrine\Tests\Models\Translation\ChildTranslationArticle"]) > 0') OR EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name="phpcr:classparents"]/sv:value[text()="Doctrine\Tests\Models\Translation\ChildTranslationArticle"]) > 0'))) AND n1.namespace || (CASE n1.namespace WHEN '' THEN '' ELSE ':' END) || n1.local_name = 'http://www.doctrine-project.org/projects/phpcr_odm/phpcr_locale:en')' with params ["default"]:

    SQLSTATE[HY000]: General error: 1 RIGHT and FULL OUTER JOINs are not currently supported

    options i see: - ignore - the problem has been present since 14.2.2014 - try to find a solution on the jackalope-doctrine-dbal level to work around the limitation - try to detect the problem in phpcr-odm and output a more specific warning (use other database or attribute translation)

    also, should we run the tests with sqlite and postgres to detect such issues?

  • 670 re-add DocumentManager::transactional() not assigned

    #670 re-add DocumentManager::transactional()

    Created by lsmith77 at 04.11.2015 - 04:11, last updated at 01.12.2015 - 09:12

    see https://github.com/doctrine/phpcr-odm/pull/669

  • 659 Changing the name of a node results in deletion not move not assigned

    #659 Changing the name of a node results in deletion not move

    Created by uwej711 at 14.09.2015 - 02:09, last updated at 05.04.2017 - 09:04

    I found this while trying to rename a route (from the RoutingBundle) with setName, the cause is a bit difficult to describe ...

    First you need a parent with mapped children, say /cms/routes/zn, the child /cms/routes/zn/page-1 will be renamed to page-2 with setName.

    The UnitOfWork correctly detects the move of /cms/routes/zn/page-1 to /cms/routes/zn/page-2. But it also creates a change for /cms/routes/zn because it adds an empty reordering in https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L1422 or https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L1424. the resulting executeUpdates for /cms/routes/zn triggers another computeChangeset for that node in https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L2482, which then results in a deletion of /cms/routes/zn/page-1.

    Only adding the reodering if the array in https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L1420 has count > 0 solves that very special case for me but if your parent node has other changes it will break anyway.

    Hope this is somehow clear ...

    Cheers Uwe

  • 658 Query builder seems unable to produce a fully working left join not assigned

    #658 Query builder seems unable to produce a fully working left join

    Created by sarcher at 06.09.2015 - 09:09, last updated at 06.11.2015 - 09:11

    I am attempting to use a LEFT JOIN behavior on child documents, but it seems to be impossible based on what I've seen.

    I have the following situation: - Tree of documents of the class Product - Documents may have one or more children of the class ProductDetail - Attempting to design a search query which includes data from these details

    Take the following query builder as an example:

    $searchTerm = '12345';
    
    $query = $queryBuilder
        ->fromDocument('Path\To\Product', 'p')
        ->addJoinLeftOuter()
            ->right()->document('Path\To\ProductDetail', 'pd')->end()
            ->condition()->child('pd', 'p')->end()
        ->end();
        ->andWhere()
            ->orX()
                ->like()->localName('p')->literal('%' . $searchTerm . '%')->end();
                ->andX()
                    ->eq()->field('pd.type')->literal('title')->end()
                    ->fullTextSearch('pd.content', $searchTerm)
                ->end()
            ->end()
        ->end()
        ->getQuery();
    

    Now, PHPCR-ODM produces a JCR-SQL2 query like:

    SELECT * 
    FROM [nt:unstructured] AS p 
    LEFT OUTER JOIN [nt:unstructured] AS pd ON ISCHILDNODE(pd, p) 
    WHERE (((LOCALNAME(p) LIKE '%12345%' OR (pd.type = 'title' AND CONTAINS(pd.content, '12345'))) 
      AND (p.[phpcr:class] = 'Path\To\Product' OR p.[phpcr:classparents] = 'Path\To\Product'))
      AND (pd.[phpcr:class] = 'Path\To\ProductDetail' OR pd.[phpcr:classparents] = 'Path\To\ProductDetail'))
    

    This all works as expected, if and only if the Product nodes contain at least one ProductDetail child -- in other words, it seems to behave as an INNER JOIN. Any Product node that has no such child will not be included in the results of the query, because of two things: 1. The query is specifying SELECT * rather than SELECT p.*, which is requiring a result for the pd alias 2. The query is appending an AND clause at the end, which will only match if the alias pd is present and of the appropriate class

    The query that I actually want is this:

    SELECT p.* 
    FROM [nt:unstructured] AS p 
    LEFT OUTER JOIN [nt:unstructured] AS pd ON ISCHILDNODE(pd, p) 
    WHERE (((LOCALNAME(p) LIKE '%12345%' OR (pd.type = 'title' AND CONTAINS(pd.content, '12345'))) 
      AND (p.[phpcr:class] = 'Path\To\Product' OR p.[phpcr:classparents] = 'Path\To\Product')))
    

    This works as one would expect a LEFT JOIN to, delivering results whose node names match "12345" regardless of whether or not they contain one or more ProductDetail children.

    What I cannot figure out is if it is possible to get to my desired query; is it? This seems to be a bug, but perhaps I am misunderstanding the intent here.

    If this is intended, is there a workaround to achieve what I am trying to do? I realize I could just pass the JCR-SQL2 query to the session (my environment uses Jackrabbit) and then manually invoke hydration, but that seems a bit ugly. :)

  • 657 Regression when persisting object ID and changing the locale not assigned

    #657 Regression when persisting object ID and changing the locale

    Created by dantleech at 29.08.2015 - 12:08, last updated at 08.10.2015 - 09:10

    A test has been added in the RoutingAutoBundle which seems to reveal a regression introduced in 83863d7e460c112aff1497abc4fdfb9c7b93cde2.

    Failure is as follows

    1) Symfony\Cmf\Bundle\RoutingAutoBundle\Tests\Functional\EventListener\AutoRouteListenerTest::testMultilangArticleRemainsSameLocale
    Undefined index: path
    
    /home/daniel/www/symfony-cmf/RoutingAutoBundle/vendor/symfony/phpunit-bridge/DeprecationErrorHandler.php:40
    /home/daniel/www/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:1604
    /home/daniel/www/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:1123
    /home/daniel/www/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:2157
    /home/daniel/www/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/DocumentManager.php:949
    /home/daniel/www/symfony-cmf/RoutingAutoBundle/Tests/Functional/EventListener/AutoRouteListenerTest.php:288
    

    Where path is the name of the property mapped as the @Id.

    /cc @lsmith77 @WouterJ

  • 654 Children not persisted when created in doctrine event listener not assigned

    #654 Children not persisted when created in doctrine event listener

    Created by dbu at 10.08.2015 - 09:08, last updated at 10.08.2015 - 09:08

    @petforsberg reported originally in https://github.com/doctrine/DoctrinePHPCRBundle/issues/179

    Within my app, when I create an Article, app auto-generates a News for it. Both (Article and News) have their own children-nodes attached (always). The workflow looks like this: 1. persist Article 2. Doctrine EventListener - Article postPersist: create children, and set their Parent as Article 3. Doctrine EventListener - Article postPersist: EventDispatcher -> generate News (creates new News document inside the other service) 4. persist News (in the same service) 5. Doctrine EventListener - News postPersist: create children, and set their Parent as News

    Points 1-4 work well. But children persisted to another persisted Document - News - seem to be not persisted at all. I checked everything, it took me like 4 hours or so. Everything looks fine, objects are created, persisted, they exist... until I do flush. Then News children-elements disappear.

    Do you know why does it happen?

    Forgot to mention: when I create a bare News (not auto-generated in the nested Doctrine events), it is created without a problem, with its children.

  • 653 Setting parent document to a Generic Node created on-the-fly in a prePersist listener causes PHPCRException not assigned

    #653 Setting parent document to a Generic Node created on-the-fly in a prePersist listener causes PHPCRException

    Created by kminh at 24.07.2015 - 08:07, last updated at 26.07.2015 - 04:07

    Hello,

    I'm trying to "move" a new (yes a new) document (Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route) to another node by using setParentDocument in a prePersist event listener.

    The target node is created on the fly if it's not there, using NodeHelper::createPath (I only need a generic target node).

        public function prePersist(LifecycleEventArgs $args)
        {
            $route = $args->getObject();
            $dm = $args->getObjectManager();
    
            if ($route instanceof Route) {
                $localeNodePath = $this->routeRoot . '/' . $this->locale;
    
                if (!$localeNode = $dm->find(null, $localeNodePath)) {
                    $session = $dm->getPhpcrSession();
                    $localeNode = NodeHelper::createPath($session, $localeNodePath);
    
                    /* $session->save(); I believe this is not needed? */ 
                }
    
                $route->setParentDocument($localeNode);
            }
        }
    

    The exception message is Document is not managed and has no id ....

    Perhaps this is caused by the fact that the target node is created on the fly, but even calling $session->save doesn't help.

    Any insight is greatly appreciated.

  • 628 Performance issue with getParent and maybe other things not assigned

    #628 Performance issue with getParent and maybe other things

    Created by dantleech at 09.04.2015 - 04:04, last updated at 10.08.2015 - 08:08

    I noticed that if you map the @ParentDocument it seems that the parent node is eagerly loaded:

    https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L550

    This is, I suppose, so that we know which class to create a proxy for, but obviously it almost defeats the point of creating a Proxy in the first place.

    Doctrine ORM doesn't have this issue I guess. Any thoughts?

  • 623 Find solution for explicit localization when using the document manager not assigned

    #623 Find solution for explicit localization when using the document manager

    Created by dantleech at 29.03.2015 - 09:03, last updated at 04.07.2015 - 12:07

    The document manager currently has one localization aware method - findTranslation, which is the localized analogue of find There does not exist an analogue for ``findMany` and the query builder does not support localizing results.

    Other methods that could be localized: - getReferrers - getReference (?) - getChildren - getDocumentsByPhpcrQuery

    Repository classes also have methods which could be localized.

    Possible solutions - Do nothing and deprecate findTranslation: The user must change global state by changing the locale of the locale chooser. - Make the DocumentManager localizable through a localize method which returns a localized clone of the DocumentManager. - Add explicit translated methods: getTranslatedReferrers, findTranslatedMany - Add additional, optional, $locale argument to all existing localizable methods.

  • 612 Not possible to map references as translated fields. dantleech

    #612 Not possible to map references as translated fields.

    Created by dantleech at 15.03.2015 - 10:03, last updated at 15.03.2015 - 11:03
    Assigned to dantleech

    Currently it is not possible to map references (@ReferenceOne, @ReferenceMany) as translated fields. This should be possible I think.

  • 611 Loading translations does not cascade to children when there is a document in the hierarchy without translatable fields not assigned

    #611 Loading translations does not cascade to children when there is a document in the hierarchy without translatable fields

    Created by uwej711 at 12.03.2015 - 02:03, last updated at 04.07.2015 - 12:07

    When you have a container block with no translated fields doLoadTranslation will not load the proper translations of the children of that container due to https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L3384

    So I have to put a dummy translated field and a locale to the container to make it work.

  • 610 New children are always appended and not inserted at the right position not assigned

    #610 New children are always appended and not inserted at the right position

    Created by uwej711 at 12.03.2015 - 01:03, last updated at 04.07.2015 - 12:07

    Adding a new object to the children of a document inserts the new object always at the end of the children regardless of the position of the new child in the collection. In comparison to that, reordering existing children in the collection has the desired effect (if the backend supports ordered children).

    Will try to create a failing test.

  • 605 QueryBuilder::setLocale has no effect for HYDRATE_DOCUMENT not assigned

    #605 QueryBuilder::setLocale has no effect for HYDRATE_DOCUMENT

    Created by uwej711 at 06.03.2015 - 12:03, last updated at 21.03.2015 - 06:03

    in DocumentManager::getDocumentsByPhpcrQuery the locale of the query is ignored.

  • 595 QueryBuilder : lt() on datetime does not exclude current object not assigned

    #595 QueryBuilder : lt() on datetime does not exclude current object

    Created by Peekmo at 16.02.2015 - 12:02, last updated at 04.07.2015 - 12:07

    Hello.

    I have a problem with a filter in the query builder on a datetime field. I want the object with the date just before the given one, and the query returns an object with the same datetime (exactly the same)

        public function getPreviousNews(News $news)
        {
            $qb = $this->createQueryBuilder('news');
            $qb->where()->lt()->field('news.date')->literal($news->getDate())->end(); // Here
            $qb->orderBy()->desc()->field('news.date');
            $qb->setMaxResults(1);
    
            try {
                return $qb->getQuery()->getSingleResult();
            } catch (\Exception $ex) {
                return null;
            }
        }
    

    Query generated

    SELECT * FROM [nt:unstructured] AS news WHERE (news.date < CAST('1996-02-16T10:20:39.000+01:00' AS DATE) AND (news.[phpcr:class] = 'xxx\AppBundle\Document\News' OR news.[phpcr:classparents] = 'xxx\AppBundle\Document\News')) ORDER BY news.date DESC
    

    And var_dump of the datetime from the object that I get

    object(DateTime)#1573 (3) { ["date"]=> string(26) "1996-02-16 10:20:39.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+01:00" } 
    

    The problem does not appears with gt() method.

    Thank you !

  • 588 use sprintf in MappingException not assigned

    #588 use sprintf in MappingException

    Created by lsmith77 at 09.01.2015 - 04:01, last updated at 10.01.2015 - 12:01

    see https://github.com/doctrine/phpcr-odm/pull/587

  • 584 RFC: Enforce UUIDs on mutable documents not assigned

    #584 RFC: Enforce UUIDs on mutable documents

    Created by Ocramius at 13.12.2014 - 12:12, last updated at 18.12.2014 - 05:12

    What

    As per discussion with @dantleech, the current UnitOfWork identity map is very messy, and unlikely to be compatible with the upcoming Ocramius/ChangeSet rework.

    Why

    There are also some cases where identifier changes in the current strategy cause problems, such as: - loading an object /foo/bar - moving it to /foo/baz - adding a new object /foo/bar - flushing

    As well as other conditions where race conditions in a single flush may happen.

    Solution

    Therefore, I suggest that the ODM enforces UUID mixins on nodes: - documents and node types registered by the ODM always have a UUID mixin - UUID is not required to be hydrated into the object - documents and node types NOT registered by the ODM are not required to have an UUID mixin, but may not be modified (read-only is enforced, and changing the documents causes exceptions on flush())

  • 575 refactor to no longer use right join not assigned

    #575 refactor to no longer use right join

    Created by lsmith77 at 24.10.2014 - 09:10, last updated at 24.10.2014 - 09:10

    right join are currently not supported by all RDBMS and so Jackalope Doctrine DBAL may fail due to its current implementation

    https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/Translation/TranslationStrategy/ChildTranslationStrategy.php#L167

    will lead to a right join in Doctrine DBAL https://github.com/jackalope/jackalope-doctrine-dbal/blob/master/src/Jackalope/Transport/DoctrineDBAL/Query/QOMWalker.php#L322

    of course we could also try to convert right joins to left joins in jackalope Doctrine DBAL

  • 561 add handling for disabling of child ordering not assigned

    #561 add handling for disabling of child ordering

    Created by lsmith77 at 10.09.2014 - 12:09, last updated at 11.09.2014 - 10:09

    see http://www.day.com/specs/jcr/2.0/23_Orderable_Child_Nodes.html

    in general support for child ordering tends to increase overhead in most implementations, so it may be disabled or not even supported.

  • 551 optimize translation prefetch not assigned

    #551 optimize translation prefetch

    Created by dbu at 18.08.2014 - 08:08, last updated at 25.08.2014 - 04:08

    follow-up of https://github.com/doctrine/phpcr-odm/pull/549/files#r16331850 , can only be done once https://github.com/jackalope/jackalope/issues/239 is fixed.

  • 532 Documents created by an EventSubscriber are not persisted not assigned

    #532 Documents created by an EventSubscriber are not persisted

    Created by asiragusa at 27.07.2014 - 10:07, last updated at 05.12.2014 - 05:12

    In my EventSubscriber I am creating a new Document on the preUpdate or prePersist events.

        public function prePersist(LifecycleEventArgs $args) {
            $doc = new Document();
            // initialization here ...
            $args->getObjectManager()->persist($doc);
        }
    

    This Document is not persisted as the changesets are calculated before the event is fired. Moreover the inserts are flushed before that the update event is fired, so there isn't a simple solution, as all the pre- events should be fired during the changesets calculation.

    Solving this issue obviously involves an important refactoring of the UnifOfWork and maybe can cause some BC breaks.

    A temporary fix for me can be to listen for the preFlush event (that is fired before the changeset calculation), but this means that I will have to manually calculate the changesets and look for the instance of the Document I want to observe (see #531 ). What I don't like about this is that this EventListener will be fired for every flush operation of the DocumentManager and it can slow down the entire application.

    What do you think about?

  • 531 DocumentListeners not assigned

    #531 DocumentListeners

    Created by asiragusa at 27.07.2014 - 01:07, last updated at 28.07.2014 - 12:07

    Doctrine ORM allows to define listeners for specific Entities (http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html#entity-listeners). Is it possible to do the same thing with PHPCR-ODM?

  • 504 Bug with translations and early exit not assigned

    #504 Bug with translations and early exit

    Created by dantleech at 15.06.2014 - 09:06, last updated at 10.08.2014 - 05:08

    Just for the record there seems to be a bug with the new early exist in the UOW#commit relating to updating translations, but not able to figure it out right now.

  • 461 [RFC] make it possible to persist serializeable objects in document not assigned

    #461 [RFC] make it possible to persist serializeable objects in document

    Created by ElectricMaxxx at 31.03.2014 - 12:03, last updated at 09.04.2014 - 09:04

    While handling with the SeoMetadata in symfony-cmf/seo-bundle, @WouterJ and i came to the conclusion that it would be nice to do have that behavior: https://github.com/symfony-cmf/SeoBundle/blob/master/Doctrine/Phpcr/SeoMetadataListener.php

    somehow as an new field type in the phpcr-odm. This would be cool for flat value objects. Behind the scenes the phpcr-odm can serialize into an array to persist it as it is done with assoc field and back.

  • 447 Nodenames in Children collection with filter not assigned

    #447 Nodenames in Children collection with filter

    Created by dbu at 06.03.2014 - 06:03, last updated at 29.09.2014 - 01:09

    in #446 i add validation on the Child mapping so that you can't misuse that field to persist a document that is not attached to that field.

    we could do the same in the Children, check the name with the filter that is set on the mapping and refuse a name that does not match. could save quite some confusion when somebody is getting it wrong.

    whats more, related to #358 we could integrate with autoname strategy by passing along a name hint that will match the filter. so for example if my filter is block* the namehint would be "block" so that i can actually use children and autoname documents together. this is a special case anyways, so i guess checking what type of id generator this is and call a specific method should be ok, do you agree? at the same time i would love to fix #358 and define precedence if both the document and the children mapping indicate a name hint. i think the children collection hint should win in that case, over the hint on the id. (its more sane to have hints from the children mapping than fixed on a document class anyways i think)

  • 444 [QueryBuilder] Allow comparisons with referenceable objects not assigned

    #444 [QueryBuilder] Allow comparisons with referenceable objects

    Created by dantleech at 28.02.2014 - 05:02, last updated at 02.10.2014 - 02:10

    I think it is. AFAIK the way to do this current is:

    $qb->where()->eq()->field('c.address')->literal($address->getUuid());
    

    We could do something like:

    $qb->where()->eq()->field('c.address')->uuidOf($address);
    

    Or automatically cast referenceable objects to uuids:

    $qb->where()->eq()->field('c.address')->literal($address);
    

    But that looks wierd.

  • 443 implement configurable change tracking not assigned

    #443 implement configurable change tracking

    Created by lsmith77 at 28.02.2014 - 04:02, last updated at 10.03.2014 - 08:03

    http://www.doctrine-project.org/docs/orm/2.2/en/reference/change-tracking-policies.html

  • 442 add support for "eventual migrations" not assigned

    #442 add support for "eventual migrations"

    Created by lsmith77 at 28.02.2014 - 04:02, last updated at 28.02.2014 - 04:02

    https://doctrine-mongodb-odm.readthedocs.org/en/latest/reference/migrating-schemas.html

  • 441 have a strategy for ReferenceOne/Many PATH to make it relative not assigned

    #441 have a strategy for ReferenceOne/Many PATH to make it relative

    Created by dbu at 28.02.2014 - 04:02, last updated at 01.03.2014 - 10:03

    this is a follow-up of #116

    i think a user might need to attach his own strategy to the document manager. we could call this path_relative= and provide "max" that string-compares the target path and the node path and puts as few ../ as necessary. but again this does not block this pull request.

  • 440 figure out how to handle dangling weak/path ReferenceOne/Many properties not assigned

    #440 figure out how to handle dangling weak/path ReferenceOne/Many properties

    Created by dbu at 28.02.2014 - 04:02, last updated at 31.03.2014 - 08:03

    this is a follow-up of #116

    the problem is: what happens when a ReferenceOne path or weak reference property points to something non-existing? is the property null? is the currently invalid reference removed on save or kept (which would make sense, in case the node at path appears later). but if it is usually kept, how can we delete it if we want?

  • 431 cleanup exception messages: exception factory methods not assigned

    #431 cleanup exception messages: exception factory methods

    Created by dbu at 15.02.2014 - 02:02, last updated at 29.09.2014 - 01:09

    By now there are a lot of exception messages spread all over the code. They should be moved to factory methods of the respective exception classes, and cleaned to be consistent. Some of the exceptions already are in factory methods.

  • 430 support custom id strategies not assigned

    #430 support custom id strategies

    Created by dbu at 15.02.2014 - 02:02, last updated at 29.09.2014 - 01:09

    see also #358 which is about improving the autoname id strategy. see for example https://github.com/doctrine/doctrine2/pull/206

    note that "id" for phpcr-odm is the phpcr path. so this is not the same as the uuid generator closure introduced in #401.

  • 429 support for parameter binding in query builder not assigned

    #429 support for parameter binding in query builder

    Created by dbu at 15.02.2014 - 02:02, last updated at 15.02.2014 - 02:02

    depends on https://github.com/jackalope/jackalope/issues/59

  • 428 hydrate query result to array not assigned

    #428 hydrate query result to array

    Created by dbu at 15.02.2014 - 02:02, last updated at 15.02.2014 - 02:02

    a query can currently return documents or phpcr nodes. it would be useful to also allow to return arrays of the selected values.

  • 427 query result caching not assigned

    #427 query result caching

    Created by dbu at 15.02.2014 - 02:02, last updated at 12.07.2017 - 08:07

    caching query results could improve the performance significantly.

    once done, also update DoctrinePHPCRBundle to integrate the cache with symfony.

  • 426 UnitOfWork::isScheduled... not assigned

    #426 UnitOfWork::isScheduled...

    Created by dbu at 15.02.2014 - 02:02, last updated at 29.09.2014 - 01:09

    as discussed in https://github.com/doctrine/phpcr-odm/pull/268 we should implement UnitOfWork::isScheduledDocument and isScheduledFor* other than isScheduledForInsert.

  • 425 implement Query::iterate not assigned

    #425 implement Query::iterate

    Created by dbu at 15.02.2014 - 02:02, last updated at 02.08.2015 - 07:08

    Implement the Query->iterate method which will return an IteratableResultSet as per the ORM.

  • 420 provide migrating document class on DocumentManager too not assigned

    #420 provide migrating document class on DocumentManager too

    Created by dbu at 14.02.2014 - 01:02, last updated at 11.07.2014 - 10:07

    there is now a command to migrate a document from one class to an other, but this would be useful functionality through code as well.

    https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/Tools/Console/Command/DocumentMigrateClassCommand.php

  • 417 Support nested associative arrays not assigned

    #417 Support nested associative arrays

    Created by dantleech at 10.02.2014 - 05:02, last updated at 19.03.2015 - 08:03

    It should be possible to have an array type which automatically creates a structure, e.g

    class Site {
        /**
         * @PHPCR\AssocArray()
         */
         protected $preferences;
    }
    

    Then automatically map that to a PHPCR structure:

    /site
        preferences/
             - jcr:primaryType  = phpcr:associative_array
             - key1 = value 
             key2/
                 - key3: = value
                 - key4: = value
                 key5/
    
  • 392 class cache? and referrers cache? not assigned

    #392 class cache? and referrers cache?

    Created by dbu at 15.12.2013 - 09:12, last updated at 28.12.2013 - 11:12

    while investigating a website using phpcr-odm, i found that after setting a depth of 2 there are two things left that lead to a lot of unnecessary requests: - parent / single child annotations always lead to getting that parent or child (parent won't be pre-fetched, child sometimes also not). the problem is that we do not know the class of the target, and thus can not create the correct proxy without having the node. i see 2 options: - we could allow to specify the class in the mapping. this is not always possible, and even if it is we might miss that a child / parent is of a subclass of the configured class. not very cool. - we could build a (persisted) cache of path => fqn class to build proxies without loading the node. this will however degrade performance if many of the child proxy are accessed (not with status quo, but i am preparing a PR to collect all child and the parent and fetch them with getNodes) - referrers resolution has to be done with NodeInterface::getReferrers - PHPCR seems to offer no way to batch that, even if we would know this is going to happen. i wonder if we could cache that across requests as well. probably this should be cached on jackalope level, rather than in the odm, to be sure we properly invalidate when needed.

    any thoughts?

  • 382 add tests for is[Single|Collection]ValuedAssociation not assigned

    #382 add tests for is[Single|Collection]ValuedAssociation

    Created by lsmith77 at 05.12.2013 - 09:12, last updated at 13.07.2015 - 02:07

    relates to https://github.com/doctrine/phpcr-odm/pull/380 and https://github.com/doctrine/phpcr-odm/pull/381

  • 361 Add generate documents command not assigned

    #361 Add generate documents command

    Created by wouterj at 17.10.2013 - 12:10, last updated at 07.02.2014 - 07:02

    Both the ORM and MongoDB ODM have a command which creates getters and setters, based on the mapping data. The PHPCR ODM should also provide something this command.

    I'm in doubt what the command name should be. The ORM uses orm:generate:entities and the MongoDB ODM uses odm:generate:documents. Some suggestions: - odm:generate:documents (duplicate, but it's the most logical) - phpcr:generate:documents (simple and descriptive, but sounds like it's something from phpcr/phpcr and not doctrine/phpcr-odm) - phpcr-odm:generate:documents (best option, but a very long command)

    For the last 2 suggestions, I would prefer to rename the MongoDB ODM command too.

    I'll start working on this one, but I would like to discuss the best name.

  • 358 autoname id strategy tuning not assigned

    #358 autoname id strategy tuning

    Created by dbu at 12.10.2013 - 01:10, last updated at 02.10.2014 - 02:10

    The autoname id strategy could use some tweaks: - [ ] A way to specify an optional nameHint for addNodeAutoNamed - [ ] The strategy should check if there is a nodename field mapped on the document and if that is non-empty and only generate a name if the field is not set. - [ ] We could add a way to slugify other fields, for example using the symfony ExpressionLanguage. that would be phpcr-odm only and not use the phpcr way of autocreating a nodename.

jackalope

jackalope

Travis Build Status Latest Stable Version Total Downloads
  • 349 How to clear ObjectManager::objectsByPath array to reduce memory consumption not assigned

    #349 How to clear ObjectManager::objectsByPath array to reduce memory consumption

    Created by holtkamp at 26.04.2018 - 03:04, last updated at 03.05.2018 - 10:05

    When batch processing the contents of big amounts of nodes, the amount of used memory increases significantly.

    I thought it would be possible to periodically clear the session/objectManager using Session::clear() to reduce the amount of used memory and it did! As we can see in the objectManager, all properties are reset to their initial value, most importantly, the objectsByPaths array:

    https://github.com/jackalope/jackalope/blob/f9509dadc2cfa781b7dc29d6f374c40390be4dc2/src/Jackalope/ObjectManager.php#L1582-L1598

    However, Session::clear() is marked as being deprecated and Session::refresh() should be used. Unfortunately with Session::refresh() the Session::objectsByPath array is never cleared, so the amount of memory still keeps increasing.

    Additionally, it seems to really slow down the process.

    What is the best way to deal with this?

    Is usage of Session::clear() in certain kind of scenarios like batch processing justified?

  • 348 getVersionByLabel() is not correct when called in the same request as addVersionLabel() not assigned

    #348 getVersionByLabel() is not correct when called in the same request as addVersionLabel()

    Created by UFTimmy at 08.03.2018 - 03:03, last updated at 04.04.2018 - 04:04

    If you follow this sequence, you do not get the correct Version. Instead, you get the previous version that held the label:

    addVersionLabel checkin (or by calling notifyHistoryChanged directly) getVersionByLabel

    Performing acts in that sequence will get you the Version that had the label before you moved it. The reason is due to the ObjectManager's in memory caching of the jcr:versionLabels node.

    addVersionLabels updates its PHP internal property for where the label is, here: https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Version/VersionHistory.php#L197

    At this point, if you call getVersionByLabel, everything is fine. However, if within the same HTTP request, you perform a checkin or otherwise call notifyHistoryChanged, then that PHP internal property for versionLabels is emptied: https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Version/VersionHistory.php#L319

    Now the next time you call getVersionByLabel, it needs to now call initVersionLabels again, since the Version state was cleared via notifyHistoryChanged.

    The problem is then here, when VersionHistory calls getNode: https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Version/VersionHistory.php#L279

    That calls Node:;getNode, which calls ObjectManager's getNodeByPath: https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Node.php#L666

    And at this point, the Node in question has already been fetched once, so it's in memory, and thus returned without fetching it fresh: https://github.com/jackalope/jackalope/blob/master/src/Jackalope/ObjectManager.php#L205

    The in memory node returned here contains where the label was prior to moving it.

    I believe I have found a bug, but I'm not sure of any solutions.

    Possible ideas:

    • Have the notifyHistoryChanged clear out the in memory cache of ObjectManager for just that one node. But I don't see any methods on ObjectManager to facilitate that.
    • Update the node's properties when addVersionLabel is called, so that way the in memory version of it will be correct. Something like this: $node = $this->getNode('jcr:versionLabels'); $node->setProperty($label, $version); However, the property is protected, and thus errors, when setProperty is called.

    As a work around for me, I am calling clear on the ObjectManager after a checkin, which resets the in memory map of ObjectManager so that the Version history node is fetched fresh next time.

            /** @var Session $session */
            $session = $this->dm->getPhpcrSession();
            $session->getObjectManager()->clear();
    

    But clear is deprecated, so I don't believe this is a durable workaround.

  • 340 XML document import not working for text elements not assigned

    #340 XML document import not working for text elements

    Created by perklason at 22.08.2017 - 06:08, last updated at 05.10.2017 - 06:10

    Hi when I try to import XML with tags like this one (I am using jackalope-doctrine-dbal in Symfony):

    <title>HarryPotter</title>

    I get the following error:

    [PHPCR\InvalidSerializedDataException]             
    
    Unexpected element in stream: #text="HarryPotter"  
    
    Exception trace:
     () at /var/www/html/std1/vendor/jackalope/jackalope/src/Jackalope/ImportExport/ImportExport.php:631
    
    

    If I do a $xml->isValid just before that line, it returns true. So what is wrong? Bug?

    This is the XML doc I try to import for testing:

    <bookstore>
      <book category="children">
        <title>HarryPotter</title>
        <author>J K. Rowling</author>   
        <year>2005</year>
        <price>29.99</price>
      </book>
      <book category="web">
        <title>Learning XML</title>
        <author>Erik T. Ray</author>    
        <year>2003</year>
        <price>39.95</price>
      </book>
    </bookstore> 
    
  • 338 Simple query not working on property? not assigned

    #338 Simple query not working on property?

    Created by alex-barylski at 27.07.2017 - 04:07, last updated at 28.07.2017 - 11:07

    I apologize if the issue is trivial - but I cannot seem to figure out why this is happening.

    // THIS DOESN'T WORK?!?!
    $sql = "SELECT * FROM [nt:unstructured] WHERE [nt:unstructured].[path] = '/index.html'";
    
    // THIS WORKS FINE
    //$sql = "SELECT * FROM [nt:unstructured] WHERE [nt:unstructured].[path] = '/work'";
    $query = $queryManager->createQuery($sql, 'JCR-SQL2');
    

    Here is the XML I am using to initialize PHPCR:

    <cms xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
        <routes>
            <index path="/" slug="cms/types/pages" />
            <alias path="/index.html" slug="cms/types/pages" />
            <work path="/test" slug="http://test.com" />
        </routes>
    </cms>
    
    

    What am I doing wrong?

  • 325 setProperty with full namespace not working not assigned

    #325 setProperty with full namespace not working

    Created by vondrasekpavel at 31.01.2017 - 11:01, last updated at 31.01.2017 - 02:01

    I tried to update documentation in Dbal.

    I wrote this code:

    // see Bootstrapping for how to get the session 
    use PHPCR\NodeType\NodeTypeInterface;
    
    $rootNode = $session->getNode('/');
    $whitewashing = $rootNode->addNode('www-whitewashing-de');
    $session->save();
    
    $posts = $whitewashing->addNode('posts');
    $session->save();
    
    $post = $posts->addNode('welcome-to-blog');
    
    $post->addMixin(NodeTypeInterface::MIX_TITLE);
    $post->setProperty(PropertyInterface::JCR_TITLE, 'Welcome to my Blog!');
    $post->setProperty(PropertyInterface::JCR_DESCRIPTION, 'This is the first post on my blog! Do you like it?');
    
    $session->save();
    

    $post->setProperty(PropertyInterface::JCR_TITLE, 'Welcome to my Blog!'); throws ( ! ) Fatal error: Uncaught PHPCR\NamespaceException: Mapping for '{http' is not defined in /Users/pavel/Sites/jackalope-doctrine-dbal/vendor/jackalope/jackalope/src/Jackalope/NamespaceRegistry.php on line 189

    Maybe setProperty isn't able to work with property name in extended form?

  • 321 refresh should not trigger a reload not assigned

    #321 refresh should not trigger a reload

    Created by dbu at 19.12.2016 - 10:12, last updated at 25.05.2018 - 05:05

    reported in https://github.com/doctrine/DoctrinePHPCRBundle/issues/265 we can get an exception during the clear. instead, clear should not trigger any state checks. (it should also not give you children that are gone, not sure if it does or not)

      [PHPCR\InvalidItemStateException]
      Item /cms/routes/krzysztof-krawczyk is deleted
    
    
    Exception trace:
     () at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/Item.php:640
     Jackalope\Item->checkState() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/Node.php:835
     Jackalope\Node->getIdentifier() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/ObjectManager.php:1110
     Jackalope\ObjectManager->refresh() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/Session.php:463
     Jackalope\Session->refresh() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:3201
     Doctrine\ODM\PHPCR\UnitOfWork->clear() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/DocumentManager.php:883
     Doctrine\ODM\PHPCR\DocumentManager->clear() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-bundle/DoctrinePHPCRBundle.php:159
     Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle->clearDocumentManagers() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-bundle/DoctrinePHPCRBundle.php:141
     Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle->shutdown() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:152
     Symfony\Component\HttpKernel\Kernel->shutdown() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/friends-of-behat/symfony-extension/src/Listener/KernelRebooter.php:47
    
  • 317 Problem with CND files in Jackrabbit not assigned

    #317 Problem with CND files in Jackrabbit

    Created by vondrasekpavel at 22.09.2016 - 02:09, last updated at 17.04.2017 - 08:04

    Hi,

    I created some node types, document-classes and mapping in XML. In Jackalope DBAL works all good but in Jackalope Jackrabbit if I call Host::getSite() I get blank collection.

    My source codes are here: https://gist.github.com/vondrasekpavel/25074ae784ac7393e9e06619585e7208

    Screen from Jackalope DBAL: snimek obrazovky 2016-09-22 v 14 05 43

    Screen from Jackalope Jackrabbit: snimek obrazovky 2016-09-22 v 14 06 53

    Site and Host are created by fixture.

    Can you help what i do wrong? Is something wrong with my node type definition?

    Thanks! Pavel

  • 313 error in request with sluggeable path not assigned

    #313 error in request with sluggeable path

    Created by ohalluin at 25.04.2016 - 04:04, last updated at 07.04.2017 - 09:04

    HTTP 400: Query: SELECT node.[jcr:uuid] AS uuid FROM [nt:unstructured] AS node WHERE ISCHILDNODE(node, [/cmf/qvdf_fr/contents/formats/test-(*)2e])

    in vendor/jackalope/jackalope-jackrabbit/src/Jackalope/Transport/Jackrabbit/Request.php at line 584

    During a query on a path containing a '-' followed by a number and a letter (eg test-2e), a 400 response appears. The problem does not occur with 'test-2-e'. This comes about the parser the URL when generating the request?

  • 303 Load properties of nodes lazily not assigned

    #303 Load properties of nodes lazily

    Created by danrot at 19.11.2015 - 06:11, last updated at 19.06.2016 - 04:06

    In the Node class is already a comment, that the nodes should be loaded lazily. This is a real performance issue for us now, because we have 7 languages on a single node. If we want to load a single language, still all properties get hydrated.

    Our solution would be to move the steps from the _setProperty method to the getProperties method, where the property gets cached. The _setProperty would then only cache the passed arguments in a separate array, which information is used to later lazily instantiate the properties in the getProperties.

    If this solution would be ok for you, we would also create a PR. Just want to make sure we don't invest time in this solution, without it being merged afterwards.

  • 256 ETag support not assigned

    #256 ETag support

    Created by dantleech at 08.11.2014 - 10:11, last updated at 08.11.2014 - 10:11

    The JCR specification supports an mix:etag mixin.

    3.7.12.1 mix:etag

    [mix:etag] mixin - jcr:etag (STRING) protected autocreated A jcr:etag property is an opaque string whose syntax is identical to that defined for entity tags in HTTP/1.1. Semantically, the jcr:etag is comparable to the HTTP/1.1 strong entity tag. On creation of a mix:etag node N, or assignment of mix:etag to N, the repository must create a jcr:etag property with an implementation determined value.

    We should implement this in the NodeProcessor as a pluggable service with a default implementation.

  • 251 remove recursion from NodePathIterator::isValid() not assigned

    #251 remove recursion from NodePathIterator::isValid()

    Created by lsmith77 at 26.10.2014 - 09:10, last updated at 26.10.2014 - 09:10

    this can have nasty side effects when dealing with larger result sets

    Fatal error: Maximum function nesting level of '200' reached, aborting! in /Users/lsmith/htdocs/phpcr_benchmark/vendor/jackalope/jackalope/src/Jackalope/NodePathIterator.php on line 100
    
    Call Stack:
        0.0004     278888   1. {main}() /Users/lsmith/htdocs/phpcr_benchmark/index.php:0
       10.2733   25832696   2. Jackalope\NodePathIterator->valid() /Users/lsmith/htdocs/phpcr_benchmark/index.php:34
       10.2778   25759864   3. Jackalope\NodePathIterator->valid() /Users/lsmith/htdocs/phpcr_benchmark/vendor/jackalope/jackalope/src/Jackalope/NodePathIterator.php:107
       10.2778   25759864   4. Jackalope\NodePathIterator->valid() /Users/lsmith/htdocs/phpcr_benchmark/vendor/jackalope/jackalope/src/Jackalope/NodePathIterator.php:107
       10.2778   25759864   5. Jackalope\NodePathIterator->valid() /Users/lsmith/htdocs/phpcr_benchmark/vendor/jackalope/jackalope/src/Jackalope/NodePathIterator.php:107
    ...
    
  • 248 Reference property value inconsistency dantleech

    #248 Reference property value inconsistency

    Created by dantleech at 15.10.2014 - 02:10, last updated at 02.05.2015 - 12:05
    Assigned to dantleech

    Sometimes a REFERENCE property returns an array of UUIDs, other times an array of objects (with UUIDs as keys). So the following hack is necessary:

        public function read(NodeInterface $node, PropertyInterface $property, $webspaceKey, $languageCode, $segmentKey)
        {
            $refs = $node->getPropertyValueWithDefault($property->getName(), array());
            $snippets = array();
    
            foreach ($refs as $i => $uuid) {
                if (UUIDHelper::isUUID($i)) {
                    $uuid= $i;
                }
    
                $snippets[] = $this->contentMapper->load($uuid, $webspaceKey, $languageCode);
            }
    
            // ...
        }
    
    
  • 247 Implement $node->setPrimaryType not assigned

    #247 Implement $node->setPrimaryType

    Created by dantleech at 03.10.2014 - 05:10, last updated at 07.04.2017 - 09:04

    Is there a reason why setPrimaryType is not supported?

        public function setPrimaryType($nodeTypeName)
        {
            $this->checkState();
    
            throw new NotImplementedException('Write');
        }
    
  • 239 NodePathIterator and batching issue not assigned

    #239 NodePathIterator and batching issue

    Created by lsmith77 at 16.08.2014 - 10:08, last updated at 09.02.2015 - 07:02

    I wonder if we should even batch for anything but Jackrabbit? Shouldn't we at least make the batch size configurable?

    this is a follow up to https://github.com/doctrine/phpcr-odm/pull/548#discussion_r16287665 and https://github.com/doctrine/phpcr-odm/pull/549/files#r16331850

    please see what needs to be changed in PHPCR ODM once this is solved.

  • 230 orderBefore fails when the node has a property with the same name as the child to be moved not assigned

    #230 orderBefore fails when the node has a property with the same name as the child to be moved

    Created by uwej711 at 24.06.2014 - 01:06, last updated at 07.08.2014 - 02:08

    just noticed by accident, not sure where the problem arises. I will try to investigate this further.

  • 225 Improve error messages not assigned

    #225 Improve error messages

    Created by dantleech at 05.04.2014 - 06:04, last updated at 20.05.2014 - 08:05

    For example:

    No explanation about what exception is about:

     Property dcms:foo in /dcms/sites/dantleech/bar
    

    No parenthis around property name "format":

    [PHPCR\RepositoryException] No default value for autocreated property format at /slinp/web/root/articles/Faster-than-light
    

    Is a PathNotFoundException. Without looking at the code I don't really know what it is actually saying to me.

    We should probably do an audit and clean up the error messages generally.

  • 224 Implement Configuration not assigned

    #224 Implement Configuration

    Created by dantleech at 05.04.2014 - 10:04, last updated at 15.04.2014 - 10:04

    https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Version/VersionManager.php#L259

    when fixed, also update Repository::jackalopeNotImplemented

  • 223 Implement Version activities not assigned

    #223 Implement Version activities

    Created by dantleech at 05.04.2014 - 10:04, last updated at 15.04.2014 - 10:04

    https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Version/VersionManager.php#L271

    when fixed, also update Repository::jackalopeNotImplemented

  • 221 Implement Session:impersonate not assigned

    #221 Implement Session:impersonate

    Created by dantleech at 05.04.2014 - 10:04, last updated at 15.04.2014 - 10:04

    Currently unsupported:

    https://github.com/phpcr/phpcr/blob/master/src/PHPCR/NodeInterface.php#L1079

    when fixed, also update Repository::jackalopeNotImplemented

  • 220 Implement node type unregister nodetype not assigned

    #220 Implement node type unregister nodetype

    Created by dantleech at 05.04.2014 - 10:04, last updated at 15.04.2014 - 10:04

    Currently unsupported by jackrabbit, but should be possible with doctrine-dbal

    https://github.com/jackalope/jackalope/blob/master/src/Jackalope/NodeType/NodeTypeManager.php#L419

    when fixed, also update Repository::jackalopeNotImplemented

  • 219 Implement Node::canAddMixin not assigned

    #219 Implement Node::canAddMixin

    Created by dantleech at 05.04.2014 - 10:04, last updated at 15.04.2014 - 10:04

    Currently not implemented:

    https://github.com/phpcr/phpcr/blob/master/src/PHPCR/NodeInterface.php#L1079

    when fixed, also update Repository::jackalopeNotImplemented

  • 218 Implement Node::setPrimaryType not assigned

    #218 Implement Node::setPrimaryType

    Created by dantleech at 05.04.2014 - 10:04, last updated at 15.04.2014 - 10:04

    Currently not implemented:

    https://github.com/phpcr/phpcr/blob/master/src/PHPCR/NodeInterface.php#L922

    when fixed, also update Repository::jackalopeNotImplemented

  • 217 Implement Node::getDefinition not assigned

    #217 Implement Node::getDefinition

    Created by dantleech at 05.04.2014 - 10:04, last updated at 15.04.2014 - 10:04

    Currently not implemented:

    https://github.com/phpcr/phpcr/blob/master/src/PHPCR/NodeInterface.php#L1100

    when fixed, also update Repository::jackalopeNotImplemented

  • 211 Acurate repository descriptors not assigned

    #211 Acurate repository descriptors

    Created by dantleech at 23.03.2014 - 08:03, last updated at 23.03.2014 - 10:03

    The following are not supported:

    Lock Management

    Desc: OPTION_LOCKING_SUPPORTED Recommend adding rep. specific: - JACKALOPE_LOCKING_GET_LOCK_SUPPORTED - JACKALOPE_LOCKING_REFRESH_SUPPORTED - JACKALOPE_LOCKING_GLOBAL_LOCK_SUPPORTED - JACKALOPE_LOCKING_TOKEN_SUPPORTED

    Partial support - LockManager::getLock - LockManager::lock(.., .., false) - i.e. non-global locks - LockManager::refresh() - LockManager::token*

    Lifecycle

    Desc: OPTION_LIFECYCLE_SUPPORTED

    Not supported

    Shared Nodes

    Desc: OPTION_SHAREABLE_NODES_SUPPORTED

    Not implemented

    Node

    Recommended descriptor: - JACKALOPE_OPTION_NODE_DESCRIPTION - Node::getDescription

    Node Type

    • JACKALOPE_UNREGISTER_NODE_TYPE
    • NodeTypeManager::unregisterNodeType

    Retention

    Desc: OPTION_RETENTION_SUPPORTED

    Not Implemented

    Session

    • JACKALOPE_SESSION_IMPERSONATE_SUPPORTED
    • Session:impersonate
  • 158 use node type information to detect changes on protected properties not assigned

    #158 use node type information to detect changes on protected properties

    Created by dbu at 27.03.2013 - 01:03, last updated at 02.05.2015 - 02:05

    for example the nt:frozenNode has all properties protected in its node type. to have it work properly, we would just have to implement the node generically enforcing its constraints.

  • 157 refactor ObjectManager to have just one node array not assigned

    #157 refactor ObjectManager to have just one node array

    Created by dbu at 27.03.2013 - 01:03, last updated at 27.03.2013 - 01:03

    the node array is currently nested, having one list per class (Node, Version, VersionHistory). this makes no sense as one tree element is always of exactly one of those types. instead of passing the class to build in, we should automatically determine that from the primary type of the node. right now if i getNode() a version node i would get a plain node for that which makes no sense.

    also Version and VersionHistory are immutable, except through the VersionManager. we should enforce that to avoid wtf errors on save.

  • 156 ObjectManager immediately methods and pending moves not assigned

    #156 ObjectManager immediately methods and pending moves

    Created by dbu at 19.03.2013 - 02:03, last updated at 19.03.2013 - 02:03

    cloneFrom and workspace copy method (ObjectManager::copyNodeImmediately) both check if a node already exists at $destAbsPath by going through the session, which will trigger getFetchPath. with jackrabbit storage, we will create same-name siblings under /b if i do this

    $session->move('/b', '/y');
    $workspace->cloneFrom('ws', '/x', '/b', false);
    $session->save();
    

    what would be allowed to create the sibling would be

    $session->move('/b', '/a');
    $workspace->cloneFrom('ws', '/x', '/a', false);
    $session->save();
    

    but this will currently say you can't clone as there is a target. this should clone but then session save would create /a[1] or throw an exception.

    this needs a general solution, some sort of raw exists check without applying getFetchPath.

    follow up from #155

  • 149 version history caching and versioning children not assigned

    #149 version history caching and versioning children

    Created by dbu at 26.02.2013 - 02:02, last updated at 26.03.2013 - 02:03

    as discussed in https://github.com/phpcr/phpcr-api-tests/pull/84 we should not only invalidate the cached version history of a node on checkin, but also on all its descendant node version histories that are loaded in the objectmanager, with something like ObjectManager::getCachedDescendants that gets all potential children (VersionHistory) of that node, by looping through the array and comparing the path string (with a trailing "/" to be sure not to catch histories of similarly named nodes)

  • 137 Child of a node is 'hidden' if named the same as a one of the node's properties not assigned

    #137 Child of a node is 'hidden' if named the same as a one of the node's properties

    Created by fazy at 05.12.2012 - 04:12, last updated at 24.06.2014 - 02:06

    It seems the relationship between a node and a child node is not correctly stored in the PHPCR in the following circumstance: - The affected property is set, e.g. title - A child is named the same as the affected property

    I originally reported this issue here: https://github.com/symfony-cmf/ContentBundle/issues/14

    However, it appears it is not only related to the Symfony CMF component, but to any node.

    Here's an example that demonstrates the situation (StaticContent is from the Symfony\Cmf\Bundle\ContentBundle\Document namespace):

        $rootNode = $manager->find(null, '/');
    
        $topDocument = new StaticContent();
        $topDocument->setParent($rootNode);
        $topDocument->setName('top');
        $topDocument->setTitle('Top Doc');
        $manager->persist($topDocument);
    
        $childDocument = new StaticContent();
        $childDocument->setParent($topDocument);
        $childDocument->setName('title');
        $manager->persist($childDocument);
    
        $manager->flush();
    
        echo 'Child nodes: ' . count($topDocument->node->getNodes()) . "\n";
        echo 'Directly found: ' . $manager->find(null, '/top/title')->getName() . "\n";
    

    This outputs the following:

    Child nodes: 0
    Directly found: title
    

    Yet I would expect 'Child nodes' to be 1.

    If I use a different name in the second case (change 'title' to 'titleOK', I get the output I was expecting:

    Child nodes: 1
    Directly found: titleOK
    

    See the issue linked above for a bit more detail.

  • 84 Cleanup reading in NodeType not assigned

    #84 Cleanup reading in NodeType

    Created by dbu at 30.01.2012 - 09:01, last updated at 06.10.2013 - 12:10

    implement the Read part of the NodeType

    there are unit tests, but we miss api tests and probably some finishing work - [ ] complete the api tests - [ ] implement the primary node feature that allows to define some sort of "default" child for a node. - [ ] implement templates - [ ] type exists exception - [ ] InvalidNodeTypeDefinitionException

  • 83 Restore version of a node not assigned

    #83 Restore version of a node

    Created by dbu at 30.01.2012 - 09:01, last updated at 27.02.2012 - 10:02

    Implement missing features in VersionManager::restore (see TODOs around) https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Version/VersionManager.php#L160 - implement restoring a list of versions - implement restoring a version to a specified path

  • 68 Implement Chapter 20: Retention and hold not assigned

    #68 Implement Chapter 20: Retention and hold

    Created by dbu at 28.12.2011 - 01:12, last updated at 13.02.2012 - 02:02

    the retention policy part needs some implementation specific things to do it http://jackrabbit.apache.org/api/2.2/org/apache/jackrabbit/core/retention/package-summary.html

    from what i guess, this is about whether nodes are cached in an open session or when to stop caching them to let garbage collection free up some memory. no clue what the hold part is doing in this.

  • 67 Implement Chapter 17: Non-Session locks and lock tokens not assigned

    #67 Implement Chapter 17: Non-Session locks and lock tokens

    Created by dbu at 28.12.2011 - 01:12, last updated at 13.06.2014 - 04:06

    Session locks have been merged in #77. missing are lock tokens and locks that survive session logout.

    when fixed, also update Repository::jackalopeNotImplemented

  • 66 performance optimizations not assigned

    #66 performance optimizations

    Created by dbu at 28.12.2011 - 01:12, last updated at 02.05.2015 - 12:05
    • do a performance analysis
    • identify main bottlenecks
    • improve the bottlenecks
    • some suspected problems are tagged with //OPTIMIZE
    • look for places where we could use getNodes or getNodesByIdentifier, instead of looping

    ideas: - [ ] have a flexible cache object injected into ObjectManager. write one that uses memcache instead of the array to persist the cache over requests (will require some cache outdate logic, plus changes to make sure permissions are respected and local modifications don't leak into other sessions) - [x] play with the depth parameter to retrieve more than one node in one request - but if we do that stupidly, we might slow everything down as we could retrieve way too many nodes. provide a way for hints, or learning, or whatever. - [ ] have a clever iterator for Node::getNodes that fetches a couple of nodes at a time to scale with large number of children (see FIXME in #95)

  • 65 Implement Chapter 22: Same-name siblings not assigned

    #65 Implement Chapter 22: Same-name siblings

    Created by dbu at 28.12.2011 - 01:12, last updated at 28.12.2011 - 01:12

    with the jackrabbit backend, this halfways works but not fully. there are some cases to be handled inside jackalope to manage backend same-name siblings.

  • 63 Implement Session based namespace remapping not assigned

    #63 Implement Session based namespace remapping

    Created by dbu at 28.12.2011 - 01:12, last updated at 15.04.2014 - 10:04

    we only have support to handle namespaces and add namespaces, but not to remap them locally in a session (mostly useful in case of namespace prefix collisions). the session remapping is probably tricky as we need to rewrite all the paths for the storage layer.

    basically we need to str_replace the local namespace with the backend namespace and back whenever we talk to the backend. or use the backend namespace internally and replace on all requests and results, but that is probably even more difficult.

    when fixed, also update Repository::jackalopeNotImplemented

  • 61 Implement Chapter 16: Access Control Management not assigned

    #61 Implement Chapter 16: Access Control Management

    Created by dbu at 28.12.2011 - 01:12, last updated at 02.10.2014 - 09:10

    for the jackrabbit backend, this first needs the ACL over Davex implemented: https://issues.apache.org/jira/browse/JCR-2003

    This means implementing the interfaces of https://github.com/phpcr/phpcr/tree/master/src/PHPCR/Security

    The JCR specification chapter is http://www.day.com/specs/jcr/2.0/16_Access_Control_Management.html

  • 60 jcr-sql2: implement query store/load not assigned

    #60 jcr-sql2: implement query store/load

    Created by dbu at 28.12.2011 - 01:12, last updated at 22.07.2013 - 02:07

    https://github.com/phpcr/phpcr/blob/master/src/PHPCR/Query/QueryInterface.php#L222 https://github.com/phpcr/phpcr/blob/master/src/PHPCR/Query/QueryManagerInterface.php#L86

    for how the data is stored, look at jackrabbit for inspiration

  • 59 jcr-sql2: implement bindValue not assigned

    #59 jcr-sql2: implement bindValue

    Created by dbu at 28.12.2011 - 01:12, last updated at 15.02.2014 - 02:02

    follow up of https://jira.liip.ch/browse/JACK-11

  • 55 Versioning: merge versions not assigned

    #55 Versioning: merge versions

    Created by dbu at 18.12.2011 - 07:12, last updated at 15.04.2014 - 10:04

    implement the methods to merge versions

    when fixed, also update Repository::jackalopeNotImplemented

  • 54 Versioning: implement labels not assigned

    #54 Versioning: implement labels

    Created by dbu at 18.12.2011 - 07:12, last updated at 15.04.2014 - 10:04

    getting and setting version labels could be used to build simple workflows.

    the methods are

    VersionHistory::addVersionLabel
    VersionHistory::getVersionByLabel
    VersionHistory::getVersionLabels
    VersionHistory::hasVersionLabel
    VersionHistory::removeVersionLabel
    

    when fixed, also update Repository::jackalopeNotImplemented

  • 46 helper for transport to generate capabilities based on implemented interfaces not assigned

    #46 helper for transport to generate capabilities based on implemented interfaces

    Created by dbu at 01.12.2011 - 04:12, last updated at 01.12.2011 - 04:12

    see #39 https://github.com/jackalope/jackalope/pull/39/files#r262394

  • 37 better error messages when a property namespace isn't registered not assigned

    #37 better error messages when a property namespace isn't registered

    Created by lsmith77 at 15.11.2011 - 05:11, last updated at 19.03.2012 - 09:03

    jackalope itself should check for valid namespace prefixes.

    jackalope-doctrine-dbal fails during save with

    Notice: Undefined index: phpcr_locale in .../jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php line 440

    jackalope-jackrabbit fails on save too, while talking to the backend

    Sending this message without having "phpcr" registered as a namespace: string(625) "sv:valuent:unstructured/sv:value/sv:propertysv:value/sv:value/sv:propertysv:value3/sv:valuesv:value1/sv:valuesv:value2/sv:value/sv:propertysv:value/sv:value/sv:property/sv:node"

    Leads to this is the response: string(317) "dcr:classjavax.jcr.InvalidSerializedDataException/dcr:classdcr:messageillegal property name: {http://www.jcp.org/jcr/sv/1.0}property/dcr:message/dcr:exception/D:error"

    And finally this exception: PHPCR\InvalidSerializedDataException: HTTP 400: illegal property name: {http://www.jcp.org/jcr/sv/1.0}property

  • 349 How to clear ObjectManager::objectsByPath array to reduce memory consumption not assigned

    #349 How to clear ObjectManager::objectsByPath array to reduce memory consumption

    Created by holtkamp at 26.04.2018 - 03:04, last updated at 03.05.2018 - 10:05

    When batch processing the contents of big amounts of nodes, the amount of used memory increases significantly.

    I thought it would be possible to periodically clear the session/objectManager using Session::clear() to reduce the amount of used memory and it did! As we can see in the objectManager, all properties are reset to their initial value, most importantly, the objectsByPaths array:

    https://github.com/jackalope/jackalope/blob/f9509dadc2cfa781b7dc29d6f374c40390be4dc2/src/Jackalope/ObjectManager.php#L1582-L1598

    However, Session::clear() is marked as being deprecated and Session::refresh() should be used. Unfortunately with Session::refresh() the Session::objectsByPath array is never cleared, so the amount of memory still keeps increasing.

    Additionally, it seems to really slow down the process.

    What is the best way to deal with this?

    Is usage of Session::clear() in certain kind of scenarios like batch processing justified?

  • 348 getVersionByLabel() is not correct when called in the same request as addVersionLabel() not assigned

    #348 getVersionByLabel() is not correct when called in the same request as addVersionLabel()

    Created by UFTimmy at 08.03.2018 - 03:03, last updated at 04.04.2018 - 04:04

    If you follow this sequence, you do not get the correct Version. Instead, you get the previous version that held the label:

    addVersionLabel checkin (or by calling notifyHistoryChanged directly) getVersionByLabel

    Performing acts in that sequence will get you the Version that had the label before you moved it. The reason is due to the ObjectManager's in memory caching of the jcr:versionLabels node.

    addVersionLabels updates its PHP internal property for where the label is, here: https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Version/VersionHistory.php#L197

    At this point, if you call getVersionByLabel, everything is fine. However, if within the same HTTP request, you perform a checkin or otherwise call notifyHistoryChanged, then that PHP internal property for versionLabels is emptied: https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Version/VersionHistory.php#L319

    Now the next time you call getVersionByLabel, it needs to now call initVersionLabels again, since the Version state was cleared via notifyHistoryChanged.

    The problem is then here, when VersionHistory calls getNode: https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Version/VersionHistory.php#L279

    That calls Node:;getNode, which calls ObjectManager's getNodeByPath: https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Node.php#L666

    And at this point, the Node in question has already been fetched once, so it's in memory, and thus returned without fetching it fresh: https://github.com/jackalope/jackalope/blob/master/src/Jackalope/ObjectManager.php#L205

    The in memory node returned here contains where the label was prior to moving it.

    I believe I have found a bug, but I'm not sure of any solutions.

    Possible ideas:

    • Have the notifyHistoryChanged clear out the in memory cache of ObjectManager for just that one node. But I don't see any methods on ObjectManager to facilitate that.
    • Update the node's properties when addVersionLabel is called, so that way the in memory version of it will be correct. Something like this: $node = $this->getNode('jcr:versionLabels'); $node->setProperty($label, $version); However, the property is protected, and thus errors, when setProperty is called.

    As a work around for me, I am calling clear on the ObjectManager after a checkin, which resets the in memory map of ObjectManager so that the Version history node is fetched fresh next time.

            /** @var Session $session */
            $session = $this->dm->getPhpcrSession();
            $session->getObjectManager()->clear();
    

    But clear is deprecated, so I don't believe this is a durable workaround.

  • 340 XML document import not working for text elements not assigned

    #340 XML document import not working for text elements

    Created by perklason at 22.08.2017 - 06:08, last updated at 05.10.2017 - 06:10

    Hi when I try to import XML with tags like this one (I am using jackalope-doctrine-dbal in Symfony):

    <title>HarryPotter</title>

    I get the following error:

    [PHPCR\InvalidSerializedDataException]             
    
    Unexpected element in stream: #text="HarryPotter"  
    
    Exception trace:
     () at /var/www/html/std1/vendor/jackalope/jackalope/src/Jackalope/ImportExport/ImportExport.php:631
    
    

    If I do a $xml->isValid just before that line, it returns true. So what is wrong? Bug?

    This is the XML doc I try to import for testing:

    <bookstore>
      <book category="children">
        <title>HarryPotter</title>
        <author>J K. Rowling</author>   
        <year>2005</year>
        <price>29.99</price>
      </book>
      <book category="web">
        <title>Learning XML</title>
        <author>Erik T. Ray</author>    
        <year>2003</year>
        <price>39.95</price>
      </book>
    </bookstore> 
    
  • 338 Simple query not working on property? not assigned

    #338 Simple query not working on property?

    Created by alex-barylski at 27.07.2017 - 04:07, last updated at 28.07.2017 - 11:07

    I apologize if the issue is trivial - but I cannot seem to figure out why this is happening.

    // THIS DOESN'T WORK?!?!
    $sql = "SELECT * FROM [nt:unstructured] WHERE [nt:unstructured].[path] = '/index.html'";
    
    // THIS WORKS FINE
    //$sql = "SELECT * FROM [nt:unstructured] WHERE [nt:unstructured].[path] = '/work'";
    $query = $queryManager->createQuery($sql, 'JCR-SQL2');
    

    Here is the XML I am using to initialize PHPCR:

    <cms xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
        <routes>
            <index path="/" slug="cms/types/pages" />
            <alias path="/index.html" slug="cms/types/pages" />
            <work path="/test" slug="http://test.com" />
        </routes>
    </cms>
    
    

    What am I doing wrong?

  • 325 setProperty with full namespace not working not assigned

    #325 setProperty with full namespace not working

    Created by vondrasekpavel at 31.01.2017 - 11:01, last updated at 31.01.2017 - 02:01

    I tried to update documentation in Dbal.

    I wrote this code:

    // see Bootstrapping for how to get the session 
    use PHPCR\NodeType\NodeTypeInterface;
    
    $rootNode = $session->getNode('/');
    $whitewashing = $rootNode->addNode('www-whitewashing-de');
    $session->save();
    
    $posts = $whitewashing->addNode('posts');
    $session->save();
    
    $post = $posts->addNode('welcome-to-blog');
    
    $post->addMixin(NodeTypeInterface::MIX_TITLE);
    $post->setProperty(PropertyInterface::JCR_TITLE, 'Welcome to my Blog!');
    $post->setProperty(PropertyInterface::JCR_DESCRIPTION, 'This is the first post on my blog! Do you like it?');
    
    $session->save();
    

    $post->setProperty(PropertyInterface::JCR_TITLE, 'Welcome to my Blog!'); throws ( ! ) Fatal error: Uncaught PHPCR\NamespaceException: Mapping for '{http' is not defined in /Users/pavel/Sites/jackalope-doctrine-dbal/vendor/jackalope/jackalope/src/Jackalope/NamespaceRegistry.php on line 189

    Maybe setProperty isn't able to work with property name in extended form?

  • 321 refresh should not trigger a reload not assigned

    #321 refresh should not trigger a reload

    Created by dbu at 19.12.2016 - 10:12, last updated at 25.05.2018 - 05:05

    reported in https://github.com/doctrine/DoctrinePHPCRBundle/issues/265 we can get an exception during the clear. instead, clear should not trigger any state checks. (it should also not give you children that are gone, not sure if it does or not)

      [PHPCR\InvalidItemStateException]
      Item /cms/routes/krzysztof-krawczyk is deleted
    
    
    Exception trace:
     () at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/Item.php:640
     Jackalope\Item->checkState() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/Node.php:835
     Jackalope\Node->getIdentifier() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/ObjectManager.php:1110
     Jackalope\ObjectManager->refresh() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/jackalope/jackalope/src/Jackalope/Session.php:463
     Jackalope\Session->refresh() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/UnitOfWork.php:3201
     Doctrine\ODM\PHPCR\UnitOfWork->clear() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/DocumentManager.php:883
     Doctrine\ODM\PHPCR\DocumentManager->clear() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-bundle/DoctrinePHPCRBundle.php:159
     Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle->clearDocumentManagers() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/doctrine/phpcr-bundle/DoctrinePHPCRBundle.php:141
     Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle->shutdown() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:152
     Symfony\Component\HttpKernel\Kernel->shutdown() at /Users/pamil/Projects/Lakion/SyliusCmsBundle/vendor/friends-of-behat/symfony-extension/src/Listener/KernelRebooter.php:47
    
  • 317 Problem with CND files in Jackrabbit not assigned

    #317 Problem with CND files in Jackrabbit

    Created by vondrasekpavel at 22.09.2016 - 02:09, last updated at 17.04.2017 - 08:04

    Hi,

    I created some node types, document-classes and mapping in XML. In Jackalope DBAL works all good but in Jackalope Jackrabbit if I call Host::getSite() I get blank collection.

    My source codes are here: https://gist.github.com/vondrasekpavel/25074ae784ac7393e9e06619585e7208

    Screen from Jackalope DBAL: snimek obrazovky 2016-09-22 v 14 05 43

    Screen from Jackalope Jackrabbit: snimek obrazovky 2016-09-22 v 14 06 53

    Site and Host are created by fixture.

    Can you help what i do wrong? Is something wrong with my node type definition?

    Thanks! Pavel

  • 313 error in request with sluggeable path not assigned

    #313 error in request with sluggeable path

    Created by ohalluin at 25.04.2016 - 04:04, last updated at 07.04.2017 - 09:04

    HTTP 400: Query: SELECT node.[jcr:uuid] AS uuid FROM [nt:unstructured] AS node WHERE ISCHILDNODE(node, [/cmf/qvdf_fr/contents/formats/test-(*)2e])

    in vendor/jackalope/jackalope-jackrabbit/src/Jackalope/Transport/Jackrabbit/Request.php at line 584

    During a query on a path containing a '-' followed by a number and a letter (eg test-2e), a 400 response appears. The problem does not occur with 'test-2-e'. This comes about the parser the URL when generating the request?

  • 303 Load properties of nodes lazily not assigned

    #303 Load properties of nodes lazily

    Created by danrot at 19.11.2015 - 06:11, last updated at 19.06.2016 - 04:06

    In the Node class is already a comment, that the nodes should be loaded lazily. This is a real performance issue for us now, because we have 7 languages on a single node. If we want to load a single language, still all properties get hydrated.

    Our solution would be to move the steps from the _setProperty method to the getProperties method, where the property gets cached. The _setProperty would then only cache the passed arguments in a separate array, which information is used to later lazily instantiate the properties in the getProperties.

    If this solution would be ok for you, we would also create a PR. Just want to make sure we don't invest time in this solution, without it being merged afterwards.

  • 256 ETag support not assigned

    #256 ETag support

    Created by dantleech at 08.11.2014 - 10:11, last updated at 08.11.2014 - 10:11

    The JCR specification supports an mix:etag mixin.

    3.7.12.1 mix:etag

    [mix:etag] mixin - jcr:etag (STRING) protected autocreated A jcr:etag property is an opaque string whose syntax is identical to that defined for entity tags in HTTP/1.1. Semantically, the jcr:etag is comparable to the HTTP/1.1 strong entity tag. On creation of a mix:etag node N, or assignment of mix:etag to N, the repository must create a jcr:etag property with an implementation determined value.

    We should implement this in the NodeProcessor as a pluggable service with a default implementation.

  • 251 remove recursion from NodePathIterator::isValid() not assigned

    #251 remove recursion from NodePathIterator::isValid()

    Created by lsmith77 at 26.10.2014 - 09:10, last updated at 26.10.2014 - 09:10

    this can have nasty side effects when dealing with larger result sets

    Fatal error: Maximum function nesting level of '200' reached, aborting! in /Users/lsmith/htdocs/phpcr_benchmark/vendor/jackalope/jackalope/src/Jackalope/NodePathIterator.php on line 100
    
    Call Stack:
        0.0004     278888   1. {main}() /Users/lsmith/htdocs/phpcr_benchmark/index.php:0
       10.2733   25832696   2. Jackalope\NodePathIterator->valid() /Users/lsmith/htdocs/phpcr_benchmark/index.php:34
       10.2778   25759864   3. Jackalope\NodePathIterator->valid() /Users/lsmith/htdocs/phpcr_benchmark/vendor/jackalope/jackalope/src/Jackalope/NodePathIterator.php:107
       10.2778   25759864   4. Jackalope\NodePathIterator->valid() /Users/lsmith/htdocs/phpcr_benchmark/vendor/jackalope/jackalope/src/Jackalope/NodePathIterator.php:107
       10.2778   25759864   5. Jackalope\NodePathIterator->valid() /Users/lsmith/htdocs/phpcr_benchmark/vendor/jackalope/jackalope/src/Jackalope/NodePathIterator.php:107
    ...
    
  • 248 Reference property value inconsistency dantleech

    #248 Reference property value inconsistency

    Created by dantleech at 15.10.2014 - 02:10, last updated at 02.05.2015 - 12:05
    Assigned to dantleech

    Sometimes a REFERENCE property returns an array of UUIDs, other times an array of objects (with UUIDs as keys). So the following hack is necessary:

        public function read(NodeInterface $node, PropertyInterface $property, $webspaceKey, $languageCode, $segmentKey)
        {
            $refs = $node->getPropertyValueWithDefault($property->getName(), array());
            $snippets = array();
    
            foreach ($refs as $i => $uuid) {
                if (UUIDHelper::isUUID($i)) {
                    $uuid= $i;
                }
    
                $snippets[] = $this->contentMapper->load($uuid, $webspaceKey, $languageCode);
            }
    
            // ...
        }
    
    
  • 247 Implement $node->setPrimaryType not assigned

    #247 Implement $node->setPrimaryType

    Created by dantleech at 03.10.2014 - 05:10, last updated at 07.04.2017 - 09:04

    Is there a reason why setPrimaryType is not supported?

        public function setPrimaryType($nodeTypeName)
        {
            $this->checkState();
    
            throw new NotImplementedException('Write');
        }
    
  • 239 NodePathIterator and batching issue not assigned

    #239 NodePathIterator and batching issue

    Created by lsmith77 at 16.08.2014 - 10:08, last updated at 09.02.2015 - 07:02

    I wonder if we should even batch for anything but Jackrabbit? Shouldn't we at least make the batch size configurable?

    this is a follow up to https://github.com/doctrine/phpcr-odm/pull/548#discussion_r16287665 and https://github.com/doctrine/phpcr-odm/pull/549/files#r16331850

    please see what needs to be changed in PHPCR ODM once this is solved.

  • 230 orderBefore fails when the node has a property with the same name as the child to be moved not assigned

    #230 orderBefore fails when the node has a property with the same name as the child to be moved

    Created by uwej711 at 24.06.2014 - 01:06, last updated at 07.08.2014 - 02:08

    just noticed by accident, not sure where the problem arises. I will try to investigate this further.

  • 225 Improve error messages not assigned

    #225 Improve error messages

    Created by dantleech at 05.04.2014 - 06:04, last updated at 20.05.2014 - 08:05

    For example:

    No explanation about what exception is about:

     Property dcms:foo in /dcms/sites/dantleech/bar
    

    No parenthis around property name "format":

    [PHPCR\RepositoryException] No default value for autocreated property format at /slinp/web/root/articles/Faster-than-light
    

    Is a PathNotFoundException. Without looking at the code I don't really know what it is actually saying to me.

    We should probably do an audit and clean up the error messages generally.

  • 224 Implement Configuration not assigned

    #224 Implement Configuration

    Created by dantleech at 05.04.2014 - 10:04, last updated at 15.04.2014 - 10:04

    https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Version/VersionManager.php#L259

    when fixed, also update Repository::jackalopeNotImplemented

  • 223 Implement Version activities not assigned

    #223 Implement Version activities

    Created by dantleech at 05.04.2014 - 10:04, last updated at 15.04.2014 - 10:04

    https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Version/VersionManager.php#L271

    when fixed, also update Repository::jackalopeNotImplemented

  • 221 Implement Session:impersonate not assigned

    #221 Implement Session:impersonate

    Created by dantleech at 05.04.2014 - 10:04, last updated at 15.04.2014 - 10:04

    Currently unsupported:

    https://github.com/phpcr/phpcr/blob/master/src/PHPCR/NodeInterface.php#L1079

    when fixed, also update Repository::jackalopeNotImplemented

  • 220 Implement node type unregister nodetype not assigned

    #220 Implement node type unregister nodetype

    Created by dantleech at 05.04.2014 - 10:04, last updated at 15.04.2014 - 10:04

    Currently unsupported by jackrabbit, but should be possible with doctrine-dbal

    https://github.com/jackalope/jackalope/blob/master/src/Jackalope/NodeType/NodeTypeManager.php#L419

    when fixed, also update Repository::jackalopeNotImplemented

  • 219 Implement Node::canAddMixin not assigned

    #219 Implement Node::canAddMixin

    Created by dantleech at 05.04.2014 - 10:04, last updated at 15.04.2014 - 10:04

    Currently not implemented:

    https://github.com/phpcr/phpcr/blob/master/src/PHPCR/NodeInterface.php#L1079

    when fixed, also update Repository::jackalopeNotImplemented

  • 218 Implement Node::setPrimaryType not assigned

    #218 Implement Node::setPrimaryType

    Created by dantleech at 05.04.2014 - 10:04, last updated at 15.04.2014 - 10:04

    Currently not implemented:

    https://github.com/phpcr/phpcr/blob/master/src/PHPCR/NodeInterface.php#L922

    when fixed, also update Repository::jackalopeNotImplemented

  • 217 Implement Node::getDefinition not assigned

    #217 Implement Node::getDefinition

    Created by dantleech at 05.04.2014 - 10:04, last updated at 15.04.2014 - 10:04

    Currently not implemented:

    https://github.com/phpcr/phpcr/blob/master/src/PHPCR/NodeInterface.php#L1100

    when fixed, also update Repository::jackalopeNotImplemented

  • 211 Acurate repository descriptors not assigned

    #211 Acurate repository descriptors

    Created by dantleech at 23.03.2014 - 08:03, last updated at 23.03.2014 - 10:03

    The following are not supported:

    Lock Management

    Desc: OPTION_LOCKING_SUPPORTED Recommend adding rep. specific: - JACKALOPE_LOCKING_GET_LOCK_SUPPORTED - JACKALOPE_LOCKING_REFRESH_SUPPORTED - JACKALOPE_LOCKING_GLOBAL_LOCK_SUPPORTED - JACKALOPE_LOCKING_TOKEN_SUPPORTED

    Partial support - LockManager::getLock - LockManager::lock(.., .., false) - i.e. non-global locks - LockManager::refresh() - LockManager::token*

    Lifecycle

    Desc: OPTION_LIFECYCLE_SUPPORTED

    Not supported

    Shared Nodes

    Desc: OPTION_SHAREABLE_NODES_SUPPORTED

    Not implemented

    Node

    Recommended descriptor: - JACKALOPE_OPTION_NODE_DESCRIPTION - Node::getDescription

    Node Type

    • JACKALOPE_UNREGISTER_NODE_TYPE
    • NodeTypeManager::unregisterNodeType

    Retention

    Desc: OPTION_RETENTION_SUPPORTED

    Not Implemented

    Session

    • JACKALOPE_SESSION_IMPERSONATE_SUPPORTED
    • Session:impersonate
  • 158 use node type information to detect changes on protected properties not assigned

    #158 use node type information to detect changes on protected properties

    Created by dbu at 27.03.2013 - 01:03, last updated at 02.05.2015 - 02:05

    for example the nt:frozenNode has all properties protected in its node type. to have it work properly, we would just have to implement the node generically enforcing its constraints.

  • 157 refactor ObjectManager to have just one node array not assigned

    #157 refactor ObjectManager to have just one node array

    Created by dbu at 27.03.2013 - 01:03, last updated at 27.03.2013 - 01:03

    the node array is currently nested, having one list per class (Node, Version, VersionHistory). this makes no sense as one tree element is always of exactly one of those types. instead of passing the class to build in, we should automatically determine that from the primary type of the node. right now if i getNode() a version node i would get a plain node for that which makes no sense.

    also Version and VersionHistory are immutable, except through the VersionManager. we should enforce that to avoid wtf errors on save.

  • 156 ObjectManager immediately methods and pending moves not assigned

    #156 ObjectManager immediately methods and pending moves

    Created by dbu at 19.03.2013 - 02:03, last updated at 19.03.2013 - 02:03

    cloneFrom and workspace copy method (ObjectManager::copyNodeImmediately) both check if a node already exists at $destAbsPath by going through the session, which will trigger getFetchPath. with jackrabbit storage, we will create same-name siblings under /b if i do this

    $session->move('/b', '/y');
    $workspace->cloneFrom('ws', '/x', '/b', false);
    $session->save();
    

    what would be allowed to create the sibling would be

    $session->move('/b', '/a');
    $workspace->cloneFrom('ws', '/x', '/a', false);
    $session->save();
    

    but this will currently say you can't clone as there is a target. this should clone but then session save would create /a[1] or throw an exception.

    this needs a general solution, some sort of raw exists check without applying getFetchPath.

    follow up from #155

  • 149 version history caching and versioning children not assigned

    #149 version history caching and versioning children

    Created by dbu at 26.02.2013 - 02:02, last updated at 26.03.2013 - 02:03

    as discussed in https://github.com/phpcr/phpcr-api-tests/pull/84 we should not only invalidate the cached version history of a node on checkin, but also on all its descendant node version histories that are loaded in the objectmanager, with something like ObjectManager::getCachedDescendants that gets all potential children (VersionHistory) of that node, by looping through the array and comparing the path string (with a trailing "/" to be sure not to catch histories of similarly named nodes)

  • 137 Child of a node is 'hidden' if named the same as a one of the node's properties not assigned

    #137 Child of a node is 'hidden' if named the same as a one of the node's properties

    Created by fazy at 05.12.2012 - 04:12, last updated at 24.06.2014 - 02:06

    It seems the relationship between a node and a child node is not correctly stored in the PHPCR in the following circumstance: - The affected property is set, e.g. title - A child is named the same as the affected property

    I originally reported this issue here: https://github.com/symfony-cmf/ContentBundle/issues/14

    However, it appears it is not only related to the Symfony CMF component, but to any node.

    Here's an example that demonstrates the situation (StaticContent is from the Symfony\Cmf\Bundle\ContentBundle\Document namespace):

        $rootNode = $manager->find(null, '/');
    
        $topDocument = new StaticContent();
        $topDocument->setParent($rootNode);
        $topDocument->setName('top');
        $topDocument->setTitle('Top Doc');
        $manager->persist($topDocument);
    
        $childDocument = new StaticContent();
        $childDocument->setParent($topDocument);
        $childDocument->setName('title');
        $manager->persist($childDocument);
    
        $manager->flush();
    
        echo 'Child nodes: ' . count($topDocument->node->getNodes()) . "\n";
        echo 'Directly found: ' . $manager->find(null, '/top/title')->getName() . "\n";
    

    This outputs the following:

    Child nodes: 0
    Directly found: title
    

    Yet I would expect 'Child nodes' to be 1.

    If I use a different name in the second case (change 'title' to 'titleOK', I get the output I was expecting:

    Child nodes: 1
    Directly found: titleOK
    

    See the issue linked above for a bit more detail.

  • 84 Cleanup reading in NodeType not assigned

    #84 Cleanup reading in NodeType

    Created by dbu at 30.01.2012 - 09:01, last updated at 06.10.2013 - 12:10

    implement the Read part of the NodeType

    there are unit tests, but we miss api tests and probably some finishing work - [ ] complete the api tests - [ ] implement the primary node feature that allows to define some sort of "default" child for a node. - [ ] implement templates - [ ] type exists exception - [ ] InvalidNodeTypeDefinitionException

  • 83 Restore version of a node not assigned

    #83 Restore version of a node

    Created by dbu at 30.01.2012 - 09:01, last updated at 27.02.2012 - 10:02

    Implement missing features in VersionManager::restore (see TODOs around) https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Version/VersionManager.php#L160 - implement restoring a list of versions - implement restoring a version to a specified path

  • 68 Implement Chapter 20: Retention and hold not assigned

    #68 Implement Chapter 20: Retention and hold

    Created by dbu at 28.12.2011 - 01:12, last updated at 13.02.2012 - 02:02

    the retention policy part needs some implementation specific things to do it http://jackrabbit.apache.org/api/2.2/org/apache/jackrabbit/core/retention/package-summary.html

    from what i guess, this is about whether nodes are cached in an open session or when to stop caching them to let garbage collection free up some memory. no clue what the hold part is doing in this.

  • 67 Implement Chapter 17: Non-Session locks and lock tokens not assigned

    #67 Implement Chapter 17: Non-Session locks and lock tokens

    Created by dbu at 28.12.2011 - 01:12, last updated at 13.06.2014 - 04:06

    Session locks have been merged in #77. missing are lock tokens and locks that survive session logout.

    when fixed, also update Repository::jackalopeNotImplemented

  • 66 performance optimizations not assigned

    #66 performance optimizations

    Created by dbu at 28.12.2011 - 01:12, last updated at 02.05.2015 - 12:05
    • do a performance analysis
    • identify main bottlenecks
    • improve the bottlenecks
    • some suspected problems are tagged with //OPTIMIZE
    • look for places where we could use getNodes or getNodesByIdentifier, instead of looping

    ideas: - [ ] have a flexible cache object injected into ObjectManager. write one that uses memcache instead of the array to persist the cache over requests (will require some cache outdate logic, plus changes to make sure permissions are respected and local modifications don't leak into other sessions) - [x] play with the depth parameter to retrieve more than one node in one request - but if we do that stupidly, we might slow everything down as we could retrieve way too many nodes. provide a way for hints, or learning, or whatever. - [ ] have a clever iterator for Node::getNodes that fetches a couple of nodes at a time to scale with large number of children (see FIXME in #95)

  • 65 Implement Chapter 22: Same-name siblings not assigned

    #65 Implement Chapter 22: Same-name siblings

    Created by dbu at 28.12.2011 - 01:12, last updated at 28.12.2011 - 01:12

    with the jackrabbit backend, this halfways works but not fully. there are some cases to be handled inside jackalope to manage backend same-name siblings.

  • 63 Implement Session based namespace remapping not assigned

    #63 Implement Session based namespace remapping

    Created by dbu at 28.12.2011 - 01:12, last updated at 15.04.2014 - 10:04

    we only have support to handle namespaces and add namespaces, but not to remap them locally in a session (mostly useful in case of namespace prefix collisions). the session remapping is probably tricky as we need to rewrite all the paths for the storage layer.

    basically we need to str_replace the local namespace with the backend namespace and back whenever we talk to the backend. or use the backend namespace internally and replace on all requests and results, but that is probably even more difficult.

    when fixed, also update Repository::jackalopeNotImplemented

  • 61 Implement Chapter 16: Access Control Management not assigned

    #61 Implement Chapter 16: Access Control Management

    Created by dbu at 28.12.2011 - 01:12, last updated at 02.10.2014 - 09:10

    for the jackrabbit backend, this first needs the ACL over Davex implemented: https://issues.apache.org/jira/browse/JCR-2003

    This means implementing the interfaces of https://github.com/phpcr/phpcr/tree/master/src/PHPCR/Security

    The JCR specification chapter is http://www.day.com/specs/jcr/2.0/16_Access_Control_Management.html

  • 60 jcr-sql2: implement query store/load not assigned

    #60 jcr-sql2: implement query store/load

    Created by dbu at 28.12.2011 - 01:12, last updated at 22.07.2013 - 02:07

    https://github.com/phpcr/phpcr/blob/master/src/PHPCR/Query/QueryInterface.php#L222 https://github.com/phpcr/phpcr/blob/master/src/PHPCR/Query/QueryManagerInterface.php#L86

    for how the data is stored, look at jackrabbit for inspiration

  • 59 jcr-sql2: implement bindValue not assigned

    #59 jcr-sql2: implement bindValue

    Created by dbu at 28.12.2011 - 01:12, last updated at 15.02.2014 - 02:02

    follow up of https://jira.liip.ch/browse/JACK-11

  • 55 Versioning: merge versions not assigned

    #55 Versioning: merge versions

    Created by dbu at 18.12.2011 - 07:12, last updated at 15.04.2014 - 10:04

    implement the methods to merge versions

    when fixed, also update Repository::jackalopeNotImplemented

  • 54 Versioning: implement labels not assigned

    #54 Versioning: implement labels

    Created by dbu at 18.12.2011 - 07:12, last updated at 15.04.2014 - 10:04

    getting and setting version labels could be used to build simple workflows.

    the methods are

    VersionHistory::addVersionLabel
    VersionHistory::getVersionByLabel
    VersionHistory::getVersionLabels
    VersionHistory::hasVersionLabel
    VersionHistory::removeVersionLabel
    

    when fixed, also update Repository::jackalopeNotImplemented

  • 46 helper for transport to generate capabilities based on implemented interfaces not assigned

    #46 helper for transport to generate capabilities based on implemented interfaces

    Created by dbu at 01.12.2011 - 04:12, last updated at 01.12.2011 - 04:12

    see #39 https://github.com/jackalope/jackalope/pull/39/files#r262394

  • 37 better error messages when a property namespace isn't registered not assigned

    #37 better error messages when a property namespace isn't registered

    Created by lsmith77 at 15.11.2011 - 05:11, last updated at 19.03.2012 - 09:03

    jackalope itself should check for valid namespace prefixes.

    jackalope-doctrine-dbal fails during save with

    Notice: Undefined index: phpcr_locale in .../jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php line 440

    jackalope-jackrabbit fails on save too, while talking to the backend

    Sending this message without having "phpcr" registered as a namespace: string(625) "sv:valuent:unstructured/sv:value/sv:propertysv:value/sv:value/sv:propertysv:value3/sv:valuesv:value1/sv:valuesv:value2/sv:value/sv:propertysv:value/sv:value/sv:property/sv:node"

    Leads to this is the response: string(317) "dcr:classjavax.jcr.InvalidSerializedDataException/dcr:classdcr:messageillegal property name: {http://www.jcp.org/jcr/sv/1.0}property/dcr:message/dcr:exception/D:error"

    And finally this exception: PHPCR\InvalidSerializedDataException: HTTP 400: illegal property name: {http://www.jcp.org/jcr/sv/1.0}property

jackalope-jackrabbit

Travis Build Status Latest Stable Version Total Downloads
  • 147 getNodeTypes should not go to backend on repeated calls not assigned

    #147 getNodeTypes should not go to backend on repeated calls

    Created by dbu at 07.04.2017 - 09:04, last updated at 07.04.2017 - 09:04

    each call to get a specific node type does a request to jackrabbit. first calling $session->getWorkspace()->getNodeTypeManager()->getAllNodeTypes(); reduces that to a single call which is about the same speed (not very fast though, at least with magnolia).

    in jackalope-doctrine-dbal, we have the CachedClient that uses a Doctrine\Common\Cache to cache meta data and other things. i think our best approach would be to convert this CachedClient to a pure decorator pattern, instead of extending a Client, and move it to jackalope/jackalope. then it can be used with jackalope-jackrabbit as well.

    (moved here from https://github.com/jackalope/jackalope/issues/312)

  • 137 setMixins fails with referenced nodes not assigned

    #137 setMixins fails with referenced nodes

    Created by danrot at 11.11.2016 - 01:11, last updated at 10.04.2017 - 08:04

    I have a node type called sulu:page, which inherits from the mix:referenceable node type. I have a node which has the mix:referencebale node type and is already referenced by some other nodes.

    Now I would like to change the node to only have the sulu:page mixins and not the mix:referenceable mixin. So I call $node->setMixins(['sulu:page']), but when saving the data in the session to jackrabbit I get an error message like this:

    {http://www.jcp.org/jcr/mix/1.0}referenceable can not be removed: the node is being referenced through at least one property of type REFERENCE
    

    I have checked the curl request which is being sent, and there are two relevant parts, which I'll show in the following snippet:

    --716fd5cc8a3f81528673d2a9af259887
    Content-Disposition: form-data; name="/cmf/microlife/contents/a/jcr:mixinTypes"
    Content-Type: jcr-value/name; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    sulu:page
    

    Some more data, and quite at the bottom I see a line like this:

    ^/cmf/microlife/contents/a/jcr:mixinTypes : []
    

    It looks to me like it is resetting the mixinTypes before setting the new value, which causes some references to break.

    Is there any reason this is built like that? Can we fix that? If I get a hint I would create a PR.

  • 110 When dropping symfony < 2.5 support, switch from DialogHelper to QuestionHelper not assigned

    #110 When dropping symfony < 2.5 support, switch from DialogHelper to QuestionHelper

    Created by dbu at 02.05.2015 - 02:05, last updated at 02.05.2015 - 02:05

    cli-config.php.dist instantiates the DialogHelper but that is deprecated. We should use the QuestionHelper now, but it works differently. We have some commands that ask interactive questions in phpcr-utils

    this needs to be strictly coordinated with https://github.com/phpcr/phpcr-utils/issues/150, or we would need to solve the phpcr-utils side in a way that both old and new are supported.

  • 98 jackrabbit oak support not assigned

    #98 jackrabbit oak support

    Created by dbu at 16.11.2014 - 11:11, last updated at 22.12.2017 - 07:12

    it would be nice to have a working setup with jackrabbit oak.

    a first step would be to wire the jcr to davex libraries around oak. once the oak http api starts to exist, we could also work with that one.

    adobe people told us that using the davex libraries should work. but there is no ready made .jar like for jackrabbit 2.x so it would need some investigating into the internals of oak and jackrabbit.

  • 85 add tests about multibyte utf-8 characters not assigned

    #85 add tests about multibyte utf-8 characters

    Created by dbu at 25.05.2014 - 10:05, last updated at 04.01.2015 - 05:01

    we should test #84 - some of it in https://github.com/phpcr/phpcr-api-tests/ rather than just here.

    we can also check if #55 or #65 can be relaxed now, they where about encoding problems.

    /cc @OHB

  • 35 implement getting multiple nodes by uuid not assigned

    #35 implement getting multiple nodes by uuid

    Created by dbu at 12.03.2013 - 09:03, last updated at 08.11.2014 - 12:11

    adjust jackrabbit to be able to fetch multiple nodes by uuid, as we can by path now.

    34 adjusts the code to shift the responsibility to the transport.

    @chregu can you provide your jackrabbit code here when you find it? if it does not exist, could you dig up the original patch you wrote for fetching multiple nodes by path? this one will look similar.

  • 29 offer an interface to plugin in 3rd party http clients not assigned

    #29 offer an interface to plugin in 3rd party http clients

    Created by dbu at 22.02.2013 - 04:02, last updated at 07.04.2017 - 09:04

    moved over from https://github.com/jackalope/jackalope/issues/33

    being able to plugin Buzz, PEAR::HTTP_Request2 or any other HTTP client for the http communication instead of our own client.

  • 4 property and child node with same name - invalid json not assigned

    #4 property and child node with same name - invalid json

    Created by dbu at 09.03.2012 - 01:03, last updated at 08.11.2014 - 12:11

    in jcr 2.0, a node may have a property and a child node with both the same name. if you think of it in xml, it makes perfectly sense. if you look at it in the api its weird because the path is identical (as paths do not distinguish node and property).

    <test toast="bar">
        <toast/>
    </test>
    

    the json coming back after putting such a structure into jackrabbit looks like this:

    {"toast":"bar",":jcr:primaryType":"Name","jcr:primaryType":"nt:unstructured","toast":{}}
    

    there is twice the key "toast", which is not legal in json. php json_decode just overwrites the property "toast" => "bar" with the node array "toast" => array().

    on the jackrabbit mailinglist we found that jackrabbit parses json by hand and happens to handle this broken case. see http://www.mail-archive.com/dev@jackrabbit.apache.org/msg28047.html

    so either we can try to provide a fix in jackrabbit to have valid json, or make the php client parse the json in a way that handles this broken situation. trying to forbid the feature seems hardly doable to me, at least not without patching jackrabbit as well.

    there is testSetPropertyNewExistingNode (deactivated in 12aae16029003863ef688d1800460915ebb3192d ) that demonstrates the problem.

  • 147 getNodeTypes should not go to backend on repeated calls not assigned

    #147 getNodeTypes should not go to backend on repeated calls

    Created by dbu at 07.04.2017 - 09:04, last updated at 07.04.2017 - 09:04

    each call to get a specific node type does a request to jackrabbit. first calling $session->getWorkspace()->getNodeTypeManager()->getAllNodeTypes(); reduces that to a single call which is about the same speed (not very fast though, at least with magnolia).

    in jackalope-doctrine-dbal, we have the CachedClient that uses a Doctrine\Common\Cache to cache meta data and other things. i think our best approach would be to convert this CachedClient to a pure decorator pattern, instead of extending a Client, and move it to jackalope/jackalope. then it can be used with jackalope-jackrabbit as well.

    (moved here from https://github.com/jackalope/jackalope/issues/312)

  • 137 setMixins fails with referenced nodes not assigned

    #137 setMixins fails with referenced nodes

    Created by danrot at 11.11.2016 - 01:11, last updated at 10.04.2017 - 08:04

    I have a node type called sulu:page, which inherits from the mix:referenceable node type. I have a node which has the mix:referencebale node type and is already referenced by some other nodes.

    Now I would like to change the node to only have the sulu:page mixins and not the mix:referenceable mixin. So I call $node->setMixins(['sulu:page']), but when saving the data in the session to jackrabbit I get an error message like this:

    {http://www.jcp.org/jcr/mix/1.0}referenceable can not be removed: the node is being referenced through at least one property of type REFERENCE
    

    I have checked the curl request which is being sent, and there are two relevant parts, which I'll show in the following snippet:

    --716fd5cc8a3f81528673d2a9af259887
    Content-Disposition: form-data; name="/cmf/microlife/contents/a/jcr:mixinTypes"
    Content-Type: jcr-value/name; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    sulu:page
    

    Some more data, and quite at the bottom I see a line like this:

    ^/cmf/microlife/contents/a/jcr:mixinTypes : []
    

    It looks to me like it is resetting the mixinTypes before setting the new value, which causes some references to break.

    Is there any reason this is built like that? Can we fix that? If I get a hint I would create a PR.

  • 110 When dropping symfony < 2.5 support, switch from DialogHelper to QuestionHelper not assigned

    #110 When dropping symfony < 2.5 support, switch from DialogHelper to QuestionHelper

    Created by dbu at 02.05.2015 - 02:05, last updated at 02.05.2015 - 02:05

    cli-config.php.dist instantiates the DialogHelper but that is deprecated. We should use the QuestionHelper now, but it works differently. We have some commands that ask interactive questions in phpcr-utils

    this needs to be strictly coordinated with https://github.com/phpcr/phpcr-utils/issues/150, or we would need to solve the phpcr-utils side in a way that both old and new are supported.

  • 98 jackrabbit oak support not assigned

    #98 jackrabbit oak support

    Created by dbu at 16.11.2014 - 11:11, last updated at 22.12.2017 - 07:12

    it would be nice to have a working setup with jackrabbit oak.

    a first step would be to wire the jcr to davex libraries around oak. once the oak http api starts to exist, we could also work with that one.

    adobe people told us that using the davex libraries should work. but there is no ready made .jar like for jackrabbit 2.x so it would need some investigating into the internals of oak and jackrabbit.

  • 85 add tests about multibyte utf-8 characters not assigned

    #85 add tests about multibyte utf-8 characters

    Created by dbu at 25.05.2014 - 10:05, last updated at 04.01.2015 - 05:01

    we should test #84 - some of it in https://github.com/phpcr/phpcr-api-tests/ rather than just here.

    we can also check if #55 or #65 can be relaxed now, they where about encoding problems.

    /cc @OHB

  • 35 implement getting multiple nodes by uuid not assigned

    #35 implement getting multiple nodes by uuid

    Created by dbu at 12.03.2013 - 09:03, last updated at 08.11.2014 - 12:11

    adjust jackrabbit to be able to fetch multiple nodes by uuid, as we can by path now.

    34 adjusts the code to shift the responsibility to the transport.

    @chregu can you provide your jackrabbit code here when you find it? if it does not exist, could you dig up the original patch you wrote for fetching multiple nodes by path? this one will look similar.

  • 29 offer an interface to plugin in 3rd party http clients not assigned

    #29 offer an interface to plugin in 3rd party http clients

    Created by dbu at 22.02.2013 - 04:02, last updated at 07.04.2017 - 09:04

    moved over from https://github.com/jackalope/jackalope/issues/33

    being able to plugin Buzz, PEAR::HTTP_Request2 or any other HTTP client for the http communication instead of our own client.

  • 4 property and child node with same name - invalid json not assigned

    #4 property and child node with same name - invalid json

    Created by dbu at 09.03.2012 - 01:03, last updated at 08.11.2014 - 12:11

    in jcr 2.0, a node may have a property and a child node with both the same name. if you think of it in xml, it makes perfectly sense. if you look at it in the api its weird because the path is identical (as paths do not distinguish node and property).

    <test toast="bar">
        <toast/>
    </test>
    

    the json coming back after putting such a structure into jackrabbit looks like this:

    {"toast":"bar",":jcr:primaryType":"Name","jcr:primaryType":"nt:unstructured","toast":{}}
    

    there is twice the key "toast", which is not legal in json. php json_decode just overwrites the property "toast" => "bar" with the node array "toast" => array().

    on the jackrabbit mailinglist we found that jackrabbit parses json by hand and happens to handle this broken case. see http://www.mail-archive.com/dev@jackrabbit.apache.org/msg28047.html

    so either we can try to provide a fix in jackrabbit to have valid json, or make the php client parse the json in a way that handles this broken situation. trying to forbid the feature seems hardly doable to me, at least not without patching jackrabbit as well.

    there is testSetPropertyNewExistingNode (deactivated in 12aae16029003863ef688d1800460915ebb3192d ) that demonstrates the problem.

jackrabbit-importexport: Pulls 0/0, Issues: 0/0

jackalope-doctrine-dbal

Travis Build Status Latest Stable Version Total Downloads
  • 356 No foreign keys are used on phpcr_binarydata, resulting in dangling binary data? not assigned

    #356 No foreign keys are used on phpcr_binarydata, resulting in dangling binary data?

    Created by holtkamp at 30.04.2018 - 03:04, last updated at 02.05.2018 - 09:05

    When looking at the schema generated for a MySQL database, I noticed that no foreign keys are used.

    Is this on purpose? For example: https://github.com/jackalope/jackalope-doctrine-dbal/blob/master/src/Jackalope/Transport/DoctrineDBAL/RepositorySchema.php#L123-L134

    The phpcr_binarydata.node_id column is a foreign key of phpcr_nodes.id and can (/ should?) be configured as such?

    An advantage can be that upon removing the node, also the binary-data is removed. For some reason I currently have a table with a lot "dangling" entries in the phpcr_binarydata table, which can be determined with a query like:

    SELECT id 
    FROM phpcr_binarydata 
    WHERE node_id NOT IN (SELECT id FROM phpcr_nodes);
    

    I think this can be prevented by adding a foreign key, something like this:

    php $binary->addForeignKeyConstraint('phpcr_nodes', ['node_id'], ['id'], ['onDelete' => 'CASCADE']);

  • 355 avoid using deprecated PDO:: constants in calls to doctrine dbal dbu

    #355 avoid using deprecated PDO:: constants in calls to doctrine dbal

    Created by dbu at 04.04.2018 - 04:04, last updated at 03.05.2018 - 09:05
    Assigned to dbu

    according to the upgrade notes, we should stop using the pdo constants and instead use the FetchMode constants from dbal.

    we should figure out the lowest dbal version that supports those dbal constants and adjust the dbal dependency accordingly.

  • 345 ReferenceMany only matches First not assigned

    #345 ReferenceMany only matches First

    Created by swimson at 06.05.2017 - 12:05, last updated at 11.05.2017 - 08:05

    Heyo, we ran into a strange bug, and are trying to figure out how to work around it.

    We have two Documents - Tombstone, and TombstoneCategory.
    Each Tombstone can be in multiple categories.

    Here's the QueryBuilder code....

        if ($categories) {
            $qb
                ->addJoinInner()
                ->right()->document('Mindgruve\Cms\OpusBundle\Doctrine\PHPCR\TombstoneCategory', 'tc')->end()
                ->condition()->equi('t.categories', 'tc.uuid')->end()->end();
    
            $node = $qb->andWhere()->orX();
            foreach ($categories as $category) {
                $node->eq()->localName('tc')->literal($category)->end();
            }
            $qb->end();
        }
    

    The generated SQL statement is ....

    SELECT n0.path AS n0_path, n0.identifier AS n0_identifier, n0.props AS n0_props, n1.path AS n1_path, n1.identifier AS n1_identifier, n1.props AS n1_props 
    FROM phpcr_nodes n0 
    INNER JOIN phpcr_nodes n1 ON ( n0.workspace_name = n1.workspace_name AND n1.type IN ('nt:unstructured', 'rep:root') AND EXTRACTVALUE(n0.props, '//sv:property[@sv:name="categories"]/sv:value[1]') = n1.identifier ) 
    WHERE n0.workspace_name = 'default' AND n0.type IN ('nt:unstructured', 'rep:root') AND ((n1.local_name = 'commercial-real-estate-banking' AND (EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name="phpcr:class"]/sv:value[text()="Mindgruve\\Cms\\OpusBundle\\Doctrine\\PHPCR\\Tombstone"]) > 0') OR EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name="phpcr:classparents"]/sv:value[text()="Mindgruve\\Cms\\OpusBundle\\Doctrine\\PHPCR\\Tombstone"]) > 0'))) AND (EXTRACTVALUE(n1.props, 'count(//sv:property[@sv:name="phpcr:class"]/sv:value[text()="Mindgruve\\Cms\\OpusBundle\\Doctrine\\PHPCR\\TombstoneCategory"]) > 0') OR EXTRACTVALUE(n1.props, 'count(//sv:property[@sv:name="phpcr:classparents"]/sv:value[text()="Mindgruve\\Cms\\OpusBundle\\Doctrine\\PHPCR\\TombstoneCategory"]) > 0')))
    

    The problem is that in the inner join there is this line...

    '//sv:property[@sv:name="categories"]/sv:value[1]') = n1.identifier
    

    The problem is that the tombstone is in two categories, and the first one isn't the one we are searching for. SQL statement always matches the first element even when the property is multivalued.....

    <sv:property sv:name="categories" sv:type="WeakReference" sv:multi-valued="1">
       <sv:value length="36">ced3ab5d-bb56-4817-885b-2cef09d7d272</sv:value>
       <sv:value length="36">bfdf6816-a2dd-416e-9adb-795b68dd824d</sv:value>
    </sv:property>
    

    Is there a better way to query multivalued properties multivalued properties?

    Thanks!

  • 325 \DateTime fields in query results are strings, in Jackrabbit they are objects. not assigned

    #325 \DateTime fields in query results are strings, in Jackrabbit they are objects.

    Created by dantleech at 31.03.2016 - 03:03, last updated at 31.03.2016 - 04:03

    The raw column results from a query represent date columns as strings, in Jackrabbit they are represented as \DateTime objects.

  • 317 error: 1093 You can't specify target table 'phpcr_nodes' for update in FROM clause not assigned

    #317 error: 1093 You can't specify target table 'phpcr_nodes' for update in FROM clause

    Created by laurentiuc at 24.01.2016 - 03:01, last updated at 17.04.2017 - 11:04

    Hello,

    Having this error while trying to move a node. the exceptions happen here

    vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php line 1847 
    

    any help is much appreciated.

    thanks, laurentiu

  • 312 Use node references tables in join query to better performance not assigned

    #312 Use node references tables in join query to better performance

    Created by hason at 14.01.2016 - 10:01, last updated at 07.04.2017 - 11:04

    The QueryBuilder

    $qb
        ->fromDocument(Article::class, 'a')
        ->addJoinInner()
            ->right()->document(ArticleCategory::class, 'c')->end()
            ->condition()->equi('a.category', 'c.uuid')->end()
        ->end()
        ->where()
            ->eq()->field('c.uuid')->literal($contentDocument->getUuid())->end()
        ->end()
        ->andWhere()
            ->eq()->field('a.publishable')->literal(true)->end()
        ->end()
        ->orderBy()->desc()->field('a.publishStartDate')->end()
    ;
    

    is actual transformed to very slow sql (sqlite 400 ms)

    SELECT 
      n0.path AS n0_path, 
      n0.identifier AS n0_identifier, 
      n0.props AS n0_props, 
      n1.path AS n1_path, 
      n1.identifier AS n1_identifier, 
      n1.props AS n1_props 
    FROM 
      phpcr_nodes n0 
      INNER JOIN phpcr_nodes n1 ON (
        n0.workspace_name = n1.workspace_name 
        AND n1.type IN ('nt:unstructured', 'rep:root') 
        AND EXTRACTVALUE(
          n0.props, '//sv:property[@sv:name="category"]/sv:value[1]'
        ) = n1.identifier
      ) 
    WHERE 
      n0.workspace_name = ? 
      AND n0.type IN ('nt:unstructured', 'rep:root') 
      AND (
        (
          (
            n1.identifier = 'c39b134f-81dd-4ef8-937d-d0fd975c349b' 
            AND EXTRACTVALUE(
              n0.props, '//sv:property[@sv:name="publishable"]/sv:value[1]'
            ) = '1'
          ) 
          AND (
            EXTRACTVALUE(
              n0.props, 'count(//sv:property[@sv:name="phpcr:class"]/sv:value[text()="AppBundle\Document\Article"]) > 0'
            ) 
            OR EXTRACTVALUE(
              n0.props, 'count(//sv:property[@sv:name="phpcr:classparents"]/sv:value[text()="AppBundle\Document\Article"]) > 0'
            )
          )
        ) 
        AND (
          EXTRACTVALUE(
            n1.props, 'count(//sv:property[@sv:name="phpcr:class"]/sv:value[text()="AppBundle\Document\ArticleCategory"]) > 0'
          ) 
          OR EXTRACTVALUE(
            n1.props, 'count(//sv:property[@sv:name="phpcr:classparents"]/sv:value[text()="AppBundle\Document\ArticleCategory"]) > 0'
          )
        )
      ) 
    ORDER BY 
      CAST(
        EXTRACTVALUE(
          n0.numerical_props, '//sv:property[@sv:name="publishStartDate"]/sv:value[1]'
        ) AS DECIMAL
      ) DESC, 
      EXTRACTVALUE(
        n0.props, '//sv:property[@sv:name="publishStartDate"]/sv:value[1]'
      ) DESC
    

    The sql is much more faster with references tables (4 ms):

    SELECT 
      n0.path AS n0_path, 
      n0.identifier AS n0_identifier, 
      n0.props AS n0_props, 
      n1.path AS n1_path, 
      n1.identifier AS n1_identifier, 
      n1.props AS n1_props 
    FROM 
      phpcr_nodes n0 
      INNER JOIN phpcr_nodes n1 ON (
        n0.workspace_name = n1.workspace_name 
        AND n1.type IN ('nt:unstructured', 'rep:root')
      ) 
      INNER JOIN phpcr_nodes_weakreferences n2 ON (
        n2.target_id = n1.id 
        AND n2.source_id = n0.id 
        AND n2.source_property_name = "category"
      ) 
    WHERE 
      n0.workspace_name = ? 
      AND n0.type IN ('nt:unstructured', 'rep:root') 
      AND (
        (
          (
            n1.identifier = 'c39b134f-81dd-4ef8-937d-d0fd975c349b' 
            AND EXTRACTVALUE(
              n0.props, '//sv:property[@sv:name="publishable"]/sv:value[1]'
            ) = '1'
          ) 
          AND (
            EXTRACTVALUE(
              n0.props, 'count(//sv:property[@sv:name="phpcr:class"]/sv:value[text()="AppBundle\Document\Article"]) > 0'
            ) 
            OR EXTRACTVALUE(
              n0.props, 'count(//sv:property[@sv:name="phpcr:classparents"]/sv:value[text()="AppBundle\Document\Article"]) > 0'
            )
          )
        ) 
        AND (
          EXTRACTVALUE(
            n1.props, 'count(//sv:property[@sv:name="phpcr:class"]/sv:value[text()="AppBundle\Document\ArticleCategory"]) > 0'
          ) 
          OR EXTRACTVALUE(
            n1.props, 'count(//sv:property[@sv:name="phpcr:classparents"]/sv:value[text()="AppBundle\Document\ArticleCategory"]) > 0'
          )
        )
      ) 
    ORDER BY 
      CAST(
        EXTRACTVALUE(
          n0.numerical_props, '//sv:property[@sv:name="publishStartDate"]/sv:value[1]'
        ) AS DECIMAL
      ) DESC, 
      EXTRACTVALUE(
        n0.props, '//sv:property[@sv:name="publishStartDate"]/sv:value[1]'
      ) DESC
    
  • 309 [query] why add selector in dcr:name? not assigned

    #309 [query] why add selector in dcr:name?

    Created by dbu at 10.11.2015 - 01:11, last updated at 15.11.2015 - 12:11

    as discovered with https://github.com/jackalope/jackalope/pull/301, we seem to have a duplication of the selector name. why do we under some circumstances add the selector name to dcr:name in https://github.com/jackalope/jackalope-doctrine-dbal/blob/master/src/Jackalope/Transport/DoctrineDBAL/Client.php#L2329 ? having it in dcr:selectorName would be enough (and actually simpler) for jackalope.

  • 305 ISDESCENDANTNODE does not work with path containing a dot not assigned

    #305 ISDESCENDANTNODE does not work with path containing a dot

    Created by danrot at 20.10.2015 - 09:10, last updated at 17.04.2017 - 11:04

    Somebody has encountered an issue in combination with Sulu: https://github.com/sulu-io/sulu-standard/issues/536#issuecomment-149315457

    I could track down the problem to the fact that this ISDESCENDANTNODE function does not work correctly, when the path contains a dot. So the following query returns nothing, although the node at the given path has child nodes:

    SELECT * FROM [nt:unstructured] AS page WHERE ISDESCENDANTNODE(page, '/cmf/htl.do/contents');
    

    I guess this should be working, since the dot doesn't have any special meaning (at least none that I am aware of), and this query works like a charm when used with jackrabbit.

  • 304 Error when using Sqlite not assigned

    #304 Error when using Sqlite

    Created by andylibrian at 19.10.2015 - 12:10, last updated at 11.01.2016 - 03:01

    I am writing a Laravel package that wraps jackalope doctrine dbal. In my test, I use pdo sqlite driver, and the test failed with following error:

    Argument 1 passed to Jackalope\Transport\DoctrineDBAL\Client::registerSqliteFunctions() must be an instance of Doctrine\DBAL\Driver\PDOConnection, instance of PDO given, called in /home/travis/build/ramping/laravel-jackalope-doctrine-dbal/vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php on line 2631 and defined
    
    /home/travis/build/ramping/laravel-jackalope-doctrine-dbal/vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php:214
    
    /home/travis/build/ramping/laravel-jackalope-doctrine-dbal/vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php:2631
    
    /home/travis/build/ramping/laravel-jackalope-doctrine-dbal/vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php:266
    
    /home/travis/build/ramping/laravel-jackalope-doctrine-dbal/vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php:429
    
    /home/travis/build/ramping/laravel-jackalope-doctrine-dbal/vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php:389
    
    /home/travis/build/ramping/laravel-jackalope-doctrine-dbal/vendor/jackalope/jackalope/src/Jackalope/Repository.php:145
    

    Here is the build : https://travis-ci.org/ramping/laravel-jackalope-doctrine-dbal/jobs/86153727

    Apparently, it's because of this:

        /**
         * @TODO: move to "SqlitePlatform" and rename to "registerExtraFunctions"?
         *
         * @param PDOConnection $sqliteConnection
         *
         * @return Client
         */
        private function registerSqliteFunctions(PDOConnection $sqliteConnection)
        {
    

    After I read these lines:

            // @TODO: move to "SqlitePlatform" and rename to "registerExtraFunctions"?
            if ($this->conn->getDatabasePlatform() instanceof SqlitePlatform) {
                $this->registerSqliteFunctions($this->conn->getWrappedConnection());
            }
    

    I tried to change it to

    private function registerSqliteFunctions(\PDO $sqliteConnection)
    

    Then the test passed. Any idea? Is this something related to that "TODO"?

  • 267 implement CAST and handle ISCHILDNODE joins not assigned

    #267 implement CAST and handle ISCHILDNODE joins

    Created by lsmith77 at 02.05.2015 - 02:05, last updated at 02.05.2015 - 04:05
    SELECT u.*
                 FROM [nt:unstructured] AS u
                  INNER JOIN [nt:unstructured] AS c ON ISCHILDNODE(c, u)
                 WHERE ISDESCENDANTNODE(u, [$newsDataPath])
                   AND (u.publishable = true)
                   AND (u.publishStartDate IS NULL OR u.publishStartDate <= CAST('$now' AS DATE))
                   AND (u.publishEndDate IS NULL OR u.publishEndDate > CAST('$now' AS DATE) OR u.publishEndDate = CAST('2008-01-01T00:00:00.000+01:00' AS DATE))
                   AND u.[phpcr:class] = 'Liipch\\NewsBundle\\Document\\NewsItem'
                   AND NAME(c) = 'phpcr_locale:$locale'
                 ORDER BY u.publishStartDate DESC
    
  • 248 Path is limited to 255 chars not assigned

    #248 Path is limited to 255 chars

    Created by dantleech at 03.03.2015 - 06:03, last updated at 20.01.2017 - 03:01

    What happens when somebody creates a path which is longer than 255 chars?

    Looking at the schema, path is varchar(255)

  • 246 ISCHILDNODE and ISDESCENDANTNODE not working with %(wildcard) not assigned

    #246 ISCHILDNODE and ISDESCENDANTNODE not working with %(wildcard)

    Created by oste at 17.02.2015 - 12:02, last updated at 21.02.2015 - 05:02

    I am trying to leverage ISCHILDNODE with a % wildcard using the Query Builder. I am constructing my query like this

    $qb->from()->document('AppBundle\Document', 'd');
    //$qb->where()->descendant('/my/%/posts', 'd');
    $qb->where()->child('/my/%/posts', 'd');
    

    This gives me a SQL-2 query that looks like this SELECT * FROM [nt:unstructured] AS d WHERE (ISCHILDNODE(d, [/my/%/posts]) Unfortunately this is not working :(

    It is worth noting that ISDESCENDANTNODE works as expected SELECT * FROM [nt:unstructured] AS d WHERE (ISDESCENDANTNODE(d, [/my/%/posts])

    @dantleech was able to confirm that neither of these work with Jackrabbit in #symfony-cmf irc chat. However they should

  • 239 race condition with sqlite? not assigned

    #239 race condition with sqlite?

    Created by dbu at 05.01.2015 - 10:01, last updated at 12.02.2015 - 09:02

    sqlite builds fail sometimes. in these 3 builds, each has one fail with a different php version: https://travis-ci.org/jackalope/jackalope-doctrine-dbal/builds/45984013 https://travis-ci.org/jackalope/jackalope-doctrine-dbal/builds/45983999 https://travis-ci.org/jackalope/jackalope-doctrine-dbal/builds/45984013

    can we synchronize / flush something, or do we need to wait at some step to reduce the risk of races?

  • 237 Initialization command should migrate the database not assigned

    #237 Initialization command should migrate the database

    Created by dantleech at 30.12.2014 - 12:12, last updated at 30.12.2014 - 12:12

    The dbal:init command could also migrate the database to the latest repository schema.

  • 227 Column aliases do not work not assigned

    #227 Column aliases do not work

    Created by dantleech at 10.12.2014 - 03:12, last updated at 11.12.2014 - 01:12
    PHPCRSH > select [i18n:de-title] AS title from [nt:unstructured] AS a 
        WHERE title IS NOT NULL;
    0 rows in set (0.13842 sec)
    
    select [i18n:de-title] AS title from [nt:unstructured] AS a 
        WHERE [i18n:de-title] IS NOT NULL;
    330 rows in set (1.77691 sec)
    
  • 225 fix HHVM issues with "Validation failed: no DTD found" not assigned

    #225 fix HHVM issues with "Validation failed: no DTD found"

    Created by lsmith77 at 21.11.2014 - 03:11, last updated at 18.06.2015 - 02:06

    https://travis-ci.org/jackalope/jackalope-doctrine-dbal/jobs/34221373

    from a quick check I do not see any DTD referenced in manager.xml ..

  • 217 [query] Selector does not allow specification of mixin not assigned

    #217 [query] Selector does not allow specification of mixin

    Created by dantleech at 25.08.2014 - 10:08, last updated at 11.12.2014 - 01:12

    The doctrine dbal selector does not seem to support selecting from mixin types, for example sulu:content is a mixin type:

    PHPCRSH > SELECT * FROM [sulu:content] AS c WHERE ISCHILDNODE('/cmf/sulu_io/contents/test') AND c.[i18n:de-state] = 2;
    +------+
    | Path |
    +------+
    
    PHPCRSH > SELECT [jcr:mixinTypes] FROM [nt:unstructured] AS c WHERE ISCHILDNODE('/cmf/sulu_io/contents/test') AND c.[i18n:de-state] = 2;
    +-----------------------------------+------------------+
    | Path                              | c.jcr:mixinTypes |
    +-----------------------------------+------------------+
    | /cmf/sulu_io/contents/test/foobar | [0] sulu:content |
    | /cmf/sulu_io/contents/test/barfoo | [0] sulu:content |
    +-----------------------------------+------------------+
    

    http://www.day.com/specs/jcr/2.0/6_Query.html#6.7.3 Selector:

    the node’s primary node type is nodeType, or the node’s primary node type is a subtype of nodeType, or the node has a mixin node type that is nodeType, or the node has a mixin node type that is a subtype of nodeType

    Jackrabbit supports mixin as selector.

  • 213 Real search indexing not assigned

    #213 Real search indexing

    Created by dantleech at 15.08.2014 - 06:08, last updated at 02.05.2015 - 01:05

    What options are there for supporting a real search indexing system internally without relying on another service (such as Lucene) ?

  • 212 Full text search constraint shouldn't assume "%" not assigned

    #212 Full text search constraint shouldn't assume "%"

    Created by dantleech at 15.08.2014 - 06:08, last updated at 17.08.2014 - 10:08

    Currently the full-text-search automatically wraps the query in "%".

    In jackrabbit you need to delimit the string with * manually, it doesn't happen automatically.

    We should substitute * with % in the full text search I think.

  • 211 Encoding warnings not assigned

    #211 Encoding warnings

    Created by dantleech at 15.08.2014 - 09:08, last updated at 11.12.2014 - 01:12

    Get the following error when listing certain nodes:

    PHPCRSH > ls
    PHP Warning:  DOMDocument::loadXML(): Input is not proper UTF-8, indicate encoding !
    Bytes: 0x85 0x26 0x23 0x31 in Entity, line: 10 in phar:///usr/local/bin/phpcrsh/vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php on line 832
    

    It is likely the nodes in question are "old", as I do not get this problem with recent nodes.

  • 206 SQL2 queries need to quote searches on integer fields with SQLite not assigned

    #206 SQL2 queries need to quote searches on integer fields with SQLite

    Created by lsmith77 at 03.07.2014 - 03:07, last updated at 09.02.2015 - 09:02

    The following node

    $node = $root->addNode('foo');
    $node->setProperty('count', 10);
    

    Will not be found with this query:

    $sql = "SELECT * FROM [nt:unstructured] WHERE count = 10";
    $query = $qm->createQuery($sql, \PHPCR\Query\QueryInterface::JCR_SQL2);
    

    But it will be found with:

    $sql = "SELECT * FROM [nt:unstructured] WHERE count = '10'";
    $query = $qm->createQuery($sql, \PHPCR\Query\QueryInterface::JCR_SQL2);
    
  • 204 Implement versioning support not assigned

    #204 Implement versioning support

    Created by benglass at 17.06.2014 - 08:06, last updated at 11.06.2015 - 01:06

    Assigned to @danrot

    This is not currently supported by the dbal client

    https://github.com/jackalope/jackalope-doctrine-dbal/blob/master/src/Jackalope/Transport/DoctrineDBAL/Client.php#L69

    There are 2 kinds of versioning: versioning (with branching/tagging) and simple versioning (linear only). We would start with simple only.

    jackalope-jackrabbit supports linear versioning with taggin but no branching (need confirmation this is accurate) so that would be what we'd shoot for.

    Implementation notes - [ ] The Client would need to implement VersioningInterface[1] - [ ] The VersionManager[2] does most of the logical side

    So the Client should handle the communication, like setting the correct properties.

    Tasks - [x] apply the mix:versionable mixin to a node - [x] create a new version of a node - [x] get the data from an old version of the node - [ ] write protection for not checked out nodes - [ ] restore an old version of a node - [ ] delete a version (optional feature)

    [1] https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Transport/VersioningInterface.php [2] https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Version/VersionManager.php

  • 192 Implement observation not assigned

    #192 Implement observation

    Created by dantleech at 29.03.2014 - 06:03, last updated at 11.12.2014 - 01:12

    This shouldn't be too hard in theory right?

  • 174 date query issue on sqlite not assigned

    #174 date query issue on sqlite

    Created by dbu at 02.02.2014 - 11:02, last updated at 23.06.2015 - 02:06

    via @rmsint

    Using dbal together with sqlite gives no results for a query using the date literal. For jackrabbit and dbal mysql the query with a date literal is giving the expected results.

    On the cmf-sandbox, this query:

    SELECT * FROM [nt:unstructured] AS b 
    WHERE (b.[jcr:created] < CAST('2014-11-11T14:50:35.000+01:00' AS DATE) 
    AND (b.[phpcr:class] = 'Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock' OR b.[phpcr:classparents] = 'Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock'))
    

    should give 2 results:

    $ app/console doctrine:phpcr:workspace:query "SELECT * FROM [nt:unstructured] AS b WHERE (b.[jcr:created] < CAST('2014-11-11T14:50:35.000+01:00' AS DATE) AND (b.[phpcr:class] = 'Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock' OR b.[phpcr:classparents] = 'Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock'))"                                                                                                                                                       
    Executing, language: JCR-SQL2
    Results:
    
    1. Row (Path: /cms/content/home/additionalInfoBlock/child1, Score: 0):
    jcr:primaryType: 'b'
    jcr:createdBy: 'admin'
    jcr:created: '2014-02-01T15:47:29.000+01:00'
    
    2. Row (Path: /cms/content/home/additionalInfoBlock/child2, Score: 0):
    jcr:primaryType: 'b'
    jcr:createdBy: 'admin'
    jcr:created: '2014-02-01T15:47:29.000+01:00'
    0.06 seconds
    

    The generated sql is:

    #mysql
    SELECT n0.id AS n0_id, n0.path AS n0_path, n0.parent AS n0_parent, n0.local_name AS n0_local_name, n0.namespace AS n0_namespace, n0.workspace_name AS n0_workspace_name, n0.identifier AS n0_identifier, n0.type AS n0_type, n0.props AS n0_props, n0.depth AS n0_depth, n0.sort_order AS n0_sort_order 
    FROM phpcr_nodes n0 
    WHERE n0.workspace_name = 'default'
    AND n0.type IN ('nt:unstructured', 'rep:root') 
    AND (EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name=\"jcr:created\"]/sv:value[text()<\"2014-11-11T14:50:35+01:00\"]) > 0') 
    AND (EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name=\"phpcr:class\"]/sv:value[text()=\"Symfony\\\\Cmf\\\\Bundle\\\\BlockBundle\\\\Doctrine\\\\Phpcr\\\\SimpleBlock\"]) > 0') 
    OR EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name=\"phpcr:classparents\"]/sv:value[text()=\"Symfony\\\\Cmf\\\\Bundle\\\\BlockBundle\\\\Doctrine\\\\Phpcr\\\\SimpleBlock\"]) > 0')))
    
    #sqlite
    SELECT n0.id AS n0_id, n0.path AS n0_path, n0.parent AS n0_parent, n0.local_name AS n0_local_name, n0.namespace AS n0_namespace, n0.workspace_name AS n0_workspace_name, n0.identifier AS n0_identifier, n0.type AS n0_type, n0.props AS n0_props, n0.depth AS n0_depth, n0.sort_order AS n0_sort_order 
    FROM phpcr_nodes n0 
    WHERE n0.workspace_name = 'default'
    AND n0.type IN ('nt:unstructured', 'rep:root') 
    AND (EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name=\"jcr:created\"]/sv:value[text()<\"2014-11-11T14:50:35+01:00\"]) > 0') 
    AND (EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name=\"phpcr:class\"]/sv:value[text()=\"Symfony\\Cmf\\Bundle\\BlockBundle\\Doctrine\\Phpcr\\SimpleBlock\"]) > 0') 
    OR EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name=\"phpcr:classparents\"]/sv:value[text()=\"Symfony\\Cmf\\Bundle\\BlockBundle\\Doctrine\\Phpcr\\SimpleBlock\"]) > 0')))
    

    The difference is that: - the escaping is different, I read in the code that this is supposed to be - and the registered EXTRACTVALUE function for sqlite returns false for the xpath expression of the date, here: https://github.com/jackalope/jackalope-doctrine-dbal/blob/master/src/Jackalope/Transport/DoctrineDBAL/Client.php#L202

  • 173 Database columns/results are case-sensitive. not assigned

    #173 Database columns/results are case-sensitive.

    Created by tlorens at 29.01.2014 - 05:01, last updated at 12.12.2014 - 02:12

    We're on an oracle database and all columns are upper case. There's code in Client.php that iterates through arrays using lower-cased keys. This obviously blows up when results are upper-cased. I've patched the code with a simple call to : $row =array_change_key_case($row, CASE_LOWER); in a few spots. You make the call on a better, more practical solution.

  • 172 Make sql table prefix configurable not assigned

    #172 Make sql table prefix configurable

    Created by dbu at 20.01.2014 - 06:01, last updated at 11.12.2014 - 01:12

    i would say the actual table names do not need to be configurable, just the prefix should really be enough. we could convert the table "local" names to constants in RepositorySchema however. or simply have getter for all those names, then one could even use a custom schema with custom table names.

    the $options to the RepositorySchema should allow a table prefix. the QOMWalker should be injected the schema rather than instantiating it itself so it can get a schema with the correct prefix. the schema should also have a getter for the prefix so the walker can figure out the right table name.

    the client would need a setter to be injected a custom created RepositorySchema to use it when building the QOMWalker, and of course for the table names of its own queries.

    the init command also builds the schema - that one should have arguments for the options to the schema, rather than pass an empty array. in the phpcr-bundle, those options should go away again and come from the symfony configuration instead.

    for the tests, the Jackalope\TestCase class should read the prefix from the globals, as we do for other configuration options, so you can define them in the phpunit.xml file.

  • 171 ValueConstraints aren't stored and validated not assigned

    #171 ValueConstraints aren't stored and validated

    Created by wjzijderveld at 20.01.2014 - 12:01, last updated at 11.12.2014 - 01:12

    While working on a blogpost about custom NodeTypes, I encountered an issue with the ValueConstraints.

    It seems they aren't stored anywhere, and I couldn't find a trace in the code where they would be validated. Are they supposed to be stored and validated?

  • 151 index on path, workspace_name is not used in Client::getNode not assigned

    #151 index on path, workspace_name is not used in Client::getNode

    Created by ACSI-IT at 23.10.2013 - 12:10, last updated at 02.05.2015 - 01:05

    Jackalope\Transport\DoctrineDBAL\Client::getNode is doing a LIKE query on phpcr_nodes.path, but EXPLAIN shows it is not using the index on (path, workspace_name).

    I traced this to the forward slashes in :pathd, adding (escaping) '\' before these forward slashes makes MySQL use its index. significantly improving performance on path queries.

    see: https://github.com/ACSI-IT/jackalope-doctrine-dbal/commit/95f73f01ab0cdc94121a94c4b9425621a5479ade

    Not sure if this is the cleanest solution, could you provide some feedback. Let me know if you want me to create a PR for this commit.

    Axel

  • 130 properly error report join selectors without alias not assigned

    #130 properly error report join selectors without alias

    Created by lsmith77 at 02.07.2013 - 03:07, last updated at 11.12.2014 - 01:12

    follow up for #125

  • 127 implement SQL2 CONTAINS not assigned

    #127 implement SQL2 CONTAINS

    Created by lsmith77 at 24.06.2013 - 05:06, last updated at 11.12.2014 - 01:12

    see https://github.com/phpcr/phpcr-api-tests/issues/109

  • 100 improve sqlite init not assigned

    #100 improve sqlite init

    Created by dbu at 15.04.2013 - 01:04, last updated at 28.12.2013 - 11:12

    when using composer create-project to create a new project with the sqlite database, we should also create the database. we could try it for all platforms actually. there is code in the DoctrineBundle for that which we might copy: https://github.com/doctrine/DoctrineBundle/blob/master/Command/CreateDatabaseDoctrineCommand.php

    we should however check if the database already exists before attempting to create it.

    btw, i had problems running jackalope:init:dbal with sqlite. nothing happens when running the command. then i added a $connection->close() line after $connection->exec() but then i get an exception about "no such table: main.phpcr_nodes"

  • 69 created_at updated_at to help with cache invalidation not assigned

    #69 created_at updated_at to help with cache invalidation

    Created by petesiss at 15.10.2012 - 04:10, last updated at 11.12.2014 - 01:12

    Do you think there is any scope for adding created_at and updated_at to the schema to help with cache invalidation?

    Im not sure whether this is something to go in here, jackalope, or even cmf, but one way or another it would be immensely helpful to be able to find out when a specific subset of nodes was last updated.

    Any thoughts? I was going to fall back on SHOW TABLE STATUS LIKE 'tablename' to get the last update time as a crude solution, but for InnoDB unfortunately the update time is always Null. There is a ticket open for it to be added but it has been open since 2005...

  • 27 Improve the performance of move node not assigned

    #27 Improve the performance of move node

    Created by adou600 at 11.05.2012 - 11:05, last updated at 08.01.2014 - 10:01

    Currently, two DB queries are needed inside move nodes: 1. Select the nodes concerned by the move 2. Update the concerned nodes

    It would be better to do it in one step with the query builder and SQL string manipulation (do not forget to also update the depth value). See: https://github.com/jackalope/jackalope-doctrine-dbal/blob/master/src/Jackalope/Transport/DoctrineDBAL/Client.php#L1425

  • 22 testTransactionCommit fails not assigned

    #22 testTransactionCommit fails

    Created by adou600 at 20.04.2012 - 02:04, last updated at 28.12.2013 - 11:12

    TransactionMethodsTest::testTransactionCommit in phpcr-api-tests is failing.

    Failed asserting that true is false on the following line: https://github.com/phpcr/phpcr-api-tests/blob/master/tests/21_Transactions/TransactionMethodsTest.php#L48

    It seems that an uncommitted transaction is saved anyway by $session->save();

  • 356 No foreign keys are used on phpcr_binarydata, resulting in dangling binary data? not assigned

    #356 No foreign keys are used on phpcr_binarydata, resulting in dangling binary data?

    Created by holtkamp at 30.04.2018 - 03:04, last updated at 02.05.2018 - 09:05

    When looking at the schema generated for a MySQL database, I noticed that no foreign keys are used.

    Is this on purpose? For example: https://github.com/jackalope/jackalope-doctrine-dbal/blob/master/src/Jackalope/Transport/DoctrineDBAL/RepositorySchema.php#L123-L134

    The phpcr_binarydata.node_id column is a foreign key of phpcr_nodes.id and can (/ should?) be configured as such?

    An advantage can be that upon removing the node, also the binary-data is removed. For some reason I currently have a table with a lot "dangling" entries in the phpcr_binarydata table, which can be determined with a query like:

    SELECT id 
    FROM phpcr_binarydata 
    WHERE node_id NOT IN (SELECT id FROM phpcr_nodes);
    

    I think this can be prevented by adding a foreign key, something like this:

    php $binary->addForeignKeyConstraint('phpcr_nodes', ['node_id'], ['id'], ['onDelete' => 'CASCADE']);

  • 355 avoid using deprecated PDO:: constants in calls to doctrine dbal dbu

    #355 avoid using deprecated PDO:: constants in calls to doctrine dbal

    Created by dbu at 04.04.2018 - 04:04, last updated at 03.05.2018 - 09:05
    Assigned to dbu

    according to the upgrade notes, we should stop using the pdo constants and instead use the FetchMode constants from dbal.

    we should figure out the lowest dbal version that supports those dbal constants and adjust the dbal dependency accordingly.

  • 345 ReferenceMany only matches First not assigned

    #345 ReferenceMany only matches First

    Created by swimson at 06.05.2017 - 12:05, last updated at 11.05.2017 - 08:05

    Heyo, we ran into a strange bug, and are trying to figure out how to work around it.

    We have two Documents - Tombstone, and TombstoneCategory.
    Each Tombstone can be in multiple categories.

    Here's the QueryBuilder code....

        if ($categories) {
            $qb
                ->addJoinInner()
                ->right()->document('Mindgruve\Cms\OpusBundle\Doctrine\PHPCR\TombstoneCategory', 'tc')->end()
                ->condition()->equi('t.categories', 'tc.uuid')->end()->end();
    
            $node = $qb->andWhere()->orX();
            foreach ($categories as $category) {
                $node->eq()->localName('tc')->literal($category)->end();
            }
            $qb->end();
        }
    

    The generated SQL statement is ....

    SELECT n0.path AS n0_path, n0.identifier AS n0_identifier, n0.props AS n0_props, n1.path AS n1_path, n1.identifier AS n1_identifier, n1.props AS n1_props 
    FROM phpcr_nodes n0 
    INNER JOIN phpcr_nodes n1 ON ( n0.workspace_name = n1.workspace_name AND n1.type IN ('nt:unstructured', 'rep:root') AND EXTRACTVALUE(n0.props, '//sv:property[@sv:name="categories"]/sv:value[1]') = n1.identifier ) 
    WHERE n0.workspace_name = 'default' AND n0.type IN ('nt:unstructured', 'rep:root') AND ((n1.local_name = 'commercial-real-estate-banking' AND (EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name="phpcr:class"]/sv:value[text()="Mindgruve\\Cms\\OpusBundle\\Doctrine\\PHPCR\\Tombstone"]) > 0') OR EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name="phpcr:classparents"]/sv:value[text()="Mindgruve\\Cms\\OpusBundle\\Doctrine\\PHPCR\\Tombstone"]) > 0'))) AND (EXTRACTVALUE(n1.props, 'count(//sv:property[@sv:name="phpcr:class"]/sv:value[text()="Mindgruve\\Cms\\OpusBundle\\Doctrine\\PHPCR\\TombstoneCategory"]) > 0') OR EXTRACTVALUE(n1.props, 'count(//sv:property[@sv:name="phpcr:classparents"]/sv:value[text()="Mindgruve\\Cms\\OpusBundle\\Doctrine\\PHPCR\\TombstoneCategory"]) > 0')))
    

    The problem is that in the inner join there is this line...

    '//sv:property[@sv:name="categories"]/sv:value[1]') = n1.identifier
    

    The problem is that the tombstone is in two categories, and the first one isn't the one we are searching for. SQL statement always matches the first element even when the property is multivalued.....

    <sv:property sv:name="categories" sv:type="WeakReference" sv:multi-valued="1">
       <sv:value length="36">ced3ab5d-bb56-4817-885b-2cef09d7d272</sv:value>
       <sv:value length="36">bfdf6816-a2dd-416e-9adb-795b68dd824d</sv:value>
    </sv:property>
    

    Is there a better way to query multivalued properties multivalued properties?

    Thanks!

  • 325 \DateTime fields in query results are strings, in Jackrabbit they are objects. not assigned

    #325 \DateTime fields in query results are strings, in Jackrabbit they are objects.

    Created by dantleech at 31.03.2016 - 03:03, last updated at 31.03.2016 - 04:03

    The raw column results from a query represent date columns as strings, in Jackrabbit they are represented as \DateTime objects.

  • 317 error: 1093 You can't specify target table 'phpcr_nodes' for update in FROM clause not assigned

    #317 error: 1093 You can't specify target table 'phpcr_nodes' for update in FROM clause

    Created by laurentiuc at 24.01.2016 - 03:01, last updated at 17.04.2017 - 11:04

    Hello,

    Having this error while trying to move a node. the exceptions happen here

    vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php line 1847 
    

    any help is much appreciated.

    thanks, laurentiu

  • 312 Use node references tables in join query to better performance not assigned

    #312 Use node references tables in join query to better performance

    Created by hason at 14.01.2016 - 10:01, last updated at 07.04.2017 - 11:04

    The QueryBuilder

    $qb
        ->fromDocument(Article::class, 'a')
        ->addJoinInner()
            ->right()->document(ArticleCategory::class, 'c')->end()
            ->condition()->equi('a.category', 'c.uuid')->end()
        ->end()
        ->where()
            ->eq()->field('c.uuid')->literal($contentDocument->getUuid())->end()
        ->end()
        ->andWhere()
            ->eq()->field('a.publishable')->literal(true)->end()
        ->end()
        ->orderBy()->desc()->field('a.publishStartDate')->end()
    ;
    

    is actual transformed to very slow sql (sqlite 400 ms)

    SELECT 
      n0.path AS n0_path, 
      n0.identifier AS n0_identifier, 
      n0.props AS n0_props, 
      n1.path AS n1_path, 
      n1.identifier AS n1_identifier, 
      n1.props AS n1_props 
    FROM 
      phpcr_nodes n0 
      INNER JOIN phpcr_nodes n1 ON (
        n0.workspace_name = n1.workspace_name 
        AND n1.type IN ('nt:unstructured', 'rep:root') 
        AND EXTRACTVALUE(
          n0.props, '//sv:property[@sv:name="category"]/sv:value[1]'
        ) = n1.identifier
      ) 
    WHERE 
      n0.workspace_name = ? 
      AND n0.type IN ('nt:unstructured', 'rep:root') 
      AND (
        (
          (
            n1.identifier = 'c39b134f-81dd-4ef8-937d-d0fd975c349b' 
            AND EXTRACTVALUE(
              n0.props, '//sv:property[@sv:name="publishable"]/sv:value[1]'
            ) = '1'
          ) 
          AND (
            EXTRACTVALUE(
              n0.props, 'count(//sv:property[@sv:name="phpcr:class"]/sv:value[text()="AppBundle\Document\Article"]) > 0'
            ) 
            OR EXTRACTVALUE(
              n0.props, 'count(//sv:property[@sv:name="phpcr:classparents"]/sv:value[text()="AppBundle\Document\Article"]) > 0'
            )
          )
        ) 
        AND (
          EXTRACTVALUE(
            n1.props, 'count(//sv:property[@sv:name="phpcr:class"]/sv:value[text()="AppBundle\Document\ArticleCategory"]) > 0'
          ) 
          OR EXTRACTVALUE(
            n1.props, 'count(//sv:property[@sv:name="phpcr:classparents"]/sv:value[text()="AppBundle\Document\ArticleCategory"]) > 0'
          )
        )
      ) 
    ORDER BY 
      CAST(
        EXTRACTVALUE(
          n0.numerical_props, '//sv:property[@sv:name="publishStartDate"]/sv:value[1]'
        ) AS DECIMAL
      ) DESC, 
      EXTRACTVALUE(
        n0.props, '//sv:property[@sv:name="publishStartDate"]/sv:value[1]'
      ) DESC
    

    The sql is much more faster with references tables (4 ms):

    SELECT 
      n0.path AS n0_path, 
      n0.identifier AS n0_identifier, 
      n0.props AS n0_props, 
      n1.path AS n1_path, 
      n1.identifier AS n1_identifier, 
      n1.props AS n1_props 
    FROM 
      phpcr_nodes n0 
      INNER JOIN phpcr_nodes n1 ON (
        n0.workspace_name = n1.workspace_name 
        AND n1.type IN ('nt:unstructured', 'rep:root')
      ) 
      INNER JOIN phpcr_nodes_weakreferences n2 ON (
        n2.target_id = n1.id 
        AND n2.source_id = n0.id 
        AND n2.source_property_name = "category"
      ) 
    WHERE 
      n0.workspace_name = ? 
      AND n0.type IN ('nt:unstructured', 'rep:root') 
      AND (
        (
          (
            n1.identifier = 'c39b134f-81dd-4ef8-937d-d0fd975c349b' 
            AND EXTRACTVALUE(
              n0.props, '//sv:property[@sv:name="publishable"]/sv:value[1]'
            ) = '1'
          ) 
          AND (
            EXTRACTVALUE(
              n0.props, 'count(//sv:property[@sv:name="phpcr:class"]/sv:value[text()="AppBundle\Document\Article"]) > 0'
            ) 
            OR EXTRACTVALUE(
              n0.props, 'count(//sv:property[@sv:name="phpcr:classparents"]/sv:value[text()="AppBundle\Document\Article"]) > 0'
            )
          )
        ) 
        AND (
          EXTRACTVALUE(
            n1.props, 'count(//sv:property[@sv:name="phpcr:class"]/sv:value[text()="AppBundle\Document\ArticleCategory"]) > 0'
          ) 
          OR EXTRACTVALUE(
            n1.props, 'count(//sv:property[@sv:name="phpcr:classparents"]/sv:value[text()="AppBundle\Document\ArticleCategory"]) > 0'
          )
        )
      ) 
    ORDER BY 
      CAST(
        EXTRACTVALUE(
          n0.numerical_props, '//sv:property[@sv:name="publishStartDate"]/sv:value[1]'
        ) AS DECIMAL
      ) DESC, 
      EXTRACTVALUE(
        n0.props, '//sv:property[@sv:name="publishStartDate"]/sv:value[1]'
      ) DESC
    
  • 309 [query] why add selector in dcr:name? not assigned

    #309 [query] why add selector in dcr:name?

    Created by dbu at 10.11.2015 - 01:11, last updated at 15.11.2015 - 12:11

    as discovered with https://github.com/jackalope/jackalope/pull/301, we seem to have a duplication of the selector name. why do we under some circumstances add the selector name to dcr:name in https://github.com/jackalope/jackalope-doctrine-dbal/blob/master/src/Jackalope/Transport/DoctrineDBAL/Client.php#L2329 ? having it in dcr:selectorName would be enough (and actually simpler) for jackalope.

  • 305 ISDESCENDANTNODE does not work with path containing a dot not assigned

    #305 ISDESCENDANTNODE does not work with path containing a dot

    Created by danrot at 20.10.2015 - 09:10, last updated at 17.04.2017 - 11:04

    Somebody has encountered an issue in combination with Sulu: https://github.com/sulu-io/sulu-standard/issues/536#issuecomment-149315457

    I could track down the problem to the fact that this ISDESCENDANTNODE function does not work correctly, when the path contains a dot. So the following query returns nothing, although the node at the given path has child nodes:

    SELECT * FROM [nt:unstructured] AS page WHERE ISDESCENDANTNODE(page, '/cmf/htl.do/contents');
    

    I guess this should be working, since the dot doesn't have any special meaning (at least none that I am aware of), and this query works like a charm when used with jackrabbit.

  • 304 Error when using Sqlite not assigned

    #304 Error when using Sqlite

    Created by andylibrian at 19.10.2015 - 12:10, last updated at 11.01.2016 - 03:01

    I am writing a Laravel package that wraps jackalope doctrine dbal. In my test, I use pdo sqlite driver, and the test failed with following error:

    Argument 1 passed to Jackalope\Transport\DoctrineDBAL\Client::registerSqliteFunctions() must be an instance of Doctrine\DBAL\Driver\PDOConnection, instance of PDO given, called in /home/travis/build/ramping/laravel-jackalope-doctrine-dbal/vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php on line 2631 and defined
    
    /home/travis/build/ramping/laravel-jackalope-doctrine-dbal/vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php:214
    
    /home/travis/build/ramping/laravel-jackalope-doctrine-dbal/vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php:2631
    
    /home/travis/build/ramping/laravel-jackalope-doctrine-dbal/vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php:266
    
    /home/travis/build/ramping/laravel-jackalope-doctrine-dbal/vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php:429
    
    /home/travis/build/ramping/laravel-jackalope-doctrine-dbal/vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php:389
    
    /home/travis/build/ramping/laravel-jackalope-doctrine-dbal/vendor/jackalope/jackalope/src/Jackalope/Repository.php:145
    

    Here is the build : https://travis-ci.org/ramping/laravel-jackalope-doctrine-dbal/jobs/86153727

    Apparently, it's because of this:

        /**
         * @TODO: move to "SqlitePlatform" and rename to "registerExtraFunctions"?
         *
         * @param PDOConnection $sqliteConnection
         *
         * @return Client
         */
        private function registerSqliteFunctions(PDOConnection $sqliteConnection)
        {
    

    After I read these lines:

            // @TODO: move to "SqlitePlatform" and rename to "registerExtraFunctions"?
            if ($this->conn->getDatabasePlatform() instanceof SqlitePlatform) {
                $this->registerSqliteFunctions($this->conn->getWrappedConnection());
            }
    

    I tried to change it to

    private function registerSqliteFunctions(\PDO $sqliteConnection)
    

    Then the test passed. Any idea? Is this something related to that "TODO"?

  • 267 implement CAST and handle ISCHILDNODE joins not assigned

    #267 implement CAST and handle ISCHILDNODE joins

    Created by lsmith77 at 02.05.2015 - 02:05, last updated at 02.05.2015 - 04:05
    SELECT u.*
                 FROM [nt:unstructured] AS u
                  INNER JOIN [nt:unstructured] AS c ON ISCHILDNODE(c, u)
                 WHERE ISDESCENDANTNODE(u, [$newsDataPath])
                   AND (u.publishable = true)
                   AND (u.publishStartDate IS NULL OR u.publishStartDate <= CAST('$now' AS DATE))
                   AND (u.publishEndDate IS NULL OR u.publishEndDate > CAST('$now' AS DATE) OR u.publishEndDate = CAST('2008-01-01T00:00:00.000+01:00' AS DATE))
                   AND u.[phpcr:class] = 'Liipch\\NewsBundle\\Document\\NewsItem'
                   AND NAME(c) = 'phpcr_locale:$locale'
                 ORDER BY u.publishStartDate DESC
    
  • 248 Path is limited to 255 chars not assigned

    #248 Path is limited to 255 chars

    Created by dantleech at 03.03.2015 - 06:03, last updated at 20.01.2017 - 03:01

    What happens when somebody creates a path which is longer than 255 chars?

    Looking at the schema, path is varchar(255)

  • 246 ISCHILDNODE and ISDESCENDANTNODE not working with %(wildcard) not assigned

    #246 ISCHILDNODE and ISDESCENDANTNODE not working with %(wildcard)

    Created by oste at 17.02.2015 - 12:02, last updated at 21.02.2015 - 05:02

    I am trying to leverage ISCHILDNODE with a % wildcard using the Query Builder. I am constructing my query like this

    $qb->from()->document('AppBundle\Document', 'd');
    //$qb->where()->descendant('/my/%/posts', 'd');
    $qb->where()->child('/my/%/posts', 'd');
    

    This gives me a SQL-2 query that looks like this SELECT * FROM [nt:unstructured] AS d WHERE (ISCHILDNODE(d, [/my/%/posts]) Unfortunately this is not working :(

    It is worth noting that ISDESCENDANTNODE works as expected SELECT * FROM [nt:unstructured] AS d WHERE (ISDESCENDANTNODE(d, [/my/%/posts])

    @dantleech was able to confirm that neither of these work with Jackrabbit in #symfony-cmf irc chat. However they should

  • 239 race condition with sqlite? not assigned

    #239 race condition with sqlite?

    Created by dbu at 05.01.2015 - 10:01, last updated at 12.02.2015 - 09:02

    sqlite builds fail sometimes. in these 3 builds, each has one fail with a different php version: https://travis-ci.org/jackalope/jackalope-doctrine-dbal/builds/45984013 https://travis-ci.org/jackalope/jackalope-doctrine-dbal/builds/45983999 https://travis-ci.org/jackalope/jackalope-doctrine-dbal/builds/45984013

    can we synchronize / flush something, or do we need to wait at some step to reduce the risk of races?

  • 237 Initialization command should migrate the database not assigned

    #237 Initialization command should migrate the database

    Created by dantleech at 30.12.2014 - 12:12, last updated at 30.12.2014 - 12:12

    The dbal:init command could also migrate the database to the latest repository schema.

  • 227 Column aliases do not work not assigned

    #227 Column aliases do not work

    Created by dantleech at 10.12.2014 - 03:12, last updated at 11.12.2014 - 01:12
    PHPCRSH > select [i18n:de-title] AS title from [nt:unstructured] AS a 
        WHERE title IS NOT NULL;
    0 rows in set (0.13842 sec)
    
    select [i18n:de-title] AS title from [nt:unstructured] AS a 
        WHERE [i18n:de-title] IS NOT NULL;
    330 rows in set (1.77691 sec)
    
  • 225 fix HHVM issues with "Validation failed: no DTD found" not assigned

    #225 fix HHVM issues with "Validation failed: no DTD found"

    Created by lsmith77 at 21.11.2014 - 03:11, last updated at 18.06.2015 - 02:06

    https://travis-ci.org/jackalope/jackalope-doctrine-dbal/jobs/34221373

    from a quick check I do not see any DTD referenced in manager.xml ..

  • 217 [query] Selector does not allow specification of mixin not assigned

    #217 [query] Selector does not allow specification of mixin

    Created by dantleech at 25.08.2014 - 10:08, last updated at 11.12.2014 - 01:12

    The doctrine dbal selector does not seem to support selecting from mixin types, for example sulu:content is a mixin type:

    PHPCRSH > SELECT * FROM [sulu:content] AS c WHERE ISCHILDNODE('/cmf/sulu_io/contents/test') AND c.[i18n:de-state] = 2;
    +------+
    | Path |
    +------+
    
    PHPCRSH > SELECT [jcr:mixinTypes] FROM [nt:unstructured] AS c WHERE ISCHILDNODE('/cmf/sulu_io/contents/test') AND c.[i18n:de-state] = 2;
    +-----------------------------------+------------------+
    | Path                              | c.jcr:mixinTypes |
    +-----------------------------------+------------------+
    | /cmf/sulu_io/contents/test/foobar | [0] sulu:content |
    | /cmf/sulu_io/contents/test/barfoo | [0] sulu:content |
    +-----------------------------------+------------------+
    

    http://www.day.com/specs/jcr/2.0/6_Query.html#6.7.3 Selector:

    the node’s primary node type is nodeType, or the node’s primary node type is a subtype of nodeType, or the node has a mixin node type that is nodeType, or the node has a mixin node type that is a subtype of nodeType

    Jackrabbit supports mixin as selector.

  • 213 Real search indexing not assigned

    #213 Real search indexing

    Created by dantleech at 15.08.2014 - 06:08, last updated at 02.05.2015 - 01:05

    What options are there for supporting a real search indexing system internally without relying on another service (such as Lucene) ?

  • 212 Full text search constraint shouldn't assume "%" not assigned

    #212 Full text search constraint shouldn't assume "%"

    Created by dantleech at 15.08.2014 - 06:08, last updated at 17.08.2014 - 10:08

    Currently the full-text-search automatically wraps the query in "%".

    In jackrabbit you need to delimit the string with * manually, it doesn't happen automatically.

    We should substitute * with % in the full text search I think.

  • 211 Encoding warnings not assigned

    #211 Encoding warnings

    Created by dantleech at 15.08.2014 - 09:08, last updated at 11.12.2014 - 01:12

    Get the following error when listing certain nodes:

    PHPCRSH > ls
    PHP Warning:  DOMDocument::loadXML(): Input is not proper UTF-8, indicate encoding !
    Bytes: 0x85 0x26 0x23 0x31 in Entity, line: 10 in phar:///usr/local/bin/phpcrsh/vendor/jackalope/jackalope-doctrine-dbal/src/Jackalope/Transport/DoctrineDBAL/Client.php on line 832
    

    It is likely the nodes in question are "old", as I do not get this problem with recent nodes.

  • 206 SQL2 queries need to quote searches on integer fields with SQLite not assigned

    #206 SQL2 queries need to quote searches on integer fields with SQLite

    Created by lsmith77 at 03.07.2014 - 03:07, last updated at 09.02.2015 - 09:02

    The following node

    $node = $root->addNode('foo');
    $node->setProperty('count', 10);
    

    Will not be found with this query:

    $sql = "SELECT * FROM [nt:unstructured] WHERE count = 10";
    $query = $qm->createQuery($sql, \PHPCR\Query\QueryInterface::JCR_SQL2);
    

    But it will be found with:

    $sql = "SELECT * FROM [nt:unstructured] WHERE count = '10'";
    $query = $qm->createQuery($sql, \PHPCR\Query\QueryInterface::JCR_SQL2);
    
  • 204 Implement versioning support not assigned

    #204 Implement versioning support

    Created by benglass at 17.06.2014 - 08:06, last updated at 11.06.2015 - 01:06

    Assigned to @danrot

    This is not currently supported by the dbal client

    https://github.com/jackalope/jackalope-doctrine-dbal/blob/master/src/Jackalope/Transport/DoctrineDBAL/Client.php#L69

    There are 2 kinds of versioning: versioning (with branching/tagging) and simple versioning (linear only). We would start with simple only.

    jackalope-jackrabbit supports linear versioning with taggin but no branching (need confirmation this is accurate) so that would be what we'd shoot for.

    Implementation notes - [ ] The Client would need to implement VersioningInterface[1] - [ ] The VersionManager[2] does most of the logical side

    So the Client should handle the communication, like setting the correct properties.

    Tasks - [x] apply the mix:versionable mixin to a node - [x] create a new version of a node - [x] get the data from an old version of the node - [ ] write protection for not checked out nodes - [ ] restore an old version of a node - [ ] delete a version (optional feature)

    [1] https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Transport/VersioningInterface.php [2] https://github.com/jackalope/jackalope/blob/master/src/Jackalope/Version/VersionManager.php

  • 192 Implement observation not assigned

    #192 Implement observation

    Created by dantleech at 29.03.2014 - 06:03, last updated at 11.12.2014 - 01:12

    This shouldn't be too hard in theory right?

  • 174 date query issue on sqlite not assigned

    #174 date query issue on sqlite

    Created by dbu at 02.02.2014 - 11:02, last updated at 23.06.2015 - 02:06

    via @rmsint

    Using dbal together with sqlite gives no results for a query using the date literal. For jackrabbit and dbal mysql the query with a date literal is giving the expected results.

    On the cmf-sandbox, this query:

    SELECT * FROM [nt:unstructured] AS b 
    WHERE (b.[jcr:created] < CAST('2014-11-11T14:50:35.000+01:00' AS DATE) 
    AND (b.[phpcr:class] = 'Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock' OR b.[phpcr:classparents] = 'Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock'))
    

    should give 2 results:

    $ app/console doctrine:phpcr:workspace:query "SELECT * FROM [nt:unstructured] AS b WHERE (b.[jcr:created] < CAST('2014-11-11T14:50:35.000+01:00' AS DATE) AND (b.[phpcr:class] = 'Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock' OR b.[phpcr:classparents] = 'Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SimpleBlock'))"                                                                                                                                                       
    Executing, language: JCR-SQL2
    Results:
    
    1. Row (Path: /cms/content/home/additionalInfoBlock/child1, Score: 0):
    jcr:primaryType: 'b'
    jcr:createdBy: 'admin'
    jcr:created: '2014-02-01T15:47:29.000+01:00'
    
    2. Row (Path: /cms/content/home/additionalInfoBlock/child2, Score: 0):
    jcr:primaryType: 'b'
    jcr:createdBy: 'admin'
    jcr:created: '2014-02-01T15:47:29.000+01:00'
    0.06 seconds
    

    The generated sql is:

    #mysql
    SELECT n0.id AS n0_id, n0.path AS n0_path, n0.parent AS n0_parent, n0.local_name AS n0_local_name, n0.namespace AS n0_namespace, n0.workspace_name AS n0_workspace_name, n0.identifier AS n0_identifier, n0.type AS n0_type, n0.props AS n0_props, n0.depth AS n0_depth, n0.sort_order AS n0_sort_order 
    FROM phpcr_nodes n0 
    WHERE n0.workspace_name = 'default'
    AND n0.type IN ('nt:unstructured', 'rep:root') 
    AND (EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name=\"jcr:created\"]/sv:value[text()<\"2014-11-11T14:50:35+01:00\"]) > 0') 
    AND (EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name=\"phpcr:class\"]/sv:value[text()=\"Symfony\\\\Cmf\\\\Bundle\\\\BlockBundle\\\\Doctrine\\\\Phpcr\\\\SimpleBlock\"]) > 0') 
    OR EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name=\"phpcr:classparents\"]/sv:value[text()=\"Symfony\\\\Cmf\\\\Bundle\\\\BlockBundle\\\\Doctrine\\\\Phpcr\\\\SimpleBlock\"]) > 0')))
    
    #sqlite
    SELECT n0.id AS n0_id, n0.path AS n0_path, n0.parent AS n0_parent, n0.local_name AS n0_local_name, n0.namespace AS n0_namespace, n0.workspace_name AS n0_workspace_name, n0.identifier AS n0_identifier, n0.type AS n0_type, n0.props AS n0_props, n0.depth AS n0_depth, n0.sort_order AS n0_sort_order 
    FROM phpcr_nodes n0 
    WHERE n0.workspace_name = 'default'
    AND n0.type IN ('nt:unstructured', 'rep:root') 
    AND (EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name=\"jcr:created\"]/sv:value[text()<\"2014-11-11T14:50:35+01:00\"]) > 0') 
    AND (EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name=\"phpcr:class\"]/sv:value[text()=\"Symfony\\Cmf\\Bundle\\BlockBundle\\Doctrine\\Phpcr\\SimpleBlock\"]) > 0') 
    OR EXTRACTVALUE(n0.props, 'count(//sv:property[@sv:name=\"phpcr:classparents\"]/sv:value[text()=\"Symfony\\Cmf\\Bundle\\BlockBundle\\Doctrine\\Phpcr\\SimpleBlock\"]) > 0')))
    

    The difference is that: - the escaping is different, I read in the code that this is supposed to be - and the registered EXTRACTVALUE function for sqlite returns false for the xpath expression of the date, here: https://github.com/jackalope/jackalope-doctrine-dbal/blob/master/src/Jackalope/Transport/DoctrineDBAL/Client.php#L202

  • 173 Database columns/results are case-sensitive. not assigned

    #173 Database columns/results are case-sensitive.

    Created by tlorens at 29.01.2014 - 05:01, last updated at 12.12.2014 - 02:12

    We're on an oracle database and all columns are upper case. There's code in Client.php that iterates through arrays using lower-cased keys. This obviously blows up when results are upper-cased. I've patched the code with a simple call to : $row =array_change_key_case($row, CASE_LOWER); in a few spots. You make the call on a better, more practical solution.

  • 172 Make sql table prefix configurable not assigned

    #172 Make sql table prefix configurable

    Created by dbu at 20.01.2014 - 06:01, last updated at 11.12.2014 - 01:12

    i would say the actual table names do not need to be configurable, just the prefix should really be enough. we could convert the table "local" names to constants in RepositorySchema however. or simply have getter for all those names, then one could even use a custom schema with custom table names.

    the $options to the RepositorySchema should allow a table prefix. the QOMWalker should be injected the schema rather than instantiating it itself so it can get a schema with the correct prefix. the schema should also have a getter for the prefix so the walker can figure out the right table name.

    the client would need a setter to be injected a custom created RepositorySchema to use it when building the QOMWalker, and of course for the table names of its own queries.

    the init command also builds the schema - that one should have arguments for the options to the schema, rather than pass an empty array. in the phpcr-bundle, those options should go away again and come from the symfony configuration instead.

    for the tests, the Jackalope\TestCase class should read the prefix from the globals, as we do for other configuration options, so you can define them in the phpunit.xml file.

  • 171 ValueConstraints aren't stored and validated not assigned

    #171 ValueConstraints aren't stored and validated

    Created by wjzijderveld at 20.01.2014 - 12:01, last updated at 11.12.2014 - 01:12

    While working on a blogpost about custom NodeTypes, I encountered an issue with the ValueConstraints.

    It seems they aren't stored anywhere, and I couldn't find a trace in the code where they would be validated. Are they supposed to be stored and validated?

  • 151 index on path, workspace_name is not used in Client::getNode not assigned

    #151 index on path, workspace_name is not used in Client::getNode

    Created by ACSI-IT at 23.10.2013 - 12:10, last updated at 02.05.2015 - 01:05

    Jackalope\Transport\DoctrineDBAL\Client::getNode is doing a LIKE query on phpcr_nodes.path, but EXPLAIN shows it is not using the index on (path, workspace_name).

    I traced this to the forward slashes in :pathd, adding (escaping) '\' before these forward slashes makes MySQL use its index. significantly improving performance on path queries.

    see: https://github.com/ACSI-IT/jackalope-doctrine-dbal/commit/95f73f01ab0cdc94121a94c4b9425621a5479ade

    Not sure if this is the cleanest solution, could you provide some feedback. Let me know if you want me to create a PR for this commit.

    Axel

  • 130 properly error report join selectors without alias not assigned

    #130 properly error report join selectors without alias

    Created by lsmith77 at 02.07.2013 - 03:07, last updated at 11.12.2014 - 01:12

    follow up for #125

  • 127 implement SQL2 CONTAINS not assigned

    #127 implement SQL2 CONTAINS

    Created by lsmith77 at 24.06.2013 - 05:06, last updated at 11.12.2014 - 01:12

    see https://github.com/phpcr/phpcr-api-tests/issues/109

  • 100 improve sqlite init not assigned

    #100 improve sqlite init

    Created by dbu at 15.04.2013 - 01:04, last updated at 28.12.2013 - 11:12

    when using composer create-project to create a new project with the sqlite database, we should also create the database. we could try it for all platforms actually. there is code in the DoctrineBundle for that which we might copy: https://github.com/doctrine/DoctrineBundle/blob/master/Command/CreateDatabaseDoctrineCommand.php

    we should however check if the database already exists before attempting to create it.

    btw, i had problems running jackalope:init:dbal with sqlite. nothing happens when running the command. then i added a $connection->close() line after $connection->exec() but then i get an exception about "no such table: main.phpcr_nodes"

  • 69 created_at updated_at to help with cache invalidation not assigned

    #69 created_at updated_at to help with cache invalidation

    Created by petesiss at 15.10.2012 - 04:10, last updated at 11.12.2014 - 01:12

    Do you think there is any scope for adding created_at and updated_at to the schema to help with cache invalidation?

    Im not sure whether this is something to go in here, jackalope, or even cmf, but one way or another it would be immensely helpful to be able to find out when a specific subset of nodes was last updated.

    Any thoughts? I was going to fall back on SHOW TABLE STATUS LIKE 'tablename' to get the last update time as a crude solution, but for InnoDB unfortunately the update time is always Null. There is a ticket open for it to be added but it has been open since 2005...

  • 27 Improve the performance of move node not assigned

    #27 Improve the performance of move node

    Created by adou600 at 11.05.2012 - 11:05, last updated at 08.01.2014 - 10:01

    Currently, two DB queries are needed inside move nodes: 1. Select the nodes concerned by the move 2. Update the concerned nodes

    It would be better to do it in one step with the query builder and SQL string manipulation (do not forget to also update the depth value). See: https://github.com/jackalope/jackalope-doctrine-dbal/blob/master/src/Jackalope/Transport/DoctrineDBAL/Client.php#L1425

  • 22 testTransactionCommit fails not assigned

    #22 testTransactionCommit fails

    Created by adou600 at 20.04.2012 - 02:04, last updated at 28.12.2013 - 11:12

    TransactionMethodsTest::testTransactionCommit in phpcr-api-tests is failing.

    Failed asserting that true is false on the following line: https://github.com/phpcr/phpcr-api-tests/blob/master/tests/21_Transactions/TransactionMethodsTest.php#L48

    It seems that an uncommitted transaction is saved anyway by $session->save();

jackalope-jackrabbit-meter: Pulls 0/0, Issues: 0/0

JavaDavexClient: Pulls 0/0, Issues: 0/0

jackalope-fs

Travis Build Status Latest Stable Version Total Downloads

jackalope-prismic

Travis Build Status Latest Stable Version Total Downloads

jackalope.github.com: Pulls 0/0, Issues: 0/0

jackalope-contentful

Travis Build Status Latest Stable Version Total Downloads

phpcr

phpcr-api-tests

Travis Build Status Latest Stable Version Total Downloads
  • 159 Add tests for on parent value not assigned

    #159 Add tests for on parent value

    Created by danrot at 11.06.2015 - 10:06, last updated at 11.06.2015 - 10:06

    As described in https://github.com/jackalope/jackalope/pull/286/files#r32197564 there are still some implementations left in jackalope-doctrine-dbal, but the tests are still succeeding, which is an indicator for me that these tests are missing in the test suite.

    The according part in the specification is section 3.13.9 on http://www.day.com/specs/jcr/2.0/3_Repository_Model.html

  • 141 seekable test not assigned

    #141 seekable test

    Created by dantleech at 16.10.2014 - 08:10, last updated at 20.10.2014 - 08:10

    The API tests tests with an integer:

        public function testSeekable()
        {
            $seekPosition = 2;
    
            $nodes = array();
            $i = 0;
            foreach ($this->nodeIterator as $path => $node) {
                if ($i++ == $seekPosition) {
                    $seekNode = $node;
                    $seekKey = $path;
                }
            }
    
            // note that in php 5.3.3, the array iterator gets the seek wrong and wants a string position instead of a number. according to the doc, we test for the correct behaviour here.
            $this->nodeIterator->seek($seekPosition);
            $this->assertEquals($seekKey, $this->nodeIterator->key());
            $this->assertEquals($seekNode, $this->nodeIterator->current());
        }
    

    in jackalope:

        public function seek($nodeName)
        {
            foreach ($this->rows as $position => $columns) {
                foreach ($columns as $column) {
                    if ($column['dcr:name'] == 'jcr:path') {
                        if ($column['dcr:value'] == $nodeName) {
                            $this->position = $position;
    
                            return;
                        }
                    }
                }
            }
    
            throw new OutOfBoundsException("invalid seek position ($nodeName)");
        }
    

    i.e. the API tests test with an integer, but jackalope expects a nodeName.

    Doctrine DBAL skips this test:

                        // this seems a bug in php with arrayiterator - and jackalope is using
                        // arrayiterator for the search result
                        // TODO https://github.com/phpcr/phpcr-api-tests/issues/22
                        'Query\\NodeViewTest::testSeekable',
    

    That issue has however been closed.

  • 116 add tests about spaces in paths for samenode and such not assigned

    #116 add tests about spaces in paths for samenode and such

    Created by dbu at 25.07.2013 - 09:07, last updated at 26.07.2013 - 12:07

    see TODO in https://github.com/phpcr/phpcr-api-tests/pull/115/files

    in general we should add a check that Sql2TestQueries and QomTestQueries have the same array keys so we test every query.

  • 110 add test for modifying a protected property value not assigned

    #110 add test for modifying a protected property value

    Created by lsmith77 at 24.06.2013 - 05:06, last updated at 02.05.2015 - 01:05

    see https://github.com/jackalope/jackalope/pull/170

  • 109 add tests for SQL2 CONTAINS() not assigned

    #109 add tests for SQL2 CONTAINS()

    Created by lsmith77 at 24.06.2013 - 05:06, last updated at 24.06.2013 - 05:06
  • 104 add a test to check if a specific timezone is maintained on a store/retrieve roundtrip not assigned

    #104 add a test to check if a specific timezone is maintained on a store/retrieve roundtrip

    Created by lsmith77 at 01.06.2013 - 08:06, last updated at 01.06.2013 - 08:06

    note Jackalope Doctrine DBAL does not support this atm, Jackrabbit does however.

  • 35 Read: Testing of read issues not assigned

    #35 Read: Testing of read issues

    Created by dbu at 13.11.2011 - 10:11, last updated at 12.03.2013 - 10:03

    implement the missing tests - Session::impersonate - ::hasPermissions when not having permissions - ::checkPermissions when not having permissions - Test GuestCredentials

  • 159 Add tests for on parent value not assigned

    #159 Add tests for on parent value

    Created by danrot at 11.06.2015 - 10:06, last updated at 11.06.2015 - 10:06

    As described in https://github.com/jackalope/jackalope/pull/286/files#r32197564 there are still some implementations left in jackalope-doctrine-dbal, but the tests are still succeeding, which is an indicator for me that these tests are missing in the test suite.

    The according part in the specification is section 3.13.9 on http://www.day.com/specs/jcr/2.0/3_Repository_Model.html

  • 141 seekable test not assigned

    #141 seekable test

    Created by dantleech at 16.10.2014 - 08:10, last updated at 20.10.2014 - 08:10

    The API tests tests with an integer:

        public function testSeekable()
        {
            $seekPosition = 2;
    
            $nodes = array();
            $i = 0;
            foreach ($this->nodeIterator as $path => $node) {
                if ($i++ == $seekPosition) {
                    $seekNode = $node;
                    $seekKey = $path;
                }
            }
    
            // note that in php 5.3.3, the array iterator gets the seek wrong and wants a string position instead of a number. according to the doc, we test for the correct behaviour here.
            $this->nodeIterator->seek($seekPosition);
            $this->assertEquals($seekKey, $this->nodeIterator->key());
            $this->assertEquals($seekNode, $this->nodeIterator->current());
        }
    

    in jackalope:

        public function seek($nodeName)
        {
            foreach ($this->rows as $position => $columns) {
                foreach ($columns as $column) {
                    if ($column['dcr:name'] == 'jcr:path') {
                        if ($column['dcr:value'] == $nodeName) {
                            $this->position = $position;
    
                            return;
                        }
                    }
                }
            }
    
            throw new OutOfBoundsException("invalid seek position ($nodeName)");
        }
    

    i.e. the API tests test with an integer, but jackalope expects a nodeName.

    Doctrine DBAL skips this test:

                        // this seems a bug in php with arrayiterator - and jackalope is using
                        // arrayiterator for the search result
                        // TODO https://github.com/phpcr/phpcr-api-tests/issues/22
                        'Query\\NodeViewTest::testSeekable',
    

    That issue has however been closed.

  • 116 add tests about spaces in paths for samenode and such not assigned

    #116 add tests about spaces in paths for samenode and such

    Created by dbu at 25.07.2013 - 09:07, last updated at 26.07.2013 - 12:07

    see TODO in https://github.com/phpcr/phpcr-api-tests/pull/115/files

    in general we should add a check that Sql2TestQueries and QomTestQueries have the same array keys so we test every query.

  • 110 add test for modifying a protected property value not assigned

    #110 add test for modifying a protected property value

    Created by lsmith77 at 24.06.2013 - 05:06, last updated at 02.05.2015 - 01:05

    see https://github.com/jackalope/jackalope/pull/170

  • 109 add tests for SQL2 CONTAINS() not assigned

    #109 add tests for SQL2 CONTAINS()

    Created by lsmith77 at 24.06.2013 - 05:06, last updated at 24.06.2013 - 05:06
  • 104 add a test to check if a specific timezone is maintained on a store/retrieve roundtrip not assigned

    #104 add a test to check if a specific timezone is maintained on a store/retrieve roundtrip

    Created by lsmith77 at 01.06.2013 - 08:06, last updated at 01.06.2013 - 08:06

    note Jackalope Doctrine DBAL does not support this atm, Jackrabbit does however.

  • 35 Read: Testing of read issues not assigned

    #35 Read: Testing of read issues

    Created by dbu at 13.11.2011 - 10:11, last updated at 12.03.2013 - 10:03

    implement the missing tests - Session::impersonate - ::hasPermissions when not having permissions - ::checkPermissions when not having permissions - Test GuestCredentials

phpcr.github.io

Travis Build Status Latest Stable Version Total Downloads
  • 32 Finish the PHPCR book: Complete the TODOs not assigned

    #32 Finish the PHPCR book: Complete the TODOs

    Created by dantleech at 05.02.2015 - 08:02, last updated at 05.02.2015 - 08:02

    There are currently a few TODO items in the PHPCR book. Would be good to be able to remove them.

  • 6 Build warning from github not assigned

    #6 Build warning from github

    Created by dantleech at 31.05.2014 - 08:05, last updated at 01.07.2014 - 03:07

    The page build completed successfully, but returned the following warning:

    Your site is using Maruku, the default Markdown interpreter. Maruku is now obsolete and may cause builds to fail for sites with invalid Markdown or HTML. See https://help.github.com/articles/migrating-your-pages-site-from-maruku for more information on upgrading to a newer Markdown interpreter.

    For information on troubleshooting Jekyll see:

    https://help.github.com/articles/using-jekyll-with-pages#troubleshooting

    If you have any questions please contact us at https://github.com/contact.

  • 32 Finish the PHPCR book: Complete the TODOs not assigned

    #32 Finish the PHPCR book: Complete the TODOs

    Created by dantleech at 05.02.2015 - 08:02, last updated at 05.02.2015 - 08:02

    There are currently a few TODO items in the PHPCR book. Would be good to be able to remove them.

  • 6 Build warning from github not assigned

    #6 Build warning from github

    Created by dantleech at 31.05.2014 - 08:05, last updated at 01.07.2014 - 03:07

    The page build completed successfully, but returned the following warning:

    Your site is using Maruku, the default Markdown interpreter. Maruku is now obsolete and may cause builds to fail for sites with invalid Markdown or HTML. See https://help.github.com/articles/migrating-your-pages-site-from-maruku for more information on upgrading to a newer Markdown interpreter.

    For information on troubleshooting Jekyll see:

    https://help.github.com/articles/using-jekyll-with-pages#troubleshooting

    If you have any questions please contact us at https://github.com/contact.

phpcr-migrations

Travis Build Status Latest Stable Version Total Downloads

phpcr_benchmark: Pulls 0/0, Issues: 0/0

phpcr-benchmarks: Pulls 0/0, Issues: 0/0

phpcr-utils

Travis Build Status Latest Stable Version Total Downloads

phpcr-implementation-benchmarks: Pulls 0/0, Issues: 0/0

phpcr-shell

Travis Build Status Latest Stable Version Total Downloads
  • 178 update queries - Allow set the value of one translated property. not assigned

    #178 update queries - Allow set the value of one translated property.

    Created by rfanjul at 09.06.2016 - 02:06, last updated at 09.06.2016 - 06:06

    Having the next Document and values.

    screen shot 2016-06-04 at 14 02 03

    I am trying to create/update a new property "extid". Tested two queries which the first one , with success result is: UPDATE nt:unstructured as a SET a.extid='1' WHERE phpcr:class="Joiz\CmsBundle\Document\ShowInstance";

    However i am not be able to set the value of the property phpcr_locale:en-extid in the following second query:

    UPDATE nt:unstructured as a SET a.extid=a.[phpcr_locale:en-extid] WHERE phpcr:class="Joiz\CmsBundle\Document\ShowInstance"; `

    The error I got is:

    [PHPCR\ValueFormatException] Invalid value for property "extid": Object values must implement PHPCR\NodeInterface, PHPCR\PropertyInterface or be \DateTime, supplied argument is of class: PHPCR\Shell\Query\ColumnOperand

  • 172 Reconsider node:definition command not assigned

    #172 Reconsider node:definition command

    Created by dantleech at 06.11.2015 - 10:11, last updated at 06.11.2015 - 10:11

    Since Jackalope now supports retrieving the NodeDefinition from the Node instance, the command node:definition has become available, and it doesn't work, so I have removed it.

    I had thought that the NodeDefinition was the NodeTypeDefinition, and planned to show the CND. Infact, I think the information we gain from the Definition could be added to node:info, which currently reads:

    PHPCRSH > node:info cmf
    /cmf
    +-------------------+--------------------------------------+
    | UUID              | f46286b4-33af-43bc-8e6a-fcf263f004f9 |
    | Index             | 1                                    |
    | Primary node type | nt:unstructured                      |
    | Mixin node types  | mix:referenceable                    |
    | Checked out?      | N/A                                  |
    | Locked?           | [ERROR] Not implemented by jackalope |
    +-------------------+--------------------------------------+
    

    @dbu wdyt?

  • 167 Node edit: Setting a value to "" has no effect not assigned

    #167 Node edit: Setting a value to "" has no effect

    Created by dantleech at 10.06.2015 - 07:06, last updated at 10.06.2015 - 07:06

    e.g.

    'i18n:en-url':
        type: String
        value: 
    

    Where value was "asd" would cause the value to remain as "asd"

  • 165 Allow creation of node types not assigned

    #165 Allow creation of node types

    Created by dantleech at 21.05.2015 - 01:05, last updated at 21.05.2015 - 01:05

    It would be good to allow the creation of node types, perhaps via. the node-type:edit command.

  • 164 No validation for invalid transport not assigned

    #164 No validation for invalid transport

    Created by dantleech at 19.05.2015 - 10:05, last updated at 19.05.2015 - 10:05
    phpcrsh --transport=jackalope-doctrine-dbal
    
    Welcome to PHPCRSH (1.0.0-beta3).
    
    At the prompt, type help for some help.
    
    - To list all of the commands type list.
    - To list all of the registered command aliases, type aliases.
    
    To exit the shell, type exit.
    
    For full documentation visit: http://phpcr.readthedocs.org/en/latest/phpcr-shell/index.html
    
    PHPCRSH > 
    
    Notice: Undefined index: jackalope-doctrine-dbal
    
  • 159 update queries: allow to copy fields not assigned

    #159 update queries: allow to copy fields

    Created by dbu at 05.05.2015 - 08:05, last updated at 10.06.2015 - 05:06

    It would be awesome if this query would work:

    UPDATE [nt:unstructured] AS a INNER JOIN [nt:unstructured] AS t ON ISCHILDNODE(t, a) SET t.linkCaption = a.linkCaption WHERE a.[phpcr:class] = 'Liipch\MagazineBundle\Document\Article' ;
    

    but the update processor would need to evaluate the value side, we get

    [PHPCR\ValueFormatException] Invalid value for property "originalLinkCaption": Object values must implement PHPCR\NodeInterface, PHPCR\PropertyInterface or be \DateTime, supplied argument is of class: PHPCR\Shell\Query\ColumnOperand
    
  • 158 update queries: strange behaviour on SET EXPR not assigned

    #158 update queries: strange behaviour on SET EXPR

    Created by dbu at 05.05.2015 - 08:05, last updated at 05.05.2015 - 11:05

    i tried to run this query:

    UPDATE [nt:unstructured] AS a INNER JOIN [nt:unstructured] AS t ON ISCHILDNODE(t, a) 
    SET expr('row.getNode("t").setProperty("originalLinkCaption", row.getNode("a").getPropertyValue("originalLinkCaption"))') 
    WHERE a.[phpcr:class] = 'Liipch\MagazineBundle\Document\Article' ;
    

    but during the autosave i get the exception

    [PHPCR\ValueFormatException] Invalid value for property ")": Object values must implement PHPCR\NodeInterface, PHPCR\PropertyInterface or be \DateTime, supplied argument is of class: PHPCR\Shell\Query\ColumnOperand
    

    as SET EXPR does not exist, this should report an error instead of trying to do strange things. there is probably a problem with the query parser.

  • 157 add note when "save" throws exception not assigned

    #157 add note when "save" throws exception

    Created by dbu at 02.05.2015 - 05:05, last updated at 02.05.2015 - 05:05

    https://github.com/jackalope/jackalope-jackrabbit/issues/93

  • 156 node:edit should handle protected properties not assigned

    #156 node:edit should handle protected properties

    Created by dbu at 02.05.2015 - 05:05, last updated at 02.05.2015 - 05:05

    This happens for example when you attempt to edit a versionable node:

    Errors encountered during denormalization: Property 'jcr:predecessors' of node type 'mix:versionable' is protected and cannot be modified
    

    protected properties should not be proposed to be edited, and not attempted to write back

  • 154 Add `node:revert` command not assigned

    #154 Add `node:revert` command

    Created by dantleech at 22.04.2015 - 06:04, last updated at 22.04.2015 - 06:04

    The command to invoke $node->revert() is missing.

  • 151 Profiling mode not assigned

    #151 Profiling mode

    Created by dantleech at 01.04.2015 - 09:04, last updated at 01.04.2015 - 09:04

    Introduce a profiling mode. In this mode each command will be timed and the results shown when the shell is exited:

    $ phpcrsh -pjackrabbit --command="rm foo" --command="cp /cmf/contents foo" --command="save"
    [0.221223] rm foo
    [0.332121] cp /cmf/contents foo
    [0.212312] save
    
  • 150 PHPCR-ODM mode not assigned

    #150 PHPCR-ODM mode

    Created by dantleech at 23.03.2015 - 05:03, last updated at 23.03.2015 - 05:03

    I wonder how much work it would be to create a SessionInterface which talks to the PHPCR-ODM.

    This would be great as all operations would trigger any listeners/subscribers on the ODM.

    So basically, we would wrap the DocumentManager in a PHPCR SessionInterface, call flush() instead of save() etc.

  • 149 References show UUID twice not assigned

    #149 References show UUID twice

    Created by dantleech at 20.03.2015 - 11:03, last updated at 20.03.2015 - 11:03
    | i18n:en-excerpt-tags       | STRING (0)     |                                                                                                               |
    | i18n:en-seo-keywords       | STRING (0)     |                                                                                                               |
    | i18n:en-links              | REFERENCE (36) | [b05c2663-48df-40d7-baef-0816d8786fb5] /cmf/sulu_io/contents/foobar-18 (b05c2663-48df-40d7-baef-0816d8786fb5) |
    
  • 148 version commands do not accept relative paths not assigned

    #148 version commands do not accept relative paths

    Created by dantleech at 19.03.2015 - 08:03, last updated at 19.03.2015 - 08:03
    PHPCRSH > version:history .
    [PHPCR\RepositoryException] Not an absolute path '.'
    
  • 145 Fix the behat sentances not assigned

    #145 Fix the behat sentances

    Created by dantleech at 01.03.2015 - 01:03, last updated at 01.03.2015 - 01:03

    Instead of

    Given I execute the command
    Then the command should not fail
    And I save the session
    

    should be

    When I execute the command ..
    Then the command should not fail
    And I save the session
    Then ...
    

    So replace Given with When and make the

  • 134 [UPDATE] (upstream) square brackets do not work in UPDATE queries on Jackrabbit. not assigned

    #134 [UPDATE] (upstream) square brackets do not work in UPDATE queries on Jackrabbit.

    Created by dantleech at 31.12.2014 - 12:12, last updated at 31.12.2014 - 12:12

    See https://github.com/phpcr/phpcr-utils/issues/143

  • 127 LIMIT BY not assigned

    #127 LIMIT BY

    Created by dantleech at 22.12.2014 - 06:12, last updated at 22.12.2014 - 06:12

    Support LIMIT BY in queries.

    SELECT * FROM [foo] LIMIT BY 10, 10
    
  • 123 Use OptionResolver for config not assigned

    #123 Use OptionResolver for config

    Created by dantleech at 19.12.2014 - 11:12, last updated at 19.12.2014 - 11:12

    Currently the config is quite primative, we could implement the OptionResolver to allow validation and defaults, etc.

  • 118 Performance issue when issuing queries doctrine-dbal not assigned

    #118 Performance issue when issuing queries doctrine-dbal

    Created by dantleech at 11.12.2014 - 10:12, last updated at 11.12.2014 - 10:12

    When we execute a query doctrine-dbal issues a single corresponding query to the RDBMS.

    But then it additionally issues 2 more queries for each row when I iterate over the result set:

    2756 Query     SELECT path, parent FROM phpcr_nodes WHERE parent IN ('/cmf/stanton/routes/en/the-region/restaurants/pizzeria-la-luna') AND workspace_name = 'default' ORDER BY sort_order ASC
    2756 Query     SELECT * FROM phpcr_nodes
                  WHERE path = '/cmf/stanton/routes/en/accommodations/restaurants/traube'
                  ORDER BY depth, sort_order ASC
    

    @dbu @lsmith77 any idea why? issue with doctrine-dbal?

  • 117 Support DBAL initializations not assigned

    #117 Support DBAL initializations

    Created by dantleech at 11.12.2014 - 10:12, last updated at 29.12.2014 - 11:12
    • Support the dbal:init command
    • Allow new sqlitedb databases to be created on intiialization
    $ phpcrsh --transport=doctrine-dbal --driver=pdo_sqlite  --db-path=~/stuff/mydb.db
    Do you want to create new sqlite database mydb.db?
    
  • 106 [query/update] Support setting properties to dynamic values not assigned

    #106 [query/update] Support setting properties to dynamic values

    Created by dantleech at 20.10.2014 - 10:10, last updated at 20.10.2014 - 10:10

    e.g.

    UPDATE [nt:foo] AS a SET a.foo = a.bar
    UPDATE [nt:foo] AS a JOIN [nt:bar] AS b ON a.foo = b.bar SET a.foo = b.baz
    

    This is something that could also easily be implemented with functions .. but it would make sense to support this in standard SQL notation.

  • 96 Enhanced autocomplete not assigned

    #96 Enhanced autocomplete

    Created by dantleech at 18.09.2014 - 09:09, last updated at 22.12.2014 - 12:12

    The current autocomplete supports command names, node names and properties.

    It does not: - Support deep path completion, i.e. foo/bar/ar<tab> - File path completion (think session:import / session:export) - Command option completion.

    This is because I cannot retrieve the full line to be completed from the shell, e.g.

    $res = readline_info();
    var_dump($res['line_buffer']); // ""
    

    It should return the current line. This doesn't even work in the Symfony shell.

  • 84 Extend SELECT grammer to allow selecting "path" and "score" not assigned

    #84 Extend SELECT grammer to allow selecting "path" and "score"

    Created by dantleech at 15.08.2014 - 05:08, last updated at 21.08.2014 - 11:08

    In the shell it would be very beneficial to be able to display all the fields contained in a query result.

    For example:

    SELECT path(), score(), title FROM [nt:unstructured] WHERE CONTAINS(*, '*foo*';
    

    Currently the path is shown all the time and the score cannot be accessed.

  • 71 Wrap PHPCR session completely to enable operation log not assigned

    #71 Wrap PHPCR session completely to enable operation log

    Created by dantleech at 20.07.2014 - 02:07, last updated at 22.07.2014 - 11:07

    It would be useful to be able to see what operations have been scheduled, for example before calling session:save.

    One way to accomplish this would be to wrap the Phpcr session and wrap the implementations NodeInterface classes and add logging capabilities to them.

    We could then add a command such as:

    shell:session:log --nodes
    +-------------------------------+
    | Path      | Method     | Args |
    +-------------------------------+
    + /path    | remove     |     |
    

    etc.

  • 53 Node Show / Edit command should export / import to YAML not assigned

    #53 Node Show / Edit command should export / import to YAML

    Created by dantleech at 20.06.2014 - 08:06, last updated at 15.08.2014 - 10:08

    Node show

    Currently the only way to see all of a nodes properties is to use the node:list command. But this is not ideal as the output is truncated

    Node edit

    Currently it is necessary to edit each property of a node individually.

    Export / Import as YAML

    It would be better in both cases to use YAML. So node:show foobar would export the properties of a node to YAML and dump to the console.

    Similarily when editing a node the node contents would be exported to YAML and the user would modify the YAML file, the file would then be re-imported and the node updated. This would facilitate much more convenient editing.

  • 44 command to export a binary property / file not assigned

    #44 command to export a binary property / file

    Created by dbu at 11.06.2014 - 01:06, last updated at 11.06.2014 - 02:06

    like #34 but the other way round: export a file from phpcr into the filesystem. ideally this could even be piped, say phpcr file:export | convert --scale ... | phpcr file:import or something...

  • 38 Table output formatting not assigned

    #38 Table output formatting

    Created by dantleech at 26.05.2014 - 12:05, last updated at 17.06.2014 - 08:06

    We should have global options for formatting table output, for example, 1. I want to dump all the descriptors in YAML format 2. I want the results of a query in CSV format

    //cc @cordoval maybe we can share some logic with gush here?

  • 29 Better query support not assigned

    #29 Better query support

    Created by dantleech at 29.04.2014 - 09:04, last updated at 29.04.2014 - 09:04

    Currently the select command only supports JCR-SQL2 as the entire select statement is taken literally and we cannot take options. (e.g. SELECT * FROM [nt:unstructured] WHERE foo is a literal). - We should provide a way to hint which query language to use. - We should provide a way to show the paths associated with the query result rows. - Which kinda implies that we provide a way to customize the output

    I guess the query behaviour should be configurable, and modifiable during the session, e.g. query:mode --format=vertical --language=JCR_SQL2, with an alias such as qmode -fvertical -lsql

  • 21 Complete version feature set not assigned

    #21 Complete version feature set

    Created by dantleech at 04.04.2014 - 10:04, last updated at 08.06.2014 - 01:06

    Support - merge - add / remove label and remove by label - show frozen node at version x

  • 178 update queries - Allow set the value of one translated property. not assigned

    #178 update queries - Allow set the value of one translated property.

    Created by rfanjul at 09.06.2016 - 02:06, last updated at 09.06.2016 - 06:06

    Having the next Document and values.

    screen shot 2016-06-04 at 14 02 03

    I am trying to create/update a new property "extid". Tested two queries which the first one , with success result is: UPDATE nt:unstructured as a SET a.extid='1' WHERE phpcr:class="Joiz\CmsBundle\Document\ShowInstance";

    However i am not be able to set the value of the property phpcr_locale:en-extid in the following second query:

    UPDATE nt:unstructured as a SET a.extid=a.[phpcr_locale:en-extid] WHERE phpcr:class="Joiz\CmsBundle\Document\ShowInstance"; `

    The error I got is:

    [PHPCR\ValueFormatException] Invalid value for property "extid": Object values must implement PHPCR\NodeInterface, PHPCR\PropertyInterface or be \DateTime, supplied argument is of class: PHPCR\Shell\Query\ColumnOperand

  • 172 Reconsider node:definition command not assigned

    #172 Reconsider node:definition command

    Created by dantleech at 06.11.2015 - 10:11, last updated at 06.11.2015 - 10:11

    Since Jackalope now supports retrieving the NodeDefinition from the Node instance, the command node:definition has become available, and it doesn't work, so I have removed it.

    I had thought that the NodeDefinition was the NodeTypeDefinition, and planned to show the CND. Infact, I think the information we gain from the Definition could be added to node:info, which currently reads:

    PHPCRSH > node:info cmf
    /cmf
    +-------------------+--------------------------------------+
    | UUID              | f46286b4-33af-43bc-8e6a-fcf263f004f9 |
    | Index             | 1                                    |
    | Primary node type | nt:unstructured                      |
    | Mixin node types  | mix:referenceable                    |
    | Checked out?      | N/A                                  |
    | Locked?           | [ERROR] Not implemented by jackalope |
    +-------------------+--------------------------------------+
    

    @dbu wdyt?

  • 167 Node edit: Setting a value to "" has no effect not assigned

    #167 Node edit: Setting a value to "" has no effect

    Created by dantleech at 10.06.2015 - 07:06, last updated at 10.06.2015 - 07:06

    e.g.

    'i18n:en-url':
        type: String
        value: 
    

    Where value was "asd" would cause the value to remain as "asd"

  • 165 Allow creation of node types not assigned

    #165 Allow creation of node types

    Created by dantleech at 21.05.2015 - 01:05, last updated at 21.05.2015 - 01:05

    It would be good to allow the creation of node types, perhaps via. the node-type:edit command.

  • 164 No validation for invalid transport not assigned

    #164 No validation for invalid transport

    Created by dantleech at 19.05.2015 - 10:05, last updated at 19.05.2015 - 10:05
    phpcrsh --transport=jackalope-doctrine-dbal
    
    Welcome to PHPCRSH (1.0.0-beta3).
    
    At the prompt, type help for some help.
    
    - To list all of the commands type list.
    - To list all of the registered command aliases, type aliases.
    
    To exit the shell, type exit.
    
    For full documentation visit: http://phpcr.readthedocs.org/en/latest/phpcr-shell/index.html
    
    PHPCRSH > 
    
    Notice: Undefined index: jackalope-doctrine-dbal
    
  • 159 update queries: allow to copy fields not assigned

    #159 update queries: allow to copy fields

    Created by dbu at 05.05.2015 - 08:05, last updated at 10.06.2015 - 05:06

    It would be awesome if this query would work:

    UPDATE [nt:unstructured] AS a INNER JOIN [nt:unstructured] AS t ON ISCHILDNODE(t, a) SET t.linkCaption = a.linkCaption WHERE a.[phpcr:class] = 'Liipch\MagazineBundle\Document\Article' ;
    

    but the update processor would need to evaluate the value side, we get

    [PHPCR\ValueFormatException] Invalid value for property "originalLinkCaption": Object values must implement PHPCR\NodeInterface, PHPCR\PropertyInterface or be \DateTime, supplied argument is of class: PHPCR\Shell\Query\ColumnOperand
    
  • 158 update queries: strange behaviour on SET EXPR not assigned

    #158 update queries: strange behaviour on SET EXPR

    Created by dbu at 05.05.2015 - 08:05, last updated at 05.05.2015 - 11:05

    i tried to run this query:

    UPDATE [nt:unstructured] AS a INNER JOIN [nt:unstructured] AS t ON ISCHILDNODE(t, a) 
    SET expr('row.getNode("t").setProperty("originalLinkCaption", row.getNode("a").getPropertyValue("originalLinkCaption"))') 
    WHERE a.[phpcr:class] = 'Liipch\MagazineBundle\Document\Article' ;
    

    but during the autosave i get the exception

    [PHPCR\ValueFormatException] Invalid value for property ")": Object values must implement PHPCR\NodeInterface, PHPCR\PropertyInterface or be \DateTime, supplied argument is of class: PHPCR\Shell\Query\ColumnOperand
    

    as SET EXPR does not exist, this should report an error instead of trying to do strange things. there is probably a problem with the query parser.

  • 157 add note when "save" throws exception not assigned

    #157 add note when "save" throws exception

    Created by dbu at 02.05.2015 - 05:05, last updated at 02.05.2015 - 05:05

    https://github.com/jackalope/jackalope-jackrabbit/issues/93

  • 156 node:edit should handle protected properties not assigned

    #156 node:edit should handle protected properties

    Created by dbu at 02.05.2015 - 05:05, last updated at 02.05.2015 - 05:05

    This happens for example when you attempt to edit a versionable node:

    Errors encountered during denormalization: Property 'jcr:predecessors' of node type 'mix:versionable' is protected and cannot be modified
    

    protected properties should not be proposed to be edited, and not attempted to write back

  • 154 Add `node:revert` command not assigned

    #154 Add `node:revert` command

    Created by dantleech at 22.04.2015 - 06:04, last updated at 22.04.2015 - 06:04

    The command to invoke $node->revert() is missing.

  • 151 Profiling mode not assigned

    #151 Profiling mode

    Created by dantleech at 01.04.2015 - 09:04, last updated at 01.04.2015 - 09:04

    Introduce a profiling mode. In this mode each command will be timed and the results shown when the shell is exited:

    $ phpcrsh -pjackrabbit --command="rm foo" --command="cp /cmf/contents foo" --command="save"
    [0.221223] rm foo
    [0.332121] cp /cmf/contents foo
    [0.212312] save
    
  • 150 PHPCR-ODM mode not assigned

    #150 PHPCR-ODM mode

    Created by dantleech at 23.03.2015 - 05:03, last updated at 23.03.2015 - 05:03

    I wonder how much work it would be to create a SessionInterface which talks to the PHPCR-ODM.

    This would be great as all operations would trigger any listeners/subscribers on the ODM.

    So basically, we would wrap the DocumentManager in a PHPCR SessionInterface, call flush() instead of save() etc.

  • 149 References show UUID twice not assigned

    #149 References show UUID twice

    Created by dantleech at 20.03.2015 - 11:03, last updated at 20.03.2015 - 11:03
    | i18n:en-excerpt-tags       | STRING (0)     |                                                                                                               |
    | i18n:en-seo-keywords       | STRING (0)     |                                                                                                               |
    | i18n:en-links              | REFERENCE (36) | [b05c2663-48df-40d7-baef-0816d8786fb5] /cmf/sulu_io/contents/foobar-18 (b05c2663-48df-40d7-baef-0816d8786fb5) |
    
  • 148 version commands do not accept relative paths not assigned

    #148 version commands do not accept relative paths

    Created by dantleech at 19.03.2015 - 08:03, last updated at 19.03.2015 - 08:03
    PHPCRSH > version:history .
    [PHPCR\RepositoryException] Not an absolute path '.'
    
  • 145 Fix the behat sentances not assigned

    #145 Fix the behat sentances

    Created by dantleech at 01.03.2015 - 01:03, last updated at 01.03.2015 - 01:03

    Instead of

    Given I execute the command
    Then the command should not fail
    And I save the session
    

    should be

    When I execute the command ..
    Then the command should not fail
    And I save the session
    Then ...
    

    So replace Given with When and make the

  • 134 [UPDATE] (upstream) square brackets do not work in UPDATE queries on Jackrabbit. not assigned

    #134 [UPDATE] (upstream) square brackets do not work in UPDATE queries on Jackrabbit.

    Created by dantleech at 31.12.2014 - 12:12, last updated at 31.12.2014 - 12:12

    See https://github.com/phpcr/phpcr-utils/issues/143

  • 127 LIMIT BY not assigned

    #127 LIMIT BY

    Created by dantleech at 22.12.2014 - 06:12, last updated at 22.12.2014 - 06:12

    Support LIMIT BY in queries.

    SELECT * FROM [foo] LIMIT BY 10, 10
    
  • 123 Use OptionResolver for config not assigned

    #123 Use OptionResolver for config

    Created by dantleech at 19.12.2014 - 11:12, last updated at 19.12.2014 - 11:12

    Currently the config is quite primative, we could implement the OptionResolver to allow validation and defaults, etc.

  • 118 Performance issue when issuing queries doctrine-dbal not assigned

    #118 Performance issue when issuing queries doctrine-dbal

    Created by dantleech at 11.12.2014 - 10:12, last updated at 11.12.2014 - 10:12

    When we execute a query doctrine-dbal issues a single corresponding query to the RDBMS.

    But then it additionally issues 2 more queries for each row when I iterate over the result set:

    2756 Query     SELECT path, parent FROM phpcr_nodes WHERE parent IN ('/cmf/stanton/routes/en/the-region/restaurants/pizzeria-la-luna') AND workspace_name = 'default' ORDER BY sort_order ASC
    2756 Query     SELECT * FROM phpcr_nodes
                  WHERE path = '/cmf/stanton/routes/en/accommodations/restaurants/traube'
                  ORDER BY depth, sort_order ASC
    

    @dbu @lsmith77 any idea why? issue with doctrine-dbal?

  • 117 Support DBAL initializations not assigned

    #117 Support DBAL initializations

    Created by dantleech at 11.12.2014 - 10:12, last updated at 29.12.2014 - 11:12
    • Support the dbal:init command
    • Allow new sqlitedb databases to be created on intiialization
    $ phpcrsh --transport=doctrine-dbal --driver=pdo_sqlite  --db-path=~/stuff/mydb.db
    Do you want to create new sqlite database mydb.db?
    
  • 106 [query/update] Support setting properties to dynamic values not assigned

    #106 [query/update] Support setting properties to dynamic values

    Created by dantleech at 20.10.2014 - 10:10, last updated at 20.10.2014 - 10:10

    e.g.

    UPDATE [nt:foo] AS a SET a.foo = a.bar
    UPDATE [nt:foo] AS a JOIN [nt:bar] AS b ON a.foo = b.bar SET a.foo = b.baz
    

    This is something that could also easily be implemented with functions .. but it would make sense to support this in standard SQL notation.

  • 96 Enhanced autocomplete not assigned

    #96 Enhanced autocomplete

    Created by dantleech at 18.09.2014 - 09:09, last updated at 22.12.2014 - 12:12

    The current autocomplete supports command names, node names and properties.

    It does not: - Support deep path completion, i.e. foo/bar/ar<tab> - File path completion (think session:import / session:export) - Command option completion.

    This is because I cannot retrieve the full line to be completed from the shell, e.g.

    $res = readline_info();
    var_dump($res['line_buffer']); // ""
    

    It should return the current line. This doesn't even work in the Symfony shell.

  • 84 Extend SELECT grammer to allow selecting "path" and "score" not assigned

    #84 Extend SELECT grammer to allow selecting "path" and "score"

    Created by dantleech at 15.08.2014 - 05:08, last updated at 21.08.2014 - 11:08

    In the shell it would be very beneficial to be able to display all the fields contained in a query result.

    For example:

    SELECT path(), score(), title FROM [nt:unstructured] WHERE CONTAINS(*, '*foo*';
    

    Currently the path is shown all the time and the score cannot be accessed.

  • 71 Wrap PHPCR session completely to enable operation log not assigned

    #71 Wrap PHPCR session completely to enable operation log

    Created by dantleech at 20.07.2014 - 02:07, last updated at 22.07.2014 - 11:07

    It would be useful to be able to see what operations have been scheduled, for example before calling session:save.

    One way to accomplish this would be to wrap the Phpcr session and wrap the implementations NodeInterface classes and add logging capabilities to them.

    We could then add a command such as:

    shell:session:log --nodes
    +-------------------------------+
    | Path      | Method     | Args |
    +-------------------------------+
    + /path    | remove     |     |
    

    etc.

  • 53 Node Show / Edit command should export / import to YAML not assigned

    #53 Node Show / Edit command should export / import to YAML

    Created by dantleech at 20.06.2014 - 08:06, last updated at 15.08.2014 - 10:08

    Node show

    Currently the only way to see all of a nodes properties is to use the node:list command. But this is not ideal as the output is truncated

    Node edit

    Currently it is necessary to edit each property of a node individually.

    Export / Import as YAML

    It would be better in both cases to use YAML. So node:show foobar would export the properties of a node to YAML and dump to the console.

    Similarily when editing a node the node contents would be exported to YAML and the user would modify the YAML file, the file would then be re-imported and the node updated. This would facilitate much more convenient editing.

  • 44 command to export a binary property / file not assigned

    #44 command to export a binary property / file

    Created by dbu at 11.06.2014 - 01:06, last updated at 11.06.2014 - 02:06

    like #34 but the other way round: export a file from phpcr into the filesystem. ideally this could even be piped, say phpcr file:export | convert --scale ... | phpcr file:import or something...

  • 38 Table output formatting not assigned

    #38 Table output formatting

    Created by dantleech at 26.05.2014 - 12:05, last updated at 17.06.2014 - 08:06

    We should have global options for formatting table output, for example, 1. I want to dump all the descriptors in YAML format 2. I want the results of a query in CSV format

    //cc @cordoval maybe we can share some logic with gush here?

  • 29 Better query support not assigned

    #29 Better query support

    Created by dantleech at 29.04.2014 - 09:04, last updated at 29.04.2014 - 09:04

    Currently the select command only supports JCR-SQL2 as the entire select statement is taken literally and we cannot take options. (e.g. SELECT * FROM [nt:unstructured] WHERE foo is a literal). - We should provide a way to hint which query language to use. - We should provide a way to show the paths associated with the query result rows. - Which kinda implies that we provide a way to customize the output

    I guess the query behaviour should be configurable, and modifiable during the session, e.g. query:mode --format=vertical --language=JCR_SQL2, with an alias such as qmode -fvertical -lsql

  • 21 Complete version feature set not assigned

    #21 Complete version feature set

    Created by dantleech at 04.04.2014 - 10:04, last updated at 08.06.2014 - 01:06

    Support - merge - add / remove label and remove by label - show frozen node at version x

phpcr

Travis Build Status Latest Stable Version Total Downloads
  • 79 There is no way to change the type of a property not assigned

    #79 There is no way to change the type of a property

    Created by dantleech at 28.07.2014 - 08:07, last updated at 02.05.2015 - 02:05

    The Property class in the JCR API accepts Value objects, Value objects are of a specified type, and setting them with setValue will change the value of the node. PHPCR is missing this missing this feature:

    http://www.day.com/specs/jsr170/javadocs/jcr-1.0/javax/jcr/Property.html#setValue(javax.jcr.Value)

    We should probably add a ->setType method.

  • 77 make QueryResultInterface countable not assigned

    #77 make QueryResultInterface countable

    Created by dbu at 22.05.2014 - 08:05, last updated at 15.11.2014 - 01:11

    implementing this interface would be convenient for handling search results and should neither be expensive to execute nor difficult to implement.

    this would be a BC break for all implementations, so it has to wait until we realease a next minor version.

  • 79 There is no way to change the type of a property not assigned

    #79 There is no way to change the type of a property

    Created by dantleech at 28.07.2014 - 08:07, last updated at 02.05.2015 - 02:05

    The Property class in the JCR API accepts Value objects, Value objects are of a specified type, and setting them with setValue will change the value of the node. PHPCR is missing this missing this feature:

    http://www.day.com/specs/jsr170/javadocs/jcr-1.0/javax/jcr/Property.html#setValue(javax.jcr.Value)

    We should probably add a ->setType method.

  • 77 make QueryResultInterface countable not assigned

    #77 make QueryResultInterface countable

    Created by dbu at 22.05.2014 - 08:05, last updated at 15.11.2014 - 01:11

    implementing this interface would be convenient for handling search results and should neither be expensive to execute nor difficult to implement.

    this would be a BC break for all implementations, so it has to wait until we realease a next minor version.

phpcr-docs

Travis Build Status
  • 8 [POC] Added JCR specification dantleech

    #8 [POC] Added JCR specification

    Created by dantleech at 22.06.2014 - 10:06, last updated at 11.05.2015 - 10:05
    Assigned to dantleech

    I have written a small script to convert an HTML version of the JCR spec (as exported from libre office using the original doc file) to RST.

    Its not perfect, as images are not preserved and the references are broken. I'm sure we could do better.

  • 8 [POC] Added JCR specification dantleech

    #8 [POC] Added JCR specification

    Created by dantleech at 22.06.2014 - 10:06, last updated at 11.05.2015 - 10:05
    Assigned to dantleech

    I have written a small script to convert an HTML version of the JCR spec (as exported from libre office using the original doc file) to RST.

    Its not perfect, as images are not preserved and the references are broken. I'm sure we could do better.

phpdocumentor-template-phpcr: Pulls 0/0, Issues: 0/0

sonata-project

SonataDoctrinePhpcrAdminBundle

Travis Build Status Latest Stable Version Total Downloads
  • 524 DevKit updates for 2.x branch not assigned

    #524 DevKit updates for 2.x branch

    Created by SonataCI at 06.05.2018 - 02:05, last updated at 24.05.2018 - 10:05
  • 521 simply allow SF4 installation not assigned

    #521 simply allow SF4 installation

    Created by ElectricMaxxx at 23.01.2018 - 11:01, last updated at 26.04.2018 - 12:04

    I am targeting this branch, because i want to work on a new 2.x version

    Changelog

    ### Added
    - Added posibility to use SF4
    
    

    Subject

    I want to allow Symfony 4.0 before making it required in travis.yaml, just to installi it in a testing project and to see what happens. I would add outcome as issues.

  • 463 Choice Type Compatibility SF3 not assigned

    #463 Choice Type Compatibility SF3

    Created by pbenard73 at 21.07.2017 - 06:07, last updated at 18.03.2018 - 11:03

    I am targeting this branch, because Form Filter ChoiceType is not compatible with Symfony 3..

    Closes #462

    ### Added
            if (!method_exists('Symfony\Component\Form\FormTypeInterface', 'setDefaultOptions')) {
                $choices = array_flip($choices);
            }
    

    Subject

    Make Form Type Filter ChoiceType compatible with Symfony 3

  • 430 Support for nested mappings not assigned

    #430 Support for nested mappings

    Created by auipga at 18.03.2017 - 06:03, last updated at 25.05.2018 - 09:05

    New approach for https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/pull/365 I am targeting this branch, because this change is a new backwards compatible feature.

    Changelog

    ### Added
    - Added support for nested mappings to show/hide depending fields of unlimited levels.
    

    To do

    • [ ] Update the documentation

    Subject

    This change adds support for nested mappings.

    Example:

    $formMapper
        ->add('car_model', 'choice_field_mask', [
            'choices' => [
                'nice_car' => 'Mercedes',
                'bad_car'  => 'Opel',
            ],
            'map' => [
                'nice_car' => ['nice_car_color'],
                'bad_car' => ['bad_car_color']
            ]
        ])
        ->add('nice_car_color', 'choice_field_mask', [
            'choices' => [
                'silver' => 'silver',
                'black'  => 'black',
            ],
            'map' => [
                'silver' => ['exclusive_color'],
                'black' => [],
            ]
        ])
        ->add('exclusive_color', 'choice', [
            'choices' => [
                'silver1' => 'premium silver',
                'silver2' => 'ultra premium silver',
            ]
        ])
        ->add('bad_car_color', 'choice', [
            'choices' => [
                'blue' => 'blue',
                'red'  => 'red',
            ]
        ])
    ;
    

    exclusive_color will only be visible if you select Mercedes AND silver. exclusive_color will be hidden if you change nice_car_color (default behaviour) and now also if you change its parent car_model.

  • 395 Moves crud association templates to admin-bundle not assigned

    #395 Moves crud association templates to admin-bundle

    Created by ju1ius at 23.06.2016 - 11:06, last updated at 05.08.2017 - 05:08

    This PR is related to SonataAdminBundle#3971 I am targetting this branch, because there are BC breaks

    Changelog

    ### Added
    - `FieldDescription` implements `FieldDescriptionInterface::describesSingleValuedAssociation` and `FieldDescriptionInterface::describesCollectionValuedAssociation` methods
    
    ### Changed
    - `FormContractor` now extends `Sonata\AdminBundle\Admin\AbstractFormContractor`
    
    ### Removed
    - removed ALL crud association templates and form widget blocks. They now belong to the admin bundle
    
  • 472 Enhancer to pass valid children to the resource response not assigned

    #472 Enhancer to pass valid children to the resource response

    Created by ElectricMaxxx at 28.07.2017 - 02:07, last updated at 28.07.2017 - 02:07

    To implement move restrictions based on hierarchy we should pass those information by an enhancer to the response of a resource call.

  • 462 Filter ChoiceType is not conform with Symfony 3 not assigned

    #462 Filter ChoiceType is not conform with Symfony 3

    Created by pbenard73 at 21.07.2017 - 03:07, last updated at 21.07.2017 - 04:07

    Subject

    I can see that the Filter Choice Type is not conform with Symfony 3. The keys and values are inversed...

    Actually:

            $choices = array(
                self::TYPE_CONTAINS => $this->translator->trans('label_type_contains', array(), 'SonataAdminBundle'),
                self::TYPE_NOT_CONTAINS => $this->translator->trans('label_type_not_contains', array(), 'SonataAdminBundle'),
                self::TYPE_EQUAL => $this->translator->trans('label_type_equals', array(), 'SonataAdminBundle'),
                self::TYPE_CONTAINS_WORDS => $this->translator->trans('label_type_contains_words', array(), 'SonataDoctrinePHPCRAdmin'),
            );
    

    But it should be

            $choices = array(
                $this->translator->trans('label_type_contains', array(), 'SonataAdminBundle')              => self::TYPE_CONTAINS,
                $this->translator->trans('label_type_not_contains', array(), 'SonataAdminBundle')          => self::TYPE_NOT_CONTAINS,
                $this->translator->trans('label_type_equals', array(), 'SonataAdminBundle')                => self::TYPE_EQUAL,
                $this->translator->trans('label_type_contains_words', array(), 'SonataDoctrinePHPCRAdmin') => self::TYPE_CONTAINS_WORDS ,
            );
    
  • 449 cleanup composer.json not assigned

    #449 cleanup composer.json

    Created by dbu at 03.07.2017 - 08:07, last updated at 03.07.2017 - 08:07

    there are a couple of @dev dependencies in composer.json. we have to move to stable versions of the dependencies before releasing.

  • 447 Cleanup code now that we are on 5.6 dbu

    #447 Cleanup code now that we are on 5.6

    Created by ElectricMaxxx at 03.07.2017 - 07:07, last updated at 27.07.2017 - 09:07
    Assigned to dbu

    Are we bound to Sonta or would it be possible to increase php version to 5.6 as we did for 2.0 on CMF?

  • 427 Oudated docs not assigned

    #427 Oudated docs

    Created by core23 at 12.02.2017 - 01:02, last updated at 12.02.2017 - 01:02

    The docs still refer to the old google groups: https://sonata-project.org/bundles/doctrine-phpcr-admin/1-x/doc/index.html

    We use slack and stackoverflow now.

  • 400 CollectionOrderListener - UndefinedMethodException not assigned

    #400 CollectionOrderListener - UndefinedMethodException

    Created by binhle410 at 21.09.2016 - 04:09, last updated at 22.09.2016 - 04:09

    Environment: DEV

    Sonata packages

    $ composer show sonata-project/*
    
    sonata-project/admin-bundle                3.7.0              The missing Symfony Admin Generator
    sonata-project/block-bundle                3.1.1              Symfony SonataBlockBundle
    sonata-project/cache                       1.0.7              Cache library
    sonata-project/cache-bundle                2.3.1              This bundle provides caching services
    sonata-project/classification-bundle       3.1.0              Symfony SonataClassificationBundle
    sonata-project/core-bundle                 3.1.1              Symfony SonataCoreBundle
    sonata-project/datagrid-bundle             2.2                Symfony SonataDatagridBundle
    sonata-project/doctrine-extensions         1.0.2              Doctrine2 behavioral extensions
    sonata-project/doctrine-orm-admin-bundle   3.0.5              Symfony Sonata / Integrate Doctrine ORM into the Son...
    sonata-project/doctrine-phpcr-admin-bundle dev-master 2e2cd0a Symfony Sonata / Integrate Doctrine PHPCR into the S...
    sonata-project/easy-extends-bundle         2.1.10             Symfony SonataEasyExtendsBundle
    sonata-project/exporter                    1.7.0              Lightweight Exporter library
    sonata-project/intl-bundle                 2.2.4              Symfony SonataIntlBundle
    sonata-project/media-bundle                3.3.0              Symfony SonataMediaBundle
    sonata-project/notification-bundle         3.0.0              Symfony SonataNotificationBundle
    sonata-project/seo-bundle                  2.0.2              Symfony SonataSeoBundle
    sonata-project/translation-bundle          2.x-dev 0391a71    SonataTranslationBundle
    

    Symfony packages

    $ composer show symfony/*
    symfony/monolog-bundle     2.11.1  Symfony MonologBundle
    symfony/phpunit-bridge     v3.1.4  Symfony PHPUnit Bridge
    symfony/polyfill-apcu      v1.2.0  Symfony polyfill backporting apcu_* functions to lower PHP versions
    symfony/polyfill-intl-icu  v1.2.0  Symfony polyfill for intl's ICU-related data and classes
    symfony/polyfill-mbstring  v1.2.0  Symfony polyfill for the Mbstring extension
    symfony/polyfill-php56     v1.2.0  Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
    symfony/polyfill-php70     v1.2.0  Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
    symfony/polyfill-util      v1.2.0  Symfony utilities for portability of PHP codes
    symfony/security-acl       v3.0.0  Symfony Security Component - ACL (Access Control List)
    symfony/swiftmailer-bundle v2.3.11 Symfony SwiftmailerBundle
    symfony/symfony            v3.1.4  The Symfony PHP framework
    

    PHP version

    $ php -v
    
    PHP 7.0.8 (cli) (built: Jun 21 2016 15:27:20) ( ZTS )
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    

    Subject

    Why do we need to support symfony 2.2 ? why not just change this method here https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/blob/1.x/Form/Listener/CollectionOrderListener.php#L59 to the new createPropertyAccessor()?

    Steps to reproduce

    Go to Sonata Admin section / Slideshow Block and create a new block In the Items Elements section, click Add, nothing works, the URL returns an exception

    Expected results

    Normal workflow of Cmf Slideshow Block Bundle

    Actual results

    nothing appears and the ajax request returns an exception which is

    Attempted to call an undefined method named "getPropertyAccessor" of class "Symfony\Component\PropertyAccess\PropertyAccess".
    Did you mean to call "createPropertyAccessor"?
       500 Internal Server Error - UndefinedMethodException
    
  • 373 tree-browser and resource-rest stable ETA Soullivaneuh

    #373 tree-browser and resource-rest stable ETA

    Created by Soullivaneuh at 10.05.2016 - 08:05, last updated at 08.01.2017 - 01:01
    Assigned to Soullivaneuh

    Have you an ETA for symfony-cmf/tree-browser-bundle and symfony-cmf/resource-rest-bundle stable release?

    I would like to push a new major for sonata-admin 3.0 support and deprecate the 1.x one but those bundle are already required with unstables versions.

    Thanks.

    cc dbu @lsmith77 @dantleech @sjopet @rmsint

  • 355 Filter getRenderSettings not working not assigned

    #355 Filter getRenderSettings not working

    Created by billsworld at 27.01.2016 - 05:01, last updated at 02.03.2016 - 11:03

    The line below is returning 'text' rather than 'date' for some reason in Symfony 2.8

    https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/blob/master/Filter/DateFilter.php#L81

    This forces us to define the date like so.

    protected function configureDatagridFilters(DatagridMapper $datagridMapper)
    {
        $datagridMapper
            ->add('createdAt', 'doctrine_phpcr_date', [], 'date')
       ;
    }
    
  • 354 Inifinite loop when using sub classes. not assigned

    #354 Inifinite loop when using sub classes.

    Created by dantleech at 12.01.2016 - 10:01, last updated at 12.01.2016 - 10:01

    If you have subclasses there is an infinite loop whereby getClass calls getSubject which calls getClass.

    It can be fixed as follows:

    # sonata-project/admin-bundle
    diff --git a/Admin/Admin.php b/Admin/Admin.php
    index 44f3559..09eebf9 100644
    --- a/Admin/Admin.php
    +++ b/Admin/Admin.php
    @@ -54,7 +54,7 @@ abstract class Admin implements AdminInterface, DomainObjectInterface
          *
          * @var string
          */
    -    private $class;
    +    protected $class;
    
         /**
          * The subclasses supported by the admin class.
    
    # sonata-project/phpcr-admin
    diff --git a/Admin/Admin.php b/Admin/Admin.php
    index 9e2c438..645b90c 100644
    --- a/Admin/Admin.php
    +++ b/Admin/Admin.php
    @@ -98,7 +98,7 @@ class Admin extends BaseAdmin
                     if (!UUIDHelper::isUUID($id)) {
                         $id = PathHelper::absolutizePath($id, '/');
                     }
    -                $this->subject = $this->getModelManager()->find($this->getClass(), $id);
    +               $this->subject = $this->getModelManager()->find($this->class, $id);
                 }
             }
    
    
  • 332 Sortable not working ElectricMaxxx

    #332 Sortable not working

    Created by danielantelo at 07.04.2015 - 02:04, last updated at 27.07.2017 - 05:07
    Assigned to ElectricMaxxx

    So i have a sonata_type_collection working in my symfony cmf project, it creates, updates and removes child documents correctly.

    I now want to enable sortable, but when i save with the sortable flag enabled i get "NodeName property "nodeName" may not be empty in document of class..."

    Is this a known issue? or am i doing something wrong.

    ->add(
         'someChidlren',
         'sonata_type_collection',
         array(
              'label'    => false,
              'by_reference'   => false,
              'cascade_validation' => true,
         ),
         array(
              'admin_code' => 'admin_reference_here',
              'edit'   => 'inline',
              'inline' => 'table',
               'sortable'  => 'position',
         )
    )
    
  • 324 Tree style admin instead of list style admin not assigned

    #324 Tree style admin instead of list style admin

    Created by RSSchermer at 02.02.2015 - 12:02, last updated at 16.02.2015 - 09:02

    I only just started playing around with the CMF project and I'm really impressed with how little custom code on top of the CMF is needed to make quite a nice custom CMS. One thing I'm was not quite happy with during my experimentation though, is the list-centric backend interface, which does not seem ideally suited for hierarchical content.

    A tree view would be much better suited. If I'm not mistaken, currently the only way to get a tree view without defining custom templates and controllers, is to use the dashboard tree block provided with this bundle. This tree is really quite nice, esspecially as it allows reordering of tree nodes. There are some problems with this approach though: - It's difficult to have multiple trees on seperate pages without resorting to custom templates and controllers. I'd prefer having a separate content tree, menu tree, route tree etc., rather than having them all in one tree. - If you want to add nodes to a tree, you still end up going through the sonata list style interfaces, complicating the user experience unnecessarily.

    I would propose something like TreeAdmin and TreeNodeAdmin.

    TreeAdmin would be responsible for a tree view. The tree view could include: - The tree with a specified root node. This can probably just use the tree block already provided by this bundle. - A 'Node creation' side menu, which lists the nodes that can be created for this tree with 'Add new' links.

    TreeAdmin services can be added to Sonata groups and show up in the Sonata admin list block or in the dashboard side-menu with a 'Tree' link which takes you to the tree view.

    TreeNodeAdmin would be responsible for the CRUD of nodes for the tree. It takes care of the form, show, delete etc views for a tree node. It could basically be the current phpcr admin class, with the difference that a parent TreeAdmin needs to be specified. The views would differ from the sonata list style views in: - Breadcrumbs include a link to the parent tree view, instead of a list view. - Buttons like 'Create and return to list' are changed to 'Create and return to tree'.

    I'd be willing to look into implementing something like this. If I'd ever end up making a proper CMS with the CMF, this is probably what I would do anyway, but I figured this may be a generic enough problem that there would be upstream interest. Before I get started though, I'm curious as to what sentiments here are for something like this and if perhaps there's better ideas for the implementation than what I came up with above.

    One issue I already ran into when playing around with this, is the somewhat 'monolithic' nature of the sonata Admin class (and by extension the Phpcr Admin class which inherits from it). It includes a lot of cruft relating to list view specifics and it feels a little wrong to extend it for something like TreeAdmin or TreeNodeAdmin. A lot of logic (e.g. for routing and security) would however be shared. I'd prefer it if there was a base admin class that is view agnostic. It seems that would be a pretty big refactor for the SonataAdminBundle though.

  • 311 Using ChildAdmin with PHPCR not assigned

    #311 Using ChildAdmin with PHPCR

    Created by he-li at 17.11.2014 - 11:11, last updated at 02.01.2017 - 09:01

    Hello,

    In our project, we want to use the functionality of child admin since we have 3 levels of embed form. We have a top level document Collection which can have some Section, and each section has some Item. Here is the configuration yaml file.

    Collection:
        ...
        referrers:
            sections:
                referencedBy: collection
                referringDocument: Section
    
    Section:  
        ...  
        referenceMany:
            items:
                strategy: weak
                targetDocument: Item
                cascade: [ all ]
        referenceOne:
            collection:
                strategy: hard
                targetDocument: Collection
    
    Item
        ...
        referrers:
            section:
                referencedBy: items
                referringDocument: Section
    

    We met 2 problems when we tried to declare parentAssociationMapping(=collection) in sectionAdmin. 1. It's not possible to use id(path) of document in routing. Because a URL like this /collection/{id}/section/{childId} cannot work with a document path. I have to overwrite the following methods to use uuid instead of id

    ``` /** * {@inheritdoc} */ public function generateObjectUrl($name, $object, array $parameters = array(), $absolute = false) { // use uuid instead of path $parameters['id'] = $object->getUuid();

       return $this->generateUrl($name, $parameters, $absolute);
    

    }

    /** * {@inheritdoc} */ public function getObject($id) { // find object by uuid instead of id $object = $this->getModelManager()->find(null, $id); foreach ($this->getExtensions() as $extension) { $extension->alterObject($this, $object); }

       return $object;
    

    } ``` 2. There's no filter type for relations. I don't find a better solution, but use doctrine_phpcr_callback in my datagrid element

    error

    $datagridMapper ->add( 'collection', 'doctrine_phpcr_callback', array( 'callback' => function ($proxyQuery, $alias, $field, $data) { ... return true; }, ) );

    So what do you think of the solution? And will the childAdmin feature be integrated in the bundle soon?

    Thanks

  • 309 Dialog forms doesn't work properly not assigned

    #309 Dialog forms doesn't work properly

    Created by robhunt3r at 20.10.2014 - 11:10, last updated at 27.06.2016 - 04:06

    I was trying to use inline forms in order to add media/gallery/stuff to other stuff, after the PRs I did for MediaBundle I made it working, but problem was now that when I clicked on LIST/CREATE/DELETE buttons I've found some problems:

    Everything is opening with jQueryUI dialogs instead of Bootstrap modals so it looked ugly. List button worked perfectly. Create button didn't work, undefined related errors with event.preventDefault(); when clicked. Delete button worked.

    So after research, I've got it working, editing some stuff in comparison with ORMAdminBundle. NOTE: This was done with Many association, not One, but I think problem will be the same

    :CRUD:edit_phpcr_many_association_script.html.twig After editing some lines, I ended with a CREATE dialog, but when clicking on SUBMIT it was causing a redirection to it's original page, so useless. Finally I ended duplicating ORM code, for the same file, this was causing a dark overlay over all page without contents.

    The problem was easy to find: There were NOT a modal div (as I said it was using jQueryUI Dialog) this is setted inside FORM:form_admin_fields.html.twig replacing this



    <div class="container sonata-ba-modal sonata-ba-modal-edit-one-to-one" style="display: none" id="field_dialog_{{ id }}"> </div>

    with this



    <div class="modal fade" id="field_dialog_{{ id }}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h4 class="modal-title"></h4> </div> <div class="modal-body"> </div> </div> </div> </div>

    This code is inside SonataOrmAdminBundle:CRUD:edit_moda.html.twig

    With this changes everything is working perfectly.

    Sorry for this bad explaination, I'm in a hurry while writting. I hope that you understand the problem and the solution I've used.

    _TL;DR / WTF are you saying_ I think we can use the same Javascript + twig code for ORM and PHPCR admin bundles, because they work in both bundles, at least under a Many relation which is what I'm using.

    Maybe we can create common JS+TWIG files inside AdminBundle as AdminBundle requires at least one DB bunle and make ORM/PHPCR/MONGODB use it.

    In order to reproduce this problem just create the simplest web with mediabundle with my PR (see my profile) using PHPCR and try to add media to a Gallery changing what I said here (JS files and modal DIV)

  • 274 widget that lists edit links to all referrers of the given node not assigned

    #274 widget that lists edit links to all referrers of the given node

    Created by lsmith77 at 09.07.2014 - 10:07, last updated at 02.05.2016 - 03:05

    The idea is that one can easily add a widget to an admintool (or maybe there is a better place to enable this and add it to the general edit navigation) that lists links to all nods that reference the node one is currently editing.

    For example one has a corporate website which references different business developers to contact on different pages. Now it would be useful to be able to get a list of all of those pages right on the edit page for each business developer.

  • 260 Implement support for export not assigned

    #260 Implement support for export

    Created by dbu at 25.04.2014 - 06:04, last updated at 25.04.2014 - 06:04

    implement ModelManager::getDataSourceIterator at https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/blob/master/Model/ModelManager.php#L549

    251 added at least an exception instead of returning null.

    until that is done, the only export is the phpcr level export and import, which is the right thing for backups anyways, but not suitable for end users.

  • 252 improve FormContractor to better guess form types not assigned

    #252 improve FormContractor to better guess form types

    Created by dbu at 05.04.2014 - 12:04, last updated at 02.05.2016 - 03:05

    it would be nice if the admin would guess the normal types for text fields, children and relations and the parent (with getRootPath as default root path).

    this happens somehow in FormContractor, not in the TypeGuesser which has nothing to do really with forms but is used for the lists.

  • 242 improve introduction not assigned

    #242 improve introduction

    Created by dbu at 01.03.2014 - 01:03, last updated at 01.03.2014 - 09:03

    @rmsint said in #103

    This is what I quickly thought to do: - [ ] an overview page: - in the cmf documentation style - dependencies + installation + basic configuration - main features: list, filter, form, tree - links to sonata documents where possible - [ ] a separate page to explain the phpcr filters (mostly the page as it is now) - [ ] provide a place (separate page probably) to explain the new, and existing, phpcr form types - in one or two sentences explain them on the overview page - [x] provide a place to explain the tree (separate page probably)

  • 235 document tree tweaking configuration options for large tree support not assigned

    #235 document tree tweaking configuration options for large tree support

    Created by dbu at 17.02.2014 - 12:02, last updated at 02.05.2016 - 03:05

    see code in #234

  • 228 detect RouteReferrersReadInterface content and show url not assigned

    #228 detect RouteReferrersReadInterface content and show url

    Created by dbu at 20.01.2014 - 03:01, last updated at 02.05.2016 - 03:05
    • [x] the edit view could show a link to the frontend if content does have a route: http://symfony.com/doc/master/cmf/bundles/routing/dynamic.html#frontendlink-sonata-admin-extension
    • [ ] the list view should be able to show a link column if the content does have a route
    • [ ] the tree could visually indicate if an item is a routable thing and provide a link to the frontend in the context menu
  • 217 Overlay editing: remove sonata navigation, fix close button not assigned

    #217 Overlay editing: remove sonata navigation, fix close button

    Created by dbu at 09.12.2013 - 09:12, last updated at 03.02.2017 - 05:02

    When editing in the overlay, we see all the Sonata navigation elements in the overlay again. Hide those. And we should make all "close", "Save and Return" and so on buttons hide the overlay after successful saving.

  • 198 sonata_type_collection for non-inline not assigned

    #198 sonata_type_collection for non-inline

    Created by dbu at 09.10.2013 - 12:10, last updated at 02.05.2016 - 03:05

    the sonata_type_collection for non-inline does an overlay similar to the one we have when using the doctrine_phpcr_odm_tree_manager form type. but editing in the overlay is broken, at least because the parent is not sent in the ajax request.

  • 189 tree breadcrumb support not assigned

    #189 tree breadcrumb support

    Created by dbu at 24.09.2013 - 06:09, last updated at 03.02.2017 - 05:02

    as discussed in https://github.com/symfony-cmf/MenuBundle/pull/135 we could show the tree elements in the breadcrumb. the perfect thing would be - [ ] Have a content breadcrumb (content ancestor) in parallel with the administrative breadcrumb - [ ] check if allowed to edit / view and if neither display entry without link - [ ] configure number of entries in the breadcrumb, if there is more than that, remove some in the middle and put a non linked "..." entry there - [ ] show tree with location of this document (on the left side?, instead of the parent selector?)

  • 157 Investigate / fix getMetadata function in TypeGuessers not assigned

    #157 Investigate / fix getMetadata function in TypeGuessers

    Created by sjopet at 13.08.2013 - 07:08, last updated at 02.05.2016 - 03:05

    The logic of the getMetadata() function in the TypeGuesser seems dodgy to me. It should always return something imo.

  • 156 TypeGuesser Add support for additional types not assigned

    #156 TypeGuesser Add support for additional types

    Created by sjopet at 13.08.2013 - 06:08, last updated at 02.05.2016 - 03:05

    Both the FilterTypeGuesser and the TypeGuesser need to get updated to add support for: - children - child - referrers - parentDocument associations - node - nodename - multi value

  • 154 implements functions or remove if obsolete not assigned

    #154 implements functions or remove if obsolete

    Created by sjopet at 13.08.2013 - 06:08, last updated at 04.07.2016 - 01:07

    Fix the current implementation of the functions: getSingleScalarResult() and getNodeType() in the ProxyQuery class

  • 153 Fix setting parent association mappings in Listbuilder not assigned

    #153 Fix setting parent association mappings in Listbuilder

    Created by sjopet at 13.08.2013 - 06:08, last updated at 02.05.2016 - 03:05

    https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/blob/master/Builder/ListBuilder.php#L111

  • 108 implement sortable for nodename not assigned

    #108 implement sortable for nodename

    Created by dbu at 26.03.2013 - 11:03, last updated at 02.05.2016 - 03:05

    see https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/pull/107/files#r3527602

    can we also sort on the id (the phpcr path)?

  • 106 Update association mapping (MixedReferrers) not assigned

    #106 Update association mapping (MixedReferrers)

    Created by rmsint at 25.03.2013 - 04:03, last updated at 05.06.2013 - 09:06

    Follow up of https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/pull/100#discussion_r3431511 - add MixedReferrers to the FormContractor - add associations to the ListBuilder - embeds associations in table rows - see also the related templates: https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/blob/master/Builder/ListBuilder.php#L132

  • 98 document sonata_type_collection for embedding admins not assigned

    #98 document sonata_type_collection for embedding admins

    Created by dbu at 17.03.2013 - 02:03, last updated at 02.05.2016 - 03:05

    like used here https://github.com/symfony-cmf/ContentBundle/blob/master/Admin/StaticContentAdmin.php

    this should probably be more of a hint and a link to the base sonata admin doc.

  • 96 document filters, nodename filter not assigned

    #96 document filters, nodename filter

    Created by dbu at 17.03.2013 - 02:03, last updated at 18.03.2013 - 08:03

    https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/pull/93

    /cc @lsmith77

  • 80 handling of inheritance (or more generally mixed collections) not assigned

    #80 handling of inheritance (or more generally mixed collections)

    Created by lsmith77 at 26.01.2013 - 02:01, last updated at 02.05.2016 - 03:05

    as of https://github.com/doctrine/phpcr-odm/pull/218 we have inheritance in search queries, which results in mixed collections being shown.

    ie. the MenuNode list now shows MultilangMenuNode nodes since the later extends from the former.

    for the add button SonataAdminBundle already supports subcollections: https://github.com/sonata-project/sandbox/blob/2.1/src/Sonata/Bundle/DemoBundle/Resources/config/admin.xml#L14

    however SonataAdminBundle does not yet support dynamically choosing which edit form to load.

    i think it would be kind of cool to be able to take this to the extreme by simply having a single list for any document. in a way this would be a competing or complementary interface to what we offer with the https://github.com/symfony-cmf/phpcrbrowser (which @danleech is working to replace with a Symfony2 implementation). at this point we would no longer really be talking about inheritance, but mixed collections. for such mixed collections we would likely need to offer a "search in any property" or something like that .. but that is another story.

    /cc @rande @dbu

  • 61 control allowed target documents for parent selection not assigned

    #61 control allowed target documents for parent selection

    Created by dbu at 28.09.2012 - 12:09, last updated at 02.05.2016 - 03:05

    follow-up of #23

  • 12 Audit / Versionning not assigned

    #12 Audit / Versionning

    Created by rande at 12.12.2011 - 04:12, last updated at 02.05.2016 - 03:05

    Hello,

    I just add a support for Audit/Versionning, I have started to add interfaces in the AdminBundle and the implementation in DoctrineORMAdminBundle. I am not sure if the interface can match the PHPCR requirements, can you please have a look the the following comments and provides any comments you might have.

    Thanks. - https://github.com/sonata-project/SonataAdminBundle/commit/baa6cd0ee9bc9fef43d90eef8dcd621b8817342e - https://github.com/sonata-project/SonataDoctrineORMAdminBundle/commit/f3eec647e92a23726f3fe739f97a1a18f993c929

  • 7 Write more unit and functional tests not assigned

    #7 Write more unit and functional tests

    Created by dbu at 04.11.2011 - 09:11, last updated at 02.05.2016 - 03:05

    Ideally, we reach 100% conscious decision: that is, all code is either tested or has the phpunit comments that it does not make sense to test it.

  • 524 DevKit updates for 2.x branch not assigned

    #524 DevKit updates for 2.x branch

    Created by SonataCI at 06.05.2018 - 02:05, last updated at 24.05.2018 - 10:05
  • 521 simply allow SF4 installation not assigned

    #521 simply allow SF4 installation

    Created by ElectricMaxxx at 23.01.2018 - 11:01, last updated at 26.04.2018 - 12:04

    I am targeting this branch, because i want to work on a new 2.x version

    Changelog

    ### Added
    - Added posibility to use SF4
    
    

    Subject

    I want to allow Symfony 4.0 before making it required in travis.yaml, just to installi it in a testing project and to see what happens. I would add outcome as issues.

  • 463 Choice Type Compatibility SF3 not assigned

    #463 Choice Type Compatibility SF3

    Created by pbenard73 at 21.07.2017 - 06:07, last updated at 18.03.2018 - 11:03

    I am targeting this branch, because Form Filter ChoiceType is not compatible with Symfony 3..

    Closes #462

    ### Added
            if (!method_exists('Symfony\Component\Form\FormTypeInterface', 'setDefaultOptions')) {
                $choices = array_flip($choices);
            }
    

    Subject

    Make Form Type Filter ChoiceType compatible with Symfony 3

  • 430 Support for nested mappings not assigned

    #430 Support for nested mappings

    Created by auipga at 18.03.2017 - 06:03, last updated at 25.05.2018 - 09:05

    New approach for https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/pull/365 I am targeting this branch, because this change is a new backwards compatible feature.

    Changelog

    ### Added
    - Added support for nested mappings to show/hide depending fields of unlimited levels.
    

    To do

    • [ ] Update the documentation

    Subject

    This change adds support for nested mappings.

    Example:

    $formMapper
        ->add('car_model', 'choice_field_mask', [
            'choices' => [
                'nice_car' => 'Mercedes',
                'bad_car'  => 'Opel',
            ],
            'map' => [
                'nice_car' => ['nice_car_color'],
                'bad_car' => ['bad_car_color']
            ]
        ])
        ->add('nice_car_color', 'choice_field_mask', [
            'choices' => [
                'silver' => 'silver',
                'black'  => 'black',
            ],
            'map' => [
                'silver' => ['exclusive_color'],
                'black' => [],
            ]
        ])
        ->add('exclusive_color', 'choice', [
            'choices' => [
                'silver1' => 'premium silver',
                'silver2' => 'ultra premium silver',
            ]
        ])
        ->add('bad_car_color', 'choice', [
            'choices' => [
                'blue' => 'blue',
                'red'  => 'red',
            ]
        ])
    ;
    

    exclusive_color will only be visible if you select Mercedes AND silver. exclusive_color will be hidden if you change nice_car_color (default behaviour) and now also if you change its parent car_model.

  • 395 Moves crud association templates to admin-bundle not assigned

    #395 Moves crud association templates to admin-bundle

    Created by ju1ius at 23.06.2016 - 11:06, last updated at 05.08.2017 - 05:08

    This PR is related to SonataAdminBundle#3971 I am targetting this branch, because there are BC breaks

    Changelog

    ### Added
    - `FieldDescription` implements `FieldDescriptionInterface::describesSingleValuedAssociation` and `FieldDescriptionInterface::describesCollectionValuedAssociation` methods
    
    ### Changed
    - `FormContractor` now extends `Sonata\AdminBundle\Admin\AbstractFormContractor`
    
    ### Removed
    - removed ALL crud association templates and form widget blocks. They now belong to the admin bundle
    
  • 472 Enhancer to pass valid children to the resource response not assigned

    #472 Enhancer to pass valid children to the resource response

    Created by ElectricMaxxx at 28.07.2017 - 02:07, last updated at 28.07.2017 - 02:07

    To implement move restrictions based on hierarchy we should pass those information by an enhancer to the response of a resource call.

  • 462 Filter ChoiceType is not conform with Symfony 3 not assigned

    #462 Filter ChoiceType is not conform with Symfony 3

    Created by pbenard73 at 21.07.2017 - 03:07, last updated at 21.07.2017 - 04:07

    Subject

    I can see that the Filter Choice Type is not conform with Symfony 3. The keys and values are inversed...

    Actually:

            $choices = array(
                self::TYPE_CONTAINS => $this->translator->trans('label_type_contains', array(), 'SonataAdminBundle'),
                self::TYPE_NOT_CONTAINS => $this->translator->trans('label_type_not_contains', array(), 'SonataAdminBundle'),
                self::TYPE_EQUAL => $this->translator->trans('label_type_equals', array(), 'SonataAdminBundle'),
                self::TYPE_CONTAINS_WORDS => $this->translator->trans('label_type_contains_words', array(), 'SonataDoctrinePHPCRAdmin'),
            );
    

    But it should be

            $choices = array(
                $this->translator->trans('label_type_contains', array(), 'SonataAdminBundle')              => self::TYPE_CONTAINS,
                $this->translator->trans('label_type_not_contains', array(), 'SonataAdminBundle')          => self::TYPE_NOT_CONTAINS,
                $this->translator->trans('label_type_equals', array(), 'SonataAdminBundle')                => self::TYPE_EQUAL,
                $this->translator->trans('label_type_contains_words', array(), 'SonataDoctrinePHPCRAdmin') => self::TYPE_CONTAINS_WORDS ,
            );
    
  • 449 cleanup composer.json not assigned

    #449 cleanup composer.json

    Created by dbu at 03.07.2017 - 08:07, last updated at 03.07.2017 - 08:07

    there are a couple of @dev dependencies in composer.json. we have to move to stable versions of the dependencies before releasing.

  • 447 Cleanup code now that we are on 5.6 dbu

    #447 Cleanup code now that we are on 5.6

    Created by ElectricMaxxx at 03.07.2017 - 07:07, last updated at 27.07.2017 - 09:07
    Assigned to dbu

    Are we bound to Sonta or would it be possible to increase php version to 5.6 as we did for 2.0 on CMF?

  • 427 Oudated docs not assigned

    #427 Oudated docs

    Created by core23 at 12.02.2017 - 01:02, last updated at 12.02.2017 - 01:02

    The docs still refer to the old google groups: https://sonata-project.org/bundles/doctrine-phpcr-admin/1-x/doc/index.html

    We use slack and stackoverflow now.

  • 400 CollectionOrderListener - UndefinedMethodException not assigned

    #400 CollectionOrderListener - UndefinedMethodException

    Created by binhle410 at 21.09.2016 - 04:09, last updated at 22.09.2016 - 04:09

    Environment: DEV

    Sonata packages

    $ composer show sonata-project/*
    
    sonata-project/admin-bundle                3.7.0              The missing Symfony Admin Generator
    sonata-project/block-bundle                3.1.1              Symfony SonataBlockBundle
    sonata-project/cache                       1.0.7              Cache library
    sonata-project/cache-bundle                2.3.1              This bundle provides caching services
    sonata-project/classification-bundle       3.1.0              Symfony SonataClassificationBundle
    sonata-project/core-bundle                 3.1.1              Symfony SonataCoreBundle
    sonata-project/datagrid-bundle             2.2                Symfony SonataDatagridBundle
    sonata-project/doctrine-extensions         1.0.2              Doctrine2 behavioral extensions
    sonata-project/doctrine-orm-admin-bundle   3.0.5              Symfony Sonata / Integrate Doctrine ORM into the Son...
    sonata-project/doctrine-phpcr-admin-bundle dev-master 2e2cd0a Symfony Sonata / Integrate Doctrine PHPCR into the S...
    sonata-project/easy-extends-bundle         2.1.10             Symfony SonataEasyExtendsBundle
    sonata-project/exporter                    1.7.0              Lightweight Exporter library
    sonata-project/intl-bundle                 2.2.4              Symfony SonataIntlBundle
    sonata-project/media-bundle                3.3.0              Symfony SonataMediaBundle
    sonata-project/notification-bundle         3.0.0              Symfony SonataNotificationBundle
    sonata-project/seo-bundle                  2.0.2              Symfony SonataSeoBundle
    sonata-project/translation-bundle          2.x-dev 0391a71    SonataTranslationBundle
    

    Symfony packages

    $ composer show symfony/*
    symfony/monolog-bundle     2.11.1  Symfony MonologBundle
    symfony/phpunit-bridge     v3.1.4  Symfony PHPUnit Bridge
    symfony/polyfill-apcu      v1.2.0  Symfony polyfill backporting apcu_* functions to lower PHP versions
    symfony/polyfill-intl-icu  v1.2.0  Symfony polyfill for intl's ICU-related data and classes
    symfony/polyfill-mbstring  v1.2.0  Symfony polyfill for the Mbstring extension
    symfony/polyfill-php56     v1.2.0  Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
    symfony/polyfill-php70     v1.2.0  Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
    symfony/polyfill-util      v1.2.0  Symfony utilities for portability of PHP codes
    symfony/security-acl       v3.0.0  Symfony Security Component - ACL (Access Control List)
    symfony/swiftmailer-bundle v2.3.11 Symfony SwiftmailerBundle
    symfony/symfony            v3.1.4  The Symfony PHP framework
    

    PHP version

    $ php -v
    
    PHP 7.0.8 (cli) (built: Jun 21 2016 15:27:20) ( ZTS )
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    

    Subject

    Why do we need to support symfony 2.2 ? why not just change this method here https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/blob/1.x/Form/Listener/CollectionOrderListener.php#L59 to the new createPropertyAccessor()?

    Steps to reproduce

    Go to Sonata Admin section / Slideshow Block and create a new block In the Items Elements section, click Add, nothing works, the URL returns an exception

    Expected results

    Normal workflow of Cmf Slideshow Block Bundle

    Actual results

    nothing appears and the ajax request returns an exception which is

    Attempted to call an undefined method named "getPropertyAccessor" of class "Symfony\Component\PropertyAccess\PropertyAccess".
    Did you mean to call "createPropertyAccessor"?
       500 Internal Server Error - UndefinedMethodException
    
  • 373 tree-browser and resource-rest stable ETA Soullivaneuh

    #373 tree-browser and resource-rest stable ETA

    Created by Soullivaneuh at 10.05.2016 - 08:05, last updated at 08.01.2017 - 01:01
    Assigned to Soullivaneuh

    Have you an ETA for symfony-cmf/tree-browser-bundle and symfony-cmf/resource-rest-bundle stable release?

    I would like to push a new major for sonata-admin 3.0 support and deprecate the 1.x one but those bundle are already required with unstables versions.

    Thanks.

    cc dbu @lsmith77 @dantleech @sjopet @rmsint

  • 355 Filter getRenderSettings not working not assigned

    #355 Filter getRenderSettings not working

    Created by billsworld at 27.01.2016 - 05:01, last updated at 02.03.2016 - 11:03

    The line below is returning 'text' rather than 'date' for some reason in Symfony 2.8

    https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/blob/master/Filter/DateFilter.php#L81

    This forces us to define the date like so.

    protected function configureDatagridFilters(DatagridMapper $datagridMapper)
    {
        $datagridMapper
            ->add('createdAt', 'doctrine_phpcr_date', [], 'date')
       ;
    }
    
  • 354 Inifinite loop when using sub classes. not assigned

    #354 Inifinite loop when using sub classes.

    Created by dantleech at 12.01.2016 - 10:01, last updated at 12.01.2016 - 10:01

    If you have subclasses there is an infinite loop whereby getClass calls getSubject which calls getClass.

    It can be fixed as follows:

    # sonata-project/admin-bundle
    diff --git a/Admin/Admin.php b/Admin/Admin.php
    index 44f3559..09eebf9 100644
    --- a/Admin/Admin.php
    +++ b/Admin/Admin.php
    @@ -54,7 +54,7 @@ abstract class Admin implements AdminInterface, DomainObjectInterface
          *
          * @var string
          */
    -    private $class;
    +    protected $class;
    
         /**
          * The subclasses supported by the admin class.
    
    # sonata-project/phpcr-admin
    diff --git a/Admin/Admin.php b/Admin/Admin.php
    index 9e2c438..645b90c 100644
    --- a/Admin/Admin.php
    +++ b/Admin/Admin.php
    @@ -98,7 +98,7 @@ class Admin extends BaseAdmin
                     if (!UUIDHelper::isUUID($id)) {
                         $id = PathHelper::absolutizePath($id, '/');
                     }
    -                $this->subject = $this->getModelManager()->find($this->getClass(), $id);
    +               $this->subject = $this->getModelManager()->find($this->class, $id);
                 }
             }
    
    
  • 332 Sortable not working ElectricMaxxx

    #332 Sortable not working

    Created by danielantelo at 07.04.2015 - 02:04, last updated at 27.07.2017 - 05:07
    Assigned to ElectricMaxxx

    So i have a sonata_type_collection working in my symfony cmf project, it creates, updates and removes child documents correctly.

    I now want to enable sortable, but when i save with the sortable flag enabled i get "NodeName property "nodeName" may not be empty in document of class..."

    Is this a known issue? or am i doing something wrong.

    ->add(
         'someChidlren',
         'sonata_type_collection',
         array(
              'label'    => false,
              'by_reference'   => false,
              'cascade_validation' => true,
         ),
         array(
              'admin_code' => 'admin_reference_here',
              'edit'   => 'inline',
              'inline' => 'table',
               'sortable'  => 'position',
         )
    )
    
  • 324 Tree style admin instead of list style admin not assigned

    #324 Tree style admin instead of list style admin

    Created by RSSchermer at 02.02.2015 - 12:02, last updated at 16.02.2015 - 09:02

    I only just started playing around with the CMF project and I'm really impressed with how little custom code on top of the CMF is needed to make quite a nice custom CMS. One thing I'm was not quite happy with during my experimentation though, is the list-centric backend interface, which does not seem ideally suited for hierarchical content.

    A tree view would be much better suited. If I'm not mistaken, currently the only way to get a tree view without defining custom templates and controllers, is to use the dashboard tree block provided with this bundle. This tree is really quite nice, esspecially as it allows reordering of tree nodes. There are some problems with this approach though: - It's difficult to have multiple trees on seperate pages without resorting to custom templates and controllers. I'd prefer having a separate content tree, menu tree, route tree etc., rather than having them all in one tree. - If you want to add nodes to a tree, you still end up going through the sonata list style interfaces, complicating the user experience unnecessarily.

    I would propose something like TreeAdmin and TreeNodeAdmin.

    TreeAdmin would be responsible for a tree view. The tree view could include: - The tree with a specified root node. This can probably just use the tree block already provided by this bundle. - A 'Node creation' side menu, which lists the nodes that can be created for this tree with 'Add new' links.

    TreeAdmin services can be added to Sonata groups and show up in the Sonata admin list block or in the dashboard side-menu with a 'Tree' link which takes you to the tree view.

    TreeNodeAdmin would be responsible for the CRUD of nodes for the tree. It takes care of the form, show, delete etc views for a tree node. It could basically be the current phpcr admin class, with the difference that a parent TreeAdmin needs to be specified. The views would differ from the sonata list style views in: - Breadcrumbs include a link to the parent tree view, instead of a list view. - Buttons like 'Create and return to list' are changed to 'Create and return to tree'.

    I'd be willing to look into implementing something like this. If I'd ever end up making a proper CMS with the CMF, this is probably what I would do anyway, but I figured this may be a generic enough problem that there would be upstream interest. Before I get started though, I'm curious as to what sentiments here are for something like this and if perhaps there's better ideas for the implementation than what I came up with above.

    One issue I already ran into when playing around with this, is the somewhat 'monolithic' nature of the sonata Admin class (and by extension the Phpcr Admin class which inherits from it). It includes a lot of cruft relating to list view specifics and it feels a little wrong to extend it for something like TreeAdmin or TreeNodeAdmin. A lot of logic (e.g. for routing and security) would however be shared. I'd prefer it if there was a base admin class that is view agnostic. It seems that would be a pretty big refactor for the SonataAdminBundle though.

  • 311 Using ChildAdmin with PHPCR not assigned

    #311 Using ChildAdmin with PHPCR

    Created by he-li at 17.11.2014 - 11:11, last updated at 02.01.2017 - 09:01

    Hello,

    In our project, we want to use the functionality of child admin since we have 3 levels of embed form. We have a top level document Collection which can have some Section, and each section has some Item. Here is the configuration yaml file.

    Collection:
        ...
        referrers:
            sections:
                referencedBy: collection
                referringDocument: Section
    
    Section:  
        ...  
        referenceMany:
            items:
                strategy: weak
                targetDocument: Item
                cascade: [ all ]
        referenceOne:
            collection:
                strategy: hard
                targetDocument: Collection
    
    Item
        ...
        referrers:
            section:
                referencedBy: items
                referringDocument: Section
    

    We met 2 problems when we tried to declare parentAssociationMapping(=collection) in sectionAdmin. 1. It's not possible to use id(path) of document in routing. Because a URL like this /collection/{id}/section/{childId} cannot work with a document path. I have to overwrite the following methods to use uuid instead of id

    ``` /** * {@inheritdoc} */ public function generateObjectUrl($name, $object, array $parameters = array(), $absolute = false) { // use uuid instead of path $parameters['id'] = $object->getUuid();

       return $this->generateUrl($name, $parameters, $absolute);
    

    }

    /** * {@inheritdoc} */ public function getObject($id) { // find object by uuid instead of id $object = $this->getModelManager()->find(null, $id); foreach ($this->getExtensions() as $extension) { $extension->alterObject($this, $object); }

       return $object;
    

    } ``` 2. There's no filter type for relations. I don't find a better solution, but use doctrine_phpcr_callback in my datagrid element

    error

    $datagridMapper ->add( 'collection', 'doctrine_phpcr_callback', array( 'callback' => function ($proxyQuery, $alias, $field, $data) { ... return true; }, ) );

    So what do you think of the solution? And will the childAdmin feature be integrated in the bundle soon?

    Thanks

  • 309 Dialog forms doesn't work properly not assigned

    #309 Dialog forms doesn't work properly

    Created by robhunt3r at 20.10.2014 - 11:10, last updated at 27.06.2016 - 04:06

    I was trying to use inline forms in order to add media/gallery/stuff to other stuff, after the PRs I did for MediaBundle I made it working, but problem was now that when I clicked on LIST/CREATE/DELETE buttons I've found some problems:

    Everything is opening with jQueryUI dialogs instead of Bootstrap modals so it looked ugly. List button worked perfectly. Create button didn't work, undefined related errors with event.preventDefault(); when clicked. Delete button worked.

    So after research, I've got it working, editing some stuff in comparison with ORMAdminBundle. NOTE: This was done with Many association, not One, but I think problem will be the same

    :CRUD:edit_phpcr_many_association_script.html.twig After editing some lines, I ended with a CREATE dialog, but when clicking on SUBMIT it was causing a redirection to it's original page, so useless. Finally I ended duplicating ORM code, for the same file, this was causing a dark overlay over all page without contents.

    The problem was easy to find: There were NOT a modal div (as I said it was using jQueryUI Dialog) this is setted inside FORM:form_admin_fields.html.twig replacing this



    <div class="container sonata-ba-modal sonata-ba-modal-edit-one-to-one" style="display: none" id="field_dialog_{{ id }}"> </div>

    with this



    <div class="modal fade" id="field_dialog_{{ id }}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h4 class="modal-title"></h4> </div> <div class="modal-body"> </div> </div> </div> </div>

    This code is inside SonataOrmAdminBundle:CRUD:edit_moda.html.twig

    With this changes everything is working perfectly.

    Sorry for this bad explaination, I'm in a hurry while writting. I hope that you understand the problem and the solution I've used.

    _TL;DR / WTF are you saying_ I think we can use the same Javascript + twig code for ORM and PHPCR admin bundles, because they work in both bundles, at least under a Many relation which is what I'm using.

    Maybe we can create common JS+TWIG files inside AdminBundle as AdminBundle requires at least one DB bunle and make ORM/PHPCR/MONGODB use it.

    In order to reproduce this problem just create the simplest web with mediabundle with my PR (see my profile) using PHPCR and try to add media to a Gallery changing what I said here (JS files and modal DIV)

  • 274 widget that lists edit links to all referrers of the given node not assigned

    #274 widget that lists edit links to all referrers of the given node

    Created by lsmith77 at 09.07.2014 - 10:07, last updated at 02.05.2016 - 03:05

    The idea is that one can easily add a widget to an admintool (or maybe there is a better place to enable this and add it to the general edit navigation) that lists links to all nods that reference the node one is currently editing.

    For example one has a corporate website which references different business developers to contact on different pages. Now it would be useful to be able to get a list of all of those pages right on the edit page for each business developer.

  • 260 Implement support for export not assigned

    #260 Implement support for export

    Created by dbu at 25.04.2014 - 06:04, last updated at 25.04.2014 - 06:04

    implement ModelManager::getDataSourceIterator at https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/blob/master/Model/ModelManager.php#L549

    251 added at least an exception instead of returning null.

    until that is done, the only export is the phpcr level export and import, which is the right thing for backups anyways, but not suitable for end users.

  • 252 improve FormContractor to better guess form types not assigned

    #252 improve FormContractor to better guess form types

    Created by dbu at 05.04.2014 - 12:04, last updated at 02.05.2016 - 03:05

    it would be nice if the admin would guess the normal types for text fields, children and relations and the parent (with getRootPath as default root path).

    this happens somehow in FormContractor, not in the TypeGuesser which has nothing to do really with forms but is used for the lists.

  • 242 improve introduction not assigned

    #242 improve introduction

    Created by dbu at 01.03.2014 - 01:03, last updated at 01.03.2014 - 09:03

    @rmsint said in #103

    This is what I quickly thought to do: - [ ] an overview page: - in the cmf documentation style - dependencies + installation + basic configuration - main features: list, filter, form, tree - links to sonata documents where possible - [ ] a separate page to explain the phpcr filters (mostly the page as it is now) - [ ] provide a place (separate page probably) to explain the new, and existing, phpcr form types - in one or two sentences explain them on the overview page - [x] provide a place to explain the tree (separate page probably)

  • 235 document tree tweaking configuration options for large tree support not assigned

    #235 document tree tweaking configuration options for large tree support

    Created by dbu at 17.02.2014 - 12:02, last updated at 02.05.2016 - 03:05

    see code in #234

  • 228 detect RouteReferrersReadInterface content and show url not assigned

    #228 detect RouteReferrersReadInterface content and show url

    Created by dbu at 20.01.2014 - 03:01, last updated at 02.05.2016 - 03:05
    • [x] the edit view could show a link to the frontend if content does have a route: http://symfony.com/doc/master/cmf/bundles/routing/dynamic.html#frontendlink-sonata-admin-extension
    • [ ] the list view should be able to show a link column if the content does have a route
    • [ ] the tree could visually indicate if an item is a routable thing and provide a link to the frontend in the context menu
  • 217 Overlay editing: remove sonata navigation, fix close button not assigned

    #217 Overlay editing: remove sonata navigation, fix close button

    Created by dbu at 09.12.2013 - 09:12, last updated at 03.02.2017 - 05:02

    When editing in the overlay, we see all the Sonata navigation elements in the overlay again. Hide those. And we should make all "close", "Save and Return" and so on buttons hide the overlay after successful saving.

  • 198 sonata_type_collection for non-inline not assigned

    #198 sonata_type_collection for non-inline

    Created by dbu at 09.10.2013 - 12:10, last updated at 02.05.2016 - 03:05

    the sonata_type_collection for non-inline does an overlay similar to the one we have when using the doctrine_phpcr_odm_tree_manager form type. but editing in the overlay is broken, at least because the parent is not sent in the ajax request.

  • 189 tree breadcrumb support not assigned

    #189 tree breadcrumb support

    Created by dbu at 24.09.2013 - 06:09, last updated at 03.02.2017 - 05:02

    as discussed in https://github.com/symfony-cmf/MenuBundle/pull/135 we could show the tree elements in the breadcrumb. the perfect thing would be - [ ] Have a content breadcrumb (content ancestor) in parallel with the administrative breadcrumb - [ ] check if allowed to edit / view and if neither display entry without link - [ ] configure number of entries in the breadcrumb, if there is more than that, remove some in the middle and put a non linked "..." entry there - [ ] show tree with location of this document (on the left side?, instead of the parent selector?)

  • 157 Investigate / fix getMetadata function in TypeGuessers not assigned

    #157 Investigate / fix getMetadata function in TypeGuessers

    Created by sjopet at 13.08.2013 - 07:08, last updated at 02.05.2016 - 03:05

    The logic of the getMetadata() function in the TypeGuesser seems dodgy to me. It should always return something imo.

  • 156 TypeGuesser Add support for additional types not assigned

    #156 TypeGuesser Add support for additional types

    Created by sjopet at 13.08.2013 - 06:08, last updated at 02.05.2016 - 03:05

    Both the FilterTypeGuesser and the TypeGuesser need to get updated to add support for: - children - child - referrers - parentDocument associations - node - nodename - multi value

  • 154 implements functions or remove if obsolete not assigned

    #154 implements functions or remove if obsolete

    Created by sjopet at 13.08.2013 - 06:08, last updated at 04.07.2016 - 01:07

    Fix the current implementation of the functions: getSingleScalarResult() and getNodeType() in the ProxyQuery class

  • 153 Fix setting parent association mappings in Listbuilder not assigned

    #153 Fix setting parent association mappings in Listbuilder

    Created by sjopet at 13.08.2013 - 06:08, last updated at 02.05.2016 - 03:05

    https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/blob/master/Builder/ListBuilder.php#L111

  • 108 implement sortable for nodename not assigned

    #108 implement sortable for nodename

    Created by dbu at 26.03.2013 - 11:03, last updated at 02.05.2016 - 03:05

    see https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/pull/107/files#r3527602

    can we also sort on the id (the phpcr path)?

  • 106 Update association mapping (MixedReferrers) not assigned

    #106 Update association mapping (MixedReferrers)

    Created by rmsint at 25.03.2013 - 04:03, last updated at 05.06.2013 - 09:06

    Follow up of https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/pull/100#discussion_r3431511 - add MixedReferrers to the FormContractor - add associations to the ListBuilder - embeds associations in table rows - see also the related templates: https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/blob/master/Builder/ListBuilder.php#L132

  • 98 document sonata_type_collection for embedding admins not assigned

    #98 document sonata_type_collection for embedding admins

    Created by dbu at 17.03.2013 - 02:03, last updated at 02.05.2016 - 03:05

    like used here https://github.com/symfony-cmf/ContentBundle/blob/master/Admin/StaticContentAdmin.php

    this should probably be more of a hint and a link to the base sonata admin doc.

  • 96 document filters, nodename filter not assigned

    #96 document filters, nodename filter

    Created by dbu at 17.03.2013 - 02:03, last updated at 18.03.2013 - 08:03

    https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/pull/93

    /cc @lsmith77

  • 80 handling of inheritance (or more generally mixed collections) not assigned

    #80 handling of inheritance (or more generally mixed collections)

    Created by lsmith77 at 26.01.2013 - 02:01, last updated at 02.05.2016 - 03:05

    as of https://github.com/doctrine/phpcr-odm/pull/218 we have inheritance in search queries, which results in mixed collections being shown.

    ie. the MenuNode list now shows MultilangMenuNode nodes since the later extends from the former.

    for the add button SonataAdminBundle already supports subcollections: https://github.com/sonata-project/sandbox/blob/2.1/src/Sonata/Bundle/DemoBundle/Resources/config/admin.xml#L14

    however SonataAdminBundle does not yet support dynamically choosing which edit form to load.

    i think it would be kind of cool to be able to take this to the extreme by simply having a single list for any document. in a way this would be a competing or complementary interface to what we offer with the https://github.com/symfony-cmf/phpcrbrowser (which @danleech is working to replace with a Symfony2 implementation). at this point we would no longer really be talking about inheritance, but mixed collections. for such mixed collections we would likely need to offer a "search in any property" or something like that .. but that is another story.

    /cc @rande @dbu

  • 61 control allowed target documents for parent selection not assigned

    #61 control allowed target documents for parent selection

    Created by dbu at 28.09.2012 - 12:09, last updated at 02.05.2016 - 03:05

    follow-up of #23

  • 12 Audit / Versionning not assigned

    #12 Audit / Versionning

    Created by rande at 12.12.2011 - 04:12, last updated at 02.05.2016 - 03:05

    Hello,

    I just add a support for Audit/Versionning, I have started to add interfaces in the AdminBundle and the implementation in DoctrineORMAdminBundle. I am not sure if the interface can match the PHPCR requirements, can you please have a look the the following comments and provides any comments you might have.

    Thanks. - https://github.com/sonata-project/SonataAdminBundle/commit/baa6cd0ee9bc9fef43d90eef8dcd621b8817342e - https://github.com/sonata-project/SonataDoctrineORMAdminBundle/commit/f3eec647e92a23726f3fe739f97a1a18f993c929

  • 7 Write more unit and functional tests not assigned

    #7 Write more unit and functional tests

    Created by dbu at 04.11.2011 - 09:11, last updated at 02.05.2016 - 03:05

    Ideally, we reach 100% conscious decision: that is, all code is either tested or has the phpunit comments that it does not make sense to test it.

symfony-cmf

media-bundle

Travis Build Status Latest Stable Version Total Downloads
  • 50 [RFC] Refactor media to be framework agnostic not assigned

    #50 [RFC] Refactor media to be framework agnostic

    Created by iampersistent at 02.09.2013 - 09:09, last updated at 03.01.2017 - 01:01

    This is a proposal to find a way to share media code between the CMF project and the Vespolina project. Basically, I have extracted the framework specific code out into its own library https://github.com/iampersistent/Media . (this is all untested at this point) This library would be used in the Vespolina project for handling media related to commerce. Media in the Vespolia project can be more than images, it can also be documents and spreadsheets.

    Because there are additional needs with the Vespolina project, the media library would need more features. It would become more like a framework agnostic SonataMediaBundle, as far as the scope of the features. I did notice that the CMF Media seems to be intended to be simple, which may clash with the needs of Vespolina.

    I can see a few different options. - we can leave things as they are and not share media code between the two projects - we can have a full featured media library shared between the projects - we can have a simple media library for CMF that is used as a base library for Vespolina media library

    There may be other options I'm missing and I'm open to hearing them.

  • 178 Attempted to load class "ElFinderVolumeDriver" from namespace "FM\ElFinderPHP\Driver" not assigned

    #178 Attempted to load class "ElFinderVolumeDriver" from namespace "FM\ElFinderPHP\Driver"

    Created by kimwue at 19.04.2018 - 06:04, last updated at 24.04.2018 - 12:04

    Getting this error:

    ClassNotFoundException in PhpcrDriver.php line 35:
    Attempted to load class "ElFinderVolumeDriver" from namespace "FM\ElFinderPHP\Driver".
    Did you forget a "use" statement for another namespace?
    

    when upgrading helios-ag/fm-elfinder-bundle from version 1 to 8.

    Any ideas?

  • 172 Automaticially add parent document for collection fresh collection items not assigned

    #172 Automaticially add parent document for collection fresh collection items

    Created by ElectricMaxxx at 08.07.2017 - 08:07, last updated at 08.07.2017 - 08:07

    I do not like Exceptions like that:

    IdException: Property "parentDocument" mapped as ParentDocument may not be empty in document of class "..\Document\Category"
    

    So i would like to add a listener to automaticiall add them.

    Just for the one, where we know the docuement - parent path relation or can map them in a simple configuration.

  • 170 Fix SonataMedia integration not assigned

    #170 Fix SonataMedia integration

    Created by ElectricMaxxx at 04.07.2017 - 07:07, last updated at 04.07.2017 - 07:07
    • Find or help to find a matching SonataMedia integration (there have been some BC-Breaks and broken releases with other then ORM)
    • Improvements on SonataCategory system as it is used in SonataMedia
  • 169 ChildrenCollection of medea files fails not assigned

    #169 ChildrenCollection of medea files fails

    Created by ElectricMaxxx at 04.07.2017 - 07:07, last updated at 04.07.2017 - 07:07

    Adding a collection of media files (images or files) to a node/document is quite easy. The persistence works, but trying to visualize them in a collection form type with the ImageType or FileType as entity fails, as the collection is created with the nodes names as keys. Those keys, which are file names in case of medea files, fail on form name validation. with an exception like:

     Symfony\Component\Form\Exception\InvalidArgumentException: The name "IMG_4721.JPG" contains illegal characters. Names should start with a letter, digit or underscore and only contain letters, digits, numbers, underscores ("_"), hyphens ("-") and colons (":").
        at n/a
            in /var/www/prberghoff/New/vendor/symfony/symfony/src/Symfony/Component/Form/FormConfigBuilder.php line 865
    
        at Symfony\Component\Form\FormConfigBuilder::validateName('IMG_4721.JPG')
            in /var/www/prberghoff/New/vendor/symfony/symfony/src/Symfony/Component/Form/FormConfigBuilder.php line 193
    

    But it would be nice to edit and persist files in a arbitrary collection without enclosing them into a document with nice names.

  • 168 Unknown "cmf_media_display_url" function. not assigned

    #168 Unknown "cmf_media_display_url" function.

    Created by cesarluna at 27.04.2017 - 05:04, last updated at 04.07.2017 - 07:07

    Instale symfony-cmf/media-bundle anadi el routing, la configuracion dentro del config.yml, pero al utilizar en mi Formulario (ExampleFormType)

    $builder
                ->add('reference', 'cmf_media_image', array('required' => false))
    

    Obtengo el siguiente mensaje: Unknown "cmf_media_display_url" function.

    estoy utilizando symfony 3.2

  • 164 Integration with Entities: Project Example not assigned

    #164 Integration with Entities: Project Example

    Created by alisonlopez at 11.01.2017 - 12:01, last updated at 11.01.2017 - 12:01

    Hi again!

    So, finally I could manage to get it installed and configured...Now I need help to get it work in my project. As you can see, I'm very new to Symfony2

    I have Sonata Admin in my project and I got the Entity "Curriculum"...which will have the field "archives" that would be a one-to-many relationship.

    "Archive" would be used in others entities outside "Curriculum" (that's why I need a file management bundle in first place...) and the files would be saved according to which entity is called.

    For example: I got this modules: 1. Curriculum 2. Documents

    Archives for Curriculum should be stored in /company/cv/ Archives for Documents should be stored in /company/documents/

    Anyone's willing to enlighten me a bit? I think it would be a good idea to insert a step-by-step guide for newbies in the docs...

  • 162 Hierarchy vs. Hierarchy not assigned

    #162 Hierarchy vs. Hierarchy

    Created by ElectricMaxxx at 05.01.2017 - 09:01, last updated at 06.01.2017 - 11:01

    Implementing PHPCR-ODM 2.0 could mean to use its HiearachyInterface, which is pretty nice from the document perspective, but not understandable from the file system perspective. I would wish to make the seperation clear.

  • 160 the future of this bundle not assigned

    #160 the future of this bundle

    Created by ElectricMaxxx at 05.01.2017 - 08:01, last updated at 05.01.2017 - 10:01

    For the current CMF release this bundle was abendoned. But i and @binhle410 still see a future of this bundle. Future is seen and wanted by all of the @symfony-cmf/contributors but we are not enough. But with some help of @binhle410 we can get this bundle on the road again.

    Future lives in visions

    And my visions for this bundles are:

    Easy usage

    To get that i would like add (more) example documents instead of interfaces only. Someone using different behavior can simply extend and replace a specific method instead of implementing a complete class. This would also mean to update the documentation and add uscases. One of the other example would be a file/image/media which is simple a reference to the file/image/media by path and name to not persist the content itself. With usecases in the docs i also mean, how to attach a file/image/media to a document. Cause here the phpcr tree will be used first. So i would suggest to introduce some kind of AttachedFile/Image/MediaInterface (maybe in read and write mode) to mark a docuemnt as one with attached files/images/media.

    Own Admin Support

    Instead of the hard dependency on sonata-media i would suggest to add own simple admins to sonata-phpcr-admin-integration-bundle. The current form type can help with some extra love. For sure we still need sonata, but only for gallery then, who would need a gallery, when there would be an extra preview onHover in treebrowser?

    CKeditor support

    Not sure if the current controller does it but it would be nice if he would enable upload for ckEditor.

    Hierarchy vs. Hierarchy

    On my own fork i replaced the bundle own HierachyInterface by the one of phpcr-odm, but it feels wrong as the first means a file system hierarchy and the second means a hierarchy in a tree of documents.

    Hook into image template helper

    Like we do with content, which is able to be passed into symfony router, i would like to pass an image/file object into the twig image helper, pass some options and get the images rendered.

    Symfony 3.0, FileStructure

    .... Just the stuff we also did in the other bundles.

  • 150 FileController can't handle file name with Chinese character not assigned

    #150 FileController can't handle file name with Chinese character

    Created by videni at 05.03.2016 - 07:03, last updated at 04.07.2017 - 07:07

    When I upload a file which has Chinese character name, I can successfully upload the file , but it returns a wrong url address to display.

  • 130 [2.0] Update FileController for SecurityContext split not assigned

    #130 [2.0] Update FileController for SecurityContext split

    Created by wouterj at 20.06.2015 - 05:06, last updated at 05.01.2017 - 09:01

    In version 2.0, which should aim to support Symfony 2.8 and 3.x, the FileController has to be updated to take the SecurityContext into account.

  • 127 Doctrine\ODM\PHPCR\Id\IdException thrown during upload not assigned

    #127 Doctrine\ODM\PHPCR\Id\IdException thrown during upload

    Created by cbastienbaron at 09.04.2015 - 07:04, last updated at 05.08.2017 - 01:08

    Hi guys,

    After a fresh install to CmfMediaBundle, i'm trying to upload a media with a dirty name 'Capture du 2015-01-07 18:46:59.png' and i get in return a beautiful 500 :)

    class: "Doctrine\ODM\PHPCR\Id\IdException"
    message: "NodeName property "nodename" of document "Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\Image" contains the illegal PHPCR value "Capture du 2015-03-25 18:01:53.png"."
    

    AFAIK, there is no a "slugable" behaviour for this pbl ? i'm afraid, finals users, doesn't care about file's name :s Or maybe i'm missing a part of config for this ?

    Thks in advance for reponse ;)

  • 115 Handling image upload when one already exists not assigned

    #115 Handling image upload when one already exists

    Created by seydu at 23.09.2014 - 04:09, last updated at 05.01.2017 - 09:01

    When I submit a form without uploading an image I lose the image I had previously uploaded. I don't see anything in the doc to handle this situation.

    Is something planed to handle this ? I used to handle this with Javascript and some tweak server side: The server sets some information in the response to let the JS know if an image already exists. If yes it hides the upload field, removes the "required" if any and adds a button to show the upload when clicked.

  • 99 How to link a document to a .pdf file + filter on extension not assigned

    #99 How to link a document to a .pdf file + filter on extension

    Created by nicolas-bastien at 14.04.2014 - 03:04, last updated at 04.07.2017 - 07:07

    Hi,

    I spent time reading the doc and looking at the sandbox and right now I found how to link my document to an image with a 'cmf_media_image' form type but nothing for simple file.

    When I try to use a file form type i have this error : * The form's view data is expected to be an instance of class Symfony\Component\HttpFoundation\File\File, but is an instance of class PHPCRProxies__CG__\Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\File. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of class PHPCRProxies__CG__\Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\File to an instance of Symfony\Component\HttpFoundation\File\File. *

    I need this to have a downloadable pdf file and a video.

    I don't understand why there is no 'cmf_media_file' form type ?

    And is there a way to limit to a list of file extension ?

    Thanks a lot

    Nico

  • 97 improve validation to provide file upload error messages not assigned

    #97 improve validation to provide file upload error messages

    Created by dbu at 04.04.2014 - 05:04, last updated at 01.02.2016 - 02:02

    in #82 the checks during transformation are improved, but we should see if we can validate UploadFile earlier to provide decent messages to the user.

  • 91 Improve error handling not assigned

    #91 Improve error handling

    Created by rmsint at 25.02.2014 - 09:02, last updated at 04.07.2017 - 07:07

    Examples: - the upload service uses a media root path. If it does not exist the upload of an image will fail because the parent can not be found. - the cmf_create.persistence.phpcr.image.basepath and cmf_media.persistence.phpcr.media_basepath can mismatch, we should check that these are indepent and have no relation. However media-bundle services that get different root paths injected can also cause an issue. See https://github.com/symfony-cmf/symfony-cmf/issues/186

    When and where to throw an error to notify the developer of this?

    Maybe validate the configuration, so the developer directly knows if the configuration is not correct. Or do some extra checks in the constructor of some services?

  • 80 SonataMediaBundle integration rmsint

    #80 SonataMediaBundle integration

    Created by dbu at 04.11.2013 - 09:11, last updated at 01.04.2014 - 11:04
    Assigned to rmsint
  • 78 improve integration with LiipImagineBundle not assigned

    #78 improve integration with LiipImagineBundle

    Created by lsmith77 at 22.10.2013 - 03:10, last updated at 01.04.2014 - 11:04

    it would be good to have a way to ensure that the file format is included in the paths generated via LiipImagineBundle.

    f.e.

    {{ /cms/media/foo | imagine_filter('small_filter') }}
    

    might then result in

    /media/cache/small_filter/cms/media/foo
    

    however this can cause issues with some web servers and reverse proxies, as they would then set the content type to text/plain.

    so we need some solution which would allow forcing the format for the mimetype into the resulting URL.

    see also #77 for how to convert the mimetype to an extension

  • 77 integrate MimeTypeExtensionGuesser not assigned

    #77 integrate MimeTypeExtensionGuesser

    Created by lsmith77 at 22.10.2013 - 03:10, last updated at 16.04.2014 - 01:04

    might make sense to provide a service for the core MimeTypeExtensionGuesser and maybe even inject it by default into the MediaRepository and ImageRepository

  • 61 Sonata Admin? not assigned

    #61 Sonata Admin?

    Created by dbu at 17.09.2013 - 06:09, last updated at 01.04.2014 - 11:04

    should we add simple sonata admin classes for these documents? or do we point people to SonataMediaBundle?

    i just notice that in the sonata admin tree, it would be nice to be able to click on the image and edit it. not sure if sonata media would always be the right thing or might provide too much to be always a good tool for this?

  • 59 Imagine with Doctrine\Phpcr\Image documents not assigned

    #59 Imagine with Doctrine\Phpcr\Image documents

    Created by dbu at 16.09.2013 - 06:09, last updated at 04.07.2017 - 07:07

    when i try to use imagine with an Image document, i get

    Parameter "path" for route "_imagine_my_filter" must match ".+" ("" given) 
    to generate a corresponding URL
    

    it works if i add a __toString method to the image that returns $this->id. it seems like LiipImagineBundle is not expecting to be passed an object but only a path to an object. can we make that work? things go wrong inside CacheManager / WebPathResolver. could we use a different path resolver?

    workaround: if i pass in the id instead of the Image document, things work so at least there is a workaround.

  • 54 add unit tests not assigned

    #54 add unit tests

    Created by lsmith77 at 04.09.2013 - 09:09, last updated at 05.01.2017 - 09:01

    follow up for https://github.com/symfony-cmf/MediaBundle/pull/47

  • 51 check possiblity to return a placeholder for the url not assigned

    #51 check possiblity to return a placeholder for the url

    Created by lsmith77 at 04.09.2013 - 08:09, last updated at 08.11.2013 - 01:11

    use a filter or something when rendering content use a dataFilter rule for ckeditor

    followup for https://github.com/symfony-cmf/MediaBundle/pull/46

  • 37 Improve Image serialization not assigned

    #37 Improve Image serialization

    Created by rmsint at 16.08.2013 - 12:08, last updated at 16.08.2013 - 10:08

    See https://github.com/symfony-cmf/MediaBundle/pull/27#discussion_r5788735

  • 34 investigate image/ file upload response not assigned

    #34 investigate image/ file upload response

    Created by dbu at 15.08.2013 - 04:08, last updated at 19.08.2013 - 09:08

    We abstracted the image / file upload for Create and other web editors in UploadFileHelper::getUploadResponse.

    The logic is currently ported from the CreateBundle and improved at some points. We should investigate the response more, questions raised are: - I don't know much about how CkEditor works, so this may not be applicable, but shouldn't we be returning a "application/json" response and using a callback in the frontend to call functions rather than returning HTML? (dantleech) - We now return javascript directly for the ckeditor but could investigate when we implement the ckeditor for the CreateBundle - possibly also in combination with elfinder. - follow up of https://github.com/symfony-cmf/MediaBundle/pull/27#discussion_r5788934 - I wonder if it is a good idea to refer to an "editor" here. (in UploadFileHelper::getUploadResponse) Could we not use this upload thingy from a web form, or something else? (dantleech) - Can we think of a use case for this? (rmsint) - Current logic is here because we expected the automatic upload process mostly for web editors. - follow up of https://github.com/symfony-cmf/MediaBundle/pull/40#discussion_r5831139

  • 15 Gaufrette adapter - rename method not assigned

    #15 Gaufrette adapter - rename method

    Created by rmsint at 04.07.2013 - 10:07, last updated at 04.07.2017 - 07:07

    Currently not implemented, see https://github.com/symfony-cmf/MediaBundle/blob/master/Adapter/Gaufrette/CmfMediaDoctrine.php#L230

    Should we rather throw an Exception? Or introduce a capabiltiies API.

    public function __construct() { $this->addCapability(self::CAN_RENAME); $this->addCapability(self::CAN_REMOVE); $this->addCapability(self::CAN_WRITE); // whatever }

  • 9 allow deletion in image form type not assigned

    #9 allow deletion in image form type

    Created by dbu at 21.06.2013 - 10:06, last updated at 04.07.2017 - 07:07

    follow up of https://github.com/doctrine/DoctrinePHPCRBundle/issues/37 - @rmsint proposed to use a form listener and handling code to handle deleting an image again.

    right now the only way to delete an image is by deleting the document containing the image. this follows the idea of http://symfony.com/doc/current/cookbook/doctrine/file_uploads.html - if the image is null (meaning we did not upload a new one) that information is simply ignored.

    the proposition is to have a listener to show a checkbox removeImage that is mapped to the document and calls setRemoveImage if checked, having a way to know that the user explicitly wanted to delete the image. rmsint wrote a gist for that: https://gist.github.com/rmsint/ad4d8804e3ae6fae2160

    (ported over from https://github.com/doctrine/DoctrinePHPCRBundle/issues/40 and not a show stopper for 1.0)

  • 8 image require on new document but not when existing not assigned

    #8 image require on new document but not when existing

    Created by dbu at 21.06.2013 - 10:06, last updated at 04.07.2017 - 07:07

    when a file upload field is required, it means the user must re-upload an image each time he submits the form. to edit a document that has an image field, which is inconvenient. the intended behaviour is that if the parent entity is new, the image is required, but otherwise it is optional. i tried to make the phpcr_odm_image form type handle that but only found a horrible hack https://gist.github.com/dbu/5142035

    see also discussion in https://groups.google.com/forum/?fromgroups#!topic/symfony2/CrooBoaAlO4

    (this is an issue in the code ported over from DoctrinePHPCRBundle https://github.com/doctrine/DoctrinePHPCRBundle/issues/43 - i think its no blocker for 1.0)

  • 50 [RFC] Refactor media to be framework agnostic not assigned

    #50 [RFC] Refactor media to be framework agnostic

    Created by iampersistent at 02.09.2013 - 09:09, last updated at 03.01.2017 - 01:01

    This is a proposal to find a way to share media code between the CMF project and the Vespolina project. Basically, I have extracted the framework specific code out into its own library https://github.com/iampersistent/Media . (this is all untested at this point) This library would be used in the Vespolina project for handling media related to commerce. Media in the Vespolia project can be more than images, it can also be documents and spreadsheets.

    Because there are additional needs with the Vespolina project, the media library would need more features. It would become more like a framework agnostic SonataMediaBundle, as far as the scope of the features. I did notice that the CMF Media seems to be intended to be simple, which may clash with the needs of Vespolina.

    I can see a few different options. - we can leave things as they are and not share media code between the two projects - we can have a full featured media library shared between the projects - we can have a simple media library for CMF that is used as a base library for Vespolina media library

    There may be other options I'm missing and I'm open to hearing them.

  • 178 Attempted to load class "ElFinderVolumeDriver" from namespace "FM\ElFinderPHP\Driver" not assigned

    #178 Attempted to load class "ElFinderVolumeDriver" from namespace "FM\ElFinderPHP\Driver"

    Created by kimwue at 19.04.2018 - 06:04, last updated at 24.04.2018 - 12:04

    Getting this error:

    ClassNotFoundException in PhpcrDriver.php line 35:
    Attempted to load class "ElFinderVolumeDriver" from namespace "FM\ElFinderPHP\Driver".
    Did you forget a "use" statement for another namespace?
    

    when upgrading helios-ag/fm-elfinder-bundle from version 1 to 8.

    Any ideas?

  • 172 Automaticially add parent document for collection fresh collection items not assigned

    #172 Automaticially add parent document for collection fresh collection items

    Created by ElectricMaxxx at 08.07.2017 - 08:07, last updated at 08.07.2017 - 08:07

    I do not like Exceptions like that:

    IdException: Property "parentDocument" mapped as ParentDocument may not be empty in document of class "..\Document\Category"
    

    So i would like to add a listener to automaticiall add them.

    Just for the one, where we know the docuement - parent path relation or can map them in a simple configuration.

  • 170 Fix SonataMedia integration not assigned

    #170 Fix SonataMedia integration

    Created by ElectricMaxxx at 04.07.2017 - 07:07, last updated at 04.07.2017 - 07:07
    • Find or help to find a matching SonataMedia integration (there have been some BC-Breaks and broken releases with other then ORM)
    • Improvements on SonataCategory system as it is used in SonataMedia
  • 169 ChildrenCollection of medea files fails not assigned

    #169 ChildrenCollection of medea files fails

    Created by ElectricMaxxx at 04.07.2017 - 07:07, last updated at 04.07.2017 - 07:07

    Adding a collection of media files (images or files) to a node/document is quite easy. The persistence works, but trying to visualize them in a collection form type with the ImageType or FileType as entity fails, as the collection is created with the nodes names as keys. Those keys, which are file names in case of medea files, fail on form name validation. with an exception like:

     Symfony\Component\Form\Exception\InvalidArgumentException: The name "IMG_4721.JPG" contains illegal characters. Names should start with a letter, digit or underscore and only contain letters, digits, numbers, underscores ("_"), hyphens ("-") and colons (":").
        at n/a
            in /var/www/prberghoff/New/vendor/symfony/symfony/src/Symfony/Component/Form/FormConfigBuilder.php line 865
    
        at Symfony\Component\Form\FormConfigBuilder::validateName('IMG_4721.JPG')
            in /var/www/prberghoff/New/vendor/symfony/symfony/src/Symfony/Component/Form/FormConfigBuilder.php line 193
    

    But it would be nice to edit and persist files in a arbitrary collection without enclosing them into a document with nice names.

  • 168 Unknown "cmf_media_display_url" function. not assigned

    #168 Unknown "cmf_media_display_url" function.

    Created by cesarluna at 27.04.2017 - 05:04, last updated at 04.07.2017 - 07:07

    Instale symfony-cmf/media-bundle anadi el routing, la configuracion dentro del config.yml, pero al utilizar en mi Formulario (ExampleFormType)

    $builder
                ->add('reference', 'cmf_media_image', array('required' => false))
    

    Obtengo el siguiente mensaje: Unknown "cmf_media_display_url" function.

    estoy utilizando symfony 3.2

  • 164 Integration with Entities: Project Example not assigned

    #164 Integration with Entities: Project Example

    Created by alisonlopez at 11.01.2017 - 12:01, last updated at 11.01.2017 - 12:01

    Hi again!

    So, finally I could manage to get it installed and configured...Now I need help to get it work in my project. As you can see, I'm very new to Symfony2

    I have Sonata Admin in my project and I got the Entity "Curriculum"...which will have the field "archives" that would be a one-to-many relationship.

    "Archive" would be used in others entities outside "Curriculum" (that's why I need a file management bundle in first place...) and the files would be saved according to which entity is called.

    For example: I got this modules: 1. Curriculum 2. Documents

    Archives for Curriculum should be stored in /company/cv/ Archives for Documents should be stored in /company/documents/

    Anyone's willing to enlighten me a bit? I think it would be a good idea to insert a step-by-step guide for newbies in the docs...

  • 162 Hierarchy vs. Hierarchy not assigned

    #162 Hierarchy vs. Hierarchy

    Created by ElectricMaxxx at 05.01.2017 - 09:01, last updated at 06.01.2017 - 11:01

    Implementing PHPCR-ODM 2.0 could mean to use its HiearachyInterface, which is pretty nice from the document perspective, but not understandable from the file system perspective. I would wish to make the seperation clear.

  • 160 the future of this bundle not assigned

    #160 the future of this bundle

    Created by ElectricMaxxx at 05.01.2017 - 08:01, last updated at 05.01.2017 - 10:01

    For the current CMF release this bundle was abendoned. But i and @binhle410 still see a future of this bundle. Future is seen and wanted by all of the @symfony-cmf/contributors but we are not enough. But with some help of @binhle410 we can get this bundle on the road again.

    Future lives in visions

    And my visions for this bundles are:

    Easy usage

    To get that i would like add (more) example documents instead of interfaces only. Someone using different behavior can simply extend and replace a specific method instead of implementing a complete class. This would also mean to update the documentation and add uscases. One of the other example would be a file/image/media which is simple a reference to the file/image/media by path and name to not persist the content itself. With usecases in the docs i also mean, how to attach a file/image/media to a document. Cause here the phpcr tree will be used first. So i would suggest to introduce some kind of AttachedFile/Image/MediaInterface (maybe in read and write mode) to mark a docuemnt as one with attached files/images/media.

    Own Admin Support

    Instead of the hard dependency on sonata-media i would suggest to add own simple admins to sonata-phpcr-admin-integration-bundle. The current form type can help with some extra love. For sure we still need sonata, but only for gallery then, who would need a gallery, when there would be an extra preview onHover in treebrowser?

    CKeditor support

    Not sure if the current controller does it but it would be nice if he would enable upload for ckEditor.

    Hierarchy vs. Hierarchy

    On my own fork i replaced the bundle own HierachyInterface by the one of phpcr-odm, but it feels wrong as the first means a file system hierarchy and the second means a hierarchy in a tree of documents.

    Hook into image template helper

    Like we do with content, which is able to be passed into symfony router, i would like to pass an image/file object into the twig image helper, pass some options and get the images rendered.

    Symfony 3.0, FileStructure

    .... Just the stuff we also did in the other bundles.

  • 150 FileController can't handle file name with Chinese character not assigned

    #150 FileController can't handle file name with Chinese character

    Created by videni at 05.03.2016 - 07:03, last updated at 04.07.2017 - 07:07

    When I upload a file which has Chinese character name, I can successfully upload the file , but it returns a wrong url address to display.

  • 130 [2.0] Update FileController for SecurityContext split not assigned

    #130 [2.0] Update FileController for SecurityContext split

    Created by wouterj at 20.06.2015 - 05:06, last updated at 05.01.2017 - 09:01

    In version 2.0, which should aim to support Symfony 2.8 and 3.x, the FileController has to be updated to take the SecurityContext into account.

  • 127 Doctrine\ODM\PHPCR\Id\IdException thrown during upload not assigned

    #127 Doctrine\ODM\PHPCR\Id\IdException thrown during upload

    Created by cbastienbaron at 09.04.2015 - 07:04, last updated at 05.08.2017 - 01:08

    Hi guys,

    After a fresh install to CmfMediaBundle, i'm trying to upload a media with a dirty name 'Capture du 2015-01-07 18:46:59.png' and i get in return a beautiful 500 :)

    class: "Doctrine\ODM\PHPCR\Id\IdException"
    message: "NodeName property "nodename" of document "Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\Image" contains the illegal PHPCR value "Capture du 2015-03-25 18:01:53.png"."
    

    AFAIK, there is no a "slugable" behaviour for this pbl ? i'm afraid, finals users, doesn't care about file's name :s Or maybe i'm missing a part of config for this ?

    Thks in advance for reponse ;)

  • 115 Handling image upload when one already exists not assigned

    #115 Handling image upload when one already exists

    Created by seydu at 23.09.2014 - 04:09, last updated at 05.01.2017 - 09:01

    When I submit a form without uploading an image I lose the image I had previously uploaded. I don't see anything in the doc to handle this situation.

    Is something planed to handle this ? I used to handle this with Javascript and some tweak server side: The server sets some information in the response to let the JS know if an image already exists. If yes it hides the upload field, removes the "required" if any and adds a button to show the upload when clicked.

  • 99 How to link a document to a .pdf file + filter on extension not assigned

    #99 How to link a document to a .pdf file + filter on extension

    Created by nicolas-bastien at 14.04.2014 - 03:04, last updated at 04.07.2017 - 07:07

    Hi,

    I spent time reading the doc and looking at the sandbox and right now I found how to link my document to an image with a 'cmf_media_image' form type but nothing for simple file.

    When I try to use a file form type i have this error : * The form's view data is expected to be an instance of class Symfony\Component\HttpFoundation\File\File, but is an instance of class PHPCRProxies__CG__\Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\File. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of class PHPCRProxies__CG__\Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\File to an instance of Symfony\Component\HttpFoundation\File\File. *

    I need this to have a downloadable pdf file and a video.

    I don't understand why there is no 'cmf_media_file' form type ?

    And is there a way to limit to a list of file extension ?

    Thanks a lot

    Nico

  • 97 improve validation to provide file upload error messages not assigned

    #97 improve validation to provide file upload error messages

    Created by dbu at 04.04.2014 - 05:04, last updated at 01.02.2016 - 02:02

    in #82 the checks during transformation are improved, but we should see if we can validate UploadFile earlier to provide decent messages to the user.

  • 91 Improve error handling not assigned

    #91 Improve error handling

    Created by rmsint at 25.02.2014 - 09:02, last updated at 04.07.2017 - 07:07

    Examples: - the upload service uses a media root path. If it does not exist the upload of an image will fail because the parent can not be found. - the cmf_create.persistence.phpcr.image.basepath and cmf_media.persistence.phpcr.media_basepath can mismatch, we should check that these are indepent and have no relation. However media-bundle services that get different root paths injected can also cause an issue. See https://github.com/symfony-cmf/symfony-cmf/issues/186

    When and where to throw an error to notify the developer of this?

    Maybe validate the configuration, so the developer directly knows if the configuration is not correct. Or do some extra checks in the constructor of some services?

  • 80 SonataMediaBundle integration rmsint

    #80 SonataMediaBundle integration

    Created by dbu at 04.11.2013 - 09:11, last updated at 01.04.2014 - 11:04
    Assigned to rmsint
  • 78 improve integration with LiipImagineBundle not assigned

    #78 improve integration with LiipImagineBundle

    Created by lsmith77 at 22.10.2013 - 03:10, last updated at 01.04.2014 - 11:04

    it would be good to have a way to ensure that the file format is included in the paths generated via LiipImagineBundle.

    f.e.

    {{ /cms/media/foo | imagine_filter('small_filter') }}
    

    might then result in

    /media/cache/small_filter/cms/media/foo
    

    however this can cause issues with some web servers and reverse proxies, as they would then set the content type to text/plain.

    so we need some solution which would allow forcing the format for the mimetype into the resulting URL.

    see also #77 for how to convert the mimetype to an extension

  • 77 integrate MimeTypeExtensionGuesser not assigned

    #77 integrate MimeTypeExtensionGuesser

    Created by lsmith77 at 22.10.2013 - 03:10, last updated at 16.04.2014 - 01:04

    might make sense to provide a service for the core MimeTypeExtensionGuesser and maybe even inject it by default into the MediaRepository and ImageRepository

  • 61 Sonata Admin? not assigned

    #61 Sonata Admin?

    Created by dbu at 17.09.2013 - 06:09, last updated at 01.04.2014 - 11:04

    should we add simple sonata admin classes for these documents? or do we point people to SonataMediaBundle?

    i just notice that in the sonata admin tree, it would be nice to be able to click on the image and edit it. not sure if sonata media would always be the right thing or might provide too much to be always a good tool for this?

  • 59 Imagine with Doctrine\Phpcr\Image documents not assigned

    #59 Imagine with Doctrine\Phpcr\Image documents

    Created by dbu at 16.09.2013 - 06:09, last updated at 04.07.2017 - 07:07

    when i try to use imagine with an Image document, i get

    Parameter "path" for route "_imagine_my_filter" must match ".+" ("" given) 
    to generate a corresponding URL
    

    it works if i add a __toString method to the image that returns $this->id. it seems like LiipImagineBundle is not expecting to be passed an object but only a path to an object. can we make that work? things go wrong inside CacheManager / WebPathResolver. could we use a different path resolver?

    workaround: if i pass in the id instead of the Image document, things work so at least there is a workaround.

  • 54 add unit tests not assigned

    #54 add unit tests

    Created by lsmith77 at 04.09.2013 - 09:09, last updated at 05.01.2017 - 09:01

    follow up for https://github.com/symfony-cmf/MediaBundle/pull/47

  • 51 check possiblity to return a placeholder for the url not assigned

    #51 check possiblity to return a placeholder for the url

    Created by lsmith77 at 04.09.2013 - 08:09, last updated at 08.11.2013 - 01:11

    use a filter or something when rendering content use a dataFilter rule for ckeditor

    followup for https://github.com/symfony-cmf/MediaBundle/pull/46

  • 37 Improve Image serialization not assigned

    #37 Improve Image serialization

    Created by rmsint at 16.08.2013 - 12:08, last updated at 16.08.2013 - 10:08

    See https://github.com/symfony-cmf/MediaBundle/pull/27#discussion_r5788735

  • 34 investigate image/ file upload response not assigned

    #34 investigate image/ file upload response

    Created by dbu at 15.08.2013 - 04:08, last updated at 19.08.2013 - 09:08

    We abstracted the image / file upload for Create and other web editors in UploadFileHelper::getUploadResponse.

    The logic is currently ported from the CreateBundle and improved at some points. We should investigate the response more, questions raised are: - I don't know much about how CkEditor works, so this may not be applicable, but shouldn't we be returning a "application/json" response and using a callback in the frontend to call functions rather than returning HTML? (dantleech) - We now return javascript directly for the ckeditor but could investigate when we implement the ckeditor for the CreateBundle - possibly also in combination with elfinder. - follow up of https://github.com/symfony-cmf/MediaBundle/pull/27#discussion_r5788934 - I wonder if it is a good idea to refer to an "editor" here. (in UploadFileHelper::getUploadResponse) Could we not use this upload thingy from a web form, or something else? (dantleech) - Can we think of a use case for this? (rmsint) - Current logic is here because we expected the automatic upload process mostly for web editors. - follow up of https://github.com/symfony-cmf/MediaBundle/pull/40#discussion_r5831139

  • 15 Gaufrette adapter - rename method not assigned

    #15 Gaufrette adapter - rename method

    Created by rmsint at 04.07.2013 - 10:07, last updated at 04.07.2017 - 07:07

    Currently not implemented, see https://github.com/symfony-cmf/MediaBundle/blob/master/Adapter/Gaufrette/CmfMediaDoctrine.php#L230

    Should we rather throw an Exception? Or introduce a capabiltiies API.

    public function __construct() { $this->addCapability(self::CAN_RENAME); $this->addCapability(self::CAN_REMOVE); $this->addCapability(self::CAN_WRITE); // whatever }

  • 9 allow deletion in image form type not assigned

    #9 allow deletion in image form type

    Created by dbu at 21.06.2013 - 10:06, last updated at 04.07.2017 - 07:07

    follow up of https://github.com/doctrine/DoctrinePHPCRBundle/issues/37 - @rmsint proposed to use a form listener and handling code to handle deleting an image again.

    right now the only way to delete an image is by deleting the document containing the image. this follows the idea of http://symfony.com/doc/current/cookbook/doctrine/file_uploads.html - if the image is null (meaning we did not upload a new one) that information is simply ignored.

    the proposition is to have a listener to show a checkbox removeImage that is mapped to the document and calls setRemoveImage if checked, having a way to know that the user explicitly wanted to delete the image. rmsint wrote a gist for that: https://gist.github.com/rmsint/ad4d8804e3ae6fae2160

    (ported over from https://github.com/doctrine/DoctrinePHPCRBundle/issues/40 and not a show stopper for 1.0)

  • 8 image require on new document but not when existing not assigned

    #8 image require on new document but not when existing

    Created by dbu at 21.06.2013 - 10:06, last updated at 04.07.2017 - 07:07

    when a file upload field is required, it means the user must re-upload an image each time he submits the form. to edit a document that has an image field, which is inconvenient. the intended behaviour is that if the parent entity is new, the image is required, but otherwise it is optional. i tried to make the phpcr_odm_image form type handle that but only found a horrible hack https://gist.github.com/dbu/5142035

    see also discussion in https://groups.google.com/forum/?fromgroups#!topic/symfony2/CrooBoaAlO4

    (this is an issue in the code ported over from DoctrinePHPCRBundle https://github.com/doctrine/DoctrinePHPCRBundle/issues/43 - i think its no blocker for 1.0)

menu-bundle

Travis Build Status Latest Stable Version Total Downloads
  • 257 [RFC] PhpcrProvider refactoring dantleech

    #257 [RFC] PhpcrProvider refactoring

    Created by dantleech at 22.05.2016 - 07:05, last updated at 16.05.2018 - 05:05
    Assigned to dantleech

    Fixes #255 Based on #256

    WIP.

    This PR refactors the PhpcrMenuProvider to throw errors more often.

    The current problem is that has was hiding all of the Exceptions which were happening in the find method and interpreting then as "menu not found".

    I think the only time it should return false is when the menu document was not found. If the menu was found and it subsequently encountered another problem, then we should throw an exception.

    F.e. if the menu document does not implement ItemInterface, then what is it doing at the menu basepath ? The most likely scenario is that the developer forgot to add the ItemInterface to the document.

    It does alot of reorganizing, making the code easier to understand (I hope!).

  • 254 [DX] Allow exceptions to be thrown during `PhpcrProvider::has` not assigned

    #254 [DX] Allow exceptions to be thrown during `PhpcrProvider::has`

    Created by dantleech at 22.05.2016 - 01:05, last updated at 23.05.2016 - 11:05

    If the provider cannot find the menu document then the error is thrown back to KnpMenu ChainProvider and the next provider is tried.

    When all providers fail you get a rather upaque message:

    The menu "pages" is not defined.
    

    PhpcrMenuProvider::has needs to return false if the document does not exist, but currently it will return false if f.e. the document does exist but does not implement the NodeInterface.

    It could be taken for granted that if the user has defined the menu base path to be /cms/menu then if a document exists at /cmf/menu/foo then they intended that foo was the menu root.

  • 208 Chance to get access to node Position not assigned

    #208 Chance to get access to node Position

    Created by ElectricMaxxx at 09.09.2014 - 09:09, last updated at 30.04.2017 - 07:04

    I know that this issue can or should affect phpcr-odm, but menu items would need that. Almost all documents can live onsorted in the tree, but would like to have access (from admin) to the position (sort_order). Is there any chance to make that? Or should i extend the MenuNode and add own Attribute for that and handle it in an menu provider?

  • 106 [MenuExtension] Embedded multilang menus not assigned

    #106 [MenuExtension] Embedded multilang menus

    Created by dantleech at 29.07.2013 - 10:07, last updated at 08.05.2014 - 05:05

    Originally reported by @wjzijderveld in ContentBundle

    The embedded route and menu forms for the content admin are great!

    But for multilang menu nodes, it doesn't work to well. It only shows one node, even though I have already a menunode in 3 locales (with fixtures in this case).

    I'll try to look into it myself if I find the time, but wanted to have a reference over here.

    This is now a problem for MenuBundle as the admin logic has moved into the Extension.

    Global issue: https://github.com/symfony-cmf/CoreBundle/issues/81

  • 57 ability to render sub-menus not assigned

    #57 ability to render sub-menus

    Created by dbu at 14.05.2013 - 09:05, last updated at 04.11.2014 - 06:11

    it would be nice to have a way to just render the current submenu if there is one of that navigation depth. we can render from a menu item but not a a menu node. and we don't have a decent way to know how deep in the menu tree we currently are

    this is the hack i came up with to get it going. but this is pretty ridiculous.

    {% if cmfMainContent is defined and cmfMainContent.menus|length > 0 %}
        {% for menu in cmfMainContent.menus %}
            {% if menu.id|split('/')|length == 6 %}
                {% set main = menu.parent.name %}
                {% set sub = menu.name %}
                <div class="related_items">
                    {{ knp_menu_render(['main', main, sub], { 'depth': 1 } ) }}
                </div>
            {% endif %}
            {% if menu.id|split('/')|length == 7 %}
                {% set main = menu.parent.parent.name %}
                {% set sub = menu.parent.name %}
                <div class="related_items">
                    {{ knp_menu_render(['main', main, sub], { 'depth': 1, 'currentClass': 'selected' } ) }}
                </div>
            {% endif %}
        {% endfor %}
    {% endif %}
    
  • 46 [sonata] Cannot associate menu node with route document not assigned

    #46 [sonata] Cannot associate menu node with route document

    Created by dantleech at 18.04.2013 - 08:04, last updated at 02.01.2015 - 02:01

    Currently you can only specify a URL, Route Name, or Content Document (or rather all three at the same time if you like - would be neat to have a radio selector there, but thats another issue) and you cannot select a document from the route subtree.

  • 19 prevent KnpMenu from loading the entire menu/route/content tree wouterj

    #19 prevent KnpMenu from loading the entire menu/route/content tree

    Created by lsmith77 at 13.10.2012 - 01:10, last updated at 21.10.2017 - 06:10
    Assigned to wouterj

    see https://groups.google.com/forum/?fromgroups=#!topic/symfony-cmf-devs/ikJ9jpomzaQ and https://groups.google.com/forum/?fromgroups=#!topic/symfony-cmf-devs/otAht7VS04Y

    i have classified this as a bug as it makes it impossible to use our menu bundle in larger setups.

    i was able to reproduce this issue. it doesnt really cause a lot of problems with a few nodes, but obviously if you start having a large tree, then its a big issue.

    we need to investigate this .. i am not yet sure if it just loads content/routes that are referenced in the menu or if it just flat out loads everything. i would doubt that.

    potentially its impossible to prevent loading all the menu items with KnpMenu 1.x, but can hopefully ensure that at least route/content nodes are lazy loaded. i dont know the menu system that well yet.

    @uwej711 you havent run into this issue yet?

    @petesiss's app is suffering severely because of this, even with node caching enabled

    @dbu i could come by fribourg the second half of next week if necessary.

  • 3 use breadcrumb once implemented in knp menu not assigned

    #3 use breadcrumb once implemented in knp menu

    Created by dbu at 22.05.2012 - 05:05, last updated at 21.10.2017 - 06:10

    once breadcrumb is merged in knp menu, we should look at how we do breadcrumbs and document it for users. see https://github.com/KnpLabs/KnpMenu/pull/45

  • 257 [RFC] PhpcrProvider refactoring dantleech

    #257 [RFC] PhpcrProvider refactoring

    Created by dantleech at 22.05.2016 - 07:05, last updated at 16.05.2018 - 05:05
    Assigned to dantleech

    Fixes #255 Based on #256

    WIP.

    This PR refactors the PhpcrMenuProvider to throw errors more often.

    The current problem is that has was hiding all of the Exceptions which were happening in the find method and interpreting then as "menu not found".

    I think the only time it should return false is when the menu document was not found. If the menu was found and it subsequently encountered another problem, then we should throw an exception.

    F.e. if the menu document does not implement ItemInterface, then what is it doing at the menu basepath ? The most likely scenario is that the developer forgot to add the ItemInterface to the document.

    It does alot of reorganizing, making the code easier to understand (I hope!).

  • 254 [DX] Allow exceptions to be thrown during `PhpcrProvider::has` not assigned

    #254 [DX] Allow exceptions to be thrown during `PhpcrProvider::has`

    Created by dantleech at 22.05.2016 - 01:05, last updated at 23.05.2016 - 11:05

    If the provider cannot find the menu document then the error is thrown back to KnpMenu ChainProvider and the next provider is tried.

    When all providers fail you get a rather upaque message:

    The menu "pages" is not defined.
    

    PhpcrMenuProvider::has needs to return false if the document does not exist, but currently it will return false if f.e. the document does exist but does not implement the NodeInterface.

    It could be taken for granted that if the user has defined the menu base path to be /cms/menu then if a document exists at /cmf/menu/foo then they intended that foo was the menu root.

  • 208 Chance to get access to node Position not assigned

    #208 Chance to get access to node Position

    Created by ElectricMaxxx at 09.09.2014 - 09:09, last updated at 30.04.2017 - 07:04

    I know that this issue can or should affect phpcr-odm, but menu items would need that. Almost all documents can live onsorted in the tree, but would like to have access (from admin) to the position (sort_order). Is there any chance to make that? Or should i extend the MenuNode and add own Attribute for that and handle it in an menu provider?

  • 106 [MenuExtension] Embedded multilang menus not assigned

    #106 [MenuExtension] Embedded multilang menus

    Created by dantleech at 29.07.2013 - 10:07, last updated at 08.05.2014 - 05:05

    Originally reported by @wjzijderveld in ContentBundle

    The embedded route and menu forms for the content admin are great!

    But for multilang menu nodes, it doesn't work to well. It only shows one node, even though I have already a menunode in 3 locales (with fixtures in this case).

    I'll try to look into it myself if I find the time, but wanted to have a reference over here.

    This is now a problem for MenuBundle as the admin logic has moved into the Extension.

    Global issue: https://github.com/symfony-cmf/CoreBundle/issues/81

  • 57 ability to render sub-menus not assigned

    #57 ability to render sub-menus

    Created by dbu at 14.05.2013 - 09:05, last updated at 04.11.2014 - 06:11

    it would be nice to have a way to just render the current submenu if there is one of that navigation depth. we can render from a menu item but not a a menu node. and we don't have a decent way to know how deep in the menu tree we currently are

    this is the hack i came up with to get it going. but this is pretty ridiculous.

    {% if cmfMainContent is defined and cmfMainContent.menus|length > 0 %}
        {% for menu in cmfMainContent.menus %}
            {% if menu.id|split('/')|length == 6 %}
                {% set main = menu.parent.name %}
                {% set sub = menu.name %}
                <div class="related_items">
                    {{ knp_menu_render(['main', main, sub], { 'depth': 1 } ) }}
                </div>
            {% endif %}
            {% if menu.id|split('/')|length == 7 %}
                {% set main = menu.parent.parent.name %}
                {% set sub = menu.parent.name %}
                <div class="related_items">
                    {{ knp_menu_render(['main', main, sub], { 'depth': 1, 'currentClass': 'selected' } ) }}
                </div>
            {% endif %}
        {% endfor %}
    {% endif %}
    
  • 46 [sonata] Cannot associate menu node with route document not assigned

    #46 [sonata] Cannot associate menu node with route document

    Created by dantleech at 18.04.2013 - 08:04, last updated at 02.01.2015 - 02:01

    Currently you can only specify a URL, Route Name, or Content Document (or rather all three at the same time if you like - would be neat to have a radio selector there, but thats another issue) and you cannot select a document from the route subtree.

  • 19 prevent KnpMenu from loading the entire menu/route/content tree wouterj

    #19 prevent KnpMenu from loading the entire menu/route/content tree

    Created by lsmith77 at 13.10.2012 - 01:10, last updated at 21.10.2017 - 06:10
    Assigned to wouterj

    see https://groups.google.com/forum/?fromgroups=#!topic/symfony-cmf-devs/ikJ9jpomzaQ and https://groups.google.com/forum/?fromgroups=#!topic/symfony-cmf-devs/otAht7VS04Y

    i have classified this as a bug as it makes it impossible to use our menu bundle in larger setups.

    i was able to reproduce this issue. it doesnt really cause a lot of problems with a few nodes, but obviously if you start having a large tree, then its a big issue.

    we need to investigate this .. i am not yet sure if it just loads content/routes that are referenced in the menu or if it just flat out loads everything. i would doubt that.

    potentially its impossible to prevent loading all the menu items with KnpMenu 1.x, but can hopefully ensure that at least route/content nodes are lazy loaded. i dont know the menu system that well yet.

    @uwej711 you havent run into this issue yet?

    @petesiss's app is suffering severely because of this, even with node caching enabled

    @dbu i could come by fribourg the second half of next week if necessary.

  • 3 use breadcrumb once implemented in knp menu not assigned

    #3 use breadcrumb once implemented in knp menu

    Created by dbu at 22.05.2012 - 05:05, last updated at 21.10.2017 - 06:10

    once breadcrumb is merged in knp menu, we should look at how we do breadcrumbs and document it for users. see https://github.com/KnpLabs/KnpMenu/pull/45

sonata-phpcr-admin-integration-bundle

Travis Build Status Latest Stable Version Total Downloads
  • 134 Make Admin extensions available without enabling each admin not assigned

    #134 Make Admin extensions available without enabling each admin

    Created by ElectricMaxxx at 03.02.2018 - 09:02, last updated at 05.02.2018 - 10:02

    I would like to challange the current "enabling strategy". Currently we enable each admin domain (core, content, ...) by configuration. Doing so its admin services are enabled/visible and its extensions. As the admins are for example purpose only, but the extensions are really helpful for custom admins, i would like to suggest to enable all extensions by default.

  • 131 Evaluate links for descriptor is broken not assigned

    #131 Evaluate links for descriptor is broken

    Created by ElectricMaxxx at 25.01.2018 - 06:01, last updated at 25.01.2018 - 06:01

    this: https://github.com/symfony-cmf/sonata-phpcr-admin-integration-bundle/blob/master/src/Description/SonataEnhancer.php#L81 can not work. No idea why i fixed it that way, maybe cause the test doesn't match real admin names. Something like:

    $linkKey = substr($code, strlen($admin->getCode()) + 1);
    

    looks more valid. So we should fix it and write more meaningfull tests for that case.

  • 130 Remove deprecations on SF 3.4 builds not assigned

    #130 Remove deprecations on SF 3.4 builds

    Created by ElectricMaxxx at 23.01.2018 - 11:01, last updated at 29.01.2018 - 09:01

    There are still some deprecation warnings for removed features in SF4. Those should be removed/fixed before being SF4 compatible.

  • 129 Make SF4 Installation possible not assigned

    #129 Make SF4 Installation possible

    Created by ElectricMaxxx at 23.01.2018 - 11:01, last updated at 24.01.2018 - 10:01

    Currently the build of SF4 with this bundle breaks because of dependencies, which still do not support SF4 (IvoryCkeditor, ...). We should change that and make the test green.

  • 122 role for visibility of advanced features not assigned

    #122 role for visibility of advanced features

    Created by ElectricMaxxx at 27.09.2017 - 10:09, last updated at 28.09.2017 - 08:09

    moved from https://github.com/symfony-cmf/routing-bundle/issues/206

    have a way to specify a minimum role needed for the advanced options like "trailing slash" and similar checkboxes. that way we could have for example ROLE_EDITOR not seeing those to have less information overload, but ROLE_ADMIN see it to do advanced magic.

  • 121 Missing Translations not assigned

    #121 Missing Translations

    Created by ElectricMaxxx at 16.08.2017 - 12:08, last updated at 16.08.2017 - 12:08

    See https://github.com/symfony-cmf/cmf-sandbox/issues/381

  • 107 Using locales with a dash instead of an underscore not assigned

    #107 Using locales with a dash instead of an underscore

    Created by ConneXNL at 15.03.2017 - 01:03, last updated at 31.03.2017 - 02:03

    In my app there I have 3 locales en, nl-nl and nl-be.

    I defined the odm locales as:

    doctrine_phpcr:
        odm:
            locales:
                en: [nl-nl, nl-be]
                nl-nl : [nl-be, en]
                nl-be : [nl-nl, en]
    

    However, this dashes used in this configuration seem to be overwritten by PHPCR to underscore.

    As soon as I go to the Admin Bundle admin/cmf/block/simpleblock/cms/blocks/test/edit?tl=nl-nl

    I will hit an error `There is no language fallback for language 'nl-nl'.

    Is this a problem of the PHPCR-admin-integration that it has to also overwrite dashes with underscores or shouldn't this be happening in the first place?

    Is there any solution to tackle this problem without having locales to be using underscores?

  • 95 link between frontend and backend not assigned

    #95 link between frontend and backend

    Created by wouterj at 12.02.2017 - 12:02, last updated at 12.02.2017 - 01:02

    Migrated from https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/issues/116. Original description:

    • [x] with symfony-cmf/routing-bundle#273 you can have a link from the edit view of a document to its frontend representation.
    • [ ] Provide a link to the frontend in the list view too.
    • [ ] provide a sonata link from the frontend in the create toolbar for the mainContent.
  • 94 publication workflow in the area of the save buttons? not assigned

    #94 publication workflow in the area of the save buttons?

    Created by wouterj at 12.02.2017 - 12:02, last updated at 12.02.2017 - 12:02

    Migrated from https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/issues/315. Original description:

    As the publish decision is about saving the content and not just one of many sections of the content, the controls would ideally be shown next to the save buttons. we could even replace "Save" with a "Publish" and "Save Draft" resp. "Unpublish" button. (without versioning, saving draft of a published content is not possible, only unpublish)

  • 93 Add "Unpublish now" button not assigned

    #93 Add "Unpublish now" button

    Created by wouterj at 12.02.2017 - 12:02, last updated at 12.02.2017 - 12:02

    Copied from https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/issues/314 . Original description:

    have a js button next to the publication end date to set the end date to the current date + time to unpublish a document.

  • 91 Do not include ID/path in the content list view not assigned

    #91 Do not include ID/path in the content list view

    Created by wouterj at 11.02.2017 - 04:02, last updated at 12.02.2017 - 01:02

    Imo, showing the path to a content object (/cms/content/home) isn't usefull for admins at all. It's title (already shown), author and whether it's published ( #32 ) would be very usefull for admins.

  • 84 use datepicker in admins not assigned

    #84 use datepicker in admins

    Created by dbu at 03.02.2017 - 03:02, last updated at 11.02.2017 - 04:02

    the publish workflow admin extension allows to set publish start and end date. http://sandbox.cmf.symfony.com/en/admin/app/demoseocontent/cms/content/home/edit?tl=en

    currently this is shown as 3 separate dropdowns, which is not elegant. afaik sonata provides a type with some nice js datepicker. we should use that instead.

  • 74 Improve admin UX by removing options they don't care about not assigned

    #74 Improve admin UX by removing options they don't care about

    Created by dbu at 20.01.2017 - 03:01, last updated at 11.02.2017 - 04:02

    moved from https://github.com/symfony-cmf/routing-bundle/issues/285

    While doing the tab/group improvements, my eye's catched some options which I don't believe are usefull for the admin (at least not in the current way). I even believe most of them never will be usefull. First of all, words I don't think the admin understands: Controller, arguments, route.

    If you then look closer at the options, the Variable pattern doesn't make any sense for the admin. What will change if the admin would put something in that text field? What's then passed to the "controller" (whatever that might be) if the controller defined those "arguments"? What can the admin change with this? I think nothing.

    The three checkboxes are about things I believe the admin understands (except that we should change "route" to "path" or "url" imo). But then, if an admin checks format pattern, what is going to be changed? Does it mean the URL has to end with .html? If we want that, it should probably be a global option (it isn't very nice to edit every route in a website to enable/disable this). The trailing slash is something that should be handled by the router itself imo. It's something the program has to care about, not the admin.

    The Compiler class setting is the most cryptic of them all. Even I don't really know what it does. And if I know it, it would still not be usefull as it's just a plain text field. How do I know which compiler classes are available? I think this is an option that should only be provided to the developer.

    At last, there are Controller and Template defaults. The first one belongs to the same group as the Compiler class imo. The Template class can be very usefull, it would allow the admin to change the theme for a page. However, we don't have anything about theming in our admin (we should maybe create a CmfThemingBundle). In the current way, there is no way to know what you can input in this field and what the page is going to look like in that case.

    These are my thoughts about the routing admin, I would love to discuss this and see which options we can remove and what we can improve (e.g. adding a global settings page, a CmfThemingBundle, etc.)

  • 56 Add missing translations not assigned

    #56 Add missing translations

    Created by wouterj at 24.12.2016 - 05:12, last updated at 01.02.2017 - 05:02

    Now we centralized all translations of the CMF in this bundle, we have a clear view of what's missing. These are marked with TODO: comments in the Xliff file. We're missing some messages in the following languages:

    • [ ] Czech
    • [x] French (#68)
    • [x] German (#60)
    • [x] Italian (#57)
    • [ ] Polish
    • [ ] Slovak
    • [x] Slovene (#58)
    • [x] Spanish (#63)
      • [x] Portuguese (Brazilian) (#80)

    /cc @pulzarraider, @eiannone, @peterkokot, @cordoval, @emgiezet You guys did an amazing job translating the CMF into the languages! Do you maybe have some time left to translate the missing messages?

  • 49 [1.0.x] Allow filtering by publish workflow not assigned

    #49 [1.0.x] Allow filtering by publish workflow

    Created by wouterj at 18.12.2016 - 03:12, last updated at 11.02.2017 - 04:02

    E.g. filter all (non-)published articles

  • 47 [1.1] Improve Block admin not assigned

    #47 [1.1] Improve Block admin

    Created by wouterj at 18.12.2016 - 12:12, last updated at 06.05.2017 - 06:05

    Instead of showing one admin per block type, the admin should have just one block admin. This would start with a type field, which dynamically changes the form fields and created document based on the selected type.

    We should also refactor the container admin block to have a nice drag 'n drop view. E.g. like this: Drag 'n drop block admin (source: https://buytaert.net/examples-of-how-to-make-drupal-outside-in)

  • 46 [1.1] Improve Menu Admin not assigned

    #46 [1.1] Improve Menu Admin

    Created by wouterj at 18.12.2016 - 12:12, last updated at 11.02.2017 - 04:02

    The menu admin can be improved quite a lot:

    • [ ] Remove the menu node admin from the sidebar list. It doesn't make sense to list all menu items
    • [ ] Improve view of menu items when editing a menu. Make it reorderable, etc.
    • [ ] Add ability to create/edit menu items in the menu admin (embedded the menu node admin)
  • 45 ContainerBlockAdmin is missing block specific fields not assigned

    #45 ContainerBlockAdmin is missing block specific fields

    Created by wouterj at 18.12.2016 - 12:12, last updated at 23.12.2016 - 12:12

    This admin should be able to set child blocks (and create new child blocks). At the moment, only the parent and node name are configurable in the admin panel.

  • 41 Generic Compiler Pass to replace admin class or document class not assigned

    #41 Generic Compiler Pass to replace admin class or document class

    Created by ElectricMaxxx at 16.12.2016 - 12:12, last updated at 10.01.2017 - 07:01

    I currently had an idea how to replace the editable admin/document class configuration in a nice way. On my sandbox PR (https://github.com/symfony-cmf/cmf-sandbox/pull/332) i created a very specific compiler pass to replace the document class for the StaticContentAdmin, what about a configuration here like:

    admin_classes:
        cmf_sonata_admin_integration.content.admin: My\Special\Admin\Class
        ....
    document_classes:
       cmf_sonata_admin_integration.content.admin: AppBundle\Document\DemoSeoContent
       ....
    

    We could then create a more generic compiler pass to replace the class or the 2. argument of a service (key) with the given value.

  • 32 publication extensions: have a special column for aggregated publication info not assigned

    #32 publication extensions: have a special column for aggregated publication info

    Created by dbu at 12.12.2016 - 12:12, last updated at 23.12.2016 - 12:12

    Group all info of the 3 publication admin extensions in one column: Published, XYZ until XZY | Published, XYZ | Published, until XZY. Use a color code to reflect the current state.

    This should be an optional feature, some might prefer to have separate columns for ordering and filtering.

    That would probably work like this: https://github.com/symfony-cmf/CoreBundle/blob/master/Admin/Extension/TranslatableExtension.php#L50

    Suggestion from https://blog.liip.ch/archive/2014/12/11/improving-the-user-experience-of-the-symfony-cmf-backend.html : We could use an icon for the column heading of publishable to save some space.

  • 5 admin breadcrumbs not assigned

    #5 admin breadcrumbs

    Created by dbu at 26.06.2016 - 01:06, last updated at 26.06.2016 - 01:06

    for the menu admins, we have a breadcrumb functionality that shows the tree of the breadcrumbs in the navigation. this would make sense for other types of documents too. as phpcr is always a tree, we could always show parents. maybe as an admin extension or trait?

    an open question is where to stop, if we should allow configuring a list of classes/interfaces that we want in the breadcrumb and stop when we encounter something else. and/or a maximum number of parents to show.

  • 134 Make Admin extensions available without enabling each admin not assigned

    #134 Make Admin extensions available without enabling each admin

    Created by ElectricMaxxx at 03.02.2018 - 09:02, last updated at 05.02.2018 - 10:02

    I would like to challange the current "enabling strategy". Currently we enable each admin domain (core, content, ...) by configuration. Doing so its admin services are enabled/visible and its extensions. As the admins are for example purpose only, but the extensions are really helpful for custom admins, i would like to suggest to enable all extensions by default.

  • 131 Evaluate links for descriptor is broken not assigned

    #131 Evaluate links for descriptor is broken

    Created by ElectricMaxxx at 25.01.2018 - 06:01, last updated at 25.01.2018 - 06:01

    this: https://github.com/symfony-cmf/sonata-phpcr-admin-integration-bundle/blob/master/src/Description/SonataEnhancer.php#L81 can not work. No idea why i fixed it that way, maybe cause the test doesn't match real admin names. Something like:

    $linkKey = substr($code, strlen($admin->getCode()) + 1);
    

    looks more valid. So we should fix it and write more meaningfull tests for that case.

  • 130 Remove deprecations on SF 3.4 builds not assigned

    #130 Remove deprecations on SF 3.4 builds

    Created by ElectricMaxxx at 23.01.2018 - 11:01, last updated at 29.01.2018 - 09:01

    There are still some deprecation warnings for removed features in SF4. Those should be removed/fixed before being SF4 compatible.

  • 129 Make SF4 Installation possible not assigned

    #129 Make SF4 Installation possible

    Created by ElectricMaxxx at 23.01.2018 - 11:01, last updated at 24.01.2018 - 10:01

    Currently the build of SF4 with this bundle breaks because of dependencies, which still do not support SF4 (IvoryCkeditor, ...). We should change that and make the test green.

  • 122 role for visibility of advanced features not assigned

    #122 role for visibility of advanced features

    Created by ElectricMaxxx at 27.09.2017 - 10:09, last updated at 28.09.2017 - 08:09

    moved from https://github.com/symfony-cmf/routing-bundle/issues/206

    have a way to specify a minimum role needed for the advanced options like "trailing slash" and similar checkboxes. that way we could have for example ROLE_EDITOR not seeing those to have less information overload, but ROLE_ADMIN see it to do advanced magic.

  • 121 Missing Translations not assigned

    #121 Missing Translations

    Created by ElectricMaxxx at 16.08.2017 - 12:08, last updated at 16.08.2017 - 12:08

    See https://github.com/symfony-cmf/cmf-sandbox/issues/381

  • 107 Using locales with a dash instead of an underscore not assigned

    #107 Using locales with a dash instead of an underscore

    Created by ConneXNL at 15.03.2017 - 01:03, last updated at 31.03.2017 - 02:03

    In my app there I have 3 locales en, nl-nl and nl-be.

    I defined the odm locales as:

    doctrine_phpcr:
        odm:
            locales:
                en: [nl-nl, nl-be]
                nl-nl : [nl-be, en]
                nl-be : [nl-nl, en]
    

    However, this dashes used in this configuration seem to be overwritten by PHPCR to underscore.

    As soon as I go to the Admin Bundle admin/cmf/block/simpleblock/cms/blocks/test/edit?tl=nl-nl

    I will hit an error `There is no language fallback for language 'nl-nl'.

    Is this a problem of the PHPCR-admin-integration that it has to also overwrite dashes with underscores or shouldn't this be happening in the first place?

    Is there any solution to tackle this problem without having locales to be using underscores?

  • 95 link between frontend and backend not assigned

    #95 link between frontend and backend

    Created by wouterj at 12.02.2017 - 12:02, last updated at 12.02.2017 - 01:02

    Migrated from https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/issues/116. Original description:

    • [x] with symfony-cmf/routing-bundle#273 you can have a link from the edit view of a document to its frontend representation.
    • [ ] Provide a link to the frontend in the list view too.
    • [ ] provide a sonata link from the frontend in the create toolbar for the mainContent.
  • 94 publication workflow in the area of the save buttons? not assigned

    #94 publication workflow in the area of the save buttons?

    Created by wouterj at 12.02.2017 - 12:02, last updated at 12.02.2017 - 12:02

    Migrated from https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/issues/315. Original description:

    As the publish decision is about saving the content and not just one of many sections of the content, the controls would ideally be shown next to the save buttons. we could even replace "Save" with a "Publish" and "Save Draft" resp. "Unpublish" button. (without versioning, saving draft of a published content is not possible, only unpublish)

  • 93 Add "Unpublish now" button not assigned

    #93 Add "Unpublish now" button

    Created by wouterj at 12.02.2017 - 12:02, last updated at 12.02.2017 - 12:02

    Copied from https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/issues/314 . Original description:

    have a js button next to the publication end date to set the end date to the current date + time to unpublish a document.

  • 91 Do not include ID/path in the content list view not assigned

    #91 Do not include ID/path in the content list view

    Created by wouterj at 11.02.2017 - 04:02, last updated at 12.02.2017 - 01:02

    Imo, showing the path to a content object (/cms/content/home) isn't usefull for admins at all. It's title (already shown), author and whether it's published ( #32 ) would be very usefull for admins.

  • 84 use datepicker in admins not assigned

    #84 use datepicker in admins

    Created by dbu at 03.02.2017 - 03:02, last updated at 11.02.2017 - 04:02

    the publish workflow admin extension allows to set publish start and end date. http://sandbox.cmf.symfony.com/en/admin/app/demoseocontent/cms/content/home/edit?tl=en

    currently this is shown as 3 separate dropdowns, which is not elegant. afaik sonata provides a type with some nice js datepicker. we should use that instead.

  • 74 Improve admin UX by removing options they don't care about not assigned

    #74 Improve admin UX by removing options they don't care about

    Created by dbu at 20.01.2017 - 03:01, last updated at 11.02.2017 - 04:02

    moved from https://github.com/symfony-cmf/routing-bundle/issues/285

    While doing the tab/group improvements, my eye's catched some options which I don't believe are usefull for the admin (at least not in the current way). I even believe most of them never will be usefull. First of all, words I don't think the admin understands: Controller, arguments, route.

    If you then look closer at the options, the Variable pattern doesn't make any sense for the admin. What will change if the admin would put something in that text field? What's then passed to the "controller" (whatever that might be) if the controller defined those "arguments"? What can the admin change with this? I think nothing.

    The three checkboxes are about things I believe the admin understands (except that we should change "route" to "path" or "url" imo). But then, if an admin checks format pattern, what is going to be changed? Does it mean the URL has to end with .html? If we want that, it should probably be a global option (it isn't very nice to edit every route in a website to enable/disable this). The trailing slash is something that should be handled by the router itself imo. It's something the program has to care about, not the admin.

    The Compiler class setting is the most cryptic of them all. Even I don't really know what it does. And if I know it, it would still not be usefull as it's just a plain text field. How do I know which compiler classes are available? I think this is an option that should only be provided to the developer.

    At last, there are Controller and Template defaults. The first one belongs to the same group as the Compiler class imo. The Template class can be very usefull, it would allow the admin to change the theme for a page. However, we don't have anything about theming in our admin (we should maybe create a CmfThemingBundle). In the current way, there is no way to know what you can input in this field and what the page is going to look like in that case.

    These are my thoughts about the routing admin, I would love to discuss this and see which options we can remove and what we can improve (e.g. adding a global settings page, a CmfThemingBundle, etc.)

  • 56 Add missing translations not assigned

    #56 Add missing translations

    Created by wouterj at 24.12.2016 - 05:12, last updated at 01.02.2017 - 05:02

    Now we centralized all translations of the CMF in this bundle, we have a clear view of what's missing. These are marked with TODO: comments in the Xliff file. We're missing some messages in the following languages:

    • [ ] Czech
    • [x] French (#68)
    • [x] German (#60)
    • [x] Italian (#57)
    • [ ] Polish
    • [ ] Slovak
    • [x] Slovene (#58)
    • [x] Spanish (#63)
      • [x] Portuguese (Brazilian) (#80)

    /cc @pulzarraider, @eiannone, @peterkokot, @cordoval, @emgiezet You guys did an amazing job translating the CMF into the languages! Do you maybe have some time left to translate the missing messages?

  • 49 [1.0.x] Allow filtering by publish workflow not assigned

    #49 [1.0.x] Allow filtering by publish workflow

    Created by wouterj at 18.12.2016 - 03:12, last updated at 11.02.2017 - 04:02

    E.g. filter all (non-)published articles

  • 47 [1.1] Improve Block admin not assigned

    #47 [1.1] Improve Block admin

    Created by wouterj at 18.12.2016 - 12:12, last updated at 06.05.2017 - 06:05

    Instead of showing one admin per block type, the admin should have just one block admin. This would start with a type field, which dynamically changes the form fields and created document based on the selected type.

    We should also refactor the container admin block to have a nice drag 'n drop view. E.g. like this: Drag 'n drop block admin (source: https://buytaert.net/examples-of-how-to-make-drupal-outside-in)

  • 46 [1.1] Improve Menu Admin not assigned

    #46 [1.1] Improve Menu Admin

    Created by wouterj at 18.12.2016 - 12:12, last updated at 11.02.2017 - 04:02

    The menu admin can be improved quite a lot:

    • [ ] Remove the menu node admin from the sidebar list. It doesn't make sense to list all menu items
    • [ ] Improve view of menu items when editing a menu. Make it reorderable, etc.
    • [ ] Add ability to create/edit menu items in the menu admin (embedded the menu node admin)
  • 45 ContainerBlockAdmin is missing block specific fields not assigned

    #45 ContainerBlockAdmin is missing block specific fields

    Created by wouterj at 18.12.2016 - 12:12, last updated at 23.12.2016 - 12:12

    This admin should be able to set child blocks (and create new child blocks). At the moment, only the parent and node name are configurable in the admin panel.

  • 41 Generic Compiler Pass to replace admin class or document class not assigned

    #41 Generic Compiler Pass to replace admin class or document class

    Created by ElectricMaxxx at 16.12.2016 - 12:12, last updated at 10.01.2017 - 07:01

    I currently had an idea how to replace the editable admin/document class configuration in a nice way. On my sandbox PR (https://github.com/symfony-cmf/cmf-sandbox/pull/332) i created a very specific compiler pass to replace the document class for the StaticContentAdmin, what about a configuration here like:

    admin_classes:
        cmf_sonata_admin_integration.content.admin: My\Special\Admin\Class
        ....
    document_classes:
       cmf_sonata_admin_integration.content.admin: AppBundle\Document\DemoSeoContent
       ....
    

    We could then create a more generic compiler pass to replace the class or the 2. argument of a service (key) with the given value.

  • 32 publication extensions: have a special column for aggregated publication info not assigned

    #32 publication extensions: have a special column for aggregated publication info

    Created by dbu at 12.12.2016 - 12:12, last updated at 23.12.2016 - 12:12

    Group all info of the 3 publication admin extensions in one column: Published, XYZ until XZY | Published, XYZ | Published, until XZY. Use a color code to reflect the current state.

    This should be an optional feature, some might prefer to have separate columns for ordering and filtering.

    That would probably work like this: https://github.com/symfony-cmf/CoreBundle/blob/master/Admin/Extension/TranslatableExtension.php#L50

    Suggestion from https://blog.liip.ch/archive/2014/12/11/improving-the-user-experience-of-the-symfony-cmf-backend.html : We could use an icon for the column heading of publishable to save some space.

  • 5 admin breadcrumbs not assigned

    #5 admin breadcrumbs

    Created by dbu at 26.06.2016 - 01:06, last updated at 26.06.2016 - 01:06

    for the menu admins, we have a breadcrumb functionality that shows the tree of the breadcrumbs in the navigation. this would make sense for other types of documents too. as phpcr is always a tree, we could always show parents. maybe as an admin extension or trait?

    an open question is where to stop, if we should allow configuring a list of classes/interfaces that we want in the breadcrumb and stop when we encounter something else. and/or a maximum number of parents to show.

Routing

Travis Build Status Latest Stable Version Total Downloads
  • 218 Uninitialised requestContext leads to "Call to a member function setParameter() on null -- in LocaleListener.php" not assigned

    #218 Uninitialised requestContext leads to "Call to a member function setParameter() on null -- in LocaleListener.php"

    Created by tapetersen at 15.03.2018 - 08:03, last updated at 15.03.2018 - 08:03

    Environment

    dev

    Symfony packages

    symfony/asset                v4.0.6             v4.0.6             Symfony Asset Component
    symfony/browser-kit          v4.0.6             v4.0.6             Symfony BrowserKit Component
    symfony/cache                v4.0.6             v4.0.6             Symfony Cache component with PSR-6, PSR-16, and tags
    symfony/config               v4.0.6             v4.0.6             Symfony Config Component
    symfony/console              v4.0.6             v4.0.6             Symfony Console Component
    symfony/css-selector         v4.0.6             v4.0.6             Symfony CssSelector Component
    symfony/debug                v4.0.6             v4.0.6             Symfony Debug Component
    symfony/debug-bundle         v4.0.6             v4.0.6             Symfony DebugBundle
    symfony/debug-pack           v1.0.4             v1.0.4             A debug pack for Symfony projects
    symfony/dependency-injection v4.0.6             v4.0.6             Symfony DependencyInjection Component
    symfony/doctrine-bridge      v4.0.6             v4.0.6             Symfony Doctrine Bridge
    symfony/dom-crawler          v4.0.6             v4.0.6             Symfony DomCrawler Component
    symfony/dotenv               v4.0.6             v4.0.6             Registers environment variables from a .env file
    symfony/event-dispatcher     v4.0.6             v4.0.6             Symfony EventDispatcher Component
    symfony/expression-language  v4.0.6             v4.0.6             Symfony ExpressionLanguage Component
    symfony/filesystem           v4.0.6             v4.0.6             Symfony Filesystem Component
    symfony/finder               v4.0.6             v4.0.6             Symfony Finder Component
    symfony/flex                 v1.0.71            v1.0.71           
    symfony/form                 v4.0.6             v4.0.6             Symfony Form Component
    symfony/framework-bundle     v4.0.6             v4.0.6             Symfony FrameworkBundle
    symfony/http-foundation      v4.0.6             v4.0.6             Symfony HttpFoundation Component
    symfony/http-kernel          v4.0.6             v4.0.6             Symfony HttpKernel Component
    symfony/inflector            v4.0.6             v4.0.6             Symfony Inflector Component
    symfony/intl                 v4.0.6             v4.0.6             A PHP replacement layer for the C intl extension that includes additional data from the ICU library.
    symfony/lts                  dev-master 396c5fc dev-master 396c5fc Enforces Long Term Supported versions of Symfony components
    symfony/maker-bundle         v1.2.0             v1.2.0             Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate...
    symfony/monolog-bridge       v4.0.6             v4.0.6             Symfony Monolog Bridge
    symfony/monolog-bundle       v3.2.0             v3.2.0             Symfony MonologBundle
    symfony/options-resolver     v4.0.6             v4.0.6             Symfony OptionsResolver Component
    symfony/orm-pack             v1.0.5             v1.0.5             A pack for the Doctrine ORM
    symfony/phpunit-bridge       v4.0.6             v4.0.6             Symfony PHPUnit Bridge
    symfony/polyfill-intl-icu    v1.7.0             v1.7.0             Symfony polyfill for intl's ICU-related data and classes
    symfony/polyfill-mbstring    v1.7.0             v1.7.0             Symfony polyfill for the Mbstring extension
    symfony/polyfill-php72       v1.7.0             v1.7.0             Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
    symfony/process              v4.0.6             v4.0.6             Symfony Process Component
    symfony/profiler-pack        v1.0.3             v1.0.3             A pack for the Symfony web profiler
    symfony/property-access      v4.0.6             v4.0.6             Symfony PropertyAccess Component
    symfony/property-info        v4.0.6             v4.0.6             Symfony Property Info Component
    symfony/routing              v4.0.6             v4.0.6             Symfony Routing Component
    symfony/security             v4.0.6             v4.0.6             Symfony Security Component
    symfony/security-bundle      v4.0.6             v4.0.6             Symfony SecurityBundle
    symfony/serializer           v4.0.6             v4.0.6             Symfony Serializer Component
    symfony/serializer-pack      v1.0.1             v1.0.1             A pack for the Symfony serializer
    symfony/stopwatch            v4.0.6             v4.0.6             Symfony Stopwatch Component
    symfony/swiftmailer-bundle   v3.2.1             v3.2.1             Symfony SwiftmailerBundle
    symfony/translation          v4.0.6             v4.0.6             Symfony Translation Component
    symfony/twig-bridge          v4.0.6             v4.0.6             Symfony Twig Bridge
    symfony/twig-bundle          v4.0.6             v4.0.6             Symfony TwigBundle
    symfony/validator            v4.0.6             v4.0.6             Symfony Validator Component
    symfony/var-dumper           v4.0.6             v4.0.6             Symfony mechanism for exploring and dumping PHP variables
    symfony/web-link             v4.0.6             v4.0.6             Symfony WebLink Component
    symfony/web-profiler-bundle  v4.0.6             v4.0.6             Symfony WebProfilerBundle
    symfony/web-server-bundle    v4.0.6             v4.0.6             Symfony WebServerBundle
    symfony/webpack-encore-pack  v1.0.2             v1.0.2             A pack for Symfony Encore
    symfony/yaml                 v4.0.6             v4.0.6             Symfony Yaml Component
    

    Symfony CMF packages

    symfony-cmf/routing dev-master e1bc515 dev-master e1bc515 Extends the Symfony routing component for dynamic routes and chaining several routers
    
    

    Subject

    Trying to use chainrouter for fallbacks it I get an error from the locallistener as it tries to set a parameter on the RequestContext but that can be null if not set. Arguably a bug in localelistener but the behavior differs from the normal symfony router which initializes it in the constructor and won't return null and doing the same to here would be a simple fix and ease interopability.

    Steps to reproduce

    1. Set up a normal symfony 4.0 project according to https://symfony.com/doc/current/setup.html
    2. Install symfony-cmf/routing composer require symfony-cmf/routing:2.1.x-dev (needs latest to accept symfony 4.0)
    3. try to configure symfony to use the chain router ( No idea if this is the easiest best way to do a simple chaining with the default)
        app.router:
          class: 'Symfony\Cmf\Component\Routing\ChainRouter'
          calls:
            - method: add
              arguments:
                - '@router.default'
    
        router: '@app.router'
    

    Expected results

    It should work as with only the normal router

    Actual results


    (1/1) FatalThrowableError Call to a member function setParameter() on null -- in LocaleListener.php (line 71) at LocaleListener->setRouterContext(object(Request))in LocaleListener.php (line 51) at LocaleListener->onKernelRequest(object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher)) at call_user_func(array(object(LocaleListener), 'onKernelRequest'), object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher))in WrappedListener.php (line 104) at WrappedListener->__invoke(object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher)) at call_user_func(object(WrappedListener), object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher))in WrappedListener.php (line 104) at WrappedListener->__invoke(object(GetResponseEvent), 'kernel.request', object(EventDispatcher))in EventDispatcher.php (line 212) at EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(GetResponseEvent))in EventDispatcher.php (line 44) at EventDispatcher->dispatch('kernel.request', object(GetResponseEvent))in TraceableEventDispatcher.php (line 139) at TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent))in HttpKernel.php (line 125) at HttpKernel->handleRaw(object(Request), 2)in HttpKernel.php (line 66) at HttpKernel->handle(object(Request), 2, false)in ExceptionListener.php (line 55) at ExceptionListener->onKernelException(object(GetResponseForExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher)) at call_user_func(array(object(ExceptionListener), 'onKernelException'), object(GetResponseForExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher))in WrappedListener.php (line 104) at WrappedListener->__invoke(object(GetResponseForExceptionEvent), 'kernel.exception', object(EventDispatcher))in EventDispatcher.php (line 212) at EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.exception', object(GetResponseForExceptionEvent))in EventDispatcher.php (line 44) at EventDispatcher->dispatch('kernel.exception', object(GetResponseForExceptionEvent))in TraceableEventDispatcher.php (line 139) at TraceableEventDispatcher->dispatch('kernel.exception', object(GetResponseForExceptionEvent))in HttpKernel.php (line 219) at HttpKernel->handleException(object(NotFoundHttpException), object(Request), 1)in HttpKernel.php (line 77) at HttpKernel->handle(object(Request), 1, true)in Kernel.php (line 190) at Kernel->handle(object(Request))in index.php (line 37)
  • 194 Candidates::determineLocale regex matches wrongly not assigned

    #194 Candidates::determineLocale regex matches wrongly

    Created by uwej711 at 08.05.2017 - 01:05, last updated at 08.05.2017 - 03:05

    Hi all,

    I'm currently upgrading one of our projects and ran into an issue with https://github.com/symfony-cmf/routing/blob/master/src/Candidates/Candidates.php#L111

    The regular expression there matches my url "/buchen" if I have "en" in the list of locales. I guess it should be

    if (preg_match('#^/('.implode('|', $this->locales).')(/|$)#', $url, $matches)) {
    

    instead.

  • 193 Attempted to load interface "ChainedRouterInterface" from namespace "Symfony\Cmf\Component\Routing". not assigned

    #193 Attempted to load interface "ChainedRouterInterface" from namespace "Symfony\Cmf\Component\Routing".

    Created by Nabilcnpe at 16.03.2017 - 09:03, last updated at 16.03.2017 - 11:03

    hey guys,

    I can't see why i got this error ! i put the routing folder in the vendors/symfony but i don't know why he can't find the chainedRouterInterface Please i need your help

    Thanks

  • 183 The router fails to match unicode uri not assigned

    #183 The router fails to match unicode uri

    Created by steve-todorov at 07.12.2016 - 12:12, last updated at 12.07.2017 - 08:07

    I've been writing a wrapper library around this one and it turns out it's not possible to match a url containing anything but english letters. Here is an example url containing a string in Bulgarian:

    http://localhost:8000/bg/Тестова-страница
    

    As of Symfony 3.2, the symfony router now officially supports UTF-8 characters in the url. So I assumed symfony-cmf/routing supports it as well. Unfortunately the link above returns a 404 error.

    I did a little digging through the source and found out that the class Symfony\Cmf\Component\Routing\Candidates\Candidates#getCandidates is causing this issue. The method calls getCandidatesFor($url), but the $url is not being urldecoded, which is why it fails to find any candidates. Adding a simple urldecode solves the problem.

    /**
     * {@inheritdoc}
     */
    public function getCandidates(Request $request)
    {
        $url = urldecode($request->getPathInfo()); // if not decoded, the path here would look like this: /bg/%D0%A2%D0%B5%D1%81%D1%82%D0%BE%D0%B2%D0%B0-%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0
        $candidates = $this->getCandidatesFor($url);
    
        $locale = $this->determineLocale($url);
        if ($locale) {
            $candidates = array_unique(array_merge($candidates, $this->getCandidatesFor(substr($url, strlen($locale) + 1))));
        }
    
        return $candidates;
    }
    

    I would be happy to open a PR with the fix if there is no better solution.

  • 176 Issues with conditional enhancer not assigned

    #176 Issues with conditional enhancer

    Created by ElectricMaxxx at 18.05.2016 - 05:05, last updated at 20.01.2017 - 03:01

    To explain #175 and describe the problems with the conditional enhancer:

    Can't inject objects by DI container

    Late, but when implementing the extension in routing bundle to use the conditional enhancer, i realized, that an enhancer map containing the objects of matcher and enhancer won't work as the DI container does not like any objects (dumping into xml problems). That was the reason to create #175 Currently i am not sure if i need the implemented priority - cause of the second problem

    Every class/type/ needs an own conditional enhancer

    I would just start with an example:


    controllers_by_type: demo_alias: - methods: ['put', 'post'] value: test.controller:aliasAction controllers_by_class: Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\RedirectRoute: - methods: ['put', 'post'] value: cmf_routing.redirect_controller:redirectAction Symfony\Cmf\Bundle\RoutingBundle\Tests\Resources\Document\Content: - methods: ['post', 'put'] value: service:putAction templates_by_class: Symfony\Cmf\Bundle\RoutingBundle\Tests\Resources\Document\Content: TestBundle:Content:index.html.twig

    without that method mapping that would leed to 4 different enhancers. 3 FieldByClass (controller_by_class, controller_by_type, controller_for_template_by_class) and 1 FieldMapPre..

    i.e. PUT request: I can't put the complete configuration into one conditional enhancer. The first request match would close the chain even when the enhancer except _type = demo_alias => _controller = test.controller:aliasAction. So would need to create 3 different conditional ehnacers. One vor the target pair _type/_controller _content/_controller and one for null/_template. The _content/_controller pair can go of controller_for_template_by_class and controller_by_class can go in one - they have the same target/source pair - i thought. But again: The first request match would close the chain completely independent from the work of the enhancer. So lets to a 4th conditional enhancer to put especially controller_by_class into one map. But lets expect a PUT request again on a route with content of class Symfony\Cmf\Bundle\RoutingBundle\Tests\Resources\Document\Content. The request matcher would close agein on the first entry the FieldByClass enhancer will see that the current content is of class Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\RedirectRoute and would do nothing. Chain closed :-(

    So The only way to work with the conditional enhancer is by creating one for each type/class/ to just find the first request match. So i would create 5 different conditional enhancers for the current example. I don't know if that is a step forward. Is that the way we planned it @dbu? From the point of seperating concerns it is really good but from the performance view we instantiate two times classes as before.

  • 171 Create content_on_method enhancer not assigned

    #171 Create content_on_method enhancer

    Created by ElectricMaxxx at 03.04.2016 - 09:04, last updated at 12.05.2016 - 03:05

    To map REST routes (and other use cases) we need an enhancer for to map on controller methods based on the HTTP method.

    The related discussion can be found: here There is also an example implementation mentioned or can be found here

    The enhancer should be available in the bundle too.

  • 130 priority for route referrers? not assigned

    #130 priority for route referrers?

    Created by dbu at 11.02.2015 - 07:02, last updated at 21.08.2015 - 02:08

    as seen when discussing https://github.com/symfony-cmf/RoutingAuto/issues/31 and canonical route for seo, we noticed that we may need to specify that a route is more or less important for a content. in the case of redirects to the content, they could be considered less important, in case of the canonical route, it could be boosted to be more important.

    one solution would be an additional interface that routes can implement to give a priority, and the generator looks at that interface (and assumes prio 0 when interface not present). i assume that the locale would remain first criteria, and priority would be second criteria. we should probably not offload this task to the content (as there may be many diferent content classes and they should not need to know about this), but do it in the generator. /cc @ElectricMaxxx, @UFTimmy

  • 100 Missing test for LazyRouteCollection.php not assigned

    #100 Missing test for LazyRouteCollection.php

    Created by dbu at 24.03.2014 - 10:03, last updated at 23.10.2017 - 05:10

    Add coverage for more operations to LazyRouteCollectionTest

  • 99 Missing test for ChainRouteCollection.php not assigned

    #99 Missing test for ChainRouteCollection.php

    Created by dbu at 24.03.2014 - 10:03, last updated at 23.10.2017 - 05:10

    this class does not have any unit tests.

  • 97 better getRouteCollection implementation not assigned

    #97 better getRouteCollection implementation

    Created by dbu at 20.03.2014 - 05:03, last updated at 04.09.2014 - 09:09

    drupal has a LazyLoadingRouteCollection which does load routes by batches.

    we could generalize this by adding a PagingProviderInterface that route providers implement to support paging. it would need something like getAllRoutes(offset, limit) and a count method. then DynamicRouter::getRouteCollection could detect the interface on the provider and use the LazyCollection (or PagingCollection?).

    that would encapsulate the logic in the right places.

  • 71 compiler pass for route filters not assigned

    #71 compiler pass for route filters

    Created by dbu at 15.07.2013 - 06:07, last updated at 14.11.2014 - 05:11

    Port the route filters pass from drupal into the component. Left over from #70

    see http://drupalcode.org/project/drupal.git/blob/refs/heads/8.x:/core/lib/Drupal/Core/DependencyInjection/Compiler/RegisterRouteFiltersPass.php btw, why is there no priorities on the filters pass? the enhancer and router passes do have priorities. for performance reasons, priorities could also be important here.

    when we do that, don't forget to enable the pass in the CmfRoutingBundle

    /cc @Crell

  • 28 add a route enhancer by (sub)path not assigned

    #28 add a route enhancer by (sub)path

    Created by lsmith77 at 22.10.2012 - 12:10, last updated at 04.08.2013 - 06:08