For Programmers: Free Programming Magazines  


Home > Archive > PHP PEAR Questions and Answers > June 2004 > Re: [PEAR-QA] Re: Channels









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR-QA] Re: Channels
Klaus Guenther

2004-06-18, 3:57 pm

Pierre-Alain Joye wrote:

>On Fri, 18 Jun 2004 08:26:16 -0400
>davey@php.net (Davey) wrote:
>
>
>
>
>I do not see the point to create a php5 only channel. This is the
>role of the dependencies not of the channels.
>
>


I see it as a possibility, but that can only be _in addition_ to them
being released through the regular PEAR channel, just like the QA'ed
packages channel.

The downside is that a lot of devs would only subscribe to the
PHP5_E_STRICT channel... which means we either have to make sure that a
huge number of PEAR packages are E_STRICT compliant or PEAR will lose
any chance of getting a large following once php5 comes out. And the
release of php5 is our huge chance to find a very broad userbase.

Klaus
Alan Knowles

2004-06-18, 3:57 pm

I'm begining to wonder if this may be necessary, Net_GeoIP begins to
illustrate some of the issues.

normally we would evolve Log2 (a PHP5 version of Log) for example,
however if the PHP5 packages is introduced before a PHP4 one, how could
it be dealt with?

Otherwise, using file extensions in the same package may be the only
other way.. - .php4 & .php5

Channels may be one way to solve this: - PEAR5 = php5 only packages..
with .php5 files... on a different release cycle with packages of the
same name...

I've no idea if PHP4 will remain a popular target, or PHP5 focused
packages will be the popular choice.... Realistically, I can not see my
clients upgrading for a year or two (it would take an overwhelming need
- like a serious bug in PHP4, to force this probably), so PHP5 only
packages may be nice for some of my pet projects, they will probably
remain difficult to use with everyday work..

Regards
Alan




Pierre-Alain Joye wrote:
> On Fri, 18 Jun 2004 08:26:16 -0400
> davey@php.net (Davey) wrote:
>
>
>
>
> I do not see the point to create a php5 only channel. This is the
> role of the dependencies not of the channels.
>
> --Pierre
>



--
Can you help out?
Need Consulting Services or Know of a Job?
http://www.akbkhome.com
David Costa

2004-06-18, 3:57 pm


On Jun 18, 2004, at 3:43 PM, Alan Knowles wrote:

> I'm begining to wonder if this may be necessary, Net_GeoIP begins to
> illustrate some of the issues.
>
> normally we would evolve Log2 (a PHP5 version of Log) for example,
> however if the PHP5 packages is introduced before a PHP4 one, how
> could it be dealt with?


we simply specify on package.xml that PHP 5 is required and include a
verification on the dependencies, we already have this on the PHP
beautifier package
>
> Otherwise, using file extensions in the same package may be the only
> other way.. - .php4 & .php5
>

That would be pretty ugly...

> Channels may be one way to solve this: - PEAR5 = php5 only packages..
> with .php5 files... on a different release cycle with packages of the
> same name...

Oh well I was only talking about PHP 5 only packages...
>
> I've no idea if PHP4 will remain a popular target, or PHP5 focused
> packages will be the popular choice.... Realistically, I can not see
> my clients upgrading for a year or two (it would take an overwhelming
> need - like a serious bug in PHP4, to force this probably), so PHP5
> only packages may be nice for some of my pet projects, they will
> probably remain difficult to use with everyday work..

Right this is why having all the PHP 5 only packages to require PHP
version 5, specify it clearly to the users and keep a non stable status
till PHP 5 gets stable seems a reasonable
solution.

Cheers
David Costa

>
> Regards
> Alan
>
>
>
>
> Pierre-Alain Joye wrote:
>
>
> --
> Can you help out?
> Need Consulting Services or Know of a Job?
> http://www.akbkhome.com
>
> --
> PEAR QA Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

Pierre-Alain Joye

2004-06-18, 3:57 pm

On Fri, 18 Jun 2004 21:43:25 +0800
alan@akbkhome.com (Alan Knowles) wrote:

> I'm begining to wonder if this may be necessary, Net_GeoIP begins
> to illustrate some of the issues.
>
> normally we would evolve Log2 (a PHP5 version of Log) for example,
>
> however if the PHP5 packages is introduced before a PHP4 one, how
> could it be dealt with?


dep php>=5

> Otherwise, using file extensions in the same package may be the
> only other way.. - .php4 & .php5



> Channels may be one way to solve this: - PEAR5 = php5 only
> packages.. with .php5 files... on a different release cycle with
> packages of the same name...


