sonata-project / SonataDoctrinePhpcrAdminBundle

[Abandoned] Symfony Sonata / Integrate Doctrine PHPCR into the SonataAdminBundle
https://sonata-project.org
MIT License
34 stars 93 forks source link

CollectionOrderListener - UndefinedMethodException #400

Closed binhle410 closed 4 years ago

binhle410 commented 7 years ago

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
dbu commented 7 years ago

uh. for the rest, we require symfony 2.3, but there is a dependency for property accessor 2.2 in composer.json... this makes little sense, even 2.3 is end of live.

can you please do a pull request where you change dependency and code to the 2.3 variant (and maybe check if there are other similar places? do that against the 1.x branch, we can release it as a patch version - there is no BC break, just dropping a too old version from composer.json.

binhle410 commented 7 years ago

Ok, I will do this along with my other pending PRs on sonata-project

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.