Skip to content

Conversation

@TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Oct 13, 2025

Closes #7488

@TomasVotruba TomasVotruba changed the title tv arrow Add closure, function and arrow function support to ParamTypeByMethodCallTypeRector Oct 13, 2025
@TomasVotruba TomasVotruba merged commit 1901bcb into main Oct 13, 2025
51 of 52 checks passed
@TomasVotruba TomasVotruba deleted the tv-arrow branch October 13, 2025 11:45
@samsonasik
Copy link
Member

It seems cause regression on use of Symfony FormBuilderInterface pass closure Assert\Callback, something like:

        $builder->add('someType', DocumentType::class, [
            'class' => SomeType::class,
            'required' => false,
            'label' => 'Some Type',
            'attr' => [
                'data-help' => 'some data help',
            ],
            'constraints' => [
-                new Assert\Callback(function ($someType, ExecutionContextInterface $context): void {
+                new Assert\Callback(function (SomeType $someType, ExecutionContextInterface $context): void {

which seems due to required => false, the type can be null.

I will check if this is resolvable.

@samsonasik
Copy link
Member

I created PR to handle Assert\Callback regression:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants