Code Monkey home page Code Monkey logo

resource-rest-bundle's Introduction

This repository is no longer maintained

Due to lack of interest, we had to decide to discontinue this repository. The CMF project focusses on the Routing component and RoutingBundle, which are still in active use by other projects.

This repository will no longer be upgraded and marked as abandoned, but will be kept available for legacy projects or if somebody wants to experiment with the CMF.

You can contact us in the #symfony_cmf channel of the Symfony devs slack.

Symfony CMF Resource Rest Bundle

Latest Stable Version Latest Unstable Version License

Total Downloads Monthly Downloads Daily Downloads

Branch Travis Coveralls
master Build Status Coverage Status

This package is part of the Symfony Content Management Framework (CMF) and licensed under the MIT License.

This Bundle provides a REST API to Puli resources as provided by the CmfResource component.

Running Behat

  1. Run web server:
KERNEL_CLASS="Symfony\Cmf\Bundle\ResourceRestBundle\Tests\Fixtures\App\Kernel" ./vendor/symfony-cmf/testing/bin/console server:run -d vendor/symfony-cmf/testing/resources/web/ 8000
  1. Run the behat tests:
KERNEL_CLASS="Symfony\Cmf\Bundle\ResourceRestBundle\Tests\Fixtures\App\Kernel" ./vendor/bin/behat

Requirements

Documentation

For the install guide and reference, see:

See also:

Support

For general support and questions, please use StackOverflow.

Contributing

Pull requests are welcome. Please see our CONTRIBUTING guide.

Unit and/or functional tests exist for this package. See the Testing documentation for a guide to running the tests.

Thanks to everyone who has contributed already.

License

This package is available under the MIT license.

resource-rest-bundle's People

Contributors

alexislefebvre avatar dantleech avatar dbu avatar electricmaxxx avatar emmanuelvella avatar fbourigault avatar jrmyio avatar lsmith77 avatar patrick-benoit avatar pierredup avatar rsalo avatar wouterj avatar xabbuh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

resource-rest-bundle's Issues

create api endpoint to serve partials

Hi,
it is an actuall use case in our project and i had that in mind for the frontend stuff for angular-cmf. I would like to see an api endpoint to serve partials/views/templates for client side applications.
I have no clue if that would be a task of Pulli it self (@webmozart ping), but i think we can do it in here.
It is a control for the dev which template is used in frontend, cause normally (i.e in angular applications) you would create a new templating beside of the symfony/twig templating and the dev has no controll. Btw. it should be doable to (pre-) render existing templates, too (subrequests)

Support REST, not just GET

The ResourceRestBundle is now just a ResourceGetBundle. In order for it to be usable with the TreeBrowserBundle, it has to support move, write and delete actions.

Move SonataEnhancer to SonataAdminBundle

I think we can move the SonataEnhancer to the SonataAdminBundle now that the TreeBrowser is officially integrated there.

It serves no purpose independently of that bundle (or?).

Add a depth request parameter

We should be able to, besides configuring a global depth, change the depth per URL. This would allow the tree to immediately load the selected node, instead of using 3 requests to select the /cmf/content/home node.

Add node type to the response

This can be used to (a) determine if a node can be edited, moved, etc and (b) to have different icons for each document type.

Broken Master Branch

Please fix the broken master branch build. at least the lowest build is broken and got memory issues.

Access security

If I don't miss something, this bundle allows everyone to request the API URLs. At this moment, it means one can retrieve all tree information, even from nodes that shouldn't be showed to other people.

