2 Commits

Author SHA1 Message Date
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
Kevin Verschaeve 4971801a90 fix: Allow to read data from a table located in a different sheet (#3659)
* fix: Allow to read data from a table located in a different sheet

* Add Test Case, Correct Calculation

Calculate correct result, at least for calculations with a single answer. For an array of answers, result will be similar to other functions which return an array (dynamic arrays not yet fully supported).

* Rename test class

* Allow Appropriate Use of Table as DefinedName in Calculations

See Issue3569Test, which behaves like Excel.

* Remove Dead Code

Scrutinizer is correct here.

* Memory Leak

Worksheet points to Table, Table points back to Worksheet. Circular reference prevents garbage collection. Remove Table collection in Worksheet at destruct time to avoid this problem.

* PhpUnit10 Failure

Avoiding memory leak triggered segfault in Phpunit 10. Research and fix later.

* Add toString to StructuredReference

Absence of such a method seems to cause problems for untaken IF branches in Calculation.

* Remove Dead Assignments

Correctly detected by Scrutinizer.

---------

Co-authored-by: Kevin Verschaeve <kevin.verschaeve@exotec.com>
Co-authored-by: oleibman <10341515+oleibman@users.noreply.github.com>
2023-08-19 06:41:57 -07:00