Skip to content

Commit

Permalink
bug #317 [SearchBundle] Enable validator when class the exists, inste…
Browse files Browse the repository at this point in the history
…ad of only the Symfony validator component (sstok)

This PR was merged into the 2.0-dev branch.

Discussion
----------

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tickets       | 
| License       | MIT

The the actual InputValidator class, and just the Symfony validator component


Commits
-------

44f08e5 [SearchBundle] Enable validator when class! exists
  • Loading branch information
sstok authored Sep 2, 2024
2 parents 69212a2 + 44f08e5 commit 5c3d247
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

namespace Rollerworks\Bundle\SearchBundle\DependencyInjection;

use Rollerworks\Component\Search\Extension\Symfony\Validator\InputValidator;
use Rollerworks\Component\Search\Field\FieldType;
use Rollerworks\Component\Search\Field\FieldTypeExtension;
use Rollerworks\Component\Search\FieldSet;
Expand All @@ -25,7 +26,6 @@
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\Translation\Translator;
use Symfony\Component\Validator\Validator\ValidatorInterface;

class RollerworksSearchExtension extends Extension implements PrependExtensionInterface
{
Expand Down Expand Up @@ -65,7 +65,7 @@ public function load(array $configs, ContainerBuilder $container): void
$loader->load('elasticsearch.xml');
}

if (interface_exists(ValidatorInterface::class)) {
if (class_exists(InputValidator::class)) {
$loader->load('input_validator.xml');
}

Expand Down

0 comments on commit 5c3d247

Please sign in to comment.