init
This commit is contained in:
407
backend/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd
vendored
Normal file
407
backend/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1.0.xsd
vendored
Normal file
@@ -0,0 +1,407 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<xsd:schema xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="http://symfony.com/schema/dic/services"
|
||||
elementFormDefault="qualified">
|
||||
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Symfony XML Services Schema, version 1.0
|
||||
Authors: Fabien Potencier
|
||||
|
||||
This defines a way to describe PHP objects (services) and their
|
||||
dependencies.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
<xsd:element name="container" type="container" />
|
||||
|
||||
<xsd:complexType name="container">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The root element of a service file.
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="foreign" />
|
||||
<xsd:sequence minOccurs="0">
|
||||
<xsd:element name="imports" type="imports" />
|
||||
<xsd:group ref="foreign" />
|
||||
</xsd:sequence>
|
||||
<xsd:sequence minOccurs="0">
|
||||
<xsd:element name="parameters" type="parameters" />
|
||||
<xsd:group ref="foreign" />
|
||||
</xsd:sequence>
|
||||
<xsd:sequence minOccurs="0">
|
||||
<xsd:element name="services" type="services" />
|
||||
<xsd:group ref="foreign" />
|
||||
</xsd:sequence>
|
||||
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element name="when" type="when" />
|
||||
</xsd:sequence>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="when">
|
||||
<xsd:sequence>
|
||||
<xsd:group ref="foreign" />
|
||||
<xsd:sequence minOccurs="0">
|
||||
<xsd:element name="imports" type="imports" />
|
||||
<xsd:group ref="foreign" />
|
||||
</xsd:sequence>
|
||||
<xsd:sequence minOccurs="0">
|
||||
<xsd:element name="parameters" type="parameters" />
|
||||
<xsd:group ref="foreign" />
|
||||
</xsd:sequence>
|
||||
<xsd:sequence minOccurs="0">
|
||||
<xsd:element name="services" type="services" />
|
||||
<xsd:group ref="foreign" />
|
||||
</xsd:sequence>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="env" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:group name="foreign">
|
||||
<xsd:sequence>
|
||||
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:group>
|
||||
|
||||
<xsd:complexType name="services">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Enclosing element for the definition of all services
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="service" type="service" minOccurs="1" />
|
||||
<xsd:element name="prototype" type="prototype" minOccurs="0" />
|
||||
<xsd:element name="defaults" type="defaults" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="instanceof" type="instanceof" minOccurs="0" />
|
||||
<xsd:element name="stack" type="stack" minOccurs="0" />
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="imports">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Enclosing element for the import elements
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:choice minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:element name="import" type="import" />
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="import">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Import an external resource defining other services or parameters
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:attribute name="resource" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="ignore-errors" type="ignore_errors" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="callable">
|
||||
<xsd:choice minOccurs="0" maxOccurs="1">
|
||||
<xsd:element name="service" type="service" minOccurs="0" maxOccurs="1" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="service" type="xsd:string" />
|
||||
<xsd:attribute name="class" type="xsd:string" />
|
||||
<xsd:attribute name="method" type="xsd:string" />
|
||||
<xsd:attribute name="function" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="factory">
|
||||
<xsd:choice minOccurs="0" maxOccurs="1">
|
||||
<xsd:element name="service" type="service" minOccurs="0" maxOccurs="1" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="service" type="xsd:string" />
|
||||
<xsd:attribute name="class" type="xsd:string" />
|
||||
<xsd:attribute name="method" type="xsd:string" />
|
||||
<xsd:attribute name="function" type="xsd:string" />
|
||||
<xsd:attribute name="expression" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="defaults">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Enclosing element for the service definitions' defaults for the current file
|
||||
]]></xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="tag" type="tag" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="bind" type="bind" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="public" type="boolean" />
|
||||
<xsd:attribute name="autowire" type="boolean" />
|
||||
<xsd:attribute name="autoconfigure" type="boolean" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="service">
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="file" type="xsd:string" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="argument" type="argument" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="configurator" type="callable" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="factory" type="factory" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="from-callable" type="factory" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="deprecated" type="deprecated" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="call" type="call" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="tag" type="tag" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="resource-tag" type="tag" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="bind" type="bind" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
<xsd:attribute name="class" type="xsd:string" />
|
||||
<xsd:attribute name="shared" type="boolean" />
|
||||
<xsd:attribute name="public" type="boolean" />
|
||||
<xsd:attribute name="synthetic" type="boolean" />
|
||||
<xsd:attribute name="lazy" type="xsd:string" />
|
||||
<xsd:attribute name="abstract" type="boolean" />
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="parent" type="xsd:string" />
|
||||
<xsd:attribute name="decorates" type="xsd:string" />
|
||||
<xsd:attribute name="decoration-on-invalid" type="invalid_decorated_service_sequence" />
|
||||
<xsd:attribute name="decoration-inner-name" type="xsd:string" />
|
||||
<xsd:attribute name="decoration-priority" type="xsd:integer" />
|
||||
<xsd:attribute name="autowire" type="boolean" />
|
||||
<xsd:attribute name="autoconfigure" type="boolean" />
|
||||
<xsd:attribute name="constructor" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="instanceof">
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="configurator" type="callable" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="call" type="call" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="tag" type="tag" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="bind" type="bind" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="shared" type="boolean" />
|
||||
<xsd:attribute name="public" type="boolean" />
|
||||
<xsd:attribute name="lazy" type="xsd:string" />
|
||||
<xsd:attribute name="autowire" type="boolean" />
|
||||
<xsd:attribute name="autoconfigure" type="boolean" />
|
||||
<xsd:attribute name="constructor" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="prototype">
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="argument" type="argument" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="configurator" type="callable" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="factory" type="factory" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="deprecated" type="deprecated" minOccurs="0" maxOccurs="1" />
|
||||
<xsd:element name="call" type="call" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="tag" type="tag" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="resource-tag" type="tag" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="bind" type="bind" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="exclude" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="namespace" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="resource" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="exclude" type="xsd:string" />
|
||||
<xsd:attribute name="shared" type="boolean" />
|
||||
<xsd:attribute name="public" type="boolean" />
|
||||
<xsd:attribute name="lazy" type="xsd:string" />
|
||||
<xsd:attribute name="abstract" type="boolean" />
|
||||
<xsd:attribute name="parent" type="xsd:string" />
|
||||
<xsd:attribute name="autowire" type="boolean" />
|
||||
<xsd:attribute name="autoconfigure" type="boolean" />
|
||||
<xsd:attribute name="constructor" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="stack">
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="service" type="service" minOccurs="1" />
|
||||
<xsd:element name="deprecated" type="deprecated" minOccurs="0" maxOccurs="1" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="id" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="public" type="boolean" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="tag" mixed="true">
|
||||
<xsd:choice minOccurs="0">
|
||||
<xsd:element name="attribute" type="tag_attribute" maxOccurs="unbounded"/>
|
||||
</xsd:choice>
|
||||
<xsd:anyAttribute namespace="##any" processContents="lax" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="deprecated">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute name="package" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="version" type="xsd:string" use="required" />
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="tag_attribute" mixed="true">
|
||||
<xsd:choice minOccurs="0">
|
||||
<xsd:element name="attribute" type="tag_attribute" maxOccurs="unbounded" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="parameters">
|
||||
<xsd:choice minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:element name="parameter" type="parameter" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="type" type="parameter_type" />
|
||||
<xsd:attribute name="key" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="parameter" mixed="true">
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:element name="parameter" type="parameter" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="type" type="parameter_type" />
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
<xsd:attribute name="key" type="xsd:string" />
|
||||
<xsd:attribute name="on-invalid" type="invalid_sequence" />
|
||||
<xsd:attribute name="trim" type="xsd:boolean" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="property" mixed="true">
|
||||
<xsd:choice minOccurs="0">
|
||||
<xsd:element name="property" type="property" maxOccurs="unbounded" />
|
||||
<xsd:element name="service" type="service" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="key-type" type="key_type" />
|
||||
<xsd:attribute name="type" type="argument_type" />
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
<xsd:attribute name="key" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="on-invalid" type="invalid_sequence" />
|
||||
<xsd:attribute name="tag" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="bind" mixed="true">
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="bind" type="bind_argument" minOccurs="0" maxOccurs="unbounded" />
|
||||
<xsd:element name="service" type="service" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="type" type="argument_type" />
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
<xsd:attribute name="key" type="xsd:string" use="required" />
|
||||
<xsd:attribute name="on-invalid" type="invalid_sequence" />
|
||||
<xsd:attribute name="method" type="xsd:string" />
|
||||
<xsd:attribute name="tag" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="bind_argument" mixed="true">
|
||||
<xsd:choice minOccurs="0">
|
||||
<xsd:element name="bind" type="bind_argument" maxOccurs="unbounded" />
|
||||
<xsd:element name="service" type="service" />
|
||||
<xsd:element name="exclude" type="xsd:string" maxOccurs="unbounded" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="type" type="argument_type" />
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
<xsd:attribute name="key" type="xsd:string" />
|
||||
<xsd:attribute name="index" type="xsd:integer" />
|
||||
<xsd:attribute name="on-invalid" type="invalid_sequence" />
|
||||
<xsd:attribute name="tag" type="xsd:string" />
|
||||
<xsd:attribute name="index-by" type="xsd:string" />
|
||||
<xsd:attribute name="default-index-method" type="xsd:string" />
|
||||
<xsd:attribute name="default-priority-method" type="xsd:string" />
|
||||
<xsd:attribute name="exclude" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="argument" mixed="true">
|
||||
<xsd:choice minOccurs="0">
|
||||
<xsd:element name="argument" type="argument" maxOccurs="unbounded" />
|
||||
<xsd:element name="service" type="service" />
|
||||
<xsd:element name="exclude" type="xsd:string" maxOccurs="unbounded" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="key-type" type="key_type" />
|
||||
<xsd:attribute name="type" type="argument_type" />
|
||||
<xsd:attribute name="id" type="xsd:string" />
|
||||
<xsd:attribute name="key" type="xsd:string" />
|
||||
<xsd:attribute name="index" type="xsd:integer" />
|
||||
<xsd:attribute name="on-invalid" type="invalid_sequence" />
|
||||
<xsd:attribute name="tag" type="xsd:string" />
|
||||
<xsd:attribute name="index-by" type="xsd:string" />
|
||||
<xsd:attribute name="default-index-method" type="xsd:string" />
|
||||
<xsd:attribute name="default-priority-method" type="xsd:string" />
|
||||
<xsd:attribute name="exclude" type="xsd:string" />
|
||||
<xsd:attribute name="exclude-self" type="xsd:boolean" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="call">
|
||||
<xsd:choice minOccurs="0">
|
||||
<xsd:element name="argument" type="argument" maxOccurs="unbounded" />
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="method" type="xsd:string" />
|
||||
<xsd:attribute name="returns-clone" type="boolean" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:simpleType name="parameter_type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="collection" />
|
||||
<xsd:enumeration value="string" />
|
||||
<xsd:enumeration value="constant" />
|
||||
<xsd:enumeration value="binary" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="argument_type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="abstract" />
|
||||
<xsd:enumeration value="collection" />
|
||||
<xsd:enumeration value="service" />
|
||||
<xsd:enumeration value="expression" />
|
||||
<xsd:enumeration value="string" />
|
||||
<xsd:enumeration value="constant" />
|
||||
<xsd:enumeration value="binary" />
|
||||
<xsd:enumeration value="iterator" />
|
||||
<xsd:enumeration value="closure" />
|
||||
<xsd:enumeration value="service_closure" />
|
||||
<xsd:enumeration value="service_locator" />
|
||||
<!-- "tagged" is an alias of "tagged_iterator", using "tagged_iterator" is preferred. -->
|
||||
<xsd:enumeration value="tagged" />
|
||||
<xsd:enumeration value="tagged_iterator" />
|
||||
<xsd:enumeration value="tagged_locator" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="key_type">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="binary" />
|
||||
<xsd:enumeration value="constant" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="ignore_errors">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:pattern value="(true|false|not_found)" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="invalid_sequence">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="null" />
|
||||
<xsd:enumeration value="ignore" />
|
||||
<xsd:enumeration value="exception" />
|
||||
<xsd:enumeration value="ignore_uninitialized" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="invalid_decorated_service_sequence">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="null" />
|
||||
<xsd:enumeration value="ignore" />
|
||||
<xsd:enumeration value="exception" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="boolean">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:pattern value="(%.+%|true|false)" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:schema>
|
||||
356
backend/vendor/symfony/dependency-injection/Loader/schema/services.schema.json
vendored
Normal file
356
backend/vendor/symfony/dependency-injection/Loader/schema/services.schema.json
vendored
Normal file
@@ -0,0 +1,356 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "Symfony Parameters and Services Configuration",
|
||||
"description": "Defines application parameters and services, including imports and environment-specific conditionals.",
|
||||
"$comment": "Root allows extension namespaces (framework:, doctrine:, etc.) via additionalProperties: true.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"imports": {
|
||||
"type": "array",
|
||||
"description": "Import other configuration resources.",
|
||||
"$comment": "YAML examples:\n- { resource: 'services.yaml' }\n- { resource: packages/dev/services.yaml, ignore_errors: true }\n- 'other_file.yaml'",
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{ "type": "string" },
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"resource": { "type": "string" },
|
||||
"type": { "type": ["string", "null"] },
|
||||
"ignore_errors": { "type": "boolean" }
|
||||
},
|
||||
"required": ["resource"],
|
||||
"additionalProperties": false
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"description": "Defines application-wide parameters.",
|
||||
"$comment": "Values support scalars, arrays and objects.",
|
||||
"patternProperties": {
|
||||
"^.+$": { "$ref": "#/$defs/parameterValue" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"services": {
|
||||
"type": "object",
|
||||
"description": "Defines your application services.",
|
||||
"$comment": "Service ids accept multiple shapes: object (full definition), '@alias' string (alias), null (empty definition), prototype (resource/namespace), stack, and short array syntax for arguments.",
|
||||
"properties": {
|
||||
"_defaults": {
|
||||
"$ref": "#/$defs/serviceDefaults"
|
||||
},
|
||||
"_instanceof": {
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
"^.+$": { "$ref": "#/$defs/serviceInstanceof" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"patternProperties": {
|
||||
"^(?:[A-Za-z_\\x7f-\\xff][A-Za-z0-9_\\x7f-\\xff]*\\\\)+[A-Za-z_\\x7f-\\xff][A-Za-z0-9_\\x7f-\\xff]*$": {
|
||||
"oneOf": [
|
||||
{ "$ref": "#/$defs/serviceConcrete" },
|
||||
{ "$ref": "#/$defs/serviceAliasObject" },
|
||||
{ "$ref": "#/$defs/servicePrototype" },
|
||||
{ "$ref": "#/$defs/serviceStack" },
|
||||
{ "$ref": "#/$defs/serviceShortSyntax" },
|
||||
{ "type": "null" },
|
||||
{ "type": "string", "pattern": "^@.+" }
|
||||
],
|
||||
"$comment": "FQCN service ids: short array syntax is allowed here."
|
||||
},
|
||||
"^(?!_).+$": {
|
||||
"oneOf": [
|
||||
{ "$ref": "#/$defs/serviceConcrete" },
|
||||
{ "$ref": "#/$defs/serviceAliasObject" },
|
||||
{ "$ref": "#/$defs/servicePrototype" },
|
||||
{ "$ref": "#/$defs/serviceStack" },
|
||||
{ "type": "null" },
|
||||
{ "type": "string", "pattern": "^@.+" }
|
||||
],
|
||||
"$comment": "Non-FQCN ids: short array syntax is not allowed."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"patternProperties": {
|
||||
"^when@.+$": {
|
||||
"$ref": "#",
|
||||
"description": "A container for parameters and services that are only loaded in a specific environment."
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"$defs": {
|
||||
"parameterValue": {
|
||||
"oneOf": [
|
||||
{ "type": "string" },
|
||||
{ "type": "number" },
|
||||
{ "type": "boolean" },
|
||||
{ "type": "array" },
|
||||
{ "type": "object" },
|
||||
{ "type": "null" }
|
||||
]
|
||||
},
|
||||
"scalarValue": {
|
||||
"oneOf": [
|
||||
{ "type": "string" },
|
||||
{ "type": "number" },
|
||||
{ "type": "boolean" },
|
||||
{ "type": "null" }
|
||||
]
|
||||
},
|
||||
"fqcn": {
|
||||
"type": "string",
|
||||
"pattern": "^(?:\\\\)?(?:[A-Za-z_\\\\x7f-\\\\xff][A-Za-z0-9_\\\\x7f-\\\\xff]*\\\\)+[A-Za-z_\\\\x7f-\\\\xff][A-Za-z0-9_\\\\x7f-\\\\xff]*$",
|
||||
"$comment": "Fully-qualified class name, optional leading backslash; requires at least one namespace separator."
|
||||
},
|
||||
"arguments": {
|
||||
"$comment": "Arguments can be an array (positional) or a map (named).",
|
||||
"oneOf": [
|
||||
{ "type": "array", "items": { "$ref": "#/$defs/parameterValue" } },
|
||||
{ "type": "object", "additionalProperties": { "$ref": "#/$defs/parameterValue" } }
|
||||
]
|
||||
},
|
||||
"tags": {
|
||||
"$comment": "YAML examples:\n- ['kernel.event_subscriber', { name: 'kernel.event_listener', event: 'kernel.request' }, { my_tag: { attr: 1 } }].",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{ "type": "string" },
|
||||
{
|
||||
"type": "object",
|
||||
"properties": { "name": { "type": "string" } },
|
||||
"required": ["name"],
|
||||
"additionalProperties": true
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"minProperties": 1,
|
||||
"maxProperties": 1,
|
||||
"additionalProperties": {
|
||||
"type": "object",
|
||||
"additionalProperties": { "$ref": "#/$defs/parameterValue" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"calls": {
|
||||
"$comment": "YAML examples:\n- ['setFoo', ['@bar'], true]\n- { method: 'setFoo', arguments: ['@bar'], returns_clone: true }\n- { setFoo: ['@bar'] }\n- { setFoo: !returns_clone ['@bar'] } (special YAML tag)",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"maxItems": 3,
|
||||
"items": [
|
||||
{ "type": "string" },
|
||||
{
|
||||
"oneOf": [
|
||||
{ "type": "array", "items": { "$ref": "#/$defs/parameterValue" } },
|
||||
{ "type": "object", "additionalProperties": { "$ref": "#/$defs/parameterValue" } }
|
||||
]
|
||||
},
|
||||
{ "type": "boolean" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"method": { "type": "string" },
|
||||
"arguments": { "$ref": "#/$defs/arguments" },
|
||||
"returns_clone": { "type": "boolean" }
|
||||
},
|
||||
"required": ["method"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"minProperties": 1,
|
||||
"maxProperties": 1,
|
||||
"additionalProperties": { "$ref": "#/$defs/arguments" }
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"deprecation": {
|
||||
"$comment": "YamlFileLoader requires an object with 'package' and 'version'.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"package": { "type": "string" },
|
||||
"version": { "type": "string" },
|
||||
"message": { "type": "string" }
|
||||
},
|
||||
"required": ["package", "version"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"callable": {
|
||||
"$comment": "Either 'Class::method' or ['Class', 'method'].",
|
||||
"oneOf": [
|
||||
{ "type": "string" },
|
||||
{
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"maxItems": 2,
|
||||
"items": [ { "type": "string" }, { "type": "string" } ]
|
||||
}
|
||||
]
|
||||
},
|
||||
"serviceShortSyntax": {
|
||||
"$comment": "Short syntax: service defined as arguments array. YAML example: App\\SomeService: ['@dependency', 'literal', 123]",
|
||||
"type": "array",
|
||||
"items": { "$ref": "#/$defs/parameterValue" }
|
||||
},
|
||||
"factoryCallable": {
|
||||
"$comment": "Either '@service', 'Class::method', or [classOrService, method]. For ['null', method] the class is resolved from the service class when using 'constructor'.",
|
||||
"oneOf": [
|
||||
{ "type": "string" },
|
||||
{
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"maxItems": 2,
|
||||
"items": [ { "type": ["string", "null"] }, { "type": "string" } ]
|
||||
}
|
||||
]
|
||||
},
|
||||
"serviceAliasObject": {
|
||||
"$comment": "Allowed keys for aliases are only 'alias', 'public', 'deprecated'.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"alias": { "type": "string" },
|
||||
"public": { "type": "boolean" },
|
||||
"deprecated": { "$ref": "#/$defs/deprecation" }
|
||||
},
|
||||
"required": ["alias"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"serviceConcrete": {
|
||||
"$comment": "'constructor' cannot be used together with 'factory'. If 'from_callable' is used, many other keys are not allowed (see YamlFileLoader).",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"class": { "type": "string" },
|
||||
"file": { "type": "string" },
|
||||
"parent": { "type": "string" },
|
||||
"shared": { "type": "boolean" },
|
||||
"synthetic": { "type": "boolean" },
|
||||
"lazy": { "oneOf": [ { "type": "boolean" }, { "$ref": "#/$defs/fqcn" } ] },
|
||||
"public": { "type": "boolean" },
|
||||
"abstract": { "type": "boolean" },
|
||||
"deprecated": { "$ref": "#/$defs/deprecation" },
|
||||
"factory": { "$ref": "#/$defs/factoryCallable" },
|
||||
"configurator": { "$ref": "#/$defs/callable" },
|
||||
"arguments": { "$ref": "#/$defs/arguments" },
|
||||
"properties": { "type": "object", "additionalProperties": { "$ref": "#/$defs/parameterValue" } },
|
||||
"calls": { "$ref": "#/$defs/calls" },
|
||||
"tags": { "$ref": "#/$defs/tags" },
|
||||
"resource_tags": { "$ref": "#/$defs/tags" },
|
||||
"decorates": { "type": "string" },
|
||||
"decoration_inner_name": { "type": "string" },
|
||||
"decoration_priority": { "type": "integer" },
|
||||
"decoration_on_invalid": { "oneOf": [ { "enum": ["exception", "ignore"] }, { "type": "null" } ], "$comment": "Use null (without quotes) for NULL_ON_INVALID_REFERENCE." },
|
||||
"autowire": { "type": "boolean" },
|
||||
"autoconfigure": { "type": "boolean" },
|
||||
"bind": { "type": "object", "additionalProperties": { "$ref": "#/$defs/parameterValue" } },
|
||||
"constructor": { "type": "string" },
|
||||
"from_callable": { "$ref": "#/$defs/parameterValue", "$comment": "Will be wrapped by factory ['Closure','fromCallable'] and sets lazy=true unless class is 'Closure'." }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"servicePrototype": {
|
||||
"$comment": "Prototype definitions register classes by scanning directories. 'namespace' requires 'resource'.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"resource": { "type": "string" },
|
||||
"namespace": { "type": "string" },
|
||||
"exclude": {
|
||||
"oneOf": [
|
||||
{ "type": "string" },
|
||||
{ "type": "array", "items": { "type": "string" } }
|
||||
]
|
||||
},
|
||||
"parent": { "type": "string" },
|
||||
"shared": { "type": "boolean" },
|
||||
"lazy": { "oneOf": [ { "type": "boolean" }, { "$ref": "#/$defs/fqcn" } ] },
|
||||
"public": { "type": "boolean" },
|
||||
"abstract": { "type": "boolean" },
|
||||
"deprecated": { "$ref": "#/$defs/deprecation" },
|
||||
"factory": { "$ref": "#/$defs/factoryCallable" },
|
||||
"arguments": { "$ref": "#/$defs/arguments" },
|
||||
"properties": { "type": "object", "additionalProperties": { "$ref": "#/$defs/parameterValue" } },
|
||||
"configurator": { "$ref": "#/$defs/callable" },
|
||||
"calls": { "$ref": "#/$defs/calls" },
|
||||
"tags": { "$ref": "#/$defs/tags" },
|
||||
"resource_tags": { "$ref": "#/$defs/tags" },
|
||||
"autowire": { "type": "boolean" },
|
||||
"autoconfigure": { "type": "boolean" },
|
||||
"bind": { "type": "object", "additionalProperties": { "$ref": "#/$defs/parameterValue" } },
|
||||
"constructor": { "type": "string" }
|
||||
},
|
||||
"required": ["resource"],
|
||||
"allOf": [
|
||||
{ "anyOf": [ { "not": { "required": ["namespace"] } }, { "required": ["resource"] } ] }
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"serviceStack": {
|
||||
"$comment": "A stack builds a service pipeline from multiple frames.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"stack": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{ "$ref": "#/$defs/serviceConcrete" },
|
||||
{ "$ref": "#/$defs/serviceAliasObject" },
|
||||
{ "$ref": "#/$defs/servicePrototype" }
|
||||
]
|
||||
}
|
||||
},
|
||||
"public": { "type": "boolean" },
|
||||
"deprecated": { "$ref": "#/$defs/deprecation" }
|
||||
},
|
||||
"required": ["stack"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"serviceDefaults": {
|
||||
"$comment": "Defaults applied to services declared in the current file.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"public": { "type": "boolean" },
|
||||
"tags": { "$ref": "#/$defs/tags" },
|
||||
"resource_tags": { "$ref": "#/$defs/tags" },
|
||||
"autowire": { "type": "boolean" },
|
||||
"autoconfigure": { "type": "boolean" },
|
||||
"bind": {
|
||||
"type": "object",
|
||||
"additionalProperties": { "$ref": "#/$defs/parameterValue" }
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"serviceInstanceof": {
|
||||
"$comment": "Applied to services declared in the current file whose class matches the key (interface or parent class).",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"shared": { "type": "boolean" },
|
||||
"lazy": { "oneOf": [ { "type": "boolean" }, { "$ref": "#/$defs/fqcn" } ] },
|
||||
"public": { "type": "boolean" },
|
||||
"properties": { "type": "object", "additionalProperties": { "$ref": "#/$defs/parameterValue" } },
|
||||
"configurator": { "$ref": "#/$defs/callable" },
|
||||
"calls": { "$ref": "#/$defs/calls" },
|
||||
"tags": { "$ref": "#/$defs/tags" },
|
||||
"resource_tags": { "$ref": "#/$defs/tags" },
|
||||
"autowire": { "type": "boolean" },
|
||||
"bind": { "type": "object", "additionalProperties": { "$ref": "#/$defs/parameterValue" } },
|
||||
"constructor": { "type": "string" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user