-
-
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 |
---|---|---|
|
@@ -44,7 +44,6 @@ class ServiceConfigurator extends AbstractServiceConfigurator | |
|
||
private $container; | ||
private $instanceof; | ||
private $allowParent; | ||
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. to be reverted |
||
|
||
public function __construct(ContainerBuilder $container, array $instanceof, bool $allowParent, ServicesConfigurator $parent, Definition $definition, $id, array $defaultTags) | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ | |
|
||
trait BindTrait | ||
{ | ||
protected $id; | ||
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. the property is already defined in the classes that use the trait 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. As above, the trait should define the properties it uses, no? |
||
|
||
/** | ||
* Sets bindings. | ||
* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ | |
|
||
trait ParentTrait | ||
{ | ||
protected $allowParent; | ||
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. visibility change, should be reverted 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. Same as above, the properties used by the trait were moved to the trait. 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. two traits defining a same property cannot be used by the same class 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. Again, SHOULD traits share a property? Having a property inside a class is similar as being in concrete instead of abstract class, your abstraction depends on the implementation and vice-versa at the same time. I mean, I can easily ignore these traits, but this seems broken. PHPStorm and PHPStan seem to agree. 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. The code is perfectly fine as is, and intended as is. So the answer is YES :) |
||
|
||
/** | ||
* Sets the Definition to inherit from. | ||
* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -412,6 +412,7 @@ class ProjectServiceContainer extends Container | |
public $__foo_bar; | ||
public $__foo_baz; | ||
public $__internal; | ||
private $privates; | ||
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. it should be "protected", as in the dumped container |
||
protected $methodMap = array( | ||
'bar' => 'getBarService', | ||
'foo_bar' => 'getFooBarService', | ||
|
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.
this should be kept (same below), this is a false positive: the property is used by a trait
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.
But that makes the trait dependent on the class using it? Which is in turn dependent on the trait it's using?