Skip to content
Permalink
Browse files

SearchExtension: removes conflicting services before it starts to add…

… them
  • Loading branch information...
dg committed Aug 19, 2019
1 parent 4aff517 commit 35bb65eab9d6e9d7f4b81ab452e9d1c7520549d4
Showing with 8 additions and 4 deletions.
  1. +7 −3 src/DI/Extensions/SearchExtension.php
  2. +1 −1 tests/SearchExtension/fixtures/Ok4.php
@@ -113,10 +113,14 @@ public function beforeCompile()
{
$builder = $this->getContainerBuilder();
foreach ($this->classes as $class => $tags) {
foreach ($this->classes as $class => $foo) {
if ($builder->findByType($class)) {
continue;
} elseif (class_exists($class)) {
unset($this->classes[$class]);
}
}
foreach ($this->classes as $class => $tags) {
if (class_exists($class)) {
$def = $builder->addDefinition(null)
->setType($class);
} else {
@@ -1,7 +1,7 @@
<?php
declare(strict_types=1);
class CountableClass implements Countable
class CountableClass extends ClassOk2 implements Countable
{
public function count()
{

0 comments on commit 35bb65e

Please sign in to comment.
You can’t perform that action at this time.