RE: [PEAR-DEV] BC breakage results
| From: | Daniel Khan | Date: | Fri, 19 Sep 2003 18:47:41 +0000 |
| Subject: | RE: [PEAR-DEV] BC breakage results | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-21801@lists.php.net to get a copy of this message | ||
Hello list,
I must admit that I am slightly getting confused by this discussion.
And I think it won't be easy to communicate this huge ruleset (if this then
that unless this) we are currently
talking about to new developers (unless we write 'THE PEAR LAW').
O.K. a module loader isn't wanted.
Why don't design our classes to allow API changes?
That would at least mean using a factory method which returns the class
object.
1.0 just came out we do a simple:
$myObj = Package::factory();
2.0 was released and a user _could_ do a
$myObj = Package::factory(2);
// The 2 is only an example and isn't a rule. The way how the new object can
be instantiated can be communicated to the
// users.
Packages not having a factory method could introduce a flag for the
constructor.
Doing this each developer can decide how he organises his packages structure
and how
he includes/requires files.
So we don't have to find a solution which fits for all.
But the nicest thing would surely be to have a main class file which only
does the factory.
Different package versions and the filesystem:
The package XML should contain a slot value for each file it contains.
Example:
MainClass.php - v1.0 has slot 0 / v2.0 has slot 1
// They can coexist
driver.php - v1.0 has slot 0 / v2.0 has slot 0
// There was only a minor change/fix and it will still work with MainClass
1.0
// so let's replace it
BTW I understood that Gentoo's slot system doesn't allow the user to install
a package into a slot.
A slot is a virtual thing and only used to decide if a new version of a
program can/should coexist with the old or not.
We shoudln't take the gentoo comparison too far btw. Linux is a slightly
bigger thing and the environment and filestructure is very different from
how php/PEAR works.
And - because somebody mentioned...I am using gentoo and I am proud do be
_no_ geek ;)
So i summarize:
- 1 package main file which doesn't change and is used to instantiate the
object(s)
- Slots to allow a file based replacement/addition of files.
- A developer chosen directory structure inside the package
I hope I made myself clear.
regards
Daniel Khan