Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appendices/migration83/deprecated.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@

<para>
Calling <methodname>Phar::setStub</methodname> with a
<parameter>$resource</parameter> and a <parameter>$length</parameter>
<type>resource</type> and a <parameter>$length</parameter>
is now deprecated. Such calls should be replaced by:
<code>$phar->setStub(stream_get_contents($resource));</code>
</para>
Expand Down
31 changes: 28 additions & 3 deletions reference/phar/Phar/setStub.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
&reftitle.description;
<methodsynopsis role="Phar">
<modifier>public</modifier> <type>bool</type><methodname>Phar::setStub</methodname>
<methodparam><type>string</type><parameter>stub</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>len</parameter><initializer>-1</initializer></methodparam>
<methodparam><type class="union"><type>resource</type><type>string</type></type><parameter>stub</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>-1</initializer></methodparam>
</methodsynopsis>
&phar.write;

Expand Down Expand Up @@ -58,7 +58,7 @@ include 'phar://myphar.phar/somefile.php';
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>len</parameter></term>
<term><parameter>length</parameter></term>
<listitem>
<para>

Expand Down Expand Up @@ -87,6 +87,31 @@ include 'phar://myphar.phar/somefile.php';
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.3.0</entry>
<entry>
Calling <methodname>Phar::setStub</methodname> with a
<type>resource</type> and a <parameter>length</parameter>
is now deprecated. Such calls should be replaced by:
<code>$phar->setStub(stream_get_contents($resource));</code>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<para>
Expand Down