Closed ruudk closed 2 weeks ago
Files without namespace and use statements have limited support as stated in readme. So just use FQN or use statements.
@janedbal Hmm, interesting. When you have a bundles.php file with 50 bundles, having to import all them, makes the file 100+ lines instead of 50 lines. So I would prefer not to have to do that.
Would it be possible to improve this limited support?
If it is, I could try to provide a PR for it.
When you have a bundles.php file with 50 bundles, having to import all them, makes the file 100+ lines instead of 50 lines. So I would prefer not to have to do that.
So use FQN like this:
<?php
return [
\Symfonycasts\TailwindBundle\SymfonycastsTailwindBundle::class => ['all' => true],
\Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true],
];
Would it be possible to improve this limited support?
Definitelly not easy. I'll try to think about that again.
So use FQN like this:
<?php return [ \Symfonycasts\TailwindBundle\SymfonycastsTailwindBundle::class => ['all' => true], \Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true], ];
That works, although PHPStorm / PHP CS Fixer now automatically imports it. Not ideal.
Ok, I dived into it and turns out it was quite easy (#148).
Can you try dev-master
if that works for you? Thanks
@janedbal It works 🎉 ⚡ Thank you!!
If you have time, it would be great to have it tagged too.
In my Symfony Application, we have a
config/bundles.php
that looks like this:My configuration looks like this:
But even though those bundles are used, the analyzer complains:
Am I missing something, or is a FQCN class reference not seen as usage?