Commit Graph

1683 Commits

Author SHA1 Message Date
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
Maxim Bulygin 442e612202
Support custom PDF library instances or configurations
This allow to create and configure the standard instance of the
external PDF libary, before returning it to the standard writer.

Or, more powerful, this allow to provide a custom implementation
of the external PDF library, allowing for custom behaviors. An
example of that would something like: https://tcpdf.org/examples/example_003/

Closes #266
2017-11-04 16:01:09 +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 98b532102d
Add experimental support for PHP 7.2 2017-11-02 16:02:42 +09:00
Adrien Crivelli b2ab08b1b5
Mention `composer fix` in contributing guide 2017-11-02 15:50:01 +09:00
anton-harvey f7518dadc9
Return false if the zip entry could not be located
Previously the function did not check whether the return value of `ZipArchive::locateName`
was `false`. And when it was, it was passed straight into `ZipArchive::getFromIndex`,
which casts it to an integer, resulting in it incorrectly retrieving the entry at index `0`.

Fixes #262
Closes #268
2017-11-02 15:42:45 +09:00
Adrien Crivelli 8183c71e78
Remove duplicated declarations of interface implementation 2017-10-31 19:58:46 +09:00
Maxim Bulygin 6561494e32
Add possibility to check validity of a cell value, based on data validation rules
`$cell->hasValidValue()` returns true if the cell has a value which conform to the
rules defined in `$cell->getDataValidation()`.

Closes #257
2017-10-31 14:07:24 +09:00
Adrien Crivelli 888c618227
Fix typo 2017-10-30 11:37:24 +09:00
Adrien Crivelli 8d23bda3dd
Fix Scrutinizer issues 2017-10-29 23:34:00 +09:00
Adrien Crivelli 557e80dc03
Rename classes to keep them in their related namespaces 2017-10-29 17:39:42 +09:00
Adrien Crivelli 3982ce2944
Remove unused variables and parameters 2017-10-29 14:09:38 +09:00
Adrien Crivelli 782b4e4fae
Upgrade chart rendering support to be composer based
This allow to get rid of manual class loading and have simpler
usage of the library.
2017-10-29 01:58:42 +09:00
Adrien Crivelli dc9f4327b6
Declare all dependencies with the help of composer-require-checker 2017-10-28 23:22:50 +09:00
Adrien Crivelli b4a187bef8
Fix missing classes 2017-10-28 22:52:23 +09:00
Adrien Crivelli a093a468d1
HLOOKUP check on the count of the rows, not columns
We must check on the count of the rows (`row_index_num` and not
`col_index_num` as in VLOOKUP) and not on the columns.

https://support.office.com/en-us/article/HLOOKUP-function-a3034eec-b719-4ba3-bb65-e1ad662ed95f

Fixes https://github.com/PHPOffice/PHPExcel/issues/1339
2017-10-26 23:02:53 +09:00
Adrien Crivelli 25ff914aa6
Simplify IOFactory to rely on autoloading 2017-10-22 01:54:14 +09:00
Adrien Crivelli 3e6a419b6d
Remove useless `@static` annotations 2017-10-21 23:26:05 +09:00
KacerCZ 069c665e56 Use stable release of mPDF 7.0 (#256) 2017-10-20 17:44:44 +09:00
mosa ee700f7c7d change array_push() to $array[] (#254)
http://php.net/manual/en/function.array-push.php#refsect1-function.array-push-description

> Note: If you use array_push() to add one element to the array it's better to use $array[] = because in that way there is no overhead of calling a function.
2017-10-19 11:07:31 +09:00
Adrien Crivelli b3e6538066
Document readers/writeres short name changes
Closes #253
2017-10-17 16:16:54 +09:00
Adrien Crivelli 79ab852bf5
Expose PDF writer to be used directly
We used to have some kind of wrapper that didn't do much except
forward methods to the real instance. That unnecessary complexity
made it harder to work with the real writer instance.
2017-10-14 14:57:44 +09:00
KacerCZ 98cd5e07bf Temporary directory is passed to mPDF (#248)
Temporary directory set to PDF writer is passed to mPDF object in constructor.
mPDF 7.0 changed temporary directory configuration from constant to constructor parameter.
Without this change it is not possible to change default temporary directory.

See: https://mpdf.github.io/installation-setup/folders-for-temporary-files.html
2017-10-13 16:08:55 +09:00
Adrien Crivelli add064e80e
Migrate `Shared\Date` methods
Closes #247
2017-10-13 12:12:58 +09:00
Adrien Crivelli b14234b198
Removed leading slashes from migrator map
Closes #245
Closes #246
2017-10-13 10:38:58 +09:00
Adrien Crivelli 26d81f6734
Spaces instead of tabs 2017-10-10 23:32:51 +09:00
Adrien Crivelli 7b889a8596
Documenting the lack of support for encryption
Closes https://github.com/PHPOffice/PHPExcel/issues/942
2017-10-10 23:28:54 +09:00
gdbonino 0bccbca031 Update worksheets.md (#243) 2017-10-10 16:14:19 +09:00
Claudio Zizza 6b4f6a7228 Introducing publicly accessible Scrutinizer configuration (#242)
Introduces a publicly accessible Scrutinizer configuration, so developers can test their PRs based on the config and extend it, in case some checks have to be added.
2017-10-08 21:42:51 +09:00
Adrien Crivelli bd3285b4fa
Avoid underscore in property names 2017-10-08 14:37:11 +09:00
Claudio Zizza c9795e13b5 Add missing class properties (#241) 2017-10-08 13:18:39 +09:00
Adrien Crivelli 483f3c98ff
More fixes from PhpStorm warnings 2017-10-08 02:00:30 +09:00
Adrien Crivelli 1259549466
Drop unused code and fix some PhpStorm warnings 2017-10-08 01:21:32 +09:00
Maxim 4b4bac53aa INDEX(): fix getting row and col numbers from references (#239)
Allow to use cell references as row and column in function INDEX(). Eg:

```
=INDEX(A1:B5, A9)
```
2017-10-06 14:01:20 +09:00
Maxim 088a76737e Fix DAY() function with 0<x<1 input (#230)
Also bring support for OpenOffice DATE() calculation method
2017-10-04 12:57:01 +09:00
Adrien Crivelli 13265581a9
PHP-CS-Fixer should stay as a dev dependency
Closes #236
Closes #237
2017-10-02 20:25:08 +09:00
Adrien Crivelli 440bfe637f
Don't use short list syntax to keep PHP 5.6 compatibility 2017-10-01 21:50:40 +09:00
Adrien Crivelli d3e769202a
Dependencies compatible with PHP 5.6 2017-10-01 21:01:56 +09:00
Adrien Crivelli 4fd8e742e7
Upgrade to PHP-CS-Fixer 2.7 2017-10-01 20:07:04 +09:00
Adrien Crivelli e95e4dfd13
Re-enable tests on samples 2017-10-01 18:18:45 +09:00
Adrien Crivelli 600a7a1b59
Fix Travis 2017-10-01 18:17:31 +09:00
Adrien Crivelli 50a0ec58af
Merge all examples together
Closes #17
2017-10-01 17:48:59 +09:00
Adrien Crivelli 29208e9d99
Remove boilerplates
Because it is a budren to maintain and LGPL 2.1 does not require
them, but only suggest them:

> To apply these terms, attach the following notices to the library.
> It is **safest** to attach them to the start of each source file
> to most effectively convey the exclusion of warranty; and each
> file **should** have at least the "copyright" line and a pointer
> to where the full notice is found.

https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html#SEC4
2017-09-30 22:12:28 +09:00
Adrien Crivelli 68bb90bb6e
Remove PHPUnit group fail19, because it has no use anymore 2017-09-30 12:18:14 +09:00
Maxim 810f174d6e Fix INDEX() function when rows count less than row number (#233) 2017-09-30 12:13:20 +09:00
Adrien Crivelli 360db8dbcd
Upgrade to mPDF 7.0+
Closes #144
2017-09-29 11:17:08 +09:00
Adrien Crivelli 04cd707b83
Document non-support for form controls
Closes https://github.com/PHPOffice/PHPExcel/issues/1051
2017-09-29 00:25:08 +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