psalm-plugin-symfony icon indicating copy to clipboard operation
psalm-plugin-symfony copied to clipboard

Psalm Plugin for Symfony

Results 56 psalm-plugin-symfony issues
Sort by recently updated
recently updated
newest added

Hello. Given: Psalm 4.6.2 psalm/symfony-plugin v.2.1.2 Symfony v4.4.* PHP code: ```php namespace App; interface SomeImportantInterface {} class SomeLogic implements SomeImportantInterface {} class Handler { public function __invoke(SomeImportantInterface $logic) { }...

feature

Doctrine has some special handling where it looks up the primary key of the object if said object is an entity that's known to it, and to keep this behavior...

https://github.com/sensiolabs/SensioFrameworkExtraBundle/blob/master/src/Configuration/ParamConverter.php vs. https://github.com/psalm/psalm-plugin-symfony/blob/master/src/Stubs/common/Bundle/FrameworkExtraBundle/Configuration/ParamConverter.stubphp Latest version doesn't return `null` anymore.

question

Hi there, The following: ```php public function denormalize($data, $type, $format = null, array $context = []): ?Money { if (null === $data) { return null; } if (!isset($data['amount'], $data['currency'])) {...

I have the following (rather ugly, but required) code: ```php if ($this->container->has('wouterj_eloquent.initializer')) { $this->container->get('wouterj_eloquent.initializer')->initialize(); } ``` This produces the following error with Psalm level 3 and this plugin (both latest...

enhancement

Hi there, This plugin is causing a large performance penalty which is most obvious on symfony projects with a large amount of services. This line: https://github.com/psalm/psalm-plugin-symfony/blob/cc89974d16ceda9f7e235e8a74f612e8d3ea44df/src/Handler/ContainerHandler.php#L144 is causing all services...

Hi @seferov The following code ``` public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('sonata_doctrine_orm_admin'); $rootNode = $treeBuilder->getRootNode(); \assert($rootNode instanceof ArrayNodeDefinition); $rootNode ->children() ->scalarNode('entity_manager')->defaultNull()->end() ->arrayNode('audit') // The error is here...

The containerInterface has the following doc ``` /** * Gets a service. * * @param string $id The service identifier * @param int $invalidBehavior The behavior when the service does...

Would it make sense to emit an error when seeing a `dd()` or `dump()`? I do this myself using a PHPStan extension, but just wanted to pitch the idea here...

The following code ``` use App\Entity\Foo; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Exception\InvalidArgumentException; class MyConstraint extends Constraint { /** * @var Foo */ public $foo; /** * @var string */ public $message =...