Re: Image_Text mess in CVS

From: Date: Wed, 12 Nov 2003 11:07:37 +0000
Subject: Re: Image_Text mess in CVS
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-23503@lists.php.net to get a copy of this message
Hi! Stefan Neufeind wrote:
Could the QA team (do we have a QA team BTW ?) have a look at the mess in CVS with Image_Text and try to fix that ? Or would Tobias be nice enough to look at other packages in CVS and try to do the same when committing, and not invent its own way. Thanks,
Well, I guess I know what you're talking about :-) Toby announced the "new way" of handling files in CVS on his private blog - and although I didn't fully agree with the way he did it at least I understood why he did it.
Should we really care what one "announces in his private blog", especially if it is in contradiction with *publicly announced PEAR rules*?
The problem is that when you develop in CVS (and on your harddisk) in a file-structure like: Image_Text/Image_Text.php Image_Text/docs/example.php [... other files as well - it's just for explanation ...] and in example.php you do a require_once 'Image/Image_Text.php'; then you run into problems because you can't test your example with the current file-structure you have.
The brilliant solution: do not develop in CVS checkout dir. Create a dir mimicking PEAR installation structure and develop in this. Personally I only copy files to checkout dir when I want to commit them.
Another thing I'd like to mention again in this discussion:
The answers are in the PEAR manual: http://pear.php.net/manual/en/faq.flat-structure.php http://pear.php.net/manual/en/standards.naming.php (Classes) http://pear.php.net/manual/en/introduction.php (Structured Library of PHP Code) Generally, if you have a file named Image/Image_Text.php, then it should contain class Image_Image_Text. Like this one?
Since the main package file resides under Image/ shouldn't it be named Image/Text.php instead of Image/Image_Text.php? But I believe this is probably a general issue with package names and files inside the package. A rule how to do it "correctly" would be nice. If we come up with correct ways for handling files in CVS / on harddisk and about the filenames I'd volunteer to have a look at the current package to try to help solve some inconsistencies with the where possible. (Background: You can't move / rename files in CVS without loosing CVS-history for that file - so renaming / moving should be done directly on the server via SSH).


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