Symfony\Component\DependencyInjection\Loader\YamlFileLoader::checkDefinition PHP Method

checkDefinition() private static method

Checks the keywords used to define a service.
private static checkDefinition ( string $id, array $definition, string $file )
$id string The service name
$definition array The service definition to check
$file string The loaded YAML file
    private static function checkDefinition($id, array $definition, $file)
    {
        foreach ($definition as $key => $value) {
            if (!isset(static::$keywords[$key])) {
                @trigger_error(sprintf('The configuration key "%s" is unsupported for service definition "%s" in "%s". Allowed configuration keys are "%s". The YamlFileLoader object will raise an exception instead in Symfony 4.0 when detecting an unsupported service configuration key.', $key, $id, $file, implode('", "', static::$keywords)), E_USER_DEPRECATED);
                // @deprecated Uncomment the following statement in Symfony 4.0
                // and also update the corresponding unit test to make it expect
                // an InvalidArgumentException exception.
                //throw new InvalidArgumentException(sprintf('The configuration key "%s" is unsupported for service definition "%s" in "%s". Allowed configuration keys are "%s".', $key, $id, $file, implode('", "', static::$keywords)));
            }
        }
    }