Problem/Motivation
After install Drupal 8.4.0-dev and create a geofield field and try to submit the lat/lng the following error is displayed
Declaration of Drupal\\geofield\\Plugin\\Validation\\Constraint\\GeoConstraint::initialize() must be compatible with Symfony\\Component\\Validator\\ConstraintValidatorInterface::initialize(Symfony\\Component\\Validator\\Context\\ExecutionContextInterface $context) in /home/fran/Projects/community/drupal8/modules/contrib/geofield/src/Plugin/Validation/Constraint/GeoConstraint.php on line 22
It seems ExecutionContextInterface is deprecated and we have to use Context\ExecutionContextInterface as is indicated in Drupal API
Proposed resolution
To fix the problem we should change geofield/src/Plugin/Validation/Constraint/GeoConstraint.php file adding the correct path to the interface.
use Symfony\Component\Validator\Context\ExecutionContextInterface;
Remaining tasks
Comments
Comment #2
fran seva commentedI have attached a patch adding the paths to Context/ExecutionContextInterface.
Comment #4
plopescFixed! Thanks