Re: merging Controversial changes back into PEAR2 Standards

From: Date: Sun, 23 Sep 2007 17:22:08 +0000
Subject: Re: merging Controversial changes back into PEAR2 Standards
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-48127@lists.php.net to get a copy of this message
Anant Narayanan wrote: >> * eliminate require_once/include_once/require/include from PEAR >> packages as a means of loading classes, and instead rely upon users to >> either use PEAR2_Autoload or a customized loading solution of their own >> creation >> > > +1 > > Restricting it to PEAR2_Autoload only would be even better; are there > cases where a 'custom solution' would be required? > > >> * recommend using class_exists() to throw an exception with helpful >> error message when loading drivers [this is optional, and would be a >> recommendation, not a requirement] >> > > 0 > > It's just a recommendation, so I'm Ok either way. > > >> * use import statements at the top of the file to declare dependencies >> explicitly >> > > -1 > > Why? I've probably missed something - are we allowing dependencies on > certain namespaces of a package? If a package is installed, the entirety > of it is there, so why would the current dependency system not work? Hi Anant, What I think is unclear is the meaning of "dependency" as I used it. I'm referring to external classes - classes declared in other files. By this definition, even PEAR2::Package::Exception is an external dependency. The only alternative to proposal #3 (using import) is that we mandate that all classnames must be used in their entirety, i.e.: throw new ::PEAR2::Package::Exception('blah'); and that import must be avoided inside PEAR2 packages. This is an option, I find it rather unattractive, but it is an option. Greg

« previous php.pear.dev (#48127) next »