Created migration guide to 5.4. Lots of placeholders and examples, but could be restructured if more appropriate headings needed.

Currently includes:
1 - "Traits" as new feature
2 - "trait" as new reserved keyword
3 - New cli_server SAPI (not linked though)
4 - E_ALL now includes E_STRICT

This migration guide is not yet active in manual.xml.in.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@314948 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Richard Quadling 2011-08-15 11:40:49 +00:00
parent 2b402b704f
commit ce09bf7327

548
appendices/migration54.xml Normal file
View file

@ -0,0 +1,548 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 304624 $ -->
<appendix xml:id="migration54" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Migrating from PHP 5.3.x to PHP 5.4.x</title>
<simpara>
&manual.migration.seealso;
<link linkend="migration5">5.0.x</link>,
<link linkend="migration51">5.1.x</link>,
<link linkend="migration52">5.2.x</link> and
<link linkend="migration53">5.3.x</link>.
</simpara>
<section xml:id="migration54.changes">
<title>What has changed in PHP 5.4.x</title>
<simpara>
<!-- Placehold for "What has changed in PHP 5.4.x". -->
<!-- Current content for the 5.3.x changes
Most improvements in PHP 5.3.x have no impact on existing code. There are
a <link linkend="migration53.incompatible">few incompatibilities</link>
and <link linkend="migration53.new-features">new features</link> that should
be considered, and code should be tested before switching PHP
versions in production environments.
-->
</simpara>
<simpara>
For systems being upgraded from an older version of PHP, the relevant
documentation is available at:
</simpara>
<itemizedlist>
<listitem>
<simpara>
<link linkend="migration53">Upgrade Notes for PHP 5.3.x</link>.
</simpara>
</listitem>
<listitem>
<simpara>
<link linkend="migration52">Upgrade Notes for PHP 5.2.x</link>.
</simpara>
</listitem>
<listitem>
<simpara>
<link linkend="migration51">Upgrade Notes for PHP 5.1.x</link>.
</simpara>
</listitem>
<listitem>
<simpara>
<link linkend="migration5">Migrating from PHP 4 to PHP 5</link>.
</simpara>
</listitem>
</itemizedlist>
</section>
<section xml:id="migration54.incompatible">
<title>Backward Incompatible Changes</title>
<simpara>
Although most existing PHP 5 code should work without changes, please take
note of some backward incompatible changes:
</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for incompatible entries -->
</simpara>
</listitem>
</itemizedlist>
<simpara>
The following keyword(s) are now reserved and may not be used in function,
class, etc. names.
</simpara>
<itemizedlist>
<listitem>
<simpara>
<link linkend="language.oop5.traits">trait</link>
</simpara>
</listitem>
</itemizedlist>
</section>
<section xml:id="migration54.new-features">
<title>New features</title>
<simpara>
PHP 5.4.0 offers a wide range of new features:
</simpara>
<itemizedlist>
<listitem>
<simpara>
Support for <link linkend="language.oop5.traits">traits</link> has been
added.
</simpara>
</listitem>
</itemizedlist>
</section>
<section xml:id="migration54.windows">
<title>Changes made to Windows support</title>
<simpara>
Changes to the Windows releases:
</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for "Changes made to Windows support" -->
</simpara>
</listitem>
</itemizedlist>
<simpara>
Windows support has been added for the following functions:
</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for "Changes made to Windows support" -->
<!-- Example for a previous versions entry for this list
<function>checkdnsrr</function>
-->
</simpara>
</listitem>
</itemizedlist>
<simpara>
Other changes:
</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for "Other changes:" -->
</simpara>
</listitem>
</itemizedlist>
</section>
<section xml:id="migration54.sapi">
<title>Changes in SAPI modules</title>
<itemizedlist>
<listitem>
<simpara>
A new SAPI module named cli-server is now available.
</simpara>
</listitem>
</itemizedlist>
</section>
<section xml:id="migration54.deprecated">
<title>Deprecated features in PHP 5.4.x</title>
<simpara>
<!-- Placeholder for "Deprecated features in PHP 5.4.x" -->
</simpara>
<simpara>
The following is a list of deprecated INI directives. Use of any of these INI
directives will cause an <constant>E_DEPRECATED</constant> error to be thrown
at startup.
</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for deprecated INI entries. -->
</simpara>
</listitem>
</itemizedlist>
<simpara>
Deprecated functions:
</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for deprecated functions. -->
</simpara>
</listitem>
</itemizedlist>
<simpara>
Deprecated features:
</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for deprecated features. -->
</simpara>
</listitem>
</itemizedlist>
</section>
<!-- Are there any undeprecated features/settings/etc. in PHP 5.4?
<section xml:id="migration54.undeprecated">
<title>Undeprecated features in PHP 5.3.x</title>
<simpara>
The <function>is_a</function> function has been undeprecated by popular
request; it will no longer issue an <constant>E_STRICT</constant> error.
</simpara>
</section>
-->
<section xml:id="migration54.parameters">
<title>New Parameters</title>
<simpara>
Several functions were given new, optional parameters in PHP 5.4:
</simpara>
<simpara>PHP Core:</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for "New Parameters" in PHP Core functions. -->
</simpara>
</listitem>
</itemizedlist>
<!-- Placeholder for "New Parameters" by books.
<simpara><link linkend="book.json">json</link>:</simpara>
<itemizedlist>
<listitem>
<simpara>
<function>json_encode</function>
- Added <parameter>options</parameter>.
</simpara>
</listitem>
<listitem>
<simpara>
<function>json_decode</function>
- Added <parameter>depth</parameter>.
</simpara>
</listitem>
</itemizedlist>
-->
<simpara>
New method parameters in PHP 5.4.0:
</simpara>
<simpara>PHP Core:</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for "New Parameters" for PHP Core methods. -->
</simpara>
</listitem>
</itemizedlist>
</section>
<section xml:id="migration54.functions">
<title>New Functions</title>
<simpara>
PHP 5.4 introduced some new functions:
</simpara>
<simpara>PHP Core:</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for "New Functions" in PHP Core. -->
</simpara>
</listitem>
</itemizedlist>
<!-- Placeholder for "New Functions" by books.
<simpara><link linkend="book.json">JSON</link>:</simpara>
<itemizedlist>
<listitem>
<simpara>
<function>json_last_error</function>
- Returns the last JSON error that occurred.
</simpara>
</listitem>
</itemizedlist>
-->
<simpara>
The following functions are now natively implemented, making them available
on all operating systems which can run PHP:
</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for natively implemented functions. -->
</simpara>
</listitem>
</itemizedlist>
</section>
<section xml:id="migration54.new-stream-wrappers">
<title>New stream wrappers</title>
<simpara>
The following stream wrappers were introduced in 5.4.0:
</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for "New stream wrappers". -->
</simpara>
</listitem>
</itemizedlist>
</section>
<section xml:id="migration54.new-stream-filters">
<title>New stream filters</title>
<simpara>
The following stream filters were introduced in 5.4.0:
</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for "New stream filters". -->
</simpara>
</listitem>
</itemizedlist>
</section>
<section xml:id="migration54.class-constants">
<title>New Class Constants</title>
<simpara>
Several new class constants were introduced in 5.4.0:
</simpara>
<!-- Placeholder for "New Class Constants" by books. -->
<!-- Example
<simpara><link linkend="ref.pdo-firebird">PDO_FIREBIRD</link>:</simpara>
<itemizedlist>
<listitem>
<simpara>
<constant>PDO::FB_ATTR_DATE_FORMAT</constant>
- Sets the format for dates.
</simpara>
</listitem>
<listitem>
<simpara>
<constant>PDO::FB_ATTR_TIME_FORMAT</constant>
- Sets the format for time.
</simpara>
</listitem>
<listitem>
<simpara>
<constant>PDO::FB_ATTR_TIMESTAMP_FORMAT</constant>
- Sets the format for timestamps.
</simpara>
</listitem>
</itemizedlist>
-->
</section>
<section xml:id="migration54.methods">
<title>New Methods</title>
<simpara>
Several new methods were introduced in 5.4.0:
</simpara>
<!-- Placeholder for "New Class Constants" by books. -->
<!-- Example
<simpara><classname>Exception</classname>:</simpara>
<itemizedlist>
<listitem>
<simpara>
<function>Exception::getPrevious</function>
- Retrieves the previous exception.
</simpara>
</listitem>
</itemizedlist>
-->
</section>
<section xml:id="migration54.new-extensions">
<title>New Extensions</title>
<simpara>
The following new extensions are added (by default) as of PHP 5.4.0:
</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for "New Extensions". -->
</simpara>
</listitem>
</itemizedlist>
</section>
<section xml:id="migration54.removed-extensions">
<title>Removed Extensions</title>
<simpara>
These extensions have been moved to PECL and are no longer part of the PHP
distribution. The PECL package versions of these extensions will be created
according to user demand.
</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for "Removed Extensions". -->
</simpara>
</listitem>
</itemizedlist>
</section>
<section xml:id="migration54.extensions-other">
<title>Other changes to extensions</title>
<simpara>
The following extensions can no longer be disabled during build
configuration:
</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for "Other changes to extensions" - Cannot be disabled during build. -->
</simpara>
</listitem>
</itemizedlist>
<simpara>
Changes in extension behaviour, and new features:
</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for "Changes in extension behaviour, and new features". -->
<!-- Example
<link linkend="book.datetime">Date and Time</link>
- The TZ environment variable is no longer used to guess the timezone
-->
</simpara>
</listitem>
</itemizedlist>
</section>
<section xml:id="migration54.classes">
<title>New Classes</title>
<simpara>
The following classes were introduced in PHP 5.4.0:
</simpara>
<!-- Placeholder for "New Classes". -->
<!-- Example
<simpara><link linkend="book.datetime">Date/Time</link>:</simpara>
<itemizedlist>
<listitem>
<simpara>
<classname>DateInterval</classname>
</simpara>
</listitem>
<listitem>
<simpara>
<classname>DatePeriod</classname>
</simpara>
</listitem>
</itemizedlist>
-->
</section>
<section xml:id="migration54.global-constants">
<title>New Global Constants</title>
<simpara>PHP Core:</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for "New Global Constants" for PHP Core. -->
<!-- Examample
<constant>__DIR__</constant>
-->
</simpara>
</listitem>
</itemizedlist>
<!-- Placeholder for "New Global Constants" by book. -->
<!-- Examample
<simpara><link linkend="book.curl">cURL</link>:</simpara>
<itemizedlist>
<listitem>
<simpara>
<constant>CURLOPT_PROGRESSFUNCTION</constant>
</simpara>
</listitem>
</itemizedlist>
-->
<section xml:id="migration54.ini">
<title>Changes to INI file handling</title>
<simpara>
The following ini directives have new default values:
</simpara>
<itemizedlist>
<listitem>
<simpara>
<!-- Placeholder for New Default Values for INI directives. -->
<!-- Example
<literal>session.use_only_cookies</literal> is now set to
<literal>"1"</literal> (enabled) by default.
-->
</simpara>
</listitem>
</itemizedlist>
</section>
<section xml:id="migration54.other">
<title>Other changes</title>
<itemizedlist>
<listitem>
<simpara>
<constant>E_ALL</constant> now includes <constant>E_STRICT</constant>.
</simpara>
</listitem>
</itemizedlist>
</section>
</appendix>
<!-- 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
-->