1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562
|
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<sect1 xml:id="migration74.other-changes" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Other Changes</title>
<sect2 xml:id="migration74.other-changes.performance">
<title>Performance Improvements</title>
<sect3 xml:id="migration74.other-changes.performance.core">
<title>PHP Core</title>
<para>
A specialized VM opcode for the <function>array_key_exists</function>
function has been added, which improves performance of this function
if it can be statically resolved. In namespaced code, this may require
writing <literal>\array_key_exists()</literal> or explicitly importing
the function.
</para>
</sect3>
<sect3 xml:id="migration74.other-changes.performance.pcre">
<title>Regular Expressions (Perl-Compatible)</title>
<para>
When <function>preg_match</function> in UTF-8 mode (<literal>"u"</literal> modifier)
is repeatedly called on the same string (but possibly different offsets),
it will only be checked for UTF-8 validity once.
</para>
</sect3>
</sect2>
<sect2 xml:id="migration74.other-changes.ini">
<title>Changes to INI File Handling</title>
<para>
<link linkend="ini.zend.exception-ignore-args">zend.exception_ignore_args</link> is a new INI directive
for including or excluding arguments from stack traces generated
from exceptions.
</para>
<para>
<link linkend="ini.opcache.preload-user">opcache.preload_user</link> is a new INI directive
for specifying the user account under which preloading
code is execute if it would otherwise be run as root (which is not
allowed for security reasons).
</para>
</sect2>
<sect2 xml:id="migration74.other-changes.pkg-config">
<title>Migration to pkg-config</title>
<para>
A number of extensions have been migrated to exclusively use pkg-config for the
detection of library dependencies. Generally, this means that instead of using
<option role="configure">--with-foo-dir=DIR</option> or similar only
<option role="configure">--with-foo</option> is used. Custom library paths can be
specified either by adding additional directories to <literal>PKG_CONFIG_PATH</literal>
or by explicitly specifying compilation options through <literal>FOO_CFLAGS</literal>
and <literal>FOO_LIBS</literal>.
</para>
<para>
The following extensions and SAPIs are affected:
</para>
<itemizedlist>
<listitem>
<simpara>CURL:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-curl</option> no longer accepts a directory.
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>Enchant:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-enchant</option> no longer accepts a directory.
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>FPM:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-fpm-systemd</option> now uses only pkg-config
for libsystem checks. The libsystemd minimum required version is 209.
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>GD:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-gd</option> becomes
<option role="configure">--enable-gd</option>
(whether to enable the extension at all) and
<option role="configure">--with-external-gd</option>
(to opt into using an external libgd, rather than the bundled one).
</simpara>
</listitem>
<listitem>
<simpara>
<option role="configure">--with-png-dir</option> has been removed. libpng is required.
</simpara>
</listitem>
<listitem>
<simpara>
<option role="configure">--with-zlib-dir</option> has been removed. zlib is required.
</simpara>
</listitem>
<listitem>
<simpara>
<option role="configure">--with-freetype-dir</option>
becomes <option role="configure">--with-freetype</option>
</simpara>
</listitem>
<listitem>
<simpara>
<option role="configure">--with-jpeg-dir</option> becomes
<option role="configure">--with-jpeg</option>
</simpara>
</listitem>
<listitem>
<simpara>
<option role="configure">--with-webp-dir</option> becomes
<option role="configure">--with-webp</option>
</simpara>
</listitem>
<listitem>
<simpara>
<option role="configure">--with-xpm-dir</option> becomes
<option role="configure">--with-xpm</option>
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>IMAP:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-kerberos-systemd</option> no longer accepts a directory.
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>Intl:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-icu-dir</option> has been removed.
If <option role="configure">--enable-intl</option> is passed,
then libicu is always required.
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>LDAP:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-ldap-sasl</option> no longer accepts a directory.
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>Libxml:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-libxml-dir</option> has been removed.
</simpara>
</listitem>
<listitem>
<simpara>
<option role="configure">--enable-libxml</option> becomes
<option role="configure">--with-libxml</option>.
</simpara>
</listitem>
<listitem>
<simpara>
<option role="configure">--with-libexpat-dir</option> has been renamed to
<option role="configure">--with-expat</option> and no longer accepts a directory.
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>Litespeed:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-litespeed</option> becomes
<option role="configure">--enable-litespeed</option>.
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>Mbstring:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-onig</option> has been removed.
Unless <option role="configure">--disable-mbregex</option>
has been passed, libonig is required.
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>ODBC:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-iodbc</option> no longer accepts a directory.
</simpara>
</listitem>
<listitem>
<simpara>
<option role="configure">--with-unixODBC</option> without a directory now uses
pkg-config (preferred). Directory is still accepted for old versions without libodbc.pc.
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>OpenSSL:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-openssl</option> no longer accepts a directory.
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>PCRE:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-pcre-regex</option> has been removed.
Instead <option role="configure">--with-external-pcre</option>
is provided to opt into using an external PCRE library, rather
than the bundled one.
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>PDO_SQLite:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-pdo-sqlite</option> no longer accepts a directory.
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>Readline:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-libedit</option> no longer accepts a directory.
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>Sodium:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-sodium</option> no longer accepts a directory.
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>SQLite3:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-sqlite3</option> no longer accepts a directory.
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>XSL:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-xsl</option> no longer accepts a directory.
</simpara>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<simpara>Zip:</simpara>
<itemizedlist>
<listitem>
<simpara>
<option role="configure">--with-libzip</option> has been removed.
</simpara>
</listitem>
<listitem>
<simpara>
<option role="configure">--enable-zip</option> becomes
<option role="configure">--with-zip</option>.
</simpara>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</sect2>
<sect2 xml:id="migration74.other-changes.csv">
<title>CSV escaping</title>
<para>
<function>fputcsv</function>,
<function>fgetcsv</function>,
<methodname>SplFileObject::fputcsv</methodname>,
<methodname>SplFileObject::fgetcsv</methodname>, and
<methodname>SplFileObject::setCsvControl</methodname>
now accept an empty string as <literal>$escape</literal> argument,
which disables the proprietary PHP escaping mechanism.
</para>
<para>
The behavior of <function>str_getcsv</function> has been
adjusted accordingly (formerly, an empty string was identical
to using the default).
</para>
<para>
<methodname>SplFileObject::getCsvControl</methodname> now may also
return an empty string for the third array element, accordingly.
</para>
</sect2>
<sect2 xml:id="migration74.other-changes.filter">
<title>Data Filtering</title>
<para>
The <link linkend="book.filter">filter</link> extension no longer exposes
<option role="configure">--with-pcre-dir</option> for Unix builds and can now reliably
be built as shared when using <command>./configure</command>
</para>
</sect2>
<sect2 xml:id="migration74.other-changes.gd">
<title>GD</title>
<para>
The behavior of <function>imagecropauto</function> in the bundled
libgd has been synced with that of system libgd:
</para>
<itemizedlist>
<listitem>
<simpara>
<constant>IMG_CROP_DEFAULT</constant> is no longer falling
back to <constant>IMG_CROP_SIDES</constant>
</simpara>
</listitem>
<listitem>
<simpara>
Threshold-cropping now uses the algorithm of system libgd
</simpara>
</listitem>
</itemizedlist>
<para>
The default <literal>$mode</literal> parameter of
<function>imagecropauto</function> has been changed to
<constant>IMG_CROP_DEFAULT</constant>; passing <literal>-1</literal>
is now deprecated.
</para>
<para>
<function>imagescale</function> now supports aspect ratio preserving
scaling to a fixed height by passing <literal>-1</literal>
as <literal>$new_width</literal>.
</para>
</sect2>
<sect2 xml:id="migration74.other-changes.hash">
<title>HASH Message Digest Framework</title>
<para>
The <link linkend="book.hash">hash</link> extension cannot be disabled
anymore and is always an integral part of any PHP build, similar to
the <link linkend="book.datetime">date</link> extension.
</para>
</sect2>
<sect2 xml:id="migration74.other-changes.intl">
<title>Intl</title>
<para>
The <link linkend="book.intl">intl</link> extension
now requires at least ICU 50.1.
</para>
<para>
<classname>ResourceBundle</classname> now implements
<interfacename>Countable</interfacename>.
</para>
</sect2>
<sect2 xml:id="migration74.other-changes.ldap">
<title>Lightweight Directory Access Protocol</title>
<para>
Support for nsldap and umich_ldap has been removed.
</para>
</sect2>
<sect2 xml:id="migration74.other-changes.libxml">
<title>Libxml</title>
<para>
All libxml-based extensions now require libxml 2.7.6 or newer.
</para>
</sect2>
<sect2 xml:id="migration74.other-changes.mbstring">
<title>Multibyte String</title>
<para>
The oniguruma library is no longer bundled with PHP, instead libonig needs
to be available on the system. Alternatively
<option role="configure">--disable-mbregex</option> can be used to disable
the mbregex component.
</para>
</sect2>
<sect2 xml:id="migration74.other-changes.opcache">
<title>OPcache</title>
<para>
The <option role="configure">--disable-opcache-file</option> and
<option role="configure">--enable-opcache-file</option> configure options
have been removed in favor of the
<link linkend="ini.opcache.file-cache">opcache.file_cache</link> INI directive.
</para>
</sect2>
<sect2 xml:id="migration74.other-changes.password">
<title>Password Hashing</title>
<para>
The <function>password_hash</function> and
<function>password_needs_rehash</function> functions
now accept nullable &string; and &integer; for <literal>$algo</literal> argument.
</para>
</sect2>
<sect2 xml:id="migration74.other-changes.pear">
<title>PEAR</title>
<para>
Installation of PEAR (including PECL) is no longer enabled by default. It
can be explicitly enabled using <option role="configure">--with-pear</option>.
This option is deprecated and may be removed in the future.
</para>
</sect2>
<sect2 xml:id="migration74.other-changes.reflection">
<title>Reflection</title>
<para>
The numeric values of the modifier constants
(<literal>IS_ABSTRACT</literal>,
<literal>IS_DEPRECATED</literal>,
<literal>IS_EXPLICIT_ABSTRACT</literal>,
<literal>IS_FINAL</literal>,
<literal>IS_IMPLICIT_ABSTRACT</literal>,
<literal>IS_PRIVATE</literal>,
<literal>IS_PROTECTED</literal>,
<literal>IS_PUBLIC</literal>, and
<literal>IS_STATIC</literal>) on the
<classname>ReflectionClass</classname>,
<classname>ReflectionFunction</classname>,
<classname>ReflectionMethod</classname>,
<classname>ReflectionObject</classname>, and
<classname>ReflectionProperty</classname>
classes have changed.
</para>
</sect2>
<sect2 xml:id="migration74.other-changes.simplexml">
<title>SimpleXML</title>
<para>
<classname>SimpleXMLElement</classname> now implements
<interfacename>Countable</interfacename>.
</para>
</sect2>
<sect2 xml:id="migration74.other-changes.sqlite3">
<title>SQLite3</title>
<para>
The bundled libsqlite has been removed. To build the
<link linkend="book.sqlite3">SQLite3</link> extension a
system libsqlite3 ≥ 3.7.4 is now required. To build the
<link linkend="ref.pdo-sqlite">PDO_SQLite</link> extension
a system libsqlite3 ≥ 3.5.0 is now required.
</para>
<para>
Serialization and unserialization of <classname>SQLite3</classname>,
<classname>SQLite3Stmt</classname> and <classname>SQLite3Result</classname>
is now explicitly forbidden. Formerly, serialization of instances of
these classes was possible, but unserialization yielded unusable objects.
</para>
<para>
The <literal>@param</literal> notation can now also be used to
denote SQL query parameters.
</para>
</sect2>
<sect2 xml:id="migration74.other-changes.zip">
<title>Zip</title>
<para>
The bundled libzip library has been removed.
A system libzip >= 0.11 is now necessary to build the
<link linkend="book.zip">zip</link> extension.
</para>
</sect2>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
|