Skip to content

ExecutionContext::getValidator() error with Symfony 2.5.3 #11611

Closed
@lspringer

Description

@lspringer

Call to undefined method Symfony\Component\Validator\ExecutionContext::getValidator()

Receiving this error when using PHP 5.5.9 & Silex 1.2 FormServiceProvider & ValidationServiceProvider when using $form->handleRequest($request) with a non-empty Request object, this had been working in <= Symfony 2.5.2

( ! ) Fatal error: Call to undefined method Symfony\Component\Validator\ExecutionContext::getValidator() in /var/www/vendor/symfony/form/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php on line 56
Call Stack

Time Memory Function Location

1 0.0001 247648 {main}( ) ../index.php:0
2 0.0315 535248 Silex\Application->run( ) ../index.php:567
3 0.0343 617168 Silex\Application->handle( ) ../Application.php:515
4 0.0476 722528 Symfony\Component\HttpKernel\HttpKernel->handle( ) ../Application.php:538
5 0.0476 723024 Symfony\Component\HttpKernel\HttpKernel->handleRaw( ) ../HttpKernel.php:66
6 0.0594 905392 call_user_func_array:{/var/www/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php:145} ( ) ../HttpKernel.php:145
7 0.0595 906120 {closure:/var/www/web/index.php:33-54}( ) ../HttpKernel.php:145
8 0.1315 1705224 Symfony\Component\Form\Form->handleRequest( ) ../index.php:35
9 0.1315 1705856 Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationRequestHandler->handleRequest( ) ../Form.php:488
10 0.1315 1708016 Symfony\Component\Form\Form->submit( ) ../HttpFoundationRequestHandler.php:80
11 0.1331 1727384 Symfony\Component\EventDispatcher\ImmutableEventDispatcher->dispatch( ) ../Form.php:655
12 0.1331 1727384 Symfony\Component\EventDispatcher\EventDispatcher->dispatch( ) ../ImmutableEventDispatcher.php:42
13 0.1331 1727384 Symfony\Component\EventDispatcher\EventDispatcher->doDispatch( ) ../EventDispatcher.php:53
14 0.1331 1727736 call_user_func:{/var/www/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php:164} ( ) ../EventDispatcher.php:164
15 0.1331 1727776 Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener->validateForm( ) ../EventDispatcher.php:164
16 0.1331 1727856 Symfony\Component\Validator\Validator->validate( ) ../ValidationListener.php:64
17 0.1369 1753688 Symfony\Component\Validator\ValidationVisitor->validate( ) ../Validator.php:101
18 0.1369 1754752 Symfony\Component\Validator\Mapping\ClassMetadata->accept( ) ../ValidationVisitor.php:167
19 0.1369 1754960 Symfony\Component\Validator\ValidationVisitor->visit( ) ../ClassMetadata.php:157
20 0.1375 1773376 Symfony\Component\Validator\ExecutionContext->validateValue( ) ../ValidationVisitor.php:112
21 0.1375 1773736 Symfony\Component\Validator\ExecutionContext->executeConstraintValidators( ) ../ExecutionContext.php:240
22 0.1442 1788872 Symfony\Component\Form\Extension\Validator\Constraints\FormValidator->validate( ) ../ExecutionContext.php:275

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions