phpstan-symfony icon indicating copy to clipboard operation
phpstan-symfony copied to clipboard

Symfony extension for PHPStan

Results 62 phpstan-symfony issues
Sort by recently updated
recently updated
newest added

I'm getting the same that arose in #337 after merge during a PHPStan patch upgrade with Renovate: | Package | Type | Update | Change | |---|---|---|---| | [phpstan/phpstan](https://github.com/phpstan/phpstan) |...

Starting with version 1.3.0 of `phpstan/phpstan-symfony`, the following code is not valid anymore. ``` // src/Controller/DefaultController.php use Symfony\Component\Form\Form; use Symfony\Component\Form\FormInterface; ... /** @var Form&FormInterface $form */ $form = $this->createForm(...); ```...

Hello, Since #192 (fix #191), the return type for `ParameterBagInterface::get()` works with dependency injection but not with `ServiceSubscriberInterface` : ```php namespace App\Issue; use Psr\Container\ContainerInterface; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; use Symfony\Contracts\Service\ServiceSubscriberInterface; class Issue...

/cc @DaveLiddament When an object is validated with Symfony Validator, we could narrow down its property types based on constraints. My idea is: * Create `class ValidatedObjectType extends ObjectType` *...

The extension is setting: ```neon constant_hassers: true constantHassers: true ``` in our libraries which we had phpstan update it still uses: ```neon constant_hassers: true ``` But this seems not has...

``` ❯ composer bin phpstan info phpstan/phpstan-symfony [bamarni-bin] Checking namespace vendor-bin/phpstanser bin phpstan info phpstan/phpstan-symfony  1 ✘  14:44:46  name : phpstan/phpstan-symfony descrip. : Symfony Framework extensions and...

You can define service subscribers with non-service name keys, e.g. ```php class SubmissionStrategyFactory implements ServiceSubscriberInterface { public function __construct(private readonly ContainerInterface $locator) { } public function getStrategy(IllustrationSubmission $submission): SubmissionStrategyInterface {...

Fixed some errors on PHPStan level 9. As Is: ``` ❯ vendor/bin/phpstan analyse src --level 9 Note: Using configuration file /Users/siketyan/.local/src/github.com/phpstan/phpstan-symfony/phpstan.neon. 54/54 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% ------ ------------------------------------------------------------------------------------------------------------------ Line Symfony/Configuration.php ------ ------------------------------------------------------------------------------------------------------------------...

I'm using the phpstan-symfony extension in a library so I'm not able to register the standard console application loader (as you would in a regular project) So I've added a...

I have an issue with ServiceSubscriberTrait (https://symfony.com/doc/5.4/service_container/service_subscribers_locators.html#service-subscriber-trait) on symfony 5.4 and PHP 7.4. Error message is like `Service "App\Service\MyService::router" is not registered in the container.` How to reproduce: 1. Install...