Skip to content

Commit 23bb9f4

Browse files
committed
Add deprecations to UPGRADING
1 parent 28cf080 commit 23bb9f4

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

UPGRADING

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,22 +351,32 @@ PHP 7.4 UPGRADE NOTES
351351
. The array and string offset access syntax using curly braces is deprecated.
352352
Use $str[$idx] instead of $str{$idx}.
353353
RFC: https://wiki.php.net/rfc/deprecate_curly_braces_array_access
354+
. The (real) cast is deprecated, use (float) instead.
354355
. Unbinding $this of a non-static method through a combination of
355356
ReflectionMethod::getClosure() and closure rebinding is deprecated. Doing
356357
so is equivalent to calling a non-static method statically, which has been
357358
deprecated since PHP 7.0.
359+
. Unbinding $this of a non-static closure is deprecated.
358360
. Using "parent" inside a class without parent is deprecated, and will throw
359361
a compile-time error in the future. Currently an error will only be
360362
generated if/when the parent is accessed at run-time.
363+
. The allow_url_include ini directive is deprecated. Enabling it will generate
364+
a deprecation notice at startup.
361365

362366
- COM:
363367
. Importing type libraries with case-insensitive constant registering has been
364368
deprecated.
365369

370+
- Filter:
371+
. FILTER_SANITIZE_MAGIC_QUOTES is deprecated, use FILTER_SANITIZER_ADD_SLASHES
372+
instead.
373+
366374
- Mbstring:
367375
. Passing a non-string pattern to mb_ereg_replace() is deprecated. Currently
368376
non-string patterns are interpreted as ASCII codepoints. In PHP 8 the
369377
pattern will be interpreted as a string instead.
378+
. Passing the encoding as 3rd parameter to mb_strrpos() is deprecated. Instead
379+
pass a 0 offset and encoding as 4th parameter.
370380

371381
- LDAP:
372382
. ldap_control_paged_result_response and ldap_control_paged_result are
@@ -377,13 +387,36 @@ PHP 7.4 UPGRADE NOTES
377387
This method has been deprecated in favor of ReflectionNamedType::getName()
378388
in the documentation since PHP 7.1, but did not throw a deprecation notice
379389
for technical reasons.
390+
. The export() methods on all Reflection classes are deprecated. Construct a
391+
Reflection object and convert it to string instead:
392+
393+
// ReflectionClass::export(Foo::class, false) is:
394+
echo new ReflectionClass(Foo::class), "\n";
395+
// $str = ReflectionClass::export(Foo::class, true) is:
396+
$str = (string) new ReflectionClass(Foo::class);
380397

381398
- Standard:
382399
. Passing invalid characters to ''base_convert()'', ''bindec()'', ''octdec()''
383400
and ''hexdec()'' will now generate a deprecation notice. The result will
384401
still be computed as if the invalid characters did not exist. Leading and
385402
trailing whitespace, as well as prefixes of type 0x (depending on base)
386403
continue to be allowed.
404+
. Using array_key_exists() on objects is deprecated. Instead either isset()
405+
or property_exists() should be used.
406+
. The is_real() function is deprecated, use is_float() instead.
407+
. The get_magic_quotes_gpc() and get_magic_quotes_runtime() functions are
408+
deprecated. They always return false.
409+
. The hebrevc() function is deprecated. It can be replaced with
410+
nl2br(hebrev($str)), or preferably the use of Unicode RTL support.
411+
. The convert_cyr_string() function is deprecated. It can be replaced by one
412+
of mb_convert_string(), iconv() or UConverter.
413+
. The money_format() function is deprecated. It can be replaced by the
414+
intl NumberFormatter functionality.
415+
. The ezmlm_hash() function is deprecated.
416+
. The restore_include_path() function is deprecated. It can be replace by
417+
ini_restore('include_path').
418+
. Passing parameters to implode() in reverse order is deprecated, use
419+
implode($glue, $parts) instead of implode($parts, $glue).
387420

388421
========================================
389422
5. Changed Functions

0 commit comments

Comments
 (0)