Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DevKit updates for 4.x branch #1658

Merged
merged 9 commits into from Mar 10, 2023
Merged

DevKit updates for 4.x branch #1658

merged 9 commits into from Mar 10, 2023

Conversation

SonataCI
Copy link
Collaborator

@SonataCI SonataCI commented Mar 5, 2023

Changelog

### Removed
- Support for PHP 7.4
- Support for Symfony 6.0 and 6.1
- Support for `doctrine/persistence` ^2.0.

@jordisala1991
Copy link
Member

2 errors missing from psalm, not sure how to fix them @VincentLanglet , can you help me?

@VincentLanglet
Copy link
Member

VincentLanglet commented Mar 9, 2023

2 errors missing from psalm, not sure how to fix them @VincentLanglet , can you help me?

Sure:

ERROR: InvalidArgument - src/CmsManager/CmsSnapshotManager.php:154:56 - Argument 1 of Sonata\BlockBundle\Util\RecursiveBlockIteratorIterator::__construct expects Doctrine\Common\Collections\Collection<array-key, mixed>|array<array-key, mixed>, but Doctrine\Common\Collections\Collection<array-key, Sonata\PageBundle\Model\PageBlockInterface> provided (see https://psalm.dev/004)
        $iterator = new RecursiveBlockIteratorIterator($page->getBlocks());

This error need to be fixed in BlockBundle by changing Collection phpdoc to ReadableCollection in order to accept covariance. (You can try with sonata-project/SonataBlockBundle#1142)

And for

$template = new Template('page', 'template.twig', ['header' => [
            'name' => 'Header',
            'block' => ['text.block'],
        ]]);

we're passing block and not blocks.

composer.json Outdated Show resolved Hide resolved
composer.json Outdated Show resolved Hide resolved
@jordisala1991 jordisala1991 merged commit 0b28aee into 4.x Mar 10, 2023
@jordisala1991 jordisala1991 deleted the 4.x-dev-kit branch March 10, 2023 17:17
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.

None yet

3 participants