GithubHelp home page GithubHelp logo

Comments (13)

PowerKiKi avatar PowerKiKi commented on July 18, 2024 2

composer is now mandatory since 035281f, so we can go ahead with this feature too.

from phpspreadsheet.

Progi1984 avatar Progi1984 commented on July 18, 2024 1

The solution that I use in PhpPresentation is the Zip Adapter of PHPOffice\Common :

from phpspreadsheet.

PowerKiKi avatar PowerKiKi commented on July 18, 2024 1

@Progi1984, @Quix0r, I had a look at Common's ZipInterface and even though I did prepare a PR to complete the features needed for PhpSpreadsheet, I must say that I am a bit unsure whether this is the right way do to it.

First of all, I noticed that PhpPresentation has a hard dependency on ZipArchive via composer ("ext-zip": "*"). And this is very clearly the case since all readers use new ZipArchive() instead of the ZipInterface. That explains why ZipInterface has no methods to read anything (but only write). So why is done that way in PhpPresentation ?

Secondly, using ZipInterface instead of ZipArchive is a slight overhead in complexity of code and reduce the features we can use since PclZip cannot (easily) replicate everything that ZipArchive does. So the question here is why should we do more work to be more limited ? what is the added value of using ZipInterface ?

Finally PclZip seems to be a dying project. It is only available via an unofficial fork, which was never updated since the first commit 3 years ago, who is possibly out of sync for the last 2 years, whose PR were never addressed at all, and who happen to be incompatible with PHP 7.1. Oh, and the latest official news is from 7 years ago. So I am really wondering why should we keep supporting this old tech ?

from phpspreadsheet.

andyinabox avatar andyinabox commented on July 18, 2024 1

Maybe it would be a good idea to list dependencies on the main README file?

from phpspreadsheet.

Quix0r avatar Quix0r commented on July 18, 2024

That what @Progi1984 recommends is are more flexible solution, rather than hard-coded ZipArchive code.

from phpspreadsheet.

PowerKiKi avatar PowerKiKi commented on July 18, 2024

I tend to agree, but that implies that composer becomes mandatory. While I don't think it matters, since composer is so common nowaday, I believe @MarkBaker wanted to keep a version without composer (hence the custom autoloader).

from phpspreadsheet.

Quix0r avatar Quix0r commented on July 18, 2024

I found this here:
http://phpzip.cvs.sourceforge.net/viewvc/phpzip/pclzip/

Even more older, sad to see that so much progress is dying because of lack of interest/time/what ever. Yeah, same with my projects like mailer. :-(

from phpspreadsheet.

agopaul avatar agopaul commented on July 18, 2024

At this point, I think the question is how much the library (PhpSpreadsheet) should be portable.

On Ubuntu the zip extension in not bundled with the PHP package but, like most extensions, it has its own package. So a "stock" LAMP installation doesn't have the zip extension installed, but when working on PHP projects, using extensions is almost inevitable. I don't know if the extension is bundled with PHP in other Linux distros and on other OSes.

Shared hosting is the only context where PHP extensions are tricky because, of course, you can't install them if they're missing. But shared hosts usually come with all the most common extensions already installed (eg: gd2, soap, zip, etc.)

I think that support for PclZip should probably be dropped otherwise the only solution would be to create and support a fork of it, but that would require additional resources and energy to maintain a library which apparently throws notice errors with the latest PHP version.

from phpspreadsheet.

PowerKiKi avatar PowerKiKi commented on July 18, 2024

Thanks all for offering your opinions. In the past 6 months, nobody offered strong argument to keep PclZip. It seems dropping it is acceptable and so it was done.

from phpspreadsheet.

andyinabox avatar andyinabox commented on July 18, 2024

So just to clarify — does this mean that if I don't have the zip extension installed (and can't install it) I'm out of luck?

from phpspreadsheet.

PowerKiKi avatar PowerKiKi commented on July 18, 2024

yes, this is enforced by composer. You won't be able to install PhpSpreadsheet if you don't have all required extensions.

from phpspreadsheet.

andyinabox avatar andyinabox commented on July 18, 2024

Oh I see -- guess I unintentionally found a loophole; I'm serving the site from a VM using vagrant but did the composer install on the host machine. :/

from phpspreadsheet.

PowerKiKi avatar PowerKiKi commented on July 18, 2024

The README will stay as concise as possible, to avoid duplication of information. This particular requirement is already listed in the install instructions. So there is nothing to do.

from phpspreadsheet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.