Are you talking about having the same tree for many (major) php
versions?

Do we have to support every upcoming php releases? Or are you
thinking about some realtime dependencies? Like I cannot load or run
a php5 script using a php4 install?

> I've no idea if PHP4 will remain a popular target, or PHP5 focused
> packages will be the popular choice.... Realistically, I can not
> see my clients upgrading for a year or two (it would take an
> overwhelming need - like a serious bug in PHP4, to force this
> probably), so PHP5 only packages may be nice for some of my pet
> projects, they will probably remain difficult to use with everyday
> work..


Then they do not install php5 packages. They cannot even do it using
the normal way (only with --force, for now).

--Pierre
Lukas Smith

2004-06-18, 3:57 pm

Alan Knowles wrote:

> I'm begining to wonder if this may be necessary, Net_GeoIP begins to
> illustrate some of the issues.
>
> normally we would evolve Log2 (a PHP5 version of Log) for example,
> however if the PHP5 packages is introduced before a PHP4 one, how could
> it be dealt with?


Maybe start off with major version 2?

regards,
Lukas Smith
smith@backendmedia.com
_______________________________
BackendMedia
www.backendmedia.com
berlin@backendmedia.com

Linn Zwoch Smith GbR
Pariser Str. 44
D-10707 Berlin

Tel +49 30 83 22 50 00
Fax +49 30 83 22 50 07
Alan Knowles

2004-06-19, 3:55 am


>Are you talking about having the same tree for many (major) php
>versions?
>
>

well in 10 years, phasing out PHP4 code may be realisitic.. I would
prehaps consider it more like debian sources, stable (PHP4), unstable
(PHP5) -

>Do we have to support every upcoming php releases? Or are you
>thinking about some realtime dependencies? Like I cannot load or run
>a php5 script using a php4 install?
>
>


This may be a reality at a 5 year release cycle, this may not be a big
issue. PHP5, if used properly, really looks like another language,
trying to kludge it into a PHP4 box may prove futile in the long run.

>Then they do not install php5 packages. They cannot even do it using
>the normal way (only with --force, for now).
>
>

That doesnt stop my system getting in a mess if I install PHP5, install
a few packages then downgrade to PHP4 if things dont work out..) - yes I
know doing things sensibly, would prevent issues, but how many end users
do you think would make a mess....

if .php5 & .php4 are not going to be to popular (although I think it
makes the distinction alot clearer), perhaps /usr/lib/pear5 (default
folder for a PHP5 channel)

One of the many things that comes across when researching Error returns
vs Exceptions (Which is really the key technical difference in PHP5, the
rest is really syntactic fluff), is that very few languages implement
both.. - If you have exceptions, you use them, if you dont, you use
something else. Imagine someone implementing a PEAR_Error type object in
C# or Java? - they would get very strange looks..
That said, I've not seen any smart way to deal with Warnings or Soft
errors in PHP5+Exceptions yet..






>--Pierre
>
>
>

Pierre-Alain Joye

2004-06-19, 3:56 pm

On Sat, 19 Jun 2004 08:47:48 +0800
alan@akbkhome.com (Alan Knowles) wrote:

>
> well in 10 years, phasing out PHP4 code may be realisitic.. I
> would prehaps consider it more like debian sources, stable (PHP4),
> unstable (PHP5) -


I'm not talking from our side but from the userside. An user can
setup two distinct trees, one for php4 and one for php5. Setting
correclty the preferences of each.

[color=darkred]
> This may be a reality at a 5 year release cycle, this may not be a
> big issue. PHP5, if used properly, really looks like another
> language, trying to kludge it into a PHP4 box may prove futile in
> the long run.



> That doesnt stop my system getting in a mess if I install PHP5,
> install a few packages then downgrade to PHP4 if things dont work
> out..) - yes I know doing things sensibly, would prevent issues,
> but how many end users do you think would make a mess....
>
> if .php5 & .php4 are not going to be to popular (although I think
> it makes the distinction alot clearer), perhaps /usr/lib/pear5
> (default folder for a PHP5 channel)


Still failed to see where a PHP5 is usefull, just setup a new tree
with the right settings could be the way. Imagine 2 channels defined
on the client side, but each of them has different settings (dep
php>5 or <=4.x) and both points to the "normal" PEAR channel.

--Pierre
Tomas V.V.Cox

2004-06-19, 3:56 pm

Pierre-Alain Joye wrote:
> On Sat, 19 Jun 2004 08:47:48 +0800
> alan@akbkhome.com (Alan Knowles) wrote:


>
>
> Still failed to see where a PHP5 is usefull, just setup a new tree
> with the right settings could be the way. Imagine 2 channels defined
> on the client side, but each of them has different settings (dep
> php>5 or <=4.x) and both points to the "normal" PEAR channel.
>


I see one advantage. Nowadays, we've taken the "include space", and this
doesn't benefit the adoption of the installer because of possible file
clashes. I find a better layout:

<php_dir>/<channel>/XXX.php

than the current:

<php_dir>/XXXX.php

New classes would do require_once 'pear/DB.php';

It's a nice opportunity to fix that :-)

Tomas V.V.Cox
Paul M Jones

2004-06-19, 3:56 pm

On Jun 19, 2004, at 9:16 AM, Tomas V.V.Cox wrote:

> Nowadays, we've taken the "include space", and this doesn't benefit
> the adoption of the installer because of possible file clashes. I find
> a better layout:
>
> <php_dir>/<channel>/XXX.php
>
> than the current:
>
> <php_dir>/XXXX.php
>
> New classes would do require_once 'pear/DB.php';
>
> It's a nice opportunity to fix that :-)
>


Completely agreed. This provides a great separation "hint" when
looking at the file system.


--

Paul M. Jones

Savant: the simple alternative to Smarty for PHP.
http://phpsavant.com/

DB_Table: build RDBMS tables and XHTML forms in one PHP class.
http://wiki.ciaweb.net/yawiki/index.php?area=DB_Table

Yawiki: your collaborative online documentation system.
http://yawiki.com/

Yawp: a single-file foundation for PHP applications.
http://phpyawp.com/
Tomas V.V.Cox

2004-06-19, 3:56 pm

Paul M Jones wrote:
> On Jun 19, 2004, at 9:16 AM, Tomas V.V.Cox wrote:
>
>
> Completely agreed. This provides a great separation "hint" when looking
> at the file system.


Before going further, take in mind that "name spaces" would change too:
class DB to PEAR_DB, class HTML_QuickForm to PEAR_HTML_QuickForm, the
same for constants, globals, sessions, etc.


Tomas V.V.Cox
Arnaud Limbourg

2004-06-19, 3:56 pm

> Before going further, take in mind that "name spaces" would change too:
> class DB to PEAR_DB, class HTML_QuickForm to PEAR_HTML_QuickForm, the
> same for constants, globals, sessions, etc.


There is no way we can do that :)

Arnaud.
Pierre-Alain Joye

2004-06-19, 3:56 pm

On Sat, 19 Jun 2004 16:16:52 +0200
cox@idecnet.com (Tomas V.V.Cox) wrote:

> I see one advantage. Nowadays, we've taken the "include space",
> and this doesn't benefit the adoption of the installer because of
> possible file clashes. I find a better layout:
>
> <php_dir>/<channel>/XXX.php
>
> than the current:
>
> <php_dir>/XXXX.php
>
> New classes would do require_once 'pear/DB.php';
>
> It's a nice opportunity to fix that :-)


Yes and no :)

It's still a situation where you have both trees in the same setup
(both in the include_path). That's a bad idea. Or?

--Pierre
Tomas V.V.Cox

2004-06-24, 1:23 am

Pierre-Alain Joye wrote:
> On Sat, 19 Jun 2004 16:16:52 +0200
> cox@idecnet.com (Tomas V.V.Cox) wrote:
>
>
>
>
> Yes and no :)
>
> It's still a situation where you have both trees in the same setup
> (both in the include_path). That's a bad idea. Or?


As far as the path (pear/DB.php) and the class names (PEAR_DB) are
different, it shouldn't be a problem.


Tomas V.V.Cox
Pierre-Alain Joye

2004-06-24, 1:23 am

On Sun, 20 Jun 2004 18:47:30 +0200
cox@idecnet.com (Tomas V.V.Cox) wrote:

> As far as the path (pear/DB.php) and the class names (PEAR_DB) are
> different, it shouldn't be a problem.


Indeed. The bad idea is to have PHP5 package only in your PHP4
include_path :)

--Pierre
Mika Tuupola

2004-06-24, 1:23 am

On Sat, 19 Jun 2004, Tomas V.V.Cox wrote:

> I see one advantage. Nowadays, we've taken the "include space", and this
> doesn't benefit the adoption of the installer because of possible file
> clashes. I find a better layout:
>
> <php_dir>/<channel>/XXX.php


As I said in irc i dont like this idea. It takes away
the possibility of a channel offering a drop-in replacement
for a package. People would have to either change their
include paths or add the <channel> into their include()
or require().

--
Mika Tuupola http://www.appelsiini.net/~tuupola/
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com