Besides that, when we implement more things than just GET (#6), even more things will be provided to the hacker.

Switch to Puli 1.0.x (dev-master is behind and there are conflicts)

Caused by the curent state of Puli (1.0.0-beta6 - 1.0.0-beta10 isn't merged into master) we do have a newer commit in this bundle (1.0.0-beta10) then in the component (dev-master). They did some changes that breaks this bundle now. The reason is a change on the Repository Interface, that should force us to implement (getVersions()).

jms/serializer-bundle 1.0.0 version support

When i install SonataDoctrinePhpcrAdminBundle, i received the following problem:

  • Can only install one of: jms/serializer-bundle[1.0.0, 0.13.0].
  • symfony-cmf/resource-rest-bundle 1.0.x-dev requires jms/serializer-bundle ~0.13
    But my other bundles require 1.0.0 version. Please just add the support for this version as well to composer (~0.13|~1.0).

Add configuration option for security paths

Currently, one has to write a security voter in order to allow access to some paths. It would be much nicer if people can configure the allowed paths with configuration instead:

cmf_resource_rest:
    security:
        allow:
            - { path: /cms/public }
            # ...

Temprorary require symfony/translation

To avoid installation issues based by a missing dependency in jms/serializer-bundle we should require symfony/translation temporary. JMS will release a fix on master, when Symfony 4.0 will be released.

Created #54 to remove it.

bug: bad verification guardAccess with tree block

Environment

Symfony 4.2.8

Symfony packages

$ composer show --latest 'symfony/*'
symfony/apache-pack           v1.0.1  v1.0.1  A pack for Apache support in S...
symfony/asset                 v4.2.8  v4.2.8  Symfony Asset Component
symfony/browser-kit           v4.2.8  v4.2.8  Symfony BrowserKit Component
symfony/cache                 v4.2.8  v4.2.8  Symfony Cache component with P...
symfony/config                v4.2.8  v4.2.8  Symfony Config Component
symfony/console               v4.2.8  v4.2.8  Symfony Console Component
symfony/contracts             v1.1.0  v1.1.0  A set of abstractions extracte...
symfony/css-selector          v4.2.8  v4.2.8  Symfony CssSelector Component
symfony/debug                 v4.2.8  v4.2.8  Symfony Debug Component
symfony/debug-bundle          v4.2.8  v4.2.8  Symfony DebugBundle
symfony/debug-pack            v1.0.7  v1.0.7  A debug pack for Symfony projects
symfony/dependency-injection  v4.2.8  v4.2.8  Symfony DependencyInjection Co...
symfony/doctrine-bridge       v4.2.8  v4.2.8  Symfony Doctrine Bridge
symfony/dom-crawler           v4.2.8  v4.2.8  Symfony DomCrawler Component
symfony/dotenv                v4.2.8  v4.2.8  Registers environment variable...
symfony/event-dispatcher      v4.2.8  v4.2.8  Symfony EventDispatcher Component
symfony/expression-language   v4.2.8  v4.2.8  Symfony ExpressionLanguage Com...
symfony/filesystem            v4.2.8  v4.2.8  Symfony Filesystem Component
symfony/finder                v4.2.8  v4.2.8  Symfony Finder Component
symfony/flex                  v1.2.5  v1.2.5  Composer plugin for Symfony
symfony/form                  v4.2.8  v4.2.8  Symfony Form Component
symfony/framework-bundle      v4.2.8  v4.2.8  Symfony FrameworkBundle
symfony/http-foundation       v4.2.8  v4.2.8  Symfony HttpFoundation Component
symfony/http-kernel           v4.2.8  v4.2.8  Symfony HttpKernel Component
symfony/inflector             v4.2.8  v4.2.8  Symfony Inflector Component
symfony/intl                  v4.2.8  v4.2.8  A PHP replacement layer for th...
symfony/maker-bundle          v1.11.6 v1.11.6 Symfony Maker helps you create...
symfony/monolog-bridge        v4.2.8  v4.2.8  Symfony Monolog Bridge
symfony/monolog-bundle        v3.3.1  v3.3.1  Symfony MonologBundle
symfony/options-resolver      v4.2.8  v4.2.8  Symfony OptionsResolver Component
symfony/orm-pack              v1.0.6  v1.0.6  A pack for the Doctrine ORM
symfony/panther               v0.3.0  v0.3.0  A browser testing and web scra...
symfony/phpunit-bridge        v4.2.8  v4.2.8  Symfony PHPUnit Bridge
symfony/polyfill-intl-icu     v1.11.0 v1.11.0 Symfony polyfill for intl's IC...
symfony/polyfill-intl-idn     v1.11.0 v1.11.0 Symfony polyfill for intl's id...
symfony/polyfill-mbstring     v1.11.0 v1.11.0 Symfony polyfill for the Mbstr...
symfony/polyfill-php72        v1.11.0 v1.11.0 Symfony polyfill backporting s...
symfony/process               v4.2.8  v4.2.8  Symfony Process Component
symfony/profiler-pack         v1.0.4  v1.0.4  A pack for the Symfony web pro...
symfony/property-access       v4.2.8  v4.2.8  Symfony PropertyAccess Component
symfony/property-info         v4.2.8  v4.2.8  Symfony Property Info Component
symfony/routing               v4.2.8  v4.2.8  Symfony Routing Component
symfony/security-acl          v3.0.2  v3.0.2  Symfony Security Component - A...
symfony/security-bundle       v4.2.8  v4.2.8  Symfony SecurityBundle
symfony/security-core         v4.2.8  v4.2.8  Symfony Security Component - C...
symfony/security-csrf         v4.2.8  v4.2.8  Symfony Security Component - C...
symfony/security-guard        v4.2.8  v4.2.8  Symfony Security Component - G...
symfony/security-http         v4.2.8  v4.2.8  Symfony Security Component - H...
symfony/serializer            v4.2.8  v4.2.8  Symfony Serializer Component
symfony/serializer-pack       v1.0.2  v1.0.2  A pack for the Symfony serializer
symfony/stopwatch             v4.2.8  v4.2.8  Symfony Stopwatch Component
symfony/swiftmailer-bundle    v3.2.6  v3.2.6  Symfony SwiftmailerBundle
symfony/templating            v4.2.8  v4.2.8  Symfony Templating Component
symfony/test-pack             v1.0.5  v1.0.5  A pack for functional and end-...
symfony/translation           v4.2.8  v4.2.8  Symfony Translation Component
symfony/twig-bridge           v4.2.8  v4.2.8  Symfony Twig Bridge
symfony/twig-bundle           v4.2.8  v4.2.8  Symfony TwigBundle
symfony/validator             v4.2.8  v4.2.8  Symfony Validator Component
symfony/var-dumper            v4.2.8  v4.2.8  Symfony mechanism for explorin...
symfony/var-exporter          v4.2.8  v4.2.8  A blend of var_export() + seri...
symfony/web-link              v4.2.8  v4.2.8  Symfony WebLink Component
symfony/web-profiler-bundle   v4.2.8  v4.2.8  Symfony WebProfilerBundle
symfony/web-server-bundle     v4.2.8  v4.2.8  Symfony WebServerBundle
symfony/webpack-encore-bundle v1.5.0  v1.5.0  Integration with your Symfony ...
symfony/yaml                  v4.2.8  v4.2.8  Symfony Yaml Component

Symfony CMF packages

$ composer show --latest 'symfony-cmf/*'
symfony-cmf/block-bundle         2.1.1 2.1.1 Symfony CMF Block Bundle
symfony-cmf/core-bundle          2.1.1 2.1.1 Symfony CMF Core Bundle
symfony-cmf/resource             1.1.0 1.1.0 Bundle which facilitates docume...
symfony-cmf/resource-bundle      1.1.0 1.1.0 Bundle which facilitates docume...
symfony-cmf/resource-rest-bundle 1.1.0 1.1.0 Bundle which provides a REST AP...
symfony-cmf/routing              2.1.0 2.1.0 Extends the Symfony routing com...
symfony-cmf/routing-auto         2.1.0 2.1.0 Component for automatically cre...
symfony-cmf/routing-auto-bundle  2.1.0 2.1.0 Bundle which automatically crea...
symfony-cmf/routing-bundle       2.1.1 2.1.1 Symfony RoutingBundle
symfony-cmf/seo-bundle           2.1.0 2.1.0 Symfony CMF Search Engine Optim...
symfony-cmf/slugifier-api        2.0.0 2.0.0 Provides a basic slugifier inte...
symfony-cmf/tree-browser-bundle  2.1.1 2.1.1 Symfony CMF Tree Browser Bundle

Subject

Access verification problem.

This returns an error in all cases.

Steps to reproduce

Adding block Sonata :

sonata_block:
    blocks:
        # ...
        sonata_admin_doctrine_phpcr.tree_block:
            settings:
                id: '/cms'
            contexts:   [admin]

And.. Congratulation, this bug is here ! Showing DeniedAccess.

Expected results

Access Authorized

Actual results

AccessDeniedException

JMS\Serializer error

Environment

Symfony: 4.4.15
PHP: 7.4

Symfony packages

brick/math                                 0.9.1   Arbitrary-precision arithmetic library
cocur/slugify                              v4.0.0  Converts a string into a slug.
composer/package-versions-deprecated       1.11.99 Composer plugin that provides efficient querying for installed packa...
dantleech/glob-finder                      1.0.0   Library offering object location from hierarchrical persistent stora...
doctrine/annotations                       1.10.4  Docblock Annotations Parser
doctrine/cache                             1.10.2  PHP Doctrine Cache library is a popular cache implementation that su...
doctrine/collections                       1.6.7   PHP Doctrine Collections library that adds additional functionality ...
doctrine/common                            2.13.3  PHP Doctrine Common project is a library that provides additional fu...
doctrine/data-fixtures                     1.4.4   Data Fixtures for all Doctrine Object Managers
doctrine/dbal                              2.12.0  Powerful PHP database abstraction layer (DBAL) with many features fo...
doctrine/doctrine-bundle                   2.1.2   Symfony DoctrineBundle
doctrine/doctrine-fixtures-bundle          3.3.2   Symfony DoctrineFixturesBundle
doctrine/doctrine-migrations-bundle        3.0.1   Symfony DoctrineMigrationsBundle
doctrine/event-manager                     1.1.1   The Doctrine Event Manager is a simple PHP event system that was bui...
doctrine/inflector                         1.4.3   PHP Doctrine Inflector is a small library that can perform string ma...
doctrine/instantiator                      1.3.1   A small, lightweight utility to instantiate objects in PHP without i...
doctrine/lexer                             1.2.1   PHP Doctrine Lexer parser library that can be used in Top-Down, Recu...
doctrine/migrations                        3.0.1   PHP Doctrine Migrations project offer additional functionality on to...
doctrine/orm                               2.7.4   Object-Relational-Mapper for PHP
doctrine/persistence                       1.3.8   The Doctrine Persistence project is a set of shared interfaces and f...
doctrine/phpcr-bundle                      2.1.2   Symfony DoctrinePHPCRBundle
doctrine/phpcr-odm                         1.5.2   Object-Document-Mapper for PHPCR
doctrine/reflection                        1.2.1   The Doctrine Reflection project is a simple library used by the vari...
doctrine/sql-formatter                     1.1.1   a PHP SQL highlighting library
egulias/email-validator                    2.1.22  A library for validating emails against several RFCs
friendsofsymfony/jsrouting-bundle          2.6.0   A pretty nice way to expose your Symfony2 routing to client applicat...
friendsofsymfony/user-bundle               v2.1.2  Symfony FOSUserBundle
jackalope/jackalope                        1.4.2   Jackalope PHPCR library
jackalope/jackalope-doctrine-dbal          1.5.1   Jackalope Transport library for Doctrine DBAL
jms/metadata                               2.3.0   Class/method/property metadata management in PHP
jms/serializer                             3.9.0   Library for (de-)serializing data of any complexity; supports XML, J...
jms/serializer-bundle                      3.7.0   Allows you to easily serialize, and deserialize data of any complexity
knplabs/knp-menu                           2.6.0   An object oriented menu library
knplabs/knp-menu-bundle                    v2.3.0  This bundle provides an integration of the KnpMenu library
laminas/laminas-code                       3.4.1   Extensions to the PHP Reflection API, static code scanning, and code...
laminas/laminas-eventmanager               3.3.0   Trigger and listen to events within a PHP application
laminas/laminas-zendframework-bridge       1.1.1   Alias legacy ZF class names to Laminas Project equivalents.
monolog/monolog                            1.25.5  Sends your logs to files, sockets, inboxes, databases and various we...
nikic/php-parser                           v4.10.2 A PHP parser written in PHP
ocramius/proxy-manager                     2.8.0   A library providing utilities to generate, instantiate and generally...
phpcr/phpcr                                2.1.6   PHP Content Repository interfaces
phpcr/phpcr-utils                          1.5.1   PHP Content Repository implementation independant utilities
phpdocumentor/reflection-common            1.0.1   Common reflection classes used by phpdocumentor to reflect the code ...
phpdocumentor/reflection-docblock          3.3.2   With this component, a library can provide support for annotations v...
phpdocumentor/type-resolver                0.4.0  
psr/cache                                  1.0.1   Common interface for caching libraries
psr/container                              1.0.0   Common Container Interface (PHP FIG PSR-11)
psr/link                                   1.0.0   Common interfaces for HTTP links
psr/log                                    1.1.3   Common interface for logging libraries
ramsey/collection                          1.1.1   A PHP 7.2+ library for representing and manipulating collections.
ramsey/uuid                                4.1.1   A PHP library for generating and working with universally unique ide...
ramsey/uuid-doctrine                       1.6.0   Allow the use of ramsey/uuid as a Doctrine field type.
sensio/framework-extra-bundle              v5.6.1  This bundle provides a way to configure your controllers with annota...
sonata-project/admin-bundle                3.74.0  The missing Symfony Admin Generator
sonata-project/block-bundle                3.20.0  Symfony SonataBlockBundle
sonata-project/cache                       2.0.1   Cache library
sonata-project/core-bundle                 3.20.0  Symfony SonataCoreBundle (abandoned)
sonata-project/datagrid-bundle             2.5.0   Symfony SonataDatagridBundle
sonata-project/doctrine-extensions         1.10.1  Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle   3.24    Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/doctrine-phpcr-admin-bundle 2.3.0   Symfony Sonata / Integrate Doctrine PHPCR into the SonataAdminBundle
sonata-project/easy-extends-bundle         2.5.0   Symfony SonataEasyExtendsBundle
sonata-project/exporter                    2.4.1   Lightweight Exporter library
sonata-project/form-extensions             0.1.2   Symfony form extensions
sonata-project/twig-extensions             0.1.1   Sonata twig extensions
sonata-project/user-bundle                 4.8.0   Symfony SonataUserBundle
swiftmailer/swiftmailer                    v6.2.3  Swiftmailer, free feature-rich PHP mailer
symfony-cmf/block-bundle                   2.1.1   Symfony CMF Block Bundle
symfony-cmf/content-bundle                 2.1.0   Symfony CMF Content Bundle
symfony-cmf/core-bundle                    2.1.1   Symfony CMF Core Bundle
symfony-cmf/menu-bundle                    2.2.0   Symfony CMF Menu Bundle
symfony-cmf/resource                       1.1.0   Bundle which facilitates document resource location via Puli
symfony-cmf/resource-bundle                1.1.0   Bundle which facilitates document resource location
symfony-cmf/resource-rest-bundle           1.1.1   Bundle which provides a REST API for resources
symfony-cmf/routing                        2.3.3   Extends the Symfony routing component for dynamic routes and chainin...
symfony-cmf/routing-bundle                 2.4.0   Symfony RoutingBundle
symfony-cmf/symfony-cmf                    2.1.0   Symfony Content Management Framework
symfony-cmf/tree-browser-bundle            2.1.1   Symfony CMF Tree Browser Bundle
symfony/asset                              v4.4.15 Symfony Asset Component
symfony/browser-kit                        v4.4.15 Symfony BrowserKit Component
symfony/cache                              v4.4.15 Symfony Cache component with PSR-6, PSR-16, and tags
symfony/cache-contracts                    v2.2.0  Generic abstractions related to caching
symfony/config                             v4.4.15 Symfony Config Component
symfony/console                            v4.4.15 Symfony Console Component
symfony/css-selector                       v4.4.15 Symfony CssSelector Component
symfony/debug                              v4.4.15 Symfony Debug Component
symfony/debug-bundle                       v4.4.15 Symfony DebugBundle
symfony/dependency-injection               v4.4.15 Symfony DependencyInjection Component
symfony/doctrine-bridge                    v4.4.15 Symfony Doctrine Bridge
symfony/dom-crawler                        v4.4.15 Symfony DomCrawler Component
symfony/dotenv                             v4.4.15 Registers environment variables from a .env file
symfony/error-handler                      v4.4.15 Symfony ErrorHandler Component
symfony/event-dispatcher                   v4.4.15 Symfony EventDispatcher Component
symfony/event-dispatcher-contracts         v1.1.9  Generic abstractions related to dispatching event
symfony/expression-language                v4.4.15 Symfony ExpressionLanguage Component
symfony/filesystem                         v4.4.15 Symfony Filesystem Component
symfony/finder                             v4.4.15 Symfony Finder Component
symfony/flex                               v1.9.10 Composer plugin for Symfony
symfony/form                               v4.4.15 Symfony Form Component
symfony/framework-bundle                   v4.4.15 Symfony FrameworkBundle
symfony/http-client                        v4.4.15 Symfony HttpClient component
symfony/http-client-contracts              v2.3.1  Generic abstractions related to HTTP clients
symfony/http-foundation                    v4.4.15 Symfony HttpFoundation Component
symfony/http-kernel                        v4.4.15 Symfony HttpKernel Component
symfony/inflector                          v4.4.15 Symfony Inflector Component
symfony/intl                               v4.4.15 A PHP replacement layer for the C intl extension that includes addit...
symfony/mailer                             v4.4.15 Symfony Mailer Component
symfony/maker-bundle                       v1.22.0 Symfony Maker helps you create empty commands, controllers, form cla...
symfony/mime                               v4.4.15 A library to manipulate MIME messages
symfony/monolog-bridge                     v4.4.15 Symfony Monolog Bridge
symfony/monolog-bundle                     v3.6.0  Symfony MonologBundle
symfony/options-resolver                   v4.4.15 Symfony OptionsResolver Component
symfony/phpunit-bridge                     v5.1.7  Symfony PHPUnit Bridge
symfony/polyfill-intl-grapheme             v1.19.0 Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-icu                  v1.19.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-intl-idn                  v1.19.0 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-intl-normalizer           v1.19.0 Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring                  v1.19.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php72                     v1.19.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP ver...
symfony/polyfill-php73                     v1.19.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP ver...
symfony/polyfill-php80                     v1.19.0 Symfony polyfill backporting some PHP 8.0+ features to lower PHP ver...
symfony/process                            v4.4.15 Symfony Process Component
symfony/property-access                    v4.4.15 Symfony PropertyAccess Component
symfony/property-info                      v4.4.15 Symfony Property Info Component
symfony/routing                            v4.4.15 Symfony Routing Component
symfony/security-acl                       v3.1.0  Symfony Security Component - ACL (Access Control List)
symfony/security-bundle                    v4.4.15 Symfony SecurityBundle
symfony/security-core                      v4.4.15 Symfony Security Component - Core Library
symfony/security-csrf                      v4.4.15 Symfony Security Component - CSRF Library
symfony/security-guard                     v4.4.15 Symfony Security Component - Guard
symfony/security-http                      v4.4.15 Symfony Security Component - HTTP Integration
symfony/serializer                         v4.4.15 Symfony Serializer Component
symfony/service-contracts                  v2.2.0  Generic abstractions related to writing services
symfony/stopwatch                          v4.4.15 Symfony Stopwatch Component
symfony/string                             v5.1.7  Symfony String component
symfony/templating                         v4.4.15 Symfony Templating Component
symfony/translation                        v4.4.15 Symfony Translation Component
symfony/translation-contracts              v2.3.0  Generic abstractions related to translation
symfony/twig-bridge                        v4.4.15 Symfony Twig Bridge
symfony/twig-bundle                        v4.4.15 Symfony TwigBundle
symfony/validator                          v4.4.15 Symfony Validator Component
symfony/var-dumper                         v4.4.15 Symfony mechanism for exploring and dumping PHP variables
symfony/var-exporter                       v4.4.15 A blend of var_export() + serialize() to turn any serializable data ...
symfony/web-link                           v4.4.15 Symfony WebLink Component
symfony/web-profiler-bundle                v4.4.15 Symfony WebProfilerBundle
symfony/yaml                               v4.4.15 Symfony Yaml Component
twig/extensions                            v1.5.4  Common additional features for Twig that do not directly belong in core
twig/extra-bundle                          v3.1.0  A Symfony bundle for extra Twig extensions
twig/string-extra                          v3.1.0  A Twig extension for Symfony String
twig/twig                                  v2.14.0 Twig, the flexible, fast, and secure template language for PHP
webimpress/safe-writer                     2.1.0   Tool to write files safely, to avoid race conditions
webmozart/assert                           1.9.1   Assertions to validate method input/output with nice error messages.
webmozart/path-util                        2.3.0   A robust cross-platform utility for normalizing, comparing and modif...
willdurand/jsonp-callback-validator        v1.1.0  JSONP callback validator.

Subject

Resource rest bundle by following the officially manual from Sonata "DOCTRINE2 PHPCR ADMIN"

Steps to reproduce

Following this manual https://sonata-project.org/bundles/doctrine-phpcr-admin/master/doc/reference/document_tree.html

Expected results

It should work.

Actual results

Symfony\Component\ErrorHandler\Error\UndefinedMethodError: Attempted to call an undefined method named "accept" of class "JMS\Serializer\SerializationContext".

at vendor/symfony-cmf/resource-rest-bundle/src/Serializer/Jms/Handler/ResourceHandler.php:82
at Symfony\Cmf\Bundle\ResourceRestBundle\Serializer\Jms\Handler\ResourceHandler->serializeResource(object(JsonSerializationVisitor), object(PhpcrOdmResource), array('name' => 'Puli\Repository\Api\Resource\PuliResource', 'params' => array()), object(SerializationContext))
(vendor/jms/serializer/src/GraphNavigator/SerializationGraphNavigator.php:198)
at JMS\Serializer\GraphNavigator\SerializationGraphNavigator->accept(object(PhpcrOdmResource), array('name' => 'Puli\Repository\Api\Resource\PuliResource', 'params' => array()))
(vendor/jms/serializer/src/Serializer.php:249)
at JMS\Serializer\Serializer->visit(object(SerializationGraphNavigator), object(JsonSerializationVisitor), object(SerializationContext), object(PhpcrOdmResource), 'json', null)
(vendor/jms/serializer/src/Serializer.php:162)
at JMS\Serializer\Serializer->serialize(object(PhpcrOdmResource), 'json', object(SerializationContext))
(vendor/symfony-cmf/resource-rest-bundle/src/Controller/ResourceController.php:206)
at Symfony\Cmf\Bundle\ResourceRestBundle\Controller\ResourceController->createResponse(object(PhpcrOdmResource))
(vendor/symfony-cmf/resource-rest-bundle/src/Controller/ResourceController.php:85)
at Symfony\Cmf\Bundle\ResourceRestBundle\Controller\ResourceController->getResourceAction(object(Request), 'default', '/cms/blocks')
(vendor/symfony/http-kernel/HttpKernel.php:158)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:80)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:201)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(public/index.php:25)

It doesn't work. We need to update JMS\Serializer package version to 2.1+. For now, we have in this package ^1.2. We have no possibilities downgrade JSM to 1.2 another way we crashing sonata-core package where is using JMS 2.1+. It's related with this PR #symfony-cmf/routing-auto/pull/122

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.