Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.1.15

Bug #7776 Problem with recursivity scanning and outputing
Submitted: 2006-06-01 07:45 UTC
From: nicolasembleton at yahoo dot fr Assigned:
Status: Open Package: PHP_Beautifier (version 0.1.15)
PHP Version: 5.1.2 OS: n/a
Roadmaps: 1.0.0RC2    
Subscription  


 [2006-06-01 07:45 UTC] nicolasembleton at yahoo dot fr (Embleton Nicolas)
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 )

Comments

 [2006-06-06 04:37 UTC] clbustos at php dot net (Claudio Bustos)
Ufff... Please, use xargs and find with individual files. Probably, in >v2.0 I will try to fix it.
 [2007-01-19 08:00 UTC] hkroger at gmail dot com (Hannu Kröger)
I can confirm this bug and it sucks big time.
 [2010-03-16 11:08 UTC] clbustos (Claudio Bustos)
-Roadmap Versions: 1.0.0RC1 +Roadmap Versions:
 [2010-03-16 11:11 UTC] clbustos (Claudio Bustos)
-Roadmap Versions: +Roadmap Versions: 1.0.0RC2
 [2012-09-20 12:10 UTC] cybot (Sebastian Mendel)
-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
 [2012-09-20 14:25 UTC] cybot (Sebastian Mendel)
-Operating System: +Operating System: n/a