Skip to content

Commit 576c7c4

Browse files
[PHP 8.4] Add ext-date constant types (#4237)
1 parent 26c2a15 commit 576c7c4

File tree

5 files changed

+163
-31
lines changed

5 files changed

+163
-31
lines changed

reference/datetime/dateperiod.xml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,20 @@
109109
&reftitle.constants;
110110
<variablelist>
111111
<varlistentry xml:id="dateperiod.constants.exclude-start-date">
112-
<term><constant>DatePeriod::EXCLUDE_START_DATE</constant></term>
112+
<term>
113+
<constant>DatePeriod::EXCLUDE_START_DATE</constant>
114+
<type>int</type>
115+
</term>
113116
<listitem>
114117
<para>Exclude start date, used in <function>DatePeriod::__construct</function>.</para>
115118
</listitem>
116119
</varlistentry>
117120

118121
<varlistentry xml:id="dateperiod.constants.include-end-date">
119-
<term><constant>DatePeriod::INCLUDE_END_DATE</constant></term>
122+
<term>
123+
<constant>DatePeriod::INCLUDE_END_DATE</constant>
124+
<type>int</type>
125+
</term>
120126
<listitem>
121127
<para>Include end date, used in <function>DatePeriod::__construct</function>.</para>
122128
</listitem>
@@ -257,6 +263,12 @@ echo $period->recurrences, "\n";
257263
</row>
258264
</thead>
259265
<tbody>
266+
<row>
267+
<entry>8.4.0</entry>
268+
<entry>
269+
The class constants are now typed.
270+
</entry>
271+
</row>
260272
<row>
261273
<entry>8.2.0</entry>
262274
<entry>

reference/datetime/datetime.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@
7777
</row>
7878
</thead>
7979
<tbody>
80+
<row>
81+
<entry>8.4.0</entry>
82+
<entry>
83+
The class constants are now typed.
84+
</entry>
85+
</row>
8086
<row>
8187
<entry>7.2.0</entry>
8288
<entry>

reference/datetime/datetimeimmutable.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@
6767
</row>
6868
</thead>
6969
<tbody>
70+
<row>
71+
<entry>8.4.0</entry>
72+
<entry>
73+
The class constants are now typed.
74+
</entry>
75+
</row>
7076
<row>
7177
<entry>7.1.0</entry>
7278
<entry>

reference/datetime/datetimeinterface.xml

Lines changed: 60 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@
151151
&reftitle.constants;
152152
<variablelist>
153153
<varlistentry xml:id="datetimeinterface.constants.atom">
154-
<term><constant>DateTimeInterface::ATOM</constant></term>
154+
<term>
155+
<constant>DateTimeInterface::ATOM</constant>
156+
<type>string</type>
157+
</term>
155158
<term><constant>DATE_ATOM</constant></term>
156159
<listitem>
157160
<simpara>
@@ -161,7 +164,10 @@
161164
</varlistentry>
162165

163166
<varlistentry xml:id="datetimeinterface.constants.cookie">
164-
<term><constant>DateTimeInterface::COOKIE</constant></term>
167+
<term>
168+
<constant>DateTimeInterface::COOKIE</constant>
169+
<type>string</type>
170+
</term>
165171
<term><constant>DATE_COOKIE</constant></term>
166172
<listitem>
167173
<simpara>
@@ -171,7 +177,10 @@
171177
</varlistentry>
172178

173179
<varlistentry xml:id="datetimeinterface.constants.iso8601">
174-
<term><constant>DateTimeInterface::ISO8601</constant></term>
180+
<term>
181+
<constant>DateTimeInterface::ISO8601</constant>
182+
<type>string</type>
183+
</term>
175184
<term><constant>DATE_ISO8601</constant></term>
176185
<listitem>
177186
<simpara>
@@ -190,7 +199,10 @@
190199
</varlistentry>
191200

192201
<varlistentry xml:id="datetimeinterface.constants.iso8601-expanded">
193-
<term><constant>DateTimeInterface::ISO8601_EXPANDED</constant></term>
202+
<term>
203+
<constant>DateTimeInterface::ISO8601_EXPANDED</constant>
204+
<type>string</type>
205+
</term>
194206
<term><constant>DATE_ISO8601_EXPANDED</constant></term>
195207
<listitem>
196208
<simpara>
@@ -208,7 +220,10 @@
208220
</varlistentry>
209221

210222
<varlistentry xml:id="datetimeinterface.constants.rfc822">
211-
<term><constant>DateTimeInterface::RFC822</constant></term>
223+
<term>
224+
<constant>DateTimeInterface::RFC822</constant>
225+
<type>string</type>
226+
</term>
212227
<term><constant>DATE_RFC822</constant></term>
213228
<listitem>
214229
<simpara>
@@ -218,7 +233,10 @@
218233
</varlistentry>
219234

220235
<varlistentry xml:id="datetimeinterface.constants.rfc850">
221-
<term><constant>DateTimeInterface::RFC850</constant></term>
236+
<term>
237+
<constant>DateTimeInterface::RFC850</constant>
238+
<type>string</type>
239+
</term>
222240
<term><constant>DATE_RFC850</constant></term>
223241
<listitem>
224242
<simpara>
@@ -228,7 +246,10 @@
228246
</varlistentry>
229247

230248
<varlistentry xml:id="datetimeinterface.constants.rfc1036">
231-
<term><constant>DateTimeInterface::RFC1036</constant></term>
249+
<term>
250+
<constant>DateTimeInterface::RFC1036</constant>
251+
<type>string</type>
252+
</term>
232253
<term><constant>DATE_RFC1036</constant></term>
233254
<listitem>
234255
<simpara>
@@ -238,7 +259,10 @@
238259
</varlistentry>
239260

240261
<varlistentry xml:id="datetimeinterface.constants.rfc1123">
241-
<term><constant>DateTimeInterface::RFC1123</constant></term>
262+
<term>
263+
<constant>DateTimeInterface::RFC1123</constant>
264+
<type>string</type>
265+
</term>
242266
<term><constant>DATE_RFC1123</constant></term>
243267
<listitem>
244268
<simpara>
@@ -248,7 +272,10 @@
248272
</varlistentry>
249273

250274
<varlistentry xml:id="datetimeinterface.constants.rfc7231">
251-
<term><constant>DateTimeInterface::RFC7231</constant></term>
275+
<term>
276+
<constant>DateTimeInterface::RFC7231</constant>
277+
<type>string</type>
278+
</term>
252279
<term><constant>DATE_RFC7231</constant></term>
253280
<listitem>
254281
<simpara>
@@ -258,7 +285,10 @@
258285
</varlistentry>
259286

260287
<varlistentry xml:id="datetimeinterface.constants.rfc2822">
261-
<term><constant>DateTimeInterface::RFC2822</constant></term>
288+
<term>
289+
<constant>DateTimeInterface::RFC2822</constant>
290+
<type>string</type>
291+
</term>
262292
<term><constant>DATE_RFC2822</constant></term>
263293
<listitem>
264294
<simpara>
@@ -268,7 +298,10 @@
268298
</varlistentry>
269299

270300
<varlistentry xml:id="datetimeinterface.constants.rfc3339">
271-
<term><constant>DateTimeInterface::RFC3339</constant></term>
301+
<term>
302+
<constant>DateTimeInterface::RFC3339</constant>
303+
<type>string</type>
304+
</term>
272305
<term><constant>DATE_RFC3339</constant></term>
273306
<listitem>
274307
<simpara>
@@ -278,7 +311,10 @@
278311
</varlistentry>
279312

280313
<varlistentry xml:id="datetimeinterface.constants.rfc3339-extended">
281-
<term><constant>DateTimeInterface::RFC3339_EXTENDED</constant></term>
314+
<term>
315+
<constant>DateTimeInterface::RFC3339_EXTENDED</constant>
316+
<type>string</type>
317+
</term>
282318
<term><constant>DATE_RFC3339_EXTENDED</constant></term>
283319
<listitem>
284320
<simpara>
@@ -288,7 +324,10 @@
288324
</varlistentry>
289325

290326
<varlistentry xml:id="datetimeinterface.constants.rss">
291-
<term><constant>DateTimeInterface::RSS</constant></term>
327+
<term>
328+
<constant>DateTimeInterface::RSS</constant>
329+
<type>string</type>
330+
</term>
292331
<term><constant>DATE_RSS</constant></term>
293332
<listitem>
294333
<simpara>
@@ -298,7 +337,10 @@
298337
</varlistentry>
299338

300339
<varlistentry xml:id="datetimeinterface.constants.w3c">
301-
<term><constant>DateTimeInterface::W3C</constant></term>
340+
<term>
341+
<constant>DateTimeInterface::W3C</constant>
342+
<type>string</type>
343+
</term>
302344
<term><constant>DATE_W3C</constant></term>
303345
<listitem>
304346
<simpara>
@@ -323,6 +365,10 @@
323365
</row>
324366
</thead>
325367
<tbody>
368+
<row>
369+
<entry>8.4.0</entry>
370+
<entry>The class constants are now typed.</entry>
371+
</row>
326372
<row>
327373
<entry>8.2.0</entry>
328374
<entry>

0 commit comments

Comments
 (0)