# Adding pecl/zip to 5.2

- Thread: https://externals.io/message/24686
- Original archive: https://news-web.php.net/php.internals/24686
- Started by Pierre on 2006-07-19T15:34:51+00:00
- Messages: 73
- Page 1 of 3: messages 1 to 25 (25 per page, add `?page=N` to the URL)
- Next page: https://externals.io/message/24686.md?page=2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #24686 — Pierre — 2006-07-19T15:34:51+00:00

URL: https://externals.io/message/24686#24686

Hello,


Many people (incl. php devs) asked me if I can include zip in 5.2.0.
Ilia thought it was too late in the game and planed to do it in 5.2.1.

I like to have it in, as experimental.

Please note that it intoduces a new class called Zip, but I never saw a
php zip implementation named Zip.

+1/-1/0?

Cheers,
-- Pierre

---

## #24693 — Antony Dovgal — 2006-07-19T15:59:43+00:00

URL: https://externals.io/message/24686#24693 · In reply to: #24686

> Hello,
> 
> 
> Many people (incl. php devs) asked me if I can include zip in 5.2.0.
> Ilia thought it was too late in the game and planed to do it in 5.2.1.
> 
> I like to have it in, as experimental.
> 
> Please note that it intoduces a new class called Zip, but I never saw a
> php zip implementation named Zip.
> 
> +1/-1/0?

-0.

I would rather move more extensions from core to PECL, than from PECL to core.
But to make it possible we need at least to make PECL version aware, so maintainers can 
release packages for different PHP versions without having to use thousands of #ifdef's.

So I'm basically against it, but I can live with this as long as the package is actively maintained.

-- 
Wbr, 
Antony Dovgal

---

## #24696 — Sean Coates — 2006-07-19T16:03:20+00:00

URL: https://externals.io/message/24686#24696 · In reply to: #24686

> Many people (incl. php devs) asked me if I can include zip in 5.2.0.
> Ilia thought it was too late in the game and planed to do it in 5.2.1.

I don't remember seeing a discussion on including Zip in core (perhaps I
just missed it, but a quick search didn't turn it up). I think Zip is
better suited as a PECL module.

Tony mentioned another issue: the headache of maintaining PECL code
between PHP versions. This is a valid point (and he can elaborate if he
likes), but is a separate issue.

IMO, core shouldn't grow for modules like this (and JSON -- but the JSON
discussion certainly DID take place and the module seems tiny enough to
be benign); the idea is to move non-essential modules OUT of the main
distribution and into PECL, not the other way.

-1 on Zip in 5.2.0
-1 on Zip in 5.2.1

S

---

## #24697 — Pierre — 2006-07-19T16:08:32+00:00

URL: https://externals.io/message/24686#24697 · In reply to: #24696

Hello,



> Tony mentioned another issue: the headache of maintaining PECL code
> between PHP versions. This is a valid point (and he can elaborate if he
> likes), but is a separate issue.

I'm very aware of the PECL issues and that's irrelevant in this current poll.

> IMO, core shouldn't grow for modules like this (and JSON -- but the JSON
> discussion certainly DID take place and the module seems tiny enough to
> be benign); the idea is to move non-essential modules OUT of the main
> distribution and into PECL, not the other way.

The discussions to move it out never took place either, that's also a
problem. Also consider this version as  a complete new package, it
fits in your definition.

--Pierre

---

## #24700 — Marco — 2006-07-19T16:51:47+00:00

URL: https://externals.io/message/24686#24700 · In reply to: #24693

>
>
> I would rather move more extensions from core to PECL, than from PECL to
> core.


From my experiences the problem with this is many shared hosts wont install
non core modules, so the more modules moved from core to pecl the less
flexible php will be and the less use it will be.

I understand the need to keep the core code maintained and as clean and lean
as possible, but we also need to look at what developers need to create
applications that can be used with mass virtual hosting.

Regards

Marco

---

## #24707 — Sean Coates — 2006-07-19T17:33:38+00:00

URL: https://externals.io/message/24686#24707 · In reply to: #24700

> From my experiences the problem with this is many shared hosts wont install
> non core modules, so the more modules moved from core to pecl the less
> flexible php will be and the less use it will be.
> 
> I understand the need to keep the core code maintained and as clean and
> lean
> as possible, but we also need to look at what developers need to create
> applications that can be used with mass virtual hosting.

This is a valid point, but it represents a chicken-and-egg problem.

Shared hosts are used to deploying PHP Proper and ignoring PECL, because
in the past, core was the only repository for everything.

As PECL grows in popularity (and as users demand more PECL
installations), we can hope this these hosts become more flexible.

At least that's what _I_ think.

S

---

## #24709 — Alexander Pak — 2006-07-19T17:38:54+00:00

URL: https://externals.io/message/24686#24709 · In reply to: #24686

+1
I wish to see Zip in PHP, it's a popular archive and plus used in .jar
implementation and .jar in its turn is used in other file formats, for
example OpenDocument one..


>
> Hello,
>
>
> Many people (incl. php devs) asked me if I can include zip in 5.2.0.
> Ilia thought it was too late in the game and planed to do it in 5.2.1.
>
> I like to have it in, as experimental.
>
> Please note that it intoduces a new class called Zip, but I never saw a
> php zip implementation named Zip.
>
> +1/-1/0?
>
> Cheers,
> -- Pierre
>
> --
> 
> 
>
>


-- 
sincerely yours,
Alexander Pak

---

## #24708 — Marco — 2006-07-19T17:45:33+00:00

URL: https://externals.io/message/24686#24708 · In reply to: #24707

> Shared hosts are used to deploying PHP Proper and ignoring PECL, because
> in the past, core was the only repository for everything.
>
> As PECL grows in popularity (and as users demand more PECL
> installations), we can hope this these hosts become more flexible.


I agree and I also hope this is the case.

Regards

Marco

---

## #24713 — John Coggeshall — 2006-07-19T18:11:15+00:00

URL: https://externals.io/message/24686#24713 · In reply to: #24686

> +1/-1/0?

+1 from me, I still to this day get people pestering me about my article
on creating .zip files from pure PHP -- a real extension is clearly
useful.

John

---

## #24728 — Jani Taskinen — 2006-07-19T23:01:56+00:00

URL: https://externals.io/message/24686#24728 · In reply to: #24686

> Please note that it intoduces a new class called Zip, but I never saw a
> php zip implementation named Zip.
>
> +1/-1/0?

     -1 in core, PECL is the place for this.
     -100 for class called Zip for the same reasons why we can not have
     Date and TimeZone classes.

     --Jani

---

## #24729 — Lukas Smith — 2006-07-19T23:02:08+00:00

URL: https://externals.io/message/24686#24729 · In reply to: #24707

Sean Coates wrote:
> > […]
> 
> This is a valid point, but it represents a chicken-and-egg problem.
> 
> Shared hosts are used to deploying PHP Proper and ignoring PECL, because
> in the past, core was the only repository for everything.
> 
> As PECL grows in popularity (and as users demand more PECL
> installations), we can hope this these hosts become more flexible.
> 
> At least that's what _I_ think.

I think we should make this a PHP6 todo item. A new major version is a 
better opportunity to get a change of minds, than a creeping slow 
change, which is about creating sufficient pain in our users so that 
shared hosters finally get the clue.

Until then we should add extensions that we think are reasonably 
frequently required and move out the ones that we deem obscure. I think 
zip is quite reasonable to get added.

As for the coordination of PECL packages that are symlinked to 
internals, it sounds like this really needs some thinking before PHP6, 
because there are already a number of extensions affected and it does 
sound like its a little bumpy.

regards,
Lukas

---

## #24730 — Pierre — 2006-07-19T23:11:24+00:00

URL: https://externals.io/message/24686#24730 · In reply to: #24728

> 
>
> > […]
>
>      -1 in core, PECL is the place for this.
>      -100 for class called Zip for the same reasons why we can not have
>      Date and TimeZone classes.

With the difference that I'm honest and do inform everyone. But your
point is, in this case, wrong:
- it is experimental and not enabled by default. Date is enabled by default
- if it is enabled by default, it will not be before php6 at best,
meaning it is a major version
- I never saw any kind of code using Zip

This extension was wrongly moved to PECL. It is time to fix this
mistake. OpenDocument support and other zip based system justify this
addition even more.

--Pierre

--Pierre

---

## #24732 — Edin Kadribasic — 2006-07-19T23:45:55+00:00

URL: https://externals.io/message/24686#24732 · In reply to: #24686

Pierre wrote:
> Hello,
> 
> 
> Many people (incl. php devs) asked me if I can include zip in 5.2.0.
> Ilia thought it was too late in the game and planed to do it in 5.2.1.
> 
> I like to have it in, as experimental.
> 
> Please note that it intoduces a new class called Zip, but I never saw a
> php zip implementation named Zip.

+1 for inclusion of zip to 5.2.0.

Zip is optional extension that is not enabled by default. Its a low-risk
and very useful addition.

Edin

---

## #24731 — Edin Kadribasic — 2006-07-19T23:53:53+00:00

URL: https://externals.io/message/24686#24731 · In reply to: #24728

Jani Taskinen wrote:
> 
> 
> > […]
> 
> 
>     -1 in core, PECL is the place for this.
>     -100 for class called Zip for the same reasons why we can not have
>     Date and TimeZone classes.

Comparing apples and organges here, eh? Tried to disable ext/date recently?

FYU, ext/date is not only enabled by default, but it cannot be disabled.
Even pcre can still be disabled.

Edin

---

## #24736 — mueller_rainer@gmx.de — 2006-07-20T02:27:19+00:00

URL: https://externals.io/message/24686#24736 · In reply to: #24686

Pierre wrote:
> Please note that it intoduces a new class called Zip, but I never saw a
> php zip implementation named Zip.

Uh, well this already was on thedailywtf...
See here, http://thedailywtf.com/forums/thread/80949.aspx

Rainer

---

## #24741 — Derick Rethans — 2006-07-20T07:43:39+00:00

URL: https://externals.io/message/24686#24741 · In reply to: #24693

> 
> > […]
> 
> -0.
> 
> I would rather move more extensions from core to PECL, than from PECL to core.

I agree here, I am also not sure whether picking the extremely short 
classname Zip is actually a good thing. Perhaps ZipArchive or ZipFile 
would be more fitting in the first place, not even considering the issue 
you can have with other libraries. Complaining against the name "Date" 
and then just going in another ext with "Zip" just feels wrong. 

Although the zip ext is a useful thing to have, I think it should stay 
in PECL as Tony says we're trying to move things to PECL... so a -1 from 
me on the current proposal to add ext/zip to core with the Zip 
classname.

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #24742 — Derick Rethans — 2006-07-20T07:44:38+00:00

URL: https://externals.io/message/24686#24742 · In reply to: #24697

> Hello,
> 
> 
> 
> > […]
> 
> I'm very aware of the PECL issues and that's irrelevant in this current poll.
> 
> > […]
> 
> The discussions to move it out never took place either, that's also a
> problem.

You can't move it out when it is not in yet...

Derick

---

## #24743 — Derick Rethans — 2006-07-20T07:45:30+00:00

URL: https://externals.io/message/24686#24743 · In reply to: #24731

> Even pcre can still be disabled.

That's on the todo for php 6 though.

Derick

---

## #24744 — Marcus Boerger — 2006-07-20T07:51:37+00:00

URL: https://externals.io/message/24686#24744 · In reply to: #24730

Hello Pierre,

  well Jan has a has a very good point here. Just as it was unlikely that
a class called PDO had been implemented a hundred times, it didn't cause
any namespace clashes. However it is fairly likely that some frameworks
bring Zip support and have a class named Zip. If not then there probably
is no mainstream use for a Zip class and inclusion to core makes little
sense. So for me this falls clearly under the terms of our naming scheme
(see [7] below) and shows we should extend this rule a bit to prevent
obvious and very short names. Obvious here imo means terms that are
likely to be used in a frameworks/applications. To me Zip definitively
is. Apart from renaming i have nothing against moving it to core.

Just a short note, you accused Derick of sneaking in stuff that was more
or less decided, well obviously he could have done it early - hadn't he
done much other work and haven't he been on vacation either. So thinking
he did is fairly understandable, though i personally doubt that. But be
it that. Why now do the same bad trick again, and that without even
having dicussed the technical part of inclusion beforehand (like we did
for date)?

best regards
marcus

[7] Classes should be given descriptive names. Avoid using abbreviations where
    possible. Each word in the class name should start with a capital letter, 
    without underscore delimiters (CampelCaps starting with a capital letter). 
    The class name should be prefixed with the name of the 'parent set' (e.g. 
    the name of the extension).

    Good:
    'Curl'
    'FooBar'

    Bad:
    'foobar'
    'foo_bar'

Warning: this is no acusation...if you feel like you probably better not
answer at all.

Thursday, July 20, 2006, 1:11:24 AM, you wrote:

> 
> > […]

> With the difference that I'm honest and do inform everyone. But your
> point is, in this case, wrong:
> - it is experimental and not enabled by default. Date is enabled by default
> - if it is enabled by default, it will not be before php6 at best,
> meaning it is a major version
> - I never saw any kind of code using Zip

> This extension was wrongly moved to PECL. It is time to fix this
> mistake. OpenDocument support and other zip based system justify this
> addition even more.

> --Pierre

> --Pierre




Best regards,
 Marcus

---

## #24748 — Robin Ericsson — 2006-07-20T08:52:33+00:00

URL: https://externals.io/message/24686#24748 · In reply to: #24741

> Although the zip ext is a useful thing to have, I think it should stay
> in PECL as Tony says we're trying to move things to PECL... so a -1 from
> me on the current proposal to add ext/zip to core with the Zip
> classname.

Seems silly to have a place like PECL where extensions can live their
own life with their own release-cycles when people want to bundle
every useless extension with PHP like it was before extentions began
moving to PECL.


regards,
    Robin

---

## #24749 — Antony Dovgal — 2006-07-20T09:04:10+00:00

URL: https://externals.io/message/24686#24749 · In reply to: #24748

> 
> > […]
 
> Seems silly to have a place like PECL where extensions can live their
> own life with their own release-cycles 

That's another problem for another offtopic discussion:
"own release cycle" is just a myth, because of the "symlinks" used to link PECL extensions to core.
You can't have, for example, development version in PECL and stable version in the core, 
you HAVE to stabilize your code before any PHP release, because it's basically the same code.

-- 
Wbr, 
Antony Dovgal

---

## #24751 — Michael Wallner — 2006-07-20T09:21:29+00:00

URL: https://externals.io/message/24686#24751 · In reply to: #24749

Antony Dovgal wrote:
> 
> > […]
> 
> That's another problem for another offtopic discussion:
> "own release cycle" is just a myth, because of the "symlinks" used to 
> link PECL extensions to core.
> You can't have, for example, development version in PECL and stable 
> version in the core, you HAVE to stabilize your code before any PHP 
> release, because it's basically the same code.

Well, an extension author could choose to import the extension to
/php-src instead of creating a link, no?

Regards,
-- 
Michael

---

## #24752 — Pierre — 2006-07-20T09:57:18+00:00

URL: https://externals.io/message/24686#24752 · In reply to: #24744

On Thu, 20 Jul 2006 09:51:37 +0200
helly@php.net (Marcus Boerger) wrote:

> Hello Pierre,
> 
>   well Jan has a has a very good point here. Just as it was unlikely

Jan?

> that a class called PDO had been implemented a hundred times, it
> didn't cause any namespace clashes. However it is fairly likely that
> some frameworks bring Zip support and have a class named Zip. If not
> then there probably is no mainstream use for a Zip class and
> inclusion to core makes little sense.

No mainstream use? Which other examples do you need? There is hundred
of usages of the zip archives.

>  So for me this falls clearly
> under the terms of our naming scheme (see [7] below) and shows we
> should extend this rule a bit to prevent obvious and very short
> names. 

Again, I have nothing against short names. We have to inform our users
and prepare them.

> Obvious here imo means terms that are likely to be used in a
> frameworks/applications. To me Zip definitively is. Apart from
> renaming i have nothing against moving it to core.
> 
> Just a short note, you accused Derick of sneaking in stuff that was
> more or less decided, well obviously he could have done it early -
> hadn't he done much other work and haven't he been on vacation
> either. So thinking he did is fairly understandable, though i
> personally doubt that. But be it that. Why now do the same bad trick
> again, and that without even having dicussed the technical part of
> inclusion beforehand (like we did for date)?

I still accuse him to sneak things in. He did it twice for the same
thing.

Don't compare apples and oranges. This thread is exactly what has
missed for Date.

Cheers,
--Pierre

---

## #24753 — Pierre — 2006-07-20T09:59:12+00:00

URL: https://externals.io/message/24686#24753 · In reply to: #24742

On Thu, 20 Jul 2006 09:44:38 +0200 (CEST)
derick@php.net (Derick Rethans) wrote:

> 
> 
> > […]
> 
> You can't move it out when it is not in yet...

It was in and moved out without much discussions. What I mean is that
we have to discuss which extensions can or should be moved out, and on
the lists. So we can do it the right way.

-- Pierre

---

## #24754 — Pierre — 2006-07-20T10:05:08+00:00

URL: https://externals.io/message/24686#24754 · In reply to: #24736

On Thu, 20 Jul 2006 04:27:19 +0200
mueller_rainer@gmx.de (Rainer Müller) wrote:

> Pierre wrote:
> > […]
> 
> Uh, well this already was on thedailywtf...
> See here, http://thedailywtf.com/forums/thread/80949.aspx

If you read the thread it is obviously his mistake. Secondly, what does
that have to do with our problems?

The extension is not enabled by default and is experimental. If some
people enables it in production (on windows or not) is not our problem.


-- Pierre

---

Next page: https://externals.io/message/24686.md?page=2
