Re: Re: PEAR2 Coding standards, Autoloading and Namespaces

From: Date: Sun, 06 Apr 2008 13:45:08 +0000
Subject: Re: Re: PEAR2 Coding standards, Autoloading and Namespaces
References: 1 2 3 4 5 6 7  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-49669@lists.php.net to get a copy of this message
On Sat, Apr 5, 2008 at 11:45 PM, Jeff Moore <jeff@procata.com> wrote: > > On Apr 5, 2008, at 2:59 PM, Helgi Þormar Þorbjörnsson wrote: > > On Sat, Apr 5, 2008 at 4:53 PM, Jeff Moore <jeff@procata.com> wrote: > > > * Foo.php is not in the Foo directory (confusing, bad for version > > > control) > > > > > > > This comment makes it seem like you've ever never never used a version > > control system ... really ... no offense but it does sound that way. > > > > No offense taken. I generally just pretend to never have used a VCS so > that I don't end up the person in charge of maintaining it (again). > > Maybe I phrased my "bad for version control" comment poorly. my intent > was referencing the svn:externals comment in a previous post in this thread. > I'm not a big fan of svn:externals, but you have to admit the technique is > popular. > > This is a real world example: > http://cvs.php.net/viewvc.cgi/pear/File/ > > > > I can see the point of having File.php inside the File dir on > > installations, > > I've nothing against that but it would have to be: > > > > - pear-root > > -- File > > --- File.php > > --- File > > ---- CSV.php > > ---- Util.php > > > > Or at least that's how I understand it ... comes kinda confusing as well > > ... > > doesn't ? Users see a file dir, click it, hey another file dir but I > > just > > clicked it ... *head explodes* > > > > Yeah, I wouldn't do it that way either. Why not: > > - pear-root > > -- File > > --- File.php > > --- CSV.php > > --- Util.php > > > > > What was the need to bury CSV and Util inside another File directory > anyway? > > Now with everything in one tidy File directory, maybe one might also put > the package.xml and tests in that directory and use this structure in > version control, too? Then, you can use svn:externals and have easy > branching and such, but without redundant File directories. > > Am I missing something in my ignorance? ;) Only that you can't map File.php properly anymore, sub class and parent class in the same folder. The idea has always been: if I have a class named File I include with File.php, if it's File_Foo_Bar I do include File/Foo/Bar.php So would you not find it confusing that it would change to: If I have a class named File I do File/File.php and if I have File_Foo I do File/Foo.php, implies that first include would give you File_File class, can be kinda sketchy changing the a bit of a core part of PEAR but well since we are changing a check of a lot of things .... svn:external, can't say I've used it a lot ... mostly to link libs into a app that did not follow anything related to PEAR structure, iirc ;-) - Helgi

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