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

Bug #16598 Missing argument to constructor
Submitted: 2009-09-12 05:47 UTC
From: kornel Assigned:
Status: Wont fix Package: PEAR_PackageFileManager2 (version 1.0.0)
PHP Version: 5.3.0 OS: *
Roadmaps: (Not assigned)    
Subscription  


 [2009-09-12 05:47 UTC] kornel (Kornel Lesinski)
Description: ------------ CVS: $Id: PackageFileManager2.php,v 1.78 2009/03/22 Line 1244: $generatorclass = 'PEAR_PackageFileManager_' . $this->_options['filelistgenerator']; $generator = new $generatorclass($options); tries to instantiate: PEAR_PackageFileManager_Fileset with constructor: function __construct($parent, $options)

Comments

 [2009-10-07 00:33 UTC] spaze (Michal Spacek)
Adding more details as I've hit this too. The problem here is a BC break between PEAR_PackageFileManager-1.6.3 and PEAR_PackageFileManager2-1.0.0alpha1 While the old 1.6.3 version is passing two params to the generator constructor like this: $generatorclass = 'PEAR_PackageFileManager_' . $this->_options['filelistgenerator']; $generator = new $generatorclass($this, $options); the newer splitted version is doing this: $generatorclass = 'PEAR_PackageFileManager_' . $this->_options['filelistgenerator']; $generator = new $generatorclass($options); This is perfectly ok with plugins from PEAR_PackageFileManager_Plugins-1.0.0 as they all were patched to accomodate to this constructor change, but there are some external plugins too. Like the Fileset one in Phing, which has patched the plugin recently too* , but in current stable version (2.3.3) it's got two params constructor. Although all we can do now is to wait for new Phing release, it would be nice to handle this BC break in a better way, if a BC break is needed at all. * http://phing.info/trac/browser/trunk/classes/phing/tasks/ext/pearpackage/Fileset.php?rev=562
 [2010-02-04 04:11 UTC] cweiske (Christian Weiske)
-Status: Open +Status: Wont fix
PEAR_PackageFileManager and PEAR_PackageFileManager2 are two separate packages, BC breaks are allowed - I don't see a reason why API cleanups should not be possible here.