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

ID: 7776
Updated by: pear@sebastianmendel.de
Reported By: nicolasembleton at yahoo dot fr
Summary: Problem with recursivity scanning and outputing
Status: Open
Type: Bug
Package: PHP_Beautifier
Operating System: Windows XP Pro SP2
-Package Version: 0.1.8
+Package Version: 0.1.15
PHP Version: 5.1.2
Roadmap Versions:
New Comment:

-Package Version: 0.1.8
+Package Version: 0.1.15
Problem with truncated file names still exists in 0.1.15

$ ls
b dummy.php
$ php_beautifier --filters "EqualsAlign()" *.php ./b/
$ tree
.
-- b
`-- ummy.php
`-- dummy.php


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

[2010-03-16 07:11:31] clbustos

-Roadmap Versions:
+Roadmap Versions: 1.0.0RC2


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

[2010-03-16 07:08:43] clbustos

-Roadmap Versions: 1.0.0RC1
+Roadmap Versions:


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

[2007-01-19 03:00:12] hkroger@gmail.com

I can confirm this bug and it sucks big time.

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

[2006-06-06 00:37:24] clbustos@php.net

Ufff... Please, use xargs and find with individual files. Probably, in
v2.0 I will try to fix it.
------------------------------------------------------------------------

[2006-06-01 03:45:34] nicolasembleton at yahoo dot fr

Description:
------------
While trying to beautify a complete recursive file structure with
pattern *.php5, outputing give completly messy files, with truncated
names, without putting files correctly in the output structure, etc...

Filename are often truncated, like "ss.xml.php5" instead of
"/class/class.xml.php5" ( with path truncated too, i guess, so that's
why file structure is not respected.

When trying to parse myself directory, it gives something clean, but i
have to let to false "setRecursive()" because problems come from here.
Sometimes, it stops alone from scanning directories with a big .php5
file, so work is partially done.

What else can i say to help you... I think a part of the problem come
from glob() function using. Don't really now why, but...

Test script:
---------------
Tried:
------
$oBeaut = new PHP_Beautifier( );
$oBatch = new PHP_Beautifier_Batch( $oBeaut );
$oBatch->addFilter( 'Dirox' );

$oBatch->setRecursive( true );

// Contains my sources
$in_path = "d:/Projects/regie_pub/_/_/*.php5";

// Will contain output
$out_path = "c:/tests/test-" .date( "ymdHi" ) ."/";

$oBatch->setInputFile( $in_path );
$oBatch->setOutputFile( $out_path );
$oBatch->process();
$oBatch->save();

And also:
---------

$oBeaut = new PHP_Beautifier( );
$oBatch = new PHP_Beautifier_Batch( $oBeaut );

$oBatch->addFilter( 'Dirox' );
$oBatch->setRecursive( true );

$in_path = "d:/Projects/regie_pub/_/_/*.php5";
$out_path = "c:/tests/test-" .date( "ymdHi" ) ."/";

$oBatch->setInputFile( $in_path );
$oBatch->setOutputFile( $out_path );
$oBatch->process();

$oBatchDir = new PHP_Beautifier_Batch_Output_Directory( $oBatch );
$oBatchDir->save();


Expected result:
----------------
Same file structure as original one with file beautified

Actual result:
--------------
It only can be viewed as a screenshot. Result is written and beautifying
is done, but files are messy.

Looks like:

Outputdir/ail.php5 instead of
Outputdir/acces/detail.php5

... Everything like this with some dir created, but named with truncated
strings.

One thing strange is that the output is ALWAYS the same. Tried lots of
workaround, but everytime, same output.

( Under linux, the command line works nice, but it stops at a certain
file ( very big ) and so the whole work is not done )

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

Search Discussions

  • Pear at Sep 20, 2012 at 9:25 am
    Edit report at https://pear.php.net/bugs/bug.php?id=7776&edit=1

    ID: 7776
    Updated by: pear@sebastianmendel.de
    Reported By: nicolasembleton at yahoo dot fr
    Summary: Problem with recursivity scanning and outputing
    Status: Open
    Type: Bug
    Package: PHP_Beautifier
    -Operating System:
    +Operating System: n/a
    Package Version: 0.1.15
    PHP Version: 5.1.2
    Roadmap Versions:
    New Comment:

    -Operating System:
    +Operating System: n/a



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

    [2012-09-20 08:10:43] cybot

    -Package Version: 0.1.8
    +Package Version: 0.1.15
    Problem with truncated file names still exists in 0.1.15

    $ ls
    b dummy.php
    $ php_beautifier --filters "EqualsAlign()" *.php ./b/
    $ tree
    .
    -- b
    `-- ummy.php
    `-- dummy.php

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

    [2010-03-16 07:11:31] clbustos

    -Roadmap Versions:
    +Roadmap Versions: 1.0.0RC2


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

    [2010-03-16 07:08:43] clbustos

    -Roadmap Versions: 1.0.0RC1
    +Roadmap Versions:


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

    [2007-01-19 03:00:12] hkroger@gmail.com

    I can confirm this bug and it sucks big time.

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

    [2006-06-06 00:37:24] clbustos@php.net

    Ufff... Please, use xargs and find with individual files. Probably, in
    v2.0 I will try to fix it.
    ------------------------------------------------------------------------

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=7776

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedSep 20, '12 at 7:10a
activeSep 20, '12 at 9:25a
posts2
users1
websitepear.php.net

1 user in discussion

Pear: 2 posts

People

Translate

site design / logo © 2022 Grokbase