Commit Graph

102 Commits

Author SHA1 Message Date
Dennis Birkholz
e56fbe2745
Fix column names if read filter calls in XLSX reader skip columns
Fixes #777
Closes #778
2018-12-10 20:00:26 +11:00
MarkBaker
3abb7ccb35 CS Complaining about not uisng $this->assertInternalType('object', $scanner); 2018-11-25 14:41:11 +01:00
MarkBaker
14159d985c Coding standards 2018-11-25 14:33:01 +01:00
MarkBaker
41bcf9a21c Support for additional callback in XML Security Scanner 2018-11-25 14:00:35 +01:00
MarkBaker
c708411529 Refactor scanner into base reader class 2018-11-25 12:14:54 +01:00
MarkBaker
abad49d426 Use factory for XMLcanner 2018-11-23 23:05:17 +01:00
MarkBaker
5854ce3738 phpcs cleanup 2018-11-20 08:18:35 +01:00
MarkBaker
7a06d71e1c Add UTF-7 XXE Unit test data 2018-11-19 23:22:59 +01:00
MarkBaker
a4d97ba896 Clean handle charset in XXE scanner 2018-11-19 22:47:34 +01:00
Laurent
79d86ef5cc
Csv reader avoid notice when the file is empty
Fixes #337
2018-10-28 14:16:53 +11:00
Jon Dufresne
5b3870c508
Prefer https:// URLs when available in docs & comments
Fixes #737
2018-10-28 13:55:00 +11:00
Paul Barton
813855b2b2
Fix CSV delimiter detection on line breaks
The CSV Reader can now correctly ignore line breaks inside
enclosures which allows it to determine the delimiter
correctly.

Fixes #716
Fixes #717
2018-10-21 18:23:55 +11:00
bayzhanov
08b4456641
Xls file threw exception during open by Xls reader
Ignore some exception in property, if stream is empty

Fixes #402
Fixes #659
2018-10-07 18:49:01 +11:00
Adrien Crivelli
9fdcaabe3c
Could not open CSV file containing HTML fragment
We now always trust the file extension to avoid false positive of mime
detection for most simple cases. But we still try to guess the mime type
if the file extension does not match or is missing.

Fixes #564
2018-06-25 11:12:27 +09:00
Robin D'Arcy
c723833d6f Allow CSV escape character to be set
Fixes #492
Closes #510
2018-05-23 10:31:41 +09:00
Adrien Crivelli
e31878ceb1
Check for MIME type to know if CSV reader can read a file
CSV reader used to accept any file without any kind of check. That made
users incorrectly believe that things were ok, even though there is no
way for CSV reader to read anything else that plain text files.

Fixes #167
2018-02-05 21:33:23 +09:00
Adrien Crivelli
c96e2dae02
Update to PHP-CS-Fixer 2.10 2018-01-28 15:59:38 +09:00
Adrien Crivelli
481fc4a7c6
Support XML file without styles
Closes #331
Closes https://github.com/PHPOffice/PHPExcel/pull/559
Fixes https://github.com/PHPOffice/PHPExcel/issues/558
2018-01-14 17:08:50 +09:00
Adrien Crivelli
4dd486fb94
Clean up very obsolete links 2017-12-30 19:07:22 +09:00
Adrien Crivelli
139d85d874
Better auto-detection of CSV separators
Closes #305
2017-12-28 12:25:37 +09:00
Adrien Crivelli
32a55a3f13
Introduce identical functional tests across several formats 2017-12-17 16:35:20 +09:00
Adrien Cohen
11b055b29f
Able to set the topLeftCell in freeze panes
Fixes #260
Closes #261
2017-12-17 13:32:16 +09:00
Adrien Crivelli
962367c95f
Can read very small HTML files
Fixes #194
2017-12-11 11:09:25 +09:00
Gabriel Caruso
aed27a0bed Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase (#271)
Use the `PHPUnit\Framework\TestCase` notation instead of `PHPUnit_Framework_TestCase` while extending our TestCases. This will help us migrate to PHPUnit 6, that [no longer support snake case class names](https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-6.0.md#changed-1).
2017-11-09 00:48:01 +09:00
Adrien Crivelli
40efcd2fdd
Rename tests according to the class the class they are testing 2017-11-03 12:47:19 +09:00
Adrien Crivelli
557e80dc03
Rename classes to keep them in their related namespaces 2017-10-29 17:39:42 +09:00
Adrien Crivelli
4fd8e742e7
Upgrade to PHP-CS-Fixer 2.7 2017-10-01 20:07:04 +09:00
GreatHumorist
2abe56b946 Support missing attribute r in c node when reading xlsx
When describing a cell, the cell reference (r="A1") is optional.
When not present, we should just increment the index of the last processed row.

Fixes #201 
Closes #225
2017-09-22 14:49:38 +09:00
GreatHumorist
7aa6233185
Added xml reader hyperlink support
Closes #223
2017-09-22 14:40:47 +09:00
Adrien Crivelli
aef4d711f5
Use self::assert*() instead of $this->assert*()
Because even if it doesn't make a difference in practice, it is
technically more correct to call static methods statically. It
also better advertise that those methods can be used from any context.
2017-09-22 14:22:44 +09:00
GreatHumorist
0477e6fcfe In Xml reader throw exception in case of invalid XML (#222)
When the xml file is not a standard xml file, the `simplexml_load_string` will return false, this will cause an error on "$xml->getNamespaces(true);" . So instead of showing the error, we throw an exception.
2017-09-20 14:20:12 +09:00
Adrien Crivelli
31daed0048
Fix class name case 2017-08-02 23:13:08 +02:00
Zharikov Viktor
07455d24f6
Make global usage of use instead of FQCN
Closes #78
Closes #147
2017-05-18 00:10:16 +02:00
Markus Lanthaler
3ee9cc5ce6
Infer CSV delimiter if it hasn't been set explicitly
Closes #141
2017-04-20 17:02:03 +09:00
Adrien Crivelli
fd9c925a7b
Refactor CachedObjectStorage to PSR-16
This drop a lot of non-core features code and delegate their maintainance
to third parties. Also it open the door to any missing implementation
out of the box, such as Redis for the moment.

Finally this consistently enforce a constraint where there can be one and
only one active cell at any point in time in code. This used to be true for
non-default implementation of cache, but it was not true for default
implementation where all cells were kept in-memory and thus were never
detached from their worksheet and thus were all kept functionnal at any
point in time.

This inconsistency of behavior between in-memory and off-memory could
lead to bugs when changing cache system if the end-user code was badly
written. Now end-user will never be able to write buggy code in the first
place, avoiding future headache when introducing caching.

Closes #3
2017-04-14 16:56:27 +09:00
Kurounin
b01671213a
Removed double un-escaping when reading CSV
Removed "unescape enclosure functionality", since the unescaping is already handled by fgetcsv,
and performing the unescaping again would actually result int the text from the cell being read wrong.

As an example try parsing the folowing CSV:

```
"<img alt="""" src=""http://example.com/image.jpg"" />"
```

With the additional unescaping it would have ended up as:

```
<img alt=" src="http://example.com/image.jpg" />
```

instead of the correct:
```
<img alt="" src="http://example.com/image.jpg" />
```

Fixes https://github.com/PHPOffice/PHPExcel/pull/1171
2017-04-03 11:57:10 +09:00
Adrien Crivelli
93e2204774
Document ODS supported features
This should be completed in the future.
2017-03-06 14:40:27 +09:00
Paolo Agostinetto
9785f926c1 php-cs run: fixed code style for new/changed files 2017-02-20 21:05:25 +01:00
Paolo Agostinetto
a0321fd6fd Removed PhpStorm comment on top of file 2017-02-20 21:02:49 +01:00
Paolo Agostinetto
c954eddf57 Ods reader: fix sheet count and added a test for sheet names 2017-02-20 21:02:04 +01:00
Paolo Agostinetto
6d6353c0f1 Ods reader: fix reading of cells with hyperlinks 2017-02-18 20:59:14 +01:00
Paolo Agostinetto
1dba2d1766 Ods reader: tests for repeated spaces and rich text 2017-02-18 20:49:48 +01:00
Paolo Agostinetto
bcd1bc364c Ods reader: test loading of Worksheets 2017-02-18 13:55:22 +01:00
Paolo Agostinetto
3c7b2e23da Added unit tests for Ods reader 2017-02-18 13:36:08 +01:00
Adrien Crivelli
031af1e9d2
Standardize writers and readers name to be the format most common extension in CamelCase 2017-01-22 17:39:23 +09:00
Adrien Crivelli
8c66afe39a
Upgrade to PHP-CS-Fixer 2.0 2016-12-22 23:46:26 +09:00
Alexander Kurilo
408da0c17a Make HTML checks more strict 2016-11-16 22:21:30 +09:00
Alexander Kurilo
928b592c14 Add readable labels for data provider samples 2016-11-16 22:21:30 +09:00
Alexander Kurilo
2809cce298 Remove unused data from test provider data set 2016-11-16 22:21:30 +09:00
Alexander Kurilo
edb3974a0d Move XEEE test data to add data for other readers 2016-11-16 22:21:30 +09:00
Adrien Crivelli
47cde0dadc
Introduce vendor prefix PhpOffice to namespace 2016-09-01 02:20:47 +09:00
Adrien Crivelli
29bdbd4e0b
Respect PSR-0 with matching folder name and namespace PhpSpreadsheetTests 2016-08-25 13:53:15 +09:00