List Info

Thread: PHP_Compat 1.6alpha




PHP_Compat 1.6alpha
user name
2007-05-18 18:52:32
Dear developers,

We've just released an alpha version of PHP_Compat [1]
which
significantly overhauls the entire package [2].

It would be great to get some general feedback, as it is a
fairly
central package to many applications and other PEAR
packages.

Regards,
Aidan Lister


[1] http://pear.ph
p.net/package/php_compat
[2] http
://pear.php.net/package/PHP_Compat/download/

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


Re: PHP_Compat 1.6alpha
user name
2007-05-20 04:05:17
I just had a quick glance through the CVS version.

line 121, Compat.php
require 'PHP/Compat/Components.php';

line 134, Compat.php:
        foreach ($components as $type => $slice) {

I'm completely unfamiliar with how you've done it all along,
but it seems a
little bit scary to rely on a global variable defined in
another file -
would it be safer to shift this to a method like
fetchDefinedComponents()
that returns an array of components?

I can see the potential for some poor bugger out in userland
picking
$components as a variable name; and having PHP compat
"secretly" change
it...

If you've already decided that's the way to go, please
disregard this
bikeshedding 



On 5/19/07, Aidan Lister <aidanphp.net> wrote:
>
> Dear developers,
>
> We've just released an alpha version of PHP_Compat [1]
which
> significantly overhauls the entire package [2].
>
> It would be great to get some general feedback, as it
is a fairly
> central package to many applications and other PEAR
packages.
>
> Regards,
> Aidan Lister
>
>
> [1] http://pear.ph
p.net/package/php_compat
> [2] http
://pear.php.net/package/PHP_Compat/download/
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub
.php
>
>


-- 
By a factor of three, what you do is not nearly as important
as how it makes
people feel; so why do you spend almost all your time on the
wrong thing?
Re: PHP_Compat 1.6alpha
user name
2007-05-20 05:52:25
Daniel O'Connor wrote:
> I'm completely unfamiliar with how you've done it all
along, but it 
> seems a
> little bit scary to rely on a global variable defined
in another file -
> would it be safer to shift this to a method like
fetchDefinedComponents()
> that returns an array of components?
>
> I can see the potential for some poor bugger out in
userland picking
> $components as a variable name; and having PHP compat
"secretly" change
> it... 

Actually $components is not a global variable, because it's
only 
included inside a function.
This could only ever affect a user if they included
Components.php 
directly, which is pointless.

Thanks for taking a look though,

Arpad

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )