I've just upgraded to latest version of both sonata as well as Symfony. Suddenly I get the following error if I try to use DateRangePickerType in the configureDatagridFilters method, as such:
->add('updated', DateRangeFilter::class, [ 'field_type' => DateRangePickerType::class ])
Too few arguments to function Sonata\Form\Type\BasePickerType::__construct(), 0 passed in /vendor/symfony/form/FormRegistry.php on line 92 and at least 1 expected
I've just upgraded to latest version of both sonata as well as Symfony. Suddenly I get the following error if I try to use DateRangePickerType in the configureDatagridFilters method, as such:
->add('updated', DateRangeFilter::class, [ 'field_type' => DateRangePickerType::class ])
Before today, this worked perfectly.
Environment
dev
Sonata packages
sonata-project/admin-bundle 3.43.0 3.43.0 The missing Symfony Admin Generator sonata-project/block-bundle 3.13.0 3.13.0 Symfony SonataBlockBundle sonata-project/cache 2.0.1 2.0.1 Cache library sonata-project/core-bundle 3.13.4 3.13.4 Symfony SonataCoreBundle sonata-project/datagrid-bundle 2.4.0 2.4.0 Symfony SonataDatagridBundle sonata-project/doctrine-extensions 1.1.3 1.1.3 Doctrine2 behavioral extensions sonata-project/doctrine-orm-admin-bundle 3.6.3 3.6.3 Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle sonata-project/easy-extends-bundle 2.5.0 2.5.0 Symfony SonataEasyExtendsBundle sonata-project/exporter 1.10.0 1.10.0 Lightweight Exporter library sonata-project/user-bundle 4.2.3 4.2.3 Symfony SonataUserBundle
Symfony packages
symfony/asset v4.1.9 v4.1.9 Symfony Asset Component symfony/browser-kit v4.1.9 v4.1.9 Symfony BrowserKit Component symfony/cache v4.1.9 v4.1.9 Symfony Cache component with PSR-6, PSR-16, and tags symfony/config v4.1.9 v4.1.9 Symfony Config Component symfony/console v4.1.9 v4.1.9 Symfony Console Component symfony/css-selector v4.1.9 v4.1.9 Symfony CssSelector Component symfony/debug v4.1.9 v4.1.9 Symfony Debug Component symfony/debug-bundle v4.1.9 v4.1.9 Symfony DebugBundle symfony/debug-pack v1.0.7 v1.0.7 A debug pack for Symfony projects symfony/dependency-injection v4.1.9 v4.1.9 Symfony DependencyInjection Component symfony/doctrine-bridge v4.1.9 v4.1.9 Symfony Doctrine Bridge symfony/dom-crawler v4.1.9 v4.1.9 Symfony DomCrawler Component symfony/dotenv v4.1.9 v4.1.9 Registers environment variables from a .env file symfony/event-dispatcher v4.1.9 v4.1.9 Symfony EventDispatcher Component symfony/expression-language v4.1.9 v4.1.9 Symfony ExpressionLanguage Component symfony/filesystem v4.1.9 v4.1.9 Symfony Filesystem Component symfony/finder v4.1.9 v4.1.9 Symfony Finder Component symfony/flex v1.1.8 v1.1.8 Composer plugin for Symfony symfony/form v4.1.9 v4.1.9 Symfony Form Component symfony/framework-bundle v4.1.9 v4.1.9 Symfony FrameworkBundle symfony/http-foundation v4.1.9 v4.1.9 Symfony HttpFoundation Component symfony/http-kernel v4.1.9 v4.1.9 Symfony HttpKernel Component symfony/inflector v4.1.9 v4.1.9 Symfony Inflector Component symfony/intl v4.1.9 v4.1.9 A PHP replacement layer for the C intl extension that includes additional data from the ICU library. symfony/maker-bundle v1.10.0 v1.10.0 Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code. symfony/monolog-bridge v4.1.9 v4.1.9 Symfony Monolog Bridge symfony/monolog-bundle v3.3.1 v3.3.1 Symfony MonologBundle symfony/options-resolver v4.1.9 v4.1.9 Symfony OptionsResolver Component symfony/orm-pack v1.0.5 v1.0.5 A pack for the Doctrine ORM symfony/panther v0.2.0 v0.2.0 A browser testing and web scraping library for PHP and Symfony. symfony/phpunit-bridge v4.2.1 v4.2.1 Symfony PHPUnit Bridge symfony/polyfill-intl-icu v1.10.0 v1.10.0 Symfony polyfill for intl's ICU-related data and classes symfony/polyfill-mbstring v1.10.0 v1.10.0 Symfony polyfill for the Mbstring extension symfony/polyfill-php72 v1.10.0 v1.10.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions symfony/process v4.1.9 v4.1.9 Symfony Process Component symfony/profiler-pack v1.0.4 v1.0.4 A pack for the Symfony web profiler symfony/property-access v4.1.9 v4.1.9 Symfony PropertyAccess Component symfony/property-info v4.1.9 v4.1.9 Symfony Property Info Component symfony/routing v4.1.9 v4.1.9 Symfony Routing Component symfony/security v4.1.9 v4.1.9 Symfony Security Component symfony/security-acl v3.0.1 v3.0.1 Symfony Security Component - ACL (Access Control List) symfony/security-bundle v4.1.9 v4.1.9 Symfony SecurityBundle symfony/serializer v4.1.9 v4.1.9 Symfony Serializer Component symfony/serializer-pack v1.0.2 v1.0.2 A pack for the Symfony serializer symfony/stopwatch v4.1.9 v4.1.9 Symfony Stopwatch Component symfony/swiftmailer-bundle v3.2.4 v3.2.4 Symfony SwiftmailerBundle symfony/templating v4.1.9 v4.1.9 Symfony Templating Component symfony/test-pack v1.0.5 v1.0.5 A pack for functional and end-to-end testing within a Symfony app symfony/translation v4.1.9 v4.1.9 Symfony Translation Component symfony/twig-bridge v4.1.9 v4.1.9 Symfony Twig Bridge symfony/twig-bundle v4.1.9 v4.1.9 Symfony TwigBundle symfony/validator v4.1.9 v4.1.9 Symfony Validator Component symfony/var-dumper v4.1.9 v4.1.9 Symfony mechanism for exploring and dumping PHP variables symfony/web-link v4.1.9 v4.1.9 Symfony WebLink Component symfony/web-profiler-bundle v4.1.9 v4.1.9 Symfony WebProfilerBundle symfony/web-server-bundle v4.1.9 v4.1.9 Symfony WebServerBundle symfony/yaml v4.1.9 v4.1.9 Symfony Yaml Component
PHP version
PHP 7.1.24-1+0~20181112093415.10+jessie~1.gbp09a4fd (cli) (built: Nov 12 2018 09:52:44) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.1.24-1+0~20181112093415.10+jessie~1.gbp09a4fd, Copyright (c) 1999-2018, by Zend Technologies with Xdebug v2.6.1, Copyright (c) 2002-2018, by Derick Rethans