Ruud Kamphuis

Results 117 issues of Ruud Kamphuis

Let's say you have the following Enum: ```php enum OrderStatus: string { case Paid = 'paid'; } ``` Currently, we have to write `{{ status.value }}` to display an enum...

It would be great if I could configure the analyzer like this: ```php $config->onlyAllowPackagesInPaths( [ 'phpstan/phpstan', ], [ __DIR__ . '/src/PHPStan/Collector/SomeCollector.php', ], ); ``` It might be specific to [my...

enhancement

It should not complain about the constructor.

enhancement

I'm looking at the [SymfonyEntrypointProvider](https://github.com/shipmonk-rnd/dead-code-detector/blob/master/src/Provider/SymfonyEntrypointProvider.php) and see that it relies on the ServiceMapFactory from phpstan-symfony. This ServiceMapFactory uses the containerXmlPath to function. In our Symfony project, we have this XML...

First of all, thanks for creating this great extension 💙 Since there is not a Discussion board to ask questions, I create this as issue. I have the following code:...

Let's say you have the following: ```php class MyHandler { public function __construct(private SomeDependency $dep) {} public function __invoke(MyCommand $command) {} } class MyCommand { public function __construct(public string $name)...

Currently, the extension is unaware of usage in templates (like Twig). I'm working on [TwigStan](https://github.com/twigstan/twigstan). TwigStan is a separate tool that invokes PHPStan (it's not an extension). It compiles Twig...

question

### Bug report PHPStan already handles Immediately Invoked Function Expression quite well. After https://github.com/phpstan/phpstan-src/pull/1628 it also understands the passed in types. Even when the parameter is passed by reference, within...

feature-request

It appears that `getSingleScalarResult()` currently always returns `bool|float|int|string|null`. If I have the following query: ```php $result = $this->createQueryBuilder('u') ->select('COUNT(u.id)') ->where('u.is_deleted = false') ->getQuery() ->getSingleScalarResult(); \PHPStan\assertType($result, 'bool|float|int|string|null'); ``` But when I...

I have no idea what this is, or what causes it. ```php // This all works: list dumpType($this->createQueryBuilder('e')->getQuery()->getResult()); dumpType($this->createQueryBuilder('my_name')->getQuery()->getResult()); dumpType($this->createQueryBuilder('oo')->getQuery()->getResult()); dumpType($this->createQueryBuilder('abcdef')->getQuery()->getResult()); dumpType($this->createQueryBuilder('user')->getQuery()->getResult()); dumpType($this->createQueryBuilder('av')->getQuery()->getResult()); dumpType($this->createQueryBuilder('eve')->getQuery()->getResult()); dumpType($this->createQueryBuilder('even')->getQuery()->getResult()); // This returns: mixed dumpType($this->createQueryBuilder('ev')->getQuery()->getResult());...