sonata-project / SonataAdminBundle

The missing Symfony Admin Generator
https://docs.sonata-project.org/projects/SonataAdminBundle
MIT License
2.11k stars 1.26k forks source link

AbstractAdmin uses deprecated InlineConstraint #5678

Closed amacrobert-meq closed 5 years ago

amacrobert-meq commented 5 years ago

Environment

Sonata packages

$ composer show --latest 'sonata-project/*'
sonata-project/admin-bundle              3.52.0 3.52.0 The missing Symfony Admin Generator
sonata-project/block-bundle              3.17.0 3.17.0 Symfony SonataBlockBundle
sonata-project/cache                     2.0.1  2.0.1  Cache library
sonata-project/core-bundle               3.17.0 3.17.0 Symfony SonataCoreBundle
sonata-project/datagrid-bundle           2.5.0  2.5.0  Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.3.0  1.3.0  Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.10.0 3.10.0 Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/exporter                  1.11.1 1.11.1 Lightweight Exporter library

Symfony packages

$ composer show --latest 'symfony/*'
symfony/monolog-bundle     v3.4.0  v3.4.0  Symfony MonologBundle
symfony/phpunit-bridge     v3.4.30 v4.3.3  Symfony PHPUnit Bridge
symfony/polyfill-apcu      v1.12.0 v1.12.0 Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-ctype     v1.12.0 v1.12.0 Symfony polyfill for ctype functions
symfony/polyfill-intl-icu  v1.12.0 v1.12.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring  v1.12.0 v1.12.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php56     v1.12.0 v1.12.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php70     v1.12.0 v1.12.0 Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-util      v1.12.0 v1.12.0 Symfony utilities for portability of PHP codes
symfony/security-acl       v3.0.2  v3.0.2  Symfony Security Component - ACL (Access Control List)
symfony/swiftmailer-bundle v2.6.7  v3.2.8  Symfony SwiftmailerBundle
symfony/symfony            v3.4.30 v4.3.3  The Symfony PHP framework

PHP version

$ php -v
PHP 7.1.31 (cli) (built: Aug 11 2019 21:05:57) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.31, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v2.7.2, Copyright (c) 2002-2019, by Derick Rethans

Subject

I see the following deprecated notice:

The Sonata\CoreBundle\Validator\Constraints\InlineConstraint class is deprecated since version 3.13.0 and will be removed in 4.0. Use Sonata\Form\Validator\Constraint\InlineConstraint instead.

I see Sonata\CoreBundle\Validator\Constraints\InlineConstraint is used in Sonata\AdminBundle\Admin\AbstractAdmin.

Steps to reproduce

  1. Install sonata-project/admin-bundle 3.52.0 and sonata-project/core-bundle 3.17.
  2. Make an admin and load its create or edit page.
  3. See deprecated notice.

Expected results

No deprecated notice.

Actual results

The Sonata\CoreBundle\Validator\Constraints\InlineConstraint class is deprecated since version 3.13.0 and will be removed in 4.0. Use Sonata\Form\Validator\Constraint\InlineConstraint instead.

phansys commented 5 years ago

Until 4.x, this deprecation could not be removed, since we need to replace "sonata-project/core-bundle" with the new dependencies, like "sonata-project/form-extensions".

I'm closing the issue.