FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=16446&edit=1

ID: 16446
Updated by: daniel.oconnor@gmail.com
Reported By: aharvey at php dot net
Summary: Use of split() causes E_DEPRECATED warnings
Status: Open
Type: Bug
Package: PhpDocumentor
Operating System: Irrelevant
Package Version: 1.4.2
PHP Version: 5.3.0
-Assigned To:
+Assigned To: ashnazg
Roadmap Versions:
New Comment:

-Assigned To:
+Assigned To: ashnazg



Previous Comments:
------------------------------------------------------------------------

[2009-07-17 10:27:01] aharvey

The following patch has been added/updated:

Patch Name: phpdocumentor-smarty-split-replacements
Revision: 1247822821
URL:
http://pear.php.net/bugs/patch-display.php?bug=16446&patch=phpdocumentor-smarty-split-replacements&revision=1247822821&display=1

------------------------------------------------------------------------

[2009-07-17 10:26:42] aharvey

The following patch has been added/updated:

Patch Name: phpdocumentor-split-replacements
Revision: 1247822802
URL:
http://pear.php.net/bugs/patch-display.php?bug=16446&patch=phpdocumentor-split-replacements&revision=1247822802&display=1

------------------------------------------------------------------------

[2009-07-17 10:26:04] aharvey

Description:
------------
There are a few places within PhpDocumentor where split() is used,
which causes deprecation warnings in PHP 5.3 that clutter the output of
PhpDocumentor.

Two patches against SVN trunk will be forthcoming momentarily: one will
deal with instances within the phpDocumentor codebase itself, while the
other deals with instances within the included Smarty version —
presumably this won't need to be applied and Smarty can be left to fix
it themselves, but just in case it's needed, I'll include it anyway. In
both cases, split() calls are replaced with either explode() or
preg_split() calls as appropriate.

Without these patches, 10 tests fail due to deprecation warnings. All
tests succeed with these patches applied. Additionally, running the
patched phpdoc against my own projects still results in correct
documentation being generated.

Test script:
---------------
The actual result includes partial output from a phpdoc run over a
project I'm currently working on. I've stripped out the irrelevant
parts.

Expected result:
----------------
PHP Version 5.3.1-dev
phpDocumentor version 1.4.2

Parsing configuration file phpDocumentor.ini...
(found in /usr/local/share/pear/data/PhpDocumentor/)...

done
Maximum memory usage set at 256M after considering php.ini...
using tokenizer Parser

(Further normal output omitted.)

Actual result:
--------------
PHP Version 5.3.1-dev
phpDocumentor version 1.4.2

Parsing configuration file phpDocumentor.ini...
(found in /usr/local/share/pear/data/PhpDocumentor/)...

done
Maximum memory usage set at 256M after considering php.ini...
using tokenizer Parser

Deprecated: Function split() is deprecated in
/usr/local/share/pear/PhpDocumentor/phpDocumentor/Io.inc on line 456

Call Stack:
0.0004 324208 1. {main}() /usr/local/bin/phpdoc:0
0.0011 331952 2.
require('/usr/local/share/pear/PhpDocumentor/phpDocumentor/phpdoc.inc')
/usr/local/bin/phpdoc:40
0.1993 8758480 3. phpDocumentor_setup->createDocs()
/usr/local/share/pear/PhpDocumentor/phpDocumentor/phpdoc.inc:65
0.2047 8762656 4. Io->getBase()
/usr/local/share/pear/PhpDocumentor/phpDocumentor/Setup.inc.php:674


Deprecated: Function split() is deprecated in
/usr/local/share/pear/PhpDocumentor/phpDocumentor/Io.inc on line 457

Call Stack:
0.0004 324208 1. {main}() /usr/local/bin/phpdoc:0
0.0011 331952 2.
require('/usr/local/share/pear/PhpDocumentor/phpDocumentor/phpdoc.inc')
/usr/local/bin/phpdoc:40
0.1993 8758480 3. phpDocumentor_setup->createDocs()
/usr/local/share/pear/PhpDocumentor/phpDocumentor/phpdoc.inc:65
0.2047 8762656 4. Io->getBase()
/usr/local/share/pear/PhpDocumentor/phpDocumentor/Setup.inc.php:674

(Another 30 or 40 deprecation warnings followed by normal output
omitted. The PhpDocumentor run is ultimately successful.)

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJul 18, '09 at 7:56a
activeJul 18, '09 at 7:56a
posts1
users1
websitepear.php.net

1 user in discussion

Daniel Oconnor: 1 post

People

Translate

site design / logo © 2022 Grokbase