-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
WIP [Meta] Add PHPStan to build process #25536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
e1be251
bfb3048
9183062
d9e30ae
83c1208
bdeda31
0a33eb1
a7dff25
03daa41
da9d0e4
75403df
c5467e0
dbdf9de
5fc8d8e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ | |
namespace Symfony\Bridge\Doctrine; | ||
|
||
use ProxyManager\Proxy\LazyLoadingInterface; | ||
use Psr\Container\ContainerInterface; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you please submit these as separate PRs, on the lowest maintained branch where they apply? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you think it would make sense to introduce this in master only? The way I see it, getting the entire framework to run will be an undertaking and, getting it to run in all branches might be quite the PITA. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't tell if we're going to merge this yet (adding phpstan) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's exactly my point, don't know if this is even possible to get running yet. Let's see if this can be done, if so, I'll separate bugfixes into separate PRs once we see how it'll even look and what gets caught. Sounds good? |
||
use Symfony\Component\DependencyInjection\Container; | ||
use Doctrine\Common\Persistence\AbstractManagerRegistry; | ||
|
||
|
@@ -24,7 +23,7 @@ | |
abstract class ManagerRegistry extends AbstractManagerRegistry | ||
{ | ||
/** | ||
* @var ContainerInterface | ||
* @var Container | ||
*/ | ||
protected $container; | ||
|
||
|
@@ -58,7 +57,7 @@ function (&$wrappedInstance, LazyLoadingInterface $manager) use ($name) { | |
$name = $this->aliases[$name]; | ||
} | ||
if (isset($this->fileMap[$name])) { | ||
$wrappedInstance = $this->load($this->fileMap[$name], false); | ||
$wrappedInstance = $this->load($this->fileMap[$name]); | ||
} else { | ||
$method = $this->methodMap[$name] ?? 'get'.strtr($name, $this->underscoreMap).'Service'; // BC with DI v3.4 | ||
$wrappedInstance = $this->{$method}(false); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why adding this one? it's not used in the code base so I wouldn't add it to please phpstan :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Monolog/Handler/SwiftMailerHandler.php is using it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not: there is no test case for it, so the code just doens't run - so there is no need to add this in require-dev (it's not required)
unless you want to add a test case :)