diff --git a/src/Symfony/ContainerMeta.php b/src/Symfony/ContainerMeta.php
index fad30b8..a7a635c 100644
--- a/src/Symfony/ContainerMeta.php
+++ b/src/Symfony/ContainerMeta.php
@@ -33,7 +33,7 @@ class ContainerMeta
if (isset($serviceAttributes->alias)) {
$service->setAlias((string) $serviceAttributes->alias);
}
- $service->setIsPublic('true' === (string) $serviceAttributes->public);
+ $service->setIsPublic('false' !== (string) $serviceAttributes->public);
$this->add($service);
}
diff --git a/tests/acceptance/container.xml b/tests/acceptance/container.xml
index 5a3c089..b6ffba6 100644
--- a/tests/acceptance/container.xml
+++ b/tests/acceptance/container.xml
@@ -16,5 +16,6 @@
+
diff --git a/tests/unit/Symfony/ContainerMetaTest.php b/tests/unit/Symfony/ContainerMetaTest.php
index 1a2d2da..dc73f99 100644
--- a/tests/unit/Symfony/ContainerMetaTest.php
+++ b/tests/unit/Symfony/ContainerMetaTest.php
@@ -57,6 +57,11 @@ class ContainerMetaTest extends TestCase
'className' => 'Symfony\Component\HttpKernel\HttpKernel',
'isPublic' => true,
],
+ [
+ 'id' => 'public_service_wo_public_attr',
+ 'className' => 'Foo\Bar',
+ 'isPublic' => true,
+ ],
];
}