Commit Graph

20 Commits

Author SHA1 Message Date
Adrien Crivelli c1eafc5336 Cleanup PHPDoc according to PhpStorm 2024-01-03 20:51:53 +08:00
Adrien Crivelli ec4098c8fd Strict mode for all tests
While we might never be able to have 100% of our code strict, we can at
the very least do it for all of our tests. This ensures that our tests
are using our API with the types as intended by the test author, and not
silently be cast to what our API requires.
2023-09-07 17:44:56 +08:00
Adrien Crivelli f131ca30e6 Drop PHP 7.4 support
This is according to our formal, published, policy to only support
EOL PHP after 6 months.

See https://phpspreadsheet.readthedocs.io/en/latest/#php-version-support

Also share the exact same dev deps across all PHP version for GitHub
Actions so runs are faster, much most importantly they are stable and
predictable. And we decide manually when we want to migrate to PHPUnit
10.

Fixes #3634
Closes #3710
2023-09-06 22:51:47 +08:00
oleibman ff625d784d More Coverage In Unit Tests (#3447)
* More Coverage In Unit Tests

Minimal source code changes.

* Scrutinizer

One legitimate complaint and one from out of left field.

* Scrutinizer Lunacy

If this doesn't stop its complaint, I give up.

* Scrutinizer - Whatever

Try again.

* Glutton For Punishment

Try again.
2023-03-13 05:25:42 -07:00
oleibman bbfaa0c336 Eliminate Some Scrutinizer 'Major' Problems Part 4 (#3154)
* Eliminate Some Scrutinizer 'Major' Problems Part 4

Mostly docblock changes and annotations. Some code changes. A few more of these to go still.

* Missed a Couple

Fix them now.
2022-11-08 18:04:48 -08:00
Owen Leibman 3bb574c302 Fix SettingsTest
SettingsTest was changing the global LibXMLLoaderOptions without restoring the original. This caused problems for one of my new tests.
2021-06-30 11:33:35 -07:00
Adrien Crivelli 49f87de165 Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
Adrien Crivelli f9532231d2 PHPStan Level 3 2021-04-11 16:33:53 +09:00
Roland Eigelsreiter ab4d7413b0 fixed php8 deprecation warning for libxml_disable_entity_loader() (#1625)
* fixed php8 deprecation warning for libxml_disable_entity_loader()
2020-10-08 15:02:14 +02:00
Adrien Crivelli fcd9f10663 Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
Adrien Crivelli f1a019e492 Upgrad PHP deps 2020-04-27 19:29:45 +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 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
Zharikov Viktor 07455d24f6 Make global usage of use instead of FQCN
Closes #78
Closes #147
2017-05-18 00:10:16 +02:00
Paolo Agostinetto 9767112b23 Settings: deleted libxml_disable_entity_loader() calls (#113)
Settings: deleted libxml_disable_entity_loader() calls since they're not necessary.
Prevent setLibXmlLoaderOptions() and getLibXmlLoaderOptions() to call the libxml_disable_entity_loader() function which alter the global state of libxml.
See the discussion here https://github.com/PHPOffice/PhpSpreadsheet/issues/74
2017-03-12 22:00:46 +09:00
Adrien Crivelli 8dddf56c2e Use proper syntax for variadic functions
This simplify code, increase readability and improve the function
signature for API users.
2017-01-23 15:01:20 +09:00
Adrien Crivelli 8c66afe39a Upgrade to PHP-CS-Fixer 2.0 2016-12-22 23:46:26 +09:00
Adrien Crivelli 47cde0dadc Introduce vendor prefix PhpOffice to namespace 2016-09-01 02:20:47 +09:00
Adrien Crivelli f917b3b1f4 Avoid call_user_func() whenever possible 2016-08-26 15:39:29 +09:00
Adrien Crivelli 29bdbd4e0b Respect PSR-0 with matching folder name and namespace PhpSpreadsheetTests 2016-08-25 13:53:15 +09:00