Skip to content
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

WIP [Meta] Add PHPStan to build process #25536

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
QA_DOCKER_IMAGE=dkarlovi/phpqa-toolbox:latest
QA_DOCKER_COMMAND=docker run -it --rm -v "$(shell pwd):/project" -w /project ${QA_DOCKER_IMAGE}

phpstan:
sh -c "${QA_DOCKER_COMMAND} phpstan analyse --configuration phpstan.neon --level 0 src/"

##
# Special operations
##

.PHONY: phpstan
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@
"egulias/email-validator": "~1.2,>=1.2.8|~2.0",
"symfony/phpunit-bridge": "~3.4|~4.0",
"symfony/security-acl": "~2.8|~3.0",
"phpdocumentor/reflection-docblock": "^3.0|^4.0"
"phpdocumentor/reflection-docblock": "^3.0|^4.0",
"swiftmailer/swiftmailer": "^6.0@dev"
Copy link
Member

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 :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

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 :)

},
"conflict": {
"phpdocumentor/reflection-docblock": "<3.0||>=3.2.0,<3.2.2",
Expand Down Expand Up @@ -126,7 +127,10 @@
]
},
"autoload-dev": {
"files": [ "src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
"files": [
"src/Symfony/Component/VarDumper/Resources/functions/dump.php",
"vendor/twig/twig/src/Extension/CoreExtension.php"
Copy link
Member

@nicolas-grekas nicolas-grekas Dec 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes no sense, it should be removed
you should generally consider that the code base is pretty clean and most phpstan reports should be considered first as false positives. This one is for sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codebase is using functions defined in this file. Of course, this extension is loaded by the Twig environment, but it works only as a side-effect. This makes it explicit.

I can move it to PHPStan's own autoloader config, as Ondrej mentioned.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please do, this is on purpose

]
},
"minimum-stability": "dev",
"extra": {
Expand Down
53 changes: 53 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
parameters:
autoload_files:
- vendor/autoload.php
- .phpunit/phpunit-6.0/vendor/autoload.php
- vendor/bin/.phpunit/phpunit-5.7/vendor/autoload.php

# files containing multiple classes are not autoloaded properly

- src/Symfony/Component/Form/Tests/Extension/Csrf/Type/FormTypeCsrfExtensionTest.php
- src/Symfony/Component/Form/Tests/Guess/GuessTest.php
- src/Symfony/Component/Form/Tests/SimpleFormTest.php
- src/Symfony/Component/Process/Tests/NonStopableProcess.php
ignoreErrors:
- '#__construct\(\) does not call parent constructor from .+#'
- '#Function xdebug_[^\s]* not found.#'

# not errors, actually expected to fail
- '#Class Symfony\\Bundle\\FrameworkBundle\\Tests\\DependencyInjection\\Compiler\\NotFound not found.#'
- '#Class Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\NotExist not found.#'
excludes_analyse:
- */src/Symfony/Bridge/*/Tests/Fixtures/*
- */src/Symfony/Bridge/*/Tests/*/Fixtures/*
- src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/fake_vendor/

- */src/Symfony/Bundle/*/Tests/Fixtures/*
- */src/Symfony/Bundle/*/Tests/*/Fixtures/*
- src/Symfony/Bundle/FrameworkBundle/Resources/views
- src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Resources/views
- src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources

- */src/Symfony/Component/*/Tests/Fixtures/*
- */src/Symfony/Component/*/Tests/*/Fixtures/*
- */src/Symfony/Component/*/Tests/Resources/*

# Typo: lowercase "fixtures"
- src/Symfony/Component/Translation/Tests/fixtures/

# temporary, it's currently incompatible with the interface
- src/Symfony/Bridge/ProxyManager

# temporary, currently crashing PHPStan 0.9.1
- src/Symfony/Bundle/FrameworkBundle/Tests/Controller/AbstractControllerTest.php
- src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTest.php

# temporary, loading a non-existant class, these should probably be fixtures
- src/symfony/Component/DependencyInjection/Tests/Compiler/OptionalServiceClass.php
- src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php

# temporary, it's full of actual errors (which are triggers for the handler)
- src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php

# temporary, PHPStan doesn't seem to understand namespaced functions properly
- src/Symfony/Component/Debug/Tests/HeaderMock.php
5 changes: 2 additions & 3 deletions src/Symfony/Bridge/Doctrine/ManagerRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Bridge\Doctrine;

use ProxyManager\Proxy\LazyLoadingInterface;
use Psr\Container\ContainerInterface;
Copy link
Member

Choose a reason for hiding this comment

The 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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

Copy link
Member

Choose a reason for hiding this comment

The 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)
But this change (and many others in this PR) are not related to adding phpstan, but are like code cleanups detected by phpstan, isn't it?
So these should be in their own PR to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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;

Expand All @@ -24,7 +23,7 @@
abstract class ManagerRegistry extends AbstractManagerRegistry
{
/**
* @var ContainerInterface
* @var Container
*/
protected $container;

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ class RegisterMappingsPassTest extends TestCase
*/
public function testNoDriverParmeterException()
{
$container = $this->createBuilder(array(
));
$container = $this->createBuilder();
$this->process($container, array(
'manager.param.one',
'manager.param.two',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@
use Symfony\Bridge\Doctrine\Form\ChoiceList\EntityLoaderInterface;
use Symfony\Bridge\Doctrine\Form\ChoiceList\IdReader;
use Symfony\Component\Form\ChoiceList\ArrayChoiceList;
use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface;

/**
* @author Bernhard Schussek <bschussek@gmail.com>
*/
class DoctrineChoiceLoaderTest extends TestCase
{
/**
* @var ChoiceListFactoryInterface|\PHPUnit_Framework_MockObject_MockObject
*/
private $factory;

/**
* @var ObjectManager|\PHPUnit_Framework_MockObject_MockObject
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
use Symfony\Component\Form\Forms;
use Symfony\Component\Form\Tests\Extension\Core\Type\BaseTypeTest;
use Symfony\Component\Form\Tests\Extension\Core\Type\FormTypeTest;
use Symfony\Component\PropertyAccess\PropertyAccess;
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleAssociationToIntIdEntity;
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity;

Expand Down Expand Up @@ -1121,8 +1120,7 @@ public function testLoaderCaching()
$repo = $this->em->getRepository(self::SINGLE_IDENT_CLASS);

$entityType = new EntityType(
$this->emRegistry,
PropertyAccess::createPropertyAccessor()
$this->emRegistry
);

$entityTypeGuesser = new DoctrineOrmTypeGuesser($this->emRegistry);
Expand Down Expand Up @@ -1184,8 +1182,7 @@ public function testLoaderCachingWithParameters()
$repo = $this->em->getRepository(self::SINGLE_IDENT_CLASS);

$entityType = new EntityType(
$this->emRegistry,
PropertyAccess::createPropertyAccessor()
$this->emRegistry
);

$entityTypeGuesser = new DoctrineOrmTypeGuesser($this->emRegistry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\Bridge\Doctrine\PropertyInfo\Tests;
namespace Symfony\Bridge\Doctrine\Tests\PropertyInfo;

use Doctrine\DBAL\Types\Type as DBALType;
use Doctrine\ORM\EntityManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function fileExcerpt($file, $line)
{
if (is_readable($file)) {
if (extension_loaded('fileinfo')) {
$finfo = new \Finfo();
$finfo = new \finfo();

// Check if the file is an application/octet-stream (eg. Phar file) because highlight_file cannot parse these files
if ('application/octet-stream' === $finfo->file($file, FILEINFO_MIME_TYPE)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\Bundle\SecurityBundle\Tests;
namespace Symfony\Bundle\SecurityBundle\Tests\Debug;

use PHPUnit\Framework\TestCase;
use Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
* file that was distributed with this source code.
*/

namespace Symfony\Bundle\TwigBundle\Tests;
namespace Symfony\Bundle\TwigBundle\Tests\Functional;

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\TwigBundle\Tests\TestCase;
use Symfony\Bundle\TwigBundle\TwigBundle;

class CacheWarmingTest extends TestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
* file that was distributed with this source code.
*/

namespace Symfony\Bundle\TwigBundle\Tests;
namespace Symfony\Bundle\TwigBundle\Tests\Functional;

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\TwigBundle\Tests\TestCase;
use Symfony\Bundle\TwigBundle\TwigBundle;

class NoTemplatingEntryTest extends TestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,9 @@
namespace Symfony\Component\Config\Tests\Definition\Builder;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\Tests\Definition\Builder\NodeBuilder as CustomNodeBuilder;
use Symfony\Component\Config\Tests\Fixtures\Builder\NodeBuilder as CustomNodeBuilder;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;

require __DIR__.'/../../Fixtures/Builder/NodeBuilder.php';
require __DIR__.'/../../Fixtures/Builder/BarNodeDefinition.php';
require __DIR__.'/../../Fixtures/Builder/VariableNodeDefinition.php';

class TreeBuilderTest extends TestCase
{
public function testUsingACustomNodeBuilder()
Expand All @@ -28,11 +24,11 @@ public function testUsingACustomNodeBuilder()

$nodeBuilder = $root->children();

$this->assertInstanceOf('Symfony\Component\Config\Tests\Definition\Builder\NodeBuilder', $nodeBuilder);
$this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\NodeBuilder', $nodeBuilder);

$nodeBuilder = $nodeBuilder->arrayNode('deeper')->children();

$this->assertInstanceOf('Symfony\Component\Config\Tests\Definition\Builder\NodeBuilder', $nodeBuilder);
$this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\NodeBuilder', $nodeBuilder);
}

public function testOverrideABuiltInNodeType()
Expand All @@ -42,7 +38,7 @@ public function testOverrideABuiltInNodeType()

$definition = $root->children()->variableNode('variable');

$this->assertInstanceOf('Symfony\Component\Config\Tests\Definition\Builder\VariableNodeDefinition', $definition);
$this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\VariableNodeDefinition', $definition);
}

public function testAddANodeType()
Expand All @@ -52,7 +48,7 @@ public function testAddANodeType()

$definition = $root->children()->barNode('variable');

$this->assertInstanceOf('Symfony\Component\Config\Tests\Definition\Builder\BarNodeDefinition', $definition);
$this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\BarNodeDefinition', $definition);
}

public function testCreateABuiltInNodeTypeWithACustomNodeBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\Component\Config\Tests\Definition\Builder;
namespace Symfony\Component\Config\Tests\Fixtures\Builder;

use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Component\Config\Tests\Fixtures\BarNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\Component\Config\Tests\Definition\Builder;
namespace Symfony\Component\Config\Tests\Fixtures\Builder;

use Symfony\Component\Config\Definition\Builder\NodeBuilder as BaseNodeBuilder;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace Symfony\Component\Config\Tests\Definition\Builder;
namespace Symfony\Component\Config\Tests\Fixtures\Builder;

use Symfony\Component\Config\Definition\Builder\VariableNodeDefinition as BaseVariableNodeDefinition;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Symfony\Component\Debug\Exception\FatalErrorException;
use Symfony\Component\Debug\DebugClassLoader;
use Composer\Autoload\ClassLoader as ComposerClassLoader;
use Symfony\Component\ClassLoader\ClassLoader as SymfonyClassLoader;

/**
* ErrorHandler for classes that do not exist.
Expand Down Expand Up @@ -105,7 +104,7 @@ private function getClassCandidates(string $class): array
}
}

if ($function[0] instanceof ComposerClassLoader || $function[0] instanceof SymfonyClassLoader) {
if ($function[0] instanceof ComposerClassLoader) {
Copy link
Member

@nicolas-grekas nicolas-grekas Dec 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be kept: the class exists in cross component versions situations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give an example?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any project that uses debug v4 + class-loader v3.4

foreach ($function[0]->getPrefixes() as $prefix => $paths) {
foreach ($paths as $path) {
$classes = array_merge($classes, $this->findClassInPath($path, $class, $prefix));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function handleError(array $error, FatalErrorException $exception)
}

$candidates = array();
foreach (get_defined_functions() as $type => $definedFunctionNames) {
foreach (get_defined_functions(false) as $type => $definedFunctionNames) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the function takes no arguments, why this here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a false positive, it takes an optional param since 7.0.15: http://php.net/manual/en/function.get-defined-functions.php#refsect1-function.get-defined-functions-parameters

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, should be removed imho as it's the default value, and may break BC

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll report it to PHPStan, don't know why it was asked for here.

foreach ($definedFunctionNames as $definedFunctionName) {
if (false !== $namespaceSeparatorIndex = strrpos($definedFunctionName, '\\')) {
$definedFunctionNameBasename = substr($definedFunctionName, $namespaceSeparatorIndex + 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ function () {},

public function testRecursionInArguments()
{
$a = null;
$a = array('foo', array(2, &$a));
$exception = $this->createException($a);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class PrototypeConfigurator extends AbstractServiceConfigurator
private $loader;
private $resource;
private $exclude;
private $allowParent;
Copy link
Member

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

Copy link
Contributor Author

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?


public function __construct(ServicesConfigurator $parent, PhpFileLoader $loader, Definition $defaults, string $namespace, string $resource, bool $allowParent)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class ServiceConfigurator extends AbstractServiceConfigurator

private $container;
private $instanceof;
private $allowParent;
Copy link
Member

Choose a reason for hiding this comment

The 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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

trait BindTrait
{
protected $id;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the property is already defined in the classes that use the trait

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

trait ParentTrait
{
protected $allowParent;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

visibility change, should be reverted

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

Copy link
Member

Choose a reason for hiding this comment

The 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
so nope, it shouldn't

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

Copy link
Member

Choose a reason for hiding this comment

The 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.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function testSimpleProcessor()
(new RegisterEnvVarProcessorsPass())->process($container);

$this->assertTrue($container->has('container.env_var_processors_locator'));
$this->assertInstanceof(SimpleProcessor::class, $container->get('container.env_var_processors_locator')->get('foo'));
$this->assertInstanceOf(SimpleProcessor::class, $container->get('container.env_var_processors_locator')->get('foo'));

$expected = array(
'foo' => array('string'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function testProcess()
$parent = 'instanceof.'.parent::class.'.0.foo';
$def = $container->getDefinition('foo');
$this->assertEmpty($def->getInstanceofConditionals());
$this->assertInstanceof(ChildDefinition::class, $def);
$this->assertInstanceOf(ChildDefinition::class, $def);
$this->assertTrue($def->isAutowired());
$this->assertSame($parent, $def->getParent());
$this->assertSame(array('tag' => array(array()), 'baz' => array(array('attr' => 123))), $def->getTags());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ class ProjectServiceContainer extends Container
public $__foo_bar;
public $__foo_baz;
public $__internal;
private $privates;
Copy link
Member

Choose a reason for hiding this comment

The 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',
Expand Down
Loading