PhpSpreadsheet/tests/PhpSpreadsheetTests
oleibman e4e99b8a73
Permit Date/Time Entered on Spreadsheet to be Calculated as Float (#3121)
* Permit Date/Time Entered on Spreadsheet to be Calculated as Float

Fix #1416. I do not entirely understand the use case for this old issue, but resolving it seems straightforward. Issue complains that user-entered date/time fields may be interpreted as either float or int when PhpSpreadsheet reads them. Issue suggests getCalculatedValue treat all date/time fields as float; that seems like a breaking change. However, adding an option to permit it seems okay. That option might be implemented as either a property of Calculation, or a static property of Cell. Since the changed logic is found in Cell (and Shared/Date), I opted for the latter.

In Cell, the property `$parent` is incorrectly described in doc block as `Cells`, and should be `?Cells`. This change eliminates some Phpstan and Scrutinizer problems, and should allow the elimination of some try/catch blocks - I have not done an exhaustive search for those.

Calls to `isDateTime` could have affected activeSheet and selectedCells; they no longer can. Optional parameters are added to it and the functions it calls to accommodate the new functionality; the defaults for the new parameters will, of course, return the same result as the earlier versions of the functions would have returned.

* Scrutinizer - Self-inflicted

Tests used constant which I deprecated.
2022-10-18 18:58:38 -07:00
..
Calculation Calculation suppressFormulaErrors - Minor Break and Deprecation (#3092) 2022-10-01 08:40:27 -07:00
Cell Permit Date/Time Entered on Spreadsheet to be Calculated as Float (#3121) 2022-10-18 18:58:38 -07:00
Chart Phpstan and Xlsx Reader (#3043) 2022-09-04 10:43:31 -07:00
Collection Support for SimpleCache Interface versions 1.0, 2.0 and 3.0; to stop people moaning; even though it requires a second implementation of the Memory cache for Cells 2022-08-20 21:27:05 +02:00
Custom Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
Document Fix Fluke Failure in Document Properties Test (#2738) 2022-04-17 08:44:29 -07:00
Features/AutoFilter/Xlsx AutoFilter inside Tables 2022-05-29 19:38:43 +05:30
Functional Scrutinizer Clean Up Tests (#3061) 2022-09-14 07:11:20 -07:00
Helper Sync composer.lock (#3075) 2022-09-20 08:37:00 -07:00
Reader Merge branch 'master' into Table-Reader-for-Xlsx 2022-10-11 10:29:14 +02:00
Shared Permit Date/Time Entered on Spreadsheet to be Calculated as Float (#3121) 2022-10-18 18:58:38 -07:00
Style Scrutinizer Clean Up Tests (#3061) 2022-09-14 07:11:20 -07:00
Worksheet Merge branch 'master' into Table-Reader-for-Xlsx 2022-10-11 10:29:14 +02:00
Writer Use Locale-Independent Float Conversion for Xlsx Writer Custom Property (#3099) 2022-10-02 18:37:55 -07:00
CellReferenceHelperTest.php Provide $includeAbsoluteReferences option for the CellReferenceHelper when updating cell addresses 2022-03-16 19:14:50 +01:00
CommentTest.php phpcs fxes 2022-06-14 12:19:54 +02:00
DefinedNameFormulaTest.php Reduce PHPStan error in tests 2021-04-12 11:10:23 +09:00
DefinedNameTest.php Scrutinizer Clean Up Tests (#3061) 2022-09-14 07:11:20 -07:00
DocumentGeneratorTest.php Move documentation builder to infra so that it isn't included in non `--dev` composer downloads 2021-05-28 22:35:37 +02:00
HashTableTest.php Improve Coverage for HashTable, Fix Clone 2021-05-30 13:03:37 +02:00
IOFactoryTest.php Allow Reader format identification to use a subset of possible Readers 2022-04-19 14:24:53 +02:00
LocaleGeneratorTest.php Calculation suppressFormulaErrors - Minor Break and Deprecation (#3092) 2022-10-01 08:40:27 -07:00
NamedFormulaTest.php Scrutinizer Clean Up Tests (#3061) 2022-09-14 07:11:20 -07:00
NamedRange2Test.php Validate Input to SetSelectedCells (#2280) 2021-09-11 06:55:00 -07:00
NamedRangeTest.php Scrutinizer Clean Up Tests (#3061) 2022-09-14 07:11:20 -07:00
ReferenceHelperTest.php Correct update to named ranges and formulae when inserting/deleting columns/rows 2022-09-23 13:24:31 +02:00
RichTextTest.php More Scrutinizer Catch Up (#3050) 2022-09-09 07:56:11 -07:00
SettingsTest.php Fix SettingsTest 2021-06-30 11:33:35 -07:00
SpreadsheetCoverageTest.php Phpstan and Xlsx Reader (#3043) 2022-09-04 10:43:31 -07:00
SpreadsheetTest.php Scrutinizer Clean Up Tests (#3061) 2022-09-14 07:11:20 -07:00