Comments (13)
composer is now mandatory since 035281f, so we can go ahead with this feature too.
from phpspreadsheet.
The solution that I use in PhpPresentation is the Zip Adapter of PHPOffice\Common :
- Common : https://github.com/PHPOffice/Common/tree/develop/src/Common/Adapter/Zip
- Use in PhpPresentation : https://github.com/PHPOffice/PHPPresentation/blob/develop/src/PhpPresentation/Writer/ODPresentation/Pictures.php#L24
from phpspreadsheet.
@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.
Maybe it would be a good idea to list dependencies on the main README file?
from phpspreadsheet.
That what @Progi1984 recommends is are more flexible solution, rather than hard-coded ZipArchive code.
from phpspreadsheet.
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.
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.
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.
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.
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.
yes, this is enforced by composer. You won't be able to install PhpSpreadsheet if you don't have all required extensions.
from phpspreadsheet.
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.
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)
- Feature request: functionality to detect and read sheet tables and related styles HOT 6
- HTML export ignores setSize / getColor cell formats HOT 5
- v2.0.0 data corruption in non-UTF-8 apps as a result of dependency voku/portable-utf8 autoloader setting default_charset and mb_internal_encoding to "UTF-8" HOT 2
- Incorrect reader used for CSV files with BOM HOT 1
- The way to Protect only a particular cell is not working. How do i lock a particular row or column HOT 1
- Image can#t be inserted inside Cell, the same way as the newest Excel sheet or google sheet HOT 4
- Cannot read csv files that contain '<a href=' and do not have the extension ‘.csv’ ‘.tsv’.
- Textboxes, shape are not visible when using mergefields in file that contains image (Excel) HOT 1
- Conditional styles comming separates, even though two of them are one conditional style when you open the sheet HOT 1
- Conditional styles comming separates, even though two of them are one conditional style when you open the sheet HOT 2
- Assistance Needed with Editing XLSX Files Using PHPSpreadsheet
- Cannot open XLSX file HOT 1
- add custome sheet fonctions HOT 1
- Conditional styling doesnt support color scale with number or percentage HOT 1
- invalid range when save xlsx file php HOT 2
- calculate error for CONCATENATE HOT 3
- Error reading file column into specific row HOT 5
- Crash while producing a spreadsheet with a reasonably complex HTML table that includes "<br>" tags. HOT 4
- Running via crontab on DigitalOcean - not saving HOT 1
- Time to build excel grows exponentialy HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpspreadsheet.