mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@347744 c90b9560-bf6c-de11-be94-00142212c4b1
331 lines
10 KiB
XML
331 lines
10 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<sect1 xml:id="language.oop5.changelog" xmlns="http://docbook.org/ns/docbook">
|
|
<title>OOP Changelog</title>
|
|
<para>
|
|
Changes to the PHP OOP model are logged here. Descriptions and other notes regarding
|
|
these features are documented within the OOP model documentation.
|
|
</para>
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>7.4.0</entry>
|
|
<entry>
|
|
Changed: It is now possible to throw exception within
|
|
<function>__toString</function>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.4.0</entry>
|
|
<entry>
|
|
Added: Support for limited return type covariance and argument
|
|
type contravariance. Full variance support is only available if
|
|
autoloading is used. Inside a single file only non-cyclic type
|
|
references are possible.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.4.0</entry>
|
|
<entry>
|
|
Added: It is now possible to type class properties.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.3.0</entry>
|
|
<entry>
|
|
Incompatibility: Argument unpacking of
|
|
<classname>Traversable</classname>s with non-&integer; keys is no longer
|
|
supported. This behaviour was not intended and thus has been removed.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.3.0</entry>
|
|
<entry>
|
|
Incompatibility: In previous versions it was possible to separate the
|
|
static properties by assigning a reference. This has been removed.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.3.0</entry>
|
|
<entry>
|
|
Changed: The <link linkend="language.operators.type">instanceof</link>
|
|
operator now allows literals as the first operand, in which case the
|
|
result is always &false;.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.2.0</entry>
|
|
<entry>
|
|
Deprecated: The <function>__autoload</function> method has been
|
|
deprecated in favour of <function>spl_autoload_register</function>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.2.0</entry>
|
|
<entry>
|
|
Changed: The following name cannot be used to name classes, interfaces,
|
|
or traits: <literal>object</literal>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.2.0</entry>
|
|
<entry>
|
|
Changed: A trailing comma can now be added to the group-use syntax
|
|
for namespaces.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.2.0</entry>
|
|
<entry>
|
|
Changed: Parameter type widening. Parameter types from overridden
|
|
methods and from interface implementations may now be omitted.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.2.0</entry>
|
|
<entry>
|
|
Changed: Abstract methods can now be overridden when an abstract class
|
|
extends another abstract class.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.1.0</entry>
|
|
<entry>
|
|
Changed: The following names cannot be used to name classes, interfaces,
|
|
or traits: <literal>void</literal> and <literal>iterable</literal>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.1.0</entry>
|
|
<entry>
|
|
Added: It is now possible to specify the
|
|
<link linkend="language.oop5.visiblity-constants">visibility of
|
|
class constants</link>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.0.0</entry>
|
|
<entry>
|
|
Deprecated: <link linkend="language.oop5.static">Static</link> calls
|
|
to methods that are not declared static.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.0.0</entry>
|
|
<entry>
|
|
Deprecated: PHP 4 style <link linkend="language.oop5.decon">
|
|
constructor</link>. I.e. methods that have the same name as the class
|
|
they are defined in.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.0.0</entry>
|
|
<entry>
|
|
Added: Group <emphasis>use</emphasis> declaration: classes, functions
|
|
and constants being imported from the same namespace can now be grouped
|
|
together in a single use statement.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.0.0</entry>
|
|
<entry>
|
|
Added: Support for
|
|
<link linkend="language.oop5.anonymous">anonymous classes</link>
|
|
has been added via <literal>new class</literal>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.0.0</entry>
|
|
<entry>
|
|
Incompatibility: Iterating over a non-<classname>Traversable</classname>
|
|
&object; will now have the same behaviour as iterating over by-reference
|
|
&array;s.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>7.0.0</entry>
|
|
<entry>
|
|
Changed: Defining (compatible) properties in two used
|
|
<link linkend="language.oop5.traits">traits</link> no longer
|
|
triggers an error.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.6.0</entry>
|
|
<entry>
|
|
Added: The <link linkend="object.debuginfo">__debugInfo()</link> method.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.5.0</entry>
|
|
<entry>
|
|
Added: The <link linkend="language.oop5.basic.class.class">::class</link> magic constant.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.5.0</entry>
|
|
<entry>
|
|
Added: <link linkend="language.exceptions">finally</link> to handle exceptions.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.4.0</entry>
|
|
<entry>
|
|
Added: <link linkend="language.oop5.traits">traits</link>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.4.0</entry>
|
|
<entry>
|
|
Changed: If an <link linkend="language.oop5.abstract">abstract</link> class
|
|
defines a signature for the <link linkend="language.oop5.decon">
|
|
constructor</link> it will now be enforced.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.3.3</entry>
|
|
<entry>
|
|
Changed: Methods with the same name as the last element of
|
|
a <link linkend="language.namespaces">namespaced</link>
|
|
class name will no longer be treated as <link
|
|
linkend="language.oop5.decon">constructor</link>. This change doesn't
|
|
affect non-namespaced classes.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.3.0</entry>
|
|
<entry>
|
|
Changed: Classes that implement interfaces with methods that have default
|
|
values in the prototype are no longer required to match the interface's default
|
|
value.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.3.0</entry>
|
|
<entry>
|
|
Changed: It's now possible to reference the class using a variable (e.g.,
|
|
<literal>echo $classname::constant;</literal>).
|
|
The variable's value can not be a keyword (e.g., <literal>self</literal>,
|
|
<literal>parent</literal> or <literal>static</literal>).
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.3.0</entry>
|
|
<entry>
|
|
Changed: An <constant>E_WARNING</constant> level error is issued if
|
|
the magic <link linkend="language.oop5.overloading">overloading</link>
|
|
methods are declared <link linkend="language.oop5.static">static</link>.
|
|
It also enforces the public visibility requirement.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.3.0</entry>
|
|
<entry>
|
|
Changed: Prior to 5.3.0, exceptions thrown in the
|
|
<function>__autoload</function> function could not be
|
|
caught in the <link linkend="language.exceptions">catch</link> block, and
|
|
would result in a fatal error. Exceptions now thrown in the __autoload function
|
|
can be caught in the <link linkend="language.exceptions">catch</link> block, with
|
|
one provison. If throwing a custom exception, then the custom exception class must
|
|
be available. The __autoload function may be used recursively to autoload the
|
|
custom exception class.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.3.0</entry>
|
|
<entry>
|
|
Added: The <link linkend="language.oop5.overloading">__callStatic</link> method.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.3.0</entry>
|
|
<entry>
|
|
Added: <link linkend="language.types.string.syntax.heredoc">heredoc</link>
|
|
and <link linkend="language.types.string.syntax.heredoc">nowdoc</link>
|
|
support for class <emphasis>const</emphasis> and property definitions.
|
|
Note: heredoc values must follow the same rules as double-quoted strings,
|
|
(e.g. no variables within).
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.3.0</entry>
|
|
<entry>
|
|
Added: <link linkend="language.oop5.late-static-bindings">Late Static Bindings</link>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.3.0</entry>
|
|
<entry>
|
|
Added: The <link linkend="object.invoke">__invoke()</link> method.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.2.0</entry>
|
|
<entry>
|
|
Changed: The <link linkend="object.tostring">__toString()</link>
|
|
method was only called when it was directly combined with
|
|
<function>echo</function> or <function>print</function>.
|
|
But now, it is called in any &string; context (e.g. in
|
|
<function>printf</function> with <literal>%s</literal> modifier) but not
|
|
in other types contexts (e.g. with <literal>%d</literal> modifier).
|
|
As of PHP 5.2.0, converting &object;s without a
|
|
<link linkend="object.tostring">__toString</link> method to &string;
|
|
emits a <constant>E_RECOVERABLE_ERROR</constant> level error.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.1.3</entry>
|
|
<entry>
|
|
Changed: In previous versions of PHP 5, the use of <literal>var</literal>
|
|
was considered deprecated and would issue an <constant>E_STRICT</constant>
|
|
level error. It's no longer deprecated, therefore does not emit the error.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.1.0</entry>
|
|
<entry>
|
|
Changed: The <link linkend="object.set-state">__set_state()</link> static
|
|
method is now called for classes exported by <function>var_export</function>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.1.0</entry>
|
|
<entry>
|
|
Added: The <link linkend="object.isset">__isset()</link>
|
|
and <link linkend="object.unset">__unset()</link> methods.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</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
|
|
-->
|