Re: [PEPr] Changes in proposal for SCM::SVN
| From: | Alan Knowles | Date: | Mon, 26 Apr 2004 07:21:32 +0000 |
| Subject: | Re: [PEPr] Changes in proposal for SCM::SVN | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-28350@lists.php.net to get a copy of this message | ||
Looking good.
I'm still a little concerned about the category prefix -
http://pear.php.net/manual/en/standards.naming.php
States that " Classes should be given descriptive names. Avoid using abbreviations where possible..."
Obviouly, very common well known abbreviations like XML, DB make alot of sense. And we do already have some packages with strange, not so commonly known abbreviations (FSM, MDB), so It's not written in stone.
I can envision 2 scenarios where it would be advantagous to have a slightly more verbose name:
- a content management system
require_once 'SCM/SVN.php';
$c = SCM_SVN::factory('add'....);
.....
is not totally clear that you are about to write to a versioning system.
- looking for solutions to write to subversion on the pear website..
it would appear as
_SCM_
_SCM_SVN_
It would be alot clearer with
_VersionControl_
_VersionControl_SVN_
Regards
Alan
Clay Loveless wrote:
Hmm... here's a copy of the changes without any BBCode, for easier reading ...-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.comChange comment:SCM_SVN Changes - Reworked use of PEAR_ErrorStack throughout the package. - Split the concept of the $options array into three seperate arrays:$options() - Used to set runtime options for the SCM_SVN class itself. (Associative array) $switches() - Used to pass switches and their values to an individual Subversion subcommand. (Associative array) $args() - Used to pass arguments to the Subversion subcommands. This non-associative array will be joined by single spaces when passed off to the run() method. Use for anything you would normally specify on the command-line *outside* of switches. - Implemented use_escapeshellcmd property, which defaults to true.If set to false, the svn command passed to exec will NOT be escaped. Recommended use: retain default setting of true unless you really know what you're doing. (Thanks to Alan Knowles for this suggestion.) - Introduced the $shortcuts property, which contains all known shortcuts for Subversion svn subcommands. This allows you to pass the shortcuts to SCM_SVN::factory if you prefer. - Merged SCM_SVN_Common into SCM_SVN to simplify things a bit. (Thanks again to Alan Knowles.) - Moved basic property assignment tasks into init() method called by factory() and got rid of subclass constructors. - Added parseOutput() method to SCM_SVN, which should be overridden by each subclass. The parseOutput() methods will (when possible!) parse output of successful run() calls into an associative array. Default parseOutput result is a join() of the exec() output generated by the run() method. - Added checkCommandRequirements() method to SCM_SVN, which reads properties from the command subclass and validates the given $switches and $args to insure that all necessary $switches and $args are set for proper command execution. (Thanks once again to Alan Knowles for this recommendation.) - Added SVN/Propdel.php and SVN/Propget.php subclasses.Please re-review the package: http://pear.php.net/pepr/pepr-proposal-show.php?id=52