Manage PHP version during pecl install

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Manage PHP version during pecl install

Remi Collet-5
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

With upcoming PHP 7 some extension maintainers have choose to maintain
2 different version, one for PHP 5, another for PHP 7

Ex:
        rrd 1.x for PHP 5, 2.x for PHP 7
        pthreads 2.x for PHP 5, 3.x for PHP 7

(some other use the same version for both, simpler for user)

Digging a little in the PEAR code, I think it will be nice to check
extension PHP minimal version against current PHP version.

But, IIUC, this will require to extend the REST schema (1.4 ?) to
include this information.

I think "min" is enough to avoid pecl with PHP 5 to try to pull an
incompatible version. ("max" could be useful, but most old extensions
don't have this information, and sometime we have max=5.99.99,
sometime max=7.0.0, exclude=7.0.0)


Does this sound sensible and doable ?
Any thoughts ?


Remi;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlX8OIwACgkQYUppBSnxahir0gCgpV2MnNxYRDXlZuPZqhstXzoJ
QKAAn3dH3E635NhQpq77mUkG5yTGMaUu
=aYHw
-----END PGP SIGNATURE-----

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

Reply | Threaded
Open this post in threaded view
|

Re: Manage PHP version during pecl install

Christian Weiske
Hello Remi,


> With upcoming PHP 7 some extension maintainers have choose to maintain
> 2 different version, one for PHP 5, another for PHP 7
>
> Digging a little in the PEAR code, I think it will be nice to check
> extension PHP minimal version against current PHP version.
>
> But, IIUC, this will require to extend the REST schema (1.4 ?) to
> include this information.

I had similar thoughts in february this year; see
https://pear.php.net/bugs/bug.php?id=20507

But I can tell you that this will not happen. I'll be glad to get the
1.10 release out, but have no further plans.

--
Regards/Mit freundlichen Grüßen
Christian Weiske

-=≡ Geeking around in the name of science since 1982 ≡=-

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Manage PHP version during pecl install

Ferenc Kovacs-4
On Tue, Sep 22, 2015 at 6:13 AM, Christian Weiske <[hidden email]>
wrote:

> Hello Remi,
>
>
> > With upcoming PHP 7 some extension maintainers have choose to maintain
> > 2 different version, one for PHP 5, another for PHP 7
> >
> > Digging a little in the PEAR code, I think it will be nice to check
> > extension PHP minimal version against current PHP version.
> >
> > But, IIUC, this will require to extend the REST schema (1.4 ?) to
> > include this information.
>
> I had similar thoughts in february this year; see
> https://pear.php.net/bugs/bug.php?id=20507
>
> But I can tell you that this will not happen. I'll be glad to get the
> 1.10 release out, but have no further plans.
>
> --
> Regards/Mit freundlichen Grüßen
> Christian Weiske
>
> -=≡ Geeking around in the name of science since 1982 ≡=-
>

So we would have to extend the REST schema in a backward compatible way and
regenerate all of the affected xml files plus add support for the new info
in PEAR_Core.
Plus the examples mentioned by Remi are all pecl exts, so that also means
updating http://git.php.net/?p=web/pecl.git and regenerating the xml files
on pecl.php.net
I can help with the second part as I have both access and some experience
with to the peclweb repo and have access to the current pecl server.

--
Ferenc Kovács
@Tyr43l - http://tyrael.hu
Reply | Threaded
Open this post in threaded view
|

Re: Manage PHP version during pecl install

Christian Weiske
In reply to this post by Christian Weiske
Hi all,



>> With upcoming PHP 7 some extension maintainers have choose to
>> maintain 2 different version, one for PHP 5, another for PHP 7
>>
>> Digging a little in the PEAR code, I think it will be nice to check
>> extension PHP minimal version against current PHP version.
>>
>> But, IIUC, this will require to extend the REST schema (1.4 ?) to
>> include this information.
>
> I had similar thoughts in february this year; see
> https://pear.php.net/bugs/bug.php?id=20507

I just saw that allreleases2.xml (introduced with REST 1.3[1]) contains
the minimum version information, e.g.
http://pear.php.net/rest/r/console_getopt/allreleases2.xml

<r><m>5.4.0</m></r>

So there is no need to extend the REST schema, just adjust PEAR to take
it into account.

BUT pecl doesn't support[2] REST 1.2 nor REST 1.3, so that would have to
be done.


[1] http://pear.php.net/manual/en/core.rest.php
[2] https://pecl.php.net/channel.xml


--
Regards/Mit freundlichen Grüßen
Christian Weiske

-= Geeking around in the name of science since 1982 =-

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

Reply | Threaded
Open this post in threaded view
|

Re: Manage PHP version during pecl install

Christian Weiske
Hi all,



>>> Digging a little in the PEAR code, I think it will be nice to check
>> I had similar thoughts in february this year; see
>> https://pear.php.net/bugs/bug.php?id=20507
> I just saw that allreleases2.xml (introduced with REST 1.3[1])
> contains the minimum version information

PEAR already checks the minimum PHP version on installation:
https://github.com/pear/pear-core/blob/stable/PEAR/REST/13.php#L92

PECL only needs to get support for REST 1.3, then it all will be fine.

--
Regards/Mit freundlichen Grüßen
Christian Weiske

-= Geeking around in the name of science since 1982 =-

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

Reply | Threaded
Open this post in threaded view
|

Re: Manage PHP version during pecl install

Christian Weiske
Hi all,


> >>> Digging a little in the PEAR code, I think it will be nice to
> >>> check
> >> I had similar thoughts in february this year; see
> >> https://pear.php.net/bugs/bug.php?id=20507
> > I just saw that allreleases2.xml (introduced with REST 1.3[1])
> > contains the minimum version information
>
> PEAR already checks the minimum PHP version on installation:
> https://github.com/pear/pear-core/blob/stable/PEAR/REST/13.php#L92
>
> PECL only needs to get support for REST 1.3, then it all will be fine.
I just tried it with a test channel server and a dummy package that has
different PHP version dependencies.

PEAR correctly installed the latest package that is supports my php
version.

--
Regards/Mit freundlichen Grüßen
Christian Weiske

-=≡ Geeking around in the name of science since 1982 ≡=-

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Manage PHP version during pecl install

Ferenc Kovacs-4
On Wed, Sep 23, 2015 at 9:53 PM, Christian Weiske <[hidden email]>
wrote:

> Hi all,
>
>
> > >>> Digging a little in the PEAR code, I think it will be nice to
> > >>> check
> > >> I had similar thoughts in february this year; see
> > >> https://pear.php.net/bugs/bug.php?id=20507
> > > I just saw that allreleases2.xml (introduced with REST 1.3[1])
> > > contains the minimum version information
> >
> > PEAR already checks the minimum PHP version on installation:
> > https://github.com/pear/pear-core/blob/stable/PEAR/REST/13.php#L92
> >
> > PECL only needs to get support for REST 1.3, then it all will be fine.
>
> I just tried it with a test channel server and a dummy package that has
> different PHP version dependencies.
>
> PEAR correctly installed the latest package that is supports my php
> version.
>
> --
> Regards/Mit freundlichen Grüßen
> Christian Weiske
>
> -=≡ Geeking around in the name of science since 1982 ≡=-
>

I've opened a feature request about this on bugs.php.net so we won't forget
it on our side:
https://bugs.php.net/bug.php?id=71224

--
Ferenc Kovács
@Tyr43l - http://tyrael.hu