Re: cvs: pear-core /PEAR/PackageFile/Generator v2.php

From: Date: Thu, 02 Mar 2006 22:33:30 +0000
Subject: Re: cvs: pear-core /PEAR/PackageFile/Generator v2.php
References: 1 2  Groups: php.pear.core 
Request: Send a blank email to pear-core+get-4591@lists.php.net to get a copy of this message
On 3/2/06, Stephan Schmidt <schst@php-tools.net> wrote: > Hi Greg, > > Greg Beaver wrote: > > cellog Thu Mar 2 20:50:59 2006 UTC > > > > Modified files: > > /pear-core/PEAR/PackageFile/Generator v2.php > > Log: > > rename XML_Util to allow PEAR to co-exist with XML_Util > > > > # this is a modified copy of XML_Util, otherwise we could use XML_Util > > I still find it a bit strange to have a forked version of XML_Util and > XML_Serializer in the PEAR package. Would did I have to change to make > it possible for you to use the existing packages? > > XML_Serializer is in its way to a first stable version and as long as I > did not have to completely revamp XML_Serializer, I'd be willing to > adjust it so it could be used by PEAR. The same applies to XML_Util, I'd > also be willing to work on XML_Util2 which means we could break BC... > > When looking at files like this > > http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/PackageFile/Generator/PHP4/v2.php?view=markup&rev=1.2 > it looks like 95% of an old version of XML_Serializer plus XML_Util. > > BTW: This seems broken (not sure, the file is even used): > > foreach (explode(PATH_SEPARATOR, ini_get('include_path')) as $path) { > $t = $path . DIRECTORY_SEPARATOR . 'XML' . DIRECTORY_SEPARATOR . > 'Util'; > if (file_exists($t) && is_readable($t)) { > include_once 'XML/Util'; > } > } > > Probably should be: > include_once $t; No, what's there would be right. You *want* to include from the relative directory, not the full path. The include_path will take care of adding the rest of the path. However, I *do* think there's a missing break; in that if. As well, where's the '.php'? > > The same applies to the following file (which seems to be used): > > http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/PackageFile/Generator/v2.php?view=markup&rev=1.34 > > Most of the code is just copy and paste from XML_Serializer and > XML_Util, with some slight modifications (which leads to broken PHPdoc, > as in some cases the @see tag refers to methods that do not exist. > > So please let me know, if and how I could help, > -- Justin Patrin

« previous php.pear.core (#4591) next »