Skip to content

Commit e95647c

Browse files
committed
1 parent 6214a21 commit e95647c

8 files changed

Lines changed: 122 additions & 35 deletions

File tree

ext/spl/spl_array.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include "php.h"
2020
#include "ext/standard/php_var.h"
21+
#include "zend_attributes.h"
2122
#include "zend_smart_str.h"
2223
#include "zend_interfaces.h"
2324
#include "zend_exceptions.h"

ext/spl/spl_array.stub.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,60 +139,70 @@ public function count(): int {}
139139
* @tentative-return-type
140140
* @implementation-alias ArrayObject::getFlags
141141
*/
142+
#[\Deprecated(since: "8.6")]
142143
public function getFlags(): int {}
143144

144145
/**
145146
* @tentative-return-type
146147
* @implementation-alias ArrayObject::setFlags
147148
*/
149+
#[\Deprecated(since: "8.6")]
148150
public function setFlags(int $flags): void {}
149151

150152
/**
151153
* @tentative-return-type
152154
* @implementation-alias ArrayObject::asort
153155
*/
156+
#[\Deprecated(since: "8.6")]
154157
public function asort(int $flags = SORT_REGULAR): true {}
155158

156159
/**
157160
* @tentative-return-type
158161
* @implementation-alias ArrayObject::ksort
159162
*/
163+
#[\Deprecated(since: "8.6")]
160164
public function ksort(int $flags = SORT_REGULAR): true {}
161165

162166
/**
163167
* @tentative-return-type
164168
* @implementation-alias ArrayObject::uasort
165169
*/
170+
#[\Deprecated(since: "8.6")]
166171
public function uasort(callable $callback): true {}
167172

168173
/**
169174
* @tentative-return-type
170175
* @implementation-alias ArrayObject::uksort
171176
*/
177+
#[\Deprecated(since: "8.6")]
172178
public function uksort(callable $callback): true {}
173179

174180
/**
175181
* @tentative-return-type
176182
* @implementation-alias ArrayObject::natsort
177183
*/
184+
#[\Deprecated(since: "8.6")]
178185
public function natsort(): true {}
179186

180187
/**
181188
* @tentative-return-type
182189
* @implementation-alias ArrayObject::natcasesort
183190
*/
191+
#[\Deprecated(since: "8.6")]
184192
public function natcasesort(): true {}
185193

186194
/**
187195
* @tentative-return-type
188196
* @implementation-alias ArrayObject::unserialize
189197
*/
198+
#[\Deprecated(since: "8.6")]
190199
public function unserialize(string $data): void {}
191200

192201
/**
193202
* @tentative-return-type
194203
* @implementation-alias ArrayObject::serialize
195204
*/
205+
#[\Deprecated(since: "8.6")]
196206
public function serialize(): string {}
197207

198208
/**

ext/spl/spl_array_arginfo.h

Lines changed: 53 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ext/spl/tests/ArrayObject/arrayIterator_ksort_basic1.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ var_dump($arrIter->ksort());
99
var_dump($arrIter);
1010

1111
?>
12-
--EXPECT--
12+
--EXPECTF--
13+
Deprecated: Method ArrayIterator::ksort() is deprecated since 8.6 in %s on line %d
1314
bool(true)
1415
object(ArrayIterator)#1 (1) {
1516
["storage":"ArrayIterator":private]=>

ext/spl/tests/ArrayObject/arrayObject_getFlags_basic2.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ int(3)
2121

2222
Deprecated: ArrayObject::__construct(): Using an object as a backing array for ArrayObject is deprecated, as it allows violating class constraints and invariants in %s on line %d
2323
int(3)
24+
25+
Deprecated: Method ArrayIterator::getFlags() is deprecated since 8.6 in %s on line %d
2426
int(3)
2527

2628
Deprecated: ArrayIterator::__construct(): Using an object as a backing array for ArrayIterator is deprecated, as it allows violating class constraints and invariants in %s on line %d
29+
30+
Deprecated: Method ArrayIterator::getFlags() is deprecated since 8.6 in %s on line %d
2731
int(3)
2832

2933
Deprecated: ArrayObject::__construct(): Using an object as a backing array for ArrayObject is deprecated, as it allows violating class constraints and invariants in %s on line %d

0 commit comments

Comments
 (0)