Skip to content

Commit c34bd81

Browse files
committed
restore XML tests, add yml instead of php config
1 parent 42d52f4 commit c34bd81

File tree

5 files changed

+290
-127
lines changed

5 files changed

+290
-127
lines changed

src/DependencyInjection/SentryExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ public function getNamespace(): string
6262
*/
6363
protected function loadInternal(array $mergedConfig, ContainerBuilder $container): void
6464
{
65-
$loader = new Loader\PhpFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
66-
$loader->load('services.php');
65+
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
66+
$loader->load('services.yaml');
6767

6868
if (!$container->hasParameter('env(SENTRY_RELEASE)')) {
6969
$container->setParameter('env(SENTRY_RELEASE)', PrettyVersions::getRootPackageVersion()->getPrettyVersion());
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
3+
<xsd:schema xmlns="https://sentry.io/schema/dic/sentry-symfony"
4+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5+
targetNamespace="https://sentry.io/schema/dic/sentry-symfony"
6+
elementFormDefault="qualified">
7+
8+
<xsd:element name="config" type="config" />
9+
10+
<xsd:complexType name="config">
11+
<xsd:choice maxOccurs="unbounded">
12+
<xsd:element name="options" type="options" minOccurs="0" maxOccurs="1" />
13+
<xsd:element name="messenger" type="messenger" minOccurs="0" maxOccurs="1" />
14+
<xsd:element name="tracing" type="tracing" minOccurs="0" maxOccurs="1" />
15+
</xsd:choice>
16+
17+
<xsd:attribute name="register-error-listener" type="xsd:boolean" />
18+
<xsd:attribute name="register-error-handler" type="xsd:boolean" />
19+
<xsd:attribute name="transport-factory" type="xsd:string" />
20+
<xsd:attribute name="dsn" type="xsd:string" />
21+
<xsd:attribute name="logger" type="xsd:string" />
22+
</xsd:complexType>
23+
24+
<xsd:complexType name="options">
25+
<xsd:sequence>
26+
<xsd:element name="integration" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
27+
<xsd:element name="trace-propagation-target" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
28+
<xsd:element name="prefix" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
29+
<xsd:element name="tag" type="tag" minOccurs="0" maxOccurs="unbounded" />
30+
<xsd:element name="in-app-exclude" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
31+
<xsd:element name="in-app-include" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
32+
<xsd:element name="class-serializer" type="class-serializer" minOccurs="0" maxOccurs="unbounded" />
33+
<xsd:element name="ignore-exception" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
34+
<xsd:element name="ignore-transaction" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
35+
</xsd:sequence>
36+
37+
<xsd:attribute name="default-integrations" type="xsd:boolean" />
38+
<xsd:attribute name="sample-rate" type="xsd:float" />
39+
<xsd:attribute name="enable-tracing" type="xsd:boolean" />
40+
<xsd:attribute name="enable-logs" type="xsd:boolean" />
41+
<xsd:attribute name="traces-sample-rate" type="xsd:float" />
42+
<xsd:attribute name="profiles-sample-rate" type="xsd:float" />
43+
<xsd:attribute name="traces-sampler" type="xsd:string" />
44+
<xsd:attribute name="attach-stacktrace" type="xsd:boolean" />
45+
<xsd:attribute name="attach-metric-code-locations" type="xsd:boolean" />
46+
<xsd:attribute name="context-lines" type="xsd:integer" />
47+
<xsd:attribute name="enable-compression" type="xsd:boolean" />
48+
<xsd:attribute name="environment" type="xsd:string" />
49+
<xsd:attribute name="logger" type="xsd:string" />
50+
<xsd:attribute name="spotlight" type="xsd:boolean" />
51+
<xsd:attribute name="spotlight-url" type="xsd:string" />
52+
<xsd:attribute name="release" type="xsd:string" />
53+
<xsd:attribute name="server-name" type="xsd:string" />
54+
<xsd:attribute name="before-send" type="xsd:string" />
55+
<xsd:attribute name="before-send-transaction" type="xsd:string" />
56+
<xsd:attribute name="before-send-check-in" type="xsd:string" />
57+
<xsd:attribute name="before-send-metrics" type="xsd:string" />
58+
<xsd:attribute name="before-send-log" type="xsd:string" />
59+
<xsd:attribute name="error-types" type="xsd:string" />
60+
<xsd:attribute name="max-breadcrumbs" type="xsd:integer" />
61+
<xsd:attribute name="before-breadcrumb" type="xsd:string" />
62+
<xsd:attribute name="send-default-pii" type="xsd:boolean" />
63+
<xsd:attribute name="max-value-length" type="xsd:integer" />
64+
<xsd:attribute name="transport" type="xsd:string" />
65+
<xsd:attribute name="http-client" type="xsd:string" />
66+
<xsd:attribute name="http-proxy" type="xsd:string" />
67+
<xsd:attribute name="http-proxy-authentication" type="xsd:string" />
68+
<xsd:attribute name="http-connect-timeout" type="xsd:integer" />
69+
<xsd:attribute name="http-timeout" type="xsd:integer" />
70+
<xsd:attribute name="http-ssl-verify-peer" type="xsd:boolean" />
71+
<xsd:attribute name="http-compression" type="xsd:boolean" />
72+
<xsd:attribute name="capture-silenced-errors" type="xsd:boolean" />
73+
<xsd:attribute name="max-request-body-size" type="max-request-body-size" />
74+
</xsd:complexType>
75+
76+
<xsd:complexType name="tag">
77+
<xsd:simpleContent>
78+
<xsd:extension base="xsd:string">
79+
<xsd:attribute name="name" type="xsd:string" use="required" />
80+
</xsd:extension>
81+
</xsd:simpleContent>
82+
</xsd:complexType>
83+
84+
<xsd:complexType name="class-serializer">
85+
<xsd:simpleContent>
86+
<xsd:extension base="xsd:string">
87+
<xsd:attribute name="class" type="xsd:string" use="required" />
88+
</xsd:extension>
89+
</xsd:simpleContent>
90+
</xsd:complexType>
91+
92+
<xsd:simpleType name="max-request-body-size">
93+
<xsd:restriction base="xsd:string">
94+
<xsd:enumeration value="none" />
95+
<xsd:enumeration value="small" />
96+
<xsd:enumeration value="medium" />
97+
<xsd:enumeration value="always" />
98+
</xsd:restriction>
99+
</xsd:simpleType>
100+
101+
<xsd:complexType name="messenger">
102+
<xsd:attribute name="enabled" type="xsd:boolean" />
103+
<xsd:attribute name="capture-soft-fails" type="xsd:boolean" />
104+
<xsd:attribute name="isolate-breadcrumbs-by-message" type="xsd:boolean" />
105+
</xsd:complexType>
106+
107+
<xsd:complexType name="tracing">
108+
<xsd:choice maxOccurs="unbounded">
109+
<xsd:element name="dbal" type="tracing-dbal" minOccurs="0" maxOccurs="1" />
110+
<xsd:element name="twig" type="tracing-twig" minOccurs="0" maxOccurs="1" />
111+
<xsd:element name="cache" type="tracing-cache" minOccurs="0" maxOccurs="1" />
112+
<xsd:element name="console" type="tracing-console" minOccurs="0" maxOccurs="1" />
113+
<xsd:element name="http-client" type="tracing-http-client" minOccurs="0" maxOccurs="1" />
114+
</xsd:choice>
115+
116+
<xsd:attribute name="enabled" type="xsd:boolean" default="true"/>
117+
</xsd:complexType>
118+
119+
<xsd:complexType name="tracing-dbal">
120+
<xsd:sequence maxOccurs="unbounded">
121+
<xsd:element name="connection" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
122+
</xsd:sequence>
123+
124+
<xsd:attribute name="enabled" type="xsd:boolean" />
125+
</xsd:complexType>
126+
127+
<xsd:complexType name="tracing-twig">
128+
<xsd:attribute name="enabled" type="xsd:boolean" />
129+
</xsd:complexType>
130+
131+
<xsd:complexType name="tracing-cache">
132+
<xsd:attribute name="enabled" type="xsd:boolean" />
133+
</xsd:complexType>
134+
135+
<xsd:complexType name="tracing-console">
136+
<xsd:sequence maxOccurs="unbounded">
137+
<xsd:element name="excluded-command" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
138+
</xsd:sequence>
139+
</xsd:complexType>
140+
141+
<xsd:complexType name="tracing-http-client">
142+
<xsd:attribute name="enabled" type="xsd:boolean" />
143+
</xsd:complexType>
144+
</xsd:schema>

src/Resources/config/services.php

Lines changed: 0 additions & 125 deletions
This file was deleted.

0 commit comments

Comments
 (0)