This repository has been archived on 2025-01-19. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
thrownewInvalidArgumentException(sprintf('Service "_instanceof" key must be an array, "%s" given in "%s".',\gettype($instanceof),$file));
}
$this->instanceof=array();
$this->isLoadingInstanceof=true;
foreach($instanceofas$id=>$service){
if(!$service||!\is_array($service)){
thrownewInvalidArgumentException(sprintf('Type definition "%s" must be a non-empty array within "_instanceof" in %s. Check your YAML syntax.',$id,$file));
thrownewInvalidArgumentException(sprintf('Service "_defaults" key must be an array, "%s" given in "%s".',\gettype($defaults),$file));
}
foreach($defaultsas$key=>$default){
if(!isset(self::$defaultsKeywords[$key])){
thrownewInvalidArgumentException(sprintf('The configuration key "%s" cannot be used to define a default value in "%s". Allowed keys are "%s".',$key,$file,implode('", "',self::$defaultsKeywords)));
}
}
if(isset($defaults['tags'])){
if(!\is_array($tags=$defaults['tags'])){
thrownewInvalidArgumentException(sprintf('Parameter "tags" in "_defaults" must be an array in %s. Check your YAML syntax.',$file));
}
foreach($tagsas$tag){
if(!\is_array($tag)){
$tag=array('name'=>$tag);
}
if(!isset($tag['name'])){
thrownewInvalidArgumentException(sprintf('A "tags" entry in "_defaults" is missing a "name" key in %s.',$file));
}
$name=$tag['name'];
unset($tag['name']);
if(!\is_string($name)||''===$name){
thrownewInvalidArgumentException(sprintf('The tag name in "_defaults" must be a non-empty string in %s.',$file));
}
foreach($tagas$attribute=>$value){
if(!is_scalar($value)&&null!==$value){
thrownewInvalidArgumentException(sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type in %s. Check your YAML syntax.',$name,$attribute,$file));
}
}
}
}
if(isset($defaults['bind'])){
if(!\is_array($defaults['bind'])){
thrownewInvalidArgumentException(sprintf('Parameter "bind" in "_defaults" must be an array in %s. Check your YAML syntax.',$file));
@trigger_error(sprintf('Service names that start with an underscore are deprecated since Symfony 3.3 and will be reserved in 4.0. Rename the "%s" service or define it in XML instead.',$id),E_USER_DEPRECATED);
thrownewInvalidArgumentException(sprintf('A service definition must be an array or a string starting with "@" but %s found for service "%s" in %s. Check your YAML syntax.',\gettype($service),$id,$file));
@trigger_error(sprintf('The configuration key "%s" is unsupported for the service "%s" which is defined as an alias in "%s". Allowed configuration keys for service aliases are "alias" and "public". The YamlFileLoader will raise an exception in Symfony 4.0, instead of silently ignoring unsupported attributes.',$key,$id,$file),E_USER_DEPRECATED);
}
}
return;
}
if($this->isLoadingInstanceof){
$definition=newChildDefinition('');
}elseif(isset($service['parent'])){
if(!empty($this->instanceof)){
thrownewInvalidArgumentException(sprintf('The service "%s" cannot use the "parent" option in the same file where "_instanceof" configuration is defined as using both is not supported. Move your child definitions to a separate file.',$id));
}
foreach($defaultsas$k=>$v){
if('tags'===$k){
// since tags are never inherited from parents, there is no confusion
// thus we can safely add them as defaults to ChildDefinition
continue;
}
if('bind'===$k){
thrownewInvalidArgumentException(sprintf('Attribute "bind" on service "%s" cannot be inherited from "_defaults" when a "parent" is set. Move your child definitions to a separate file.',$id));
}
if(!isset($service[$k])){
thrownewInvalidArgumentException(sprintf('Attribute "%s" on service "%s" cannot be inherited from "_defaults" when a "parent" is set. Move your child definitions to a separate file or define this attribute explicitly.',$k,$id));
thrownewInvalidArgumentException(sprintf('The second parameter for function call "%s" must be an array of its arguments for service "%s" in %s. Check your YAML syntax.',$method,$id,$file));
thrownewInvalidArgumentException(sprintf('Parameter "tags" must be an array for service "%s" in %s. Check your YAML syntax.',$id,$file));
}
if(isset($defaults['tags'])){
$tags=array_merge($tags,$defaults['tags']);
}
foreach($tagsas$tag){
if(!\is_array($tag)){
$tag=array('name'=>$tag);
}
if(!isset($tag['name'])){
thrownewInvalidArgumentException(sprintf('A "tags" entry is missing a "name" key for service "%s" in %s.',$id,$file));
}
$name=$tag['name'];
unset($tag['name']);
if(!\is_string($name)||''===$name){
thrownewInvalidArgumentException(sprintf('The tag name for service "%s" in %s must be a non-empty string.',$id,$file));
}
foreach($tagas$attribute=>$value){
if(!is_scalar($value)&&null!==$value){
thrownewInvalidArgumentException(sprintf('A "tags" attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s" in %s. Check your YAML syntax.',$id,$name,$attribute,$file));
thrownewInvalidArgumentException(sprintf('The value of the "decorates" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s").',$id,$service['decorates'],substr($service['decorates'],1)));
thrownewInvalidArgumentException(sprintf('Parameter "autowiring_types" must be a string or an array for service "%s" in %s. Check your YAML syntax.',$id,$file));
thrownewInvalidArgumentException(sprintf('A "autowiring_types" attribute must be of type string for service "%s" in %s. Check your YAML syntax.',$id,$file));
thrownewInvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try setting "autoconfigure: false" for the service.',$id));
thrownewInvalidArgumentException(sprintf('A "resource" attribute must be set when the "namespace" attribute is set for service "%s" in %s. Check your YAML syntax.',$id,$file));
}
if(array_key_exists('resource',$service)){
if(!\is_string($service['resource'])){
thrownewInvalidArgumentException(sprintf('A "resource" attribute must be of type string for service "%s" in %s. Check your YAML syntax.',$id,$file));
thrownewInvalidArgumentException(sprintf('The value of the "%s" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s").',$parameter,$id,$callable,substr($callable,1)));
thrownewInvalidArgumentException(sprintf('Parameter "%s" must contain an array with two elements for service "%s" in %s. Check your YAML syntax.',$parameter,$id,$file));
}
thrownewInvalidArgumentException(sprintf('Parameter "%s" must be a string or an array for service "%s" in %s. Check your YAML syntax.',$parameter,$id,$file));
thrownewInvalidArgumentException(sprintf('There is no extension able to load the configuration for "%s" (in %s). Looked for namespace "%s", found %s',$namespace,$file,$namespace,$extensionNamespaces?sprintf('"%s"',implode('", "',$extensionNamespaces)):'none'));
thrownew\LogicException(sprintf('The "@=" expression syntax cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'));
@trigger_error(sprintf('The "=" suffix that used to disable strict references in Symfony 2.x is deprecated since Symfony 3.3 and will be unsupported in 4.0. Remove it in "%s".',$value),E_USER_DEPRECATED);
thrownewInvalidArgumentException(sprintf('The configuration key "%s" is unsupported for definition "%s" in "%s". Allowed configuration keys are "%s".',$key,$id,$file,implode('", "',$keywords)));
}
@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('", "',$keywords)),E_USER_DEPRECATED);