Doc #77916 [Opn->Csd]: Phar documentation example bug
| From: | cmb@php.net | Date: | Thu, 18 Apr 2019 08:34:35 +0000 |
| Subject: | Doc #77916 [Opn->Csd]: Phar documentation example bug | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-16604@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77916&edit=1
ID: 77916
Updated by: cmb@php.net
Reported by: jurrien dot dokter at springdigital dot nl
Summary: Phar documentation example bug
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Unknown/Other Function
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2019-04-18 08:33:49] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=347277
Log: Fix #77916: Phar documentation example bug
------------------------------------------------------------------------
[2019-04-18 08:22:02] jurrien dot dokter at springdigital dot nl
Description:
------------
---
From manual page: https://php.net/phar.using.intro
---
---
$p->buildFromIterator(new RecursiveIteratorIterator(new
DirectoryIterator('/path/to/project')), '/path/to/');
---
This needs to be replaced with
---
$p->buildFromIterator(new RecursiveIteratorIterator(new
RecursiveDirectoryIterator('/path/to/project')), '/path/to/');
---
Otherwise it'll give a pretty fatal error.
> Uncaught InvalidArgumentException: An instance of RecursiveIterator or IteratorAggregate
> creating it is required
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77916&edit=1