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

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

-Roadmap Versions:
+Roadmap Versions: 1.4.3
Patched code worked fine on all PHP versions I tested (5.3.0, 5.2.10,
5.2.6, 5.1.6, 5.0.5, 4.4.9), and it does clear up the deprecation
warnings regarding split() in 5.3.0.


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

[2009-07-18 09:54:16] doconnor

-Assigned To:
+Assigned To: ashnazg


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

[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

  • Demon Gene at Aug 8, 2009 at 5:03 am
    Edit report at http://pear.php.net/bugs/bug.php?id=16446&edit=1

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

    -Status: Assigned
    +Status: Closed
    Committed to SVN... thanks for the patches, Adam.


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

    [2009-08-08 06:58:01] ashnazg

    -Roadmap Versions:
    +Roadmap Versions: 1.4.3
    Patched code worked fine on all PHP versions I tested (5.3.0, 5.2.10,
    5.2.6, 5.1.6, 5.0.5, 4.4.9), and it does clear up the deprecation
    warnings regarding split() in 5.3.0.

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

    [2009-07-18 09:54:16] doconnor

    -Assigned To:
    +Assigned To: ashnazg


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

    [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.)

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedAug 8, '09 at 4:58a
activeAug 8, '09 at 5:03a
posts2
users1
websitepear.php.net

1 user in discussion

Demon Gene: 2 posts

People

Translate

site design / logo © 2022 Grokbase