Skip to content

Restrict datagridBuilder type to class-string and add Template#7092

Merged
VincentLanglet merged 6 commits intosonata-project:3.xfrom
VincentLanglet:builder
Apr 26, 2021
Merged

Restrict datagridBuilder type to class-string and add Template#7092
VincentLanglet merged 6 commits intosonata-project:3.xfrom
VincentLanglet:builder

Conversation

@VincentLanglet
Copy link
Member

@VincentLanglet VincentLanglet commented Apr 19, 2021

Subject

BC

Fix

ArgumentTypeCoercion - src/Builder/DatagridBuilder.php:135:78 - Argument 2 of Sonata\AdminBundle\Filter\FilterFactoryInterface::create expects class-string, parent type string provided (see https://psalm.dev/193)
        $filter = $this->filterFactory->create($fieldDescription->getName(), $type, $fieldDescription->getOptions());

And

Method Sonata\DoctrineORMAdminBundle\Builder\DatagridBuilder::getBaseDatagrid() should return Sonata\AdminBundle\Datagrid\DatagridInterface<Sonata\AdminBundle\Datagrid\ProxyQueryInterface> but returns  
         Sonata\AdminBundle\Datagrid\Datagrid<Sonata\DoctrineORMAdminBundle\Datagrid\ProxyQueryInterface>.

And I'm trying to solve other issue in sonata-project/SonataDoctrineORMAdminBundle#1421

Changelog

### Added
- Generic template for DatagridBuilderInterface
- Generic template for LockInterface

### Fixed
- `DatagridBuilderInterface::addFilter` phpdoc: The `$type` MUST be a class-string.
- Missing generic template for ModelManagerInterface

@VincentLanglet VincentLanglet requested a review from a team April 19, 2021 10:40
@VincentLanglet VincentLanglet changed the title Restrict datagridBuilder type to class-string Restrict datagridBuilder type to class-string and add Template Apr 19, 2021
jordisala1991
jordisala1991 previously approved these changes Apr 19, 2021
@VincentLanglet VincentLanglet requested a review from a team April 19, 2021 18:02
phansys
phansys previously approved these changes Apr 26, 2021
@VincentLanglet VincentLanglet dismissed stale reviews from phansys and jordisala1991 via 0fe7b3a April 26, 2021 22:59
Co-authored-by: Javier Spagnoletti <phansys@gmail.com>
@VincentLanglet VincentLanglet merged commit 37e10c8 into sonata-project:3.x Apr 26, 2021
@VincentLanglet VincentLanglet deleted the builder branch April 26, 2021 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants