Commit Graph

3719 Commits

Author SHA1 Message Date
oleibman d93a303371 Fix Unintential Deprecated Calls in Tests - ENGINEERING (#3176)
* Fix Unintential Deprecated Calls in Tests - ENGINEERING

I think it's best to install these before PR #3166. There are no changes to source code, only to test members which continue to inadvertently use calls to deprecated functions.

* Fix deprecation DocBlocks

Deprecated->deprecated, adjust see and comments

* Fix Deliberate Deprecated Tests

Add annotations.

* Run Unit Tests in Spreadsheet Context

This turned up only one error, in IMSUB. The only group that still needs this is Statistical. Not sure if I will get to that quickly.
2022-11-24 07:57:41 -08:00
oleibman 3697352e28 Fix Unintential Deprecated Calls in Tests - LOGICAL (#3178)
* Fix Unintential Deprecated Calls in Tests - LOGICAL

I think it's best to install these before PR #3166. There are no changes to source code, only to doc-blocks and to test members which continue to inadvertently use calls to deprecated functions.

* Change Unit Tests to Run in Spreadsheet Context

They had been run as direct calls, which is not how most users would use them. Making this change exposed some minor coding errors - SWITCH needs to flatten its arguments, and IFERROR and IFNA were not handling a null testValue in the same manner as Excel.
2022-11-23 07:49:28 -08:00
oleibman ca1ff07fbe Fix Unintential Deprecated Calls in Tests - DATABASE (#3175)
* Fix Unintential Deprecated Calls in Tests - DATABASE

I think it's best to install these before PR #3166. There are no changes to source code, only to test members which continue to inadvertently use calls to deprecated functions.

* Fix deprecation Blocks

Deprecated->deprecated, adjust see and comments

* Fix Deliberate Deprecated Tests

Add annotations.

* Change Unit Tests to Run in Spreadsheet Context

... rather than as direct calls. The major difference is that specifying an invalid column should result in an Excel error, not null. Minor code changes were needed, including to Statistical/Conditional which sometimes calls Database.

* Correct Some DocBlocks

Null is no longer a possible output for most of these functions.

* 2 Overlooked Tests

Change to run in spreadsheet context.

* T Function Should Return Null-String, not Null

Fix it.
2022-11-23 06:54:51 -08:00
MarkBaker 717ec4f73a Eliminate redundant assignment 2022-11-23 03:38:56 +01:00
Mark Baker a3187a3d3e Merge pull request #3199 from PHPOffice/Functionality-Prevent-Serialization
Explicitly prevent serialization of the Spreadsheet object
2022-11-23 03:14:04 +01:00
Mark Baker f4e5318bb2 Merge branch 'master' into Functionality-Prevent-Serialization 2022-11-23 02:58:33 +01:00
oleibman fe79f7b02c Fix Unintential Deprecated Calls in Tests - INFORMATION (#3177)
* Fix Unintential Deprecated Calls in Tests - INFORMATION

I think it's best to install these before PR #3166. There are no changes to source code, only to doc-blocks and to test members which continue to inadvertently use calls to deprecated functions.

* Missed Some Deprecated Calls

Fix them now.
2022-11-22 07:14:19 -08:00
oleibman c2bf9cdf9e Restore Cyclic Error Messages (#3170)
Fix #3169. Insufficient detail when calculation fails due to cyclic reference.
2022-11-22 06:32:08 -08:00
oleibman 525384e573 Fix DocBlock in Style (#3200)
There is a DocBlock `@var ?array<string, array>` which causes PhpDocumentor to fail parsing Style/Style, so the online API documentation for that class is missing. Changing to `@var null|array<string, array>` fixes the problem.
2022-11-21 21:28:57 -08:00
oleibman 704a7b9fd1 Fix Unintential Deprecated Calls in Tests - LOOKUPREF (#3174)
* Fix Unintential Deprecated Calls in Tests - LOOKUPREF

I think it's best to install these before PR #3166. There are no changes to source code, only to test members which continue to inadvertently use calls to deprecated functions.

* Fix deprecation DocBlocks

Deprecated->deprecated, adjust see and comments

* One Intentional Deprecation

Annotate it.
2022-11-21 19:54:14 -08:00
oleibman 26e17277e1 Eliminate Some Scrutinizer 'Major' Problems Part 5 (#3161)
* Eliminate Some Scrutinizer 'Major' Problems Part 5

More of the same. 2 or 3 of these still to go after this.

Note one deprecation. Shared/Drawing has a method imagecreatefrombmp. However, that was introduced as a native PHP function with 7.2, so the method is no longer needed.

* More Silliness

Keep trying.

* If At First You Don't Succeed

Try, try again.
2022-11-21 15:31:13 -08:00
MarkBaker a7259de437 Explicitly prevent serialization of the Spreadsheet object 2022-11-22 00:12:09 +01:00
MarkBaker 8955859925 Update FAQ 2022-11-21 21:15:49 +01:00
Mark Baker b6f9ef17fe Merge pull request #3198 from PHPOffice/Github-CI_PHP-7.3-Issue
See if reintroducing PHP 7.3 in the matrix fixes the CI Workflow issue
2022-11-21 15:45:25 +01:00
MarkBaker 596a00bf69 This is going to be a real pain 2022-11-21 15:16:36 +01:00
MarkBaker 575a1efb2b Heaven only knows why the CI pipelines are complaining about a PHP 7.3 issue; all references to PHP 7.3 should have been removed from the workflows
Re-introducing 7.3 now, just to try and ensure that all checks pass, so that the 7.3 weirdness won't be a blocker for merging
2022-11-21 15:11:30 +01:00
Mark Baker 8b9b32d647 Merge pull request #3197 from PHPOffice/BugFix_Default-arguments-for-TEXTJOIN
Support null and empty values in TEXTJOIN()
2022-11-21 15:02:45 +01:00
MarkBaker 9f6bbd71b6 BugFix - Support null values in TEXTJOIN() text values as well as empty strings
Allow default values for TEXTJOIN() delimiter and ignore_empty... even though the official MS documentation lists them as required arguments, they are actually optional
2022-11-21 14:35:42 +01:00
Mark Baker f1be181858 Merge pull request #3194 from PHPOffice/ConditionalFormatting_Eliminate-duplicate-setter-code
Eliminate duplicate call to set Conditional Styles in the model when loading an Xls file
2022-11-20 21:59:59 +01:00
Mark Baker db1988e976 Merge branch 'master' into ConditionalFormatting_Eliminate-duplicate-setter-code 2022-11-20 21:47:18 +01:00
Mark Baker 1429999f0b Merge pull request #3193 from PHPOffice/Issue-2871_Merge-Cells-Bugfix-and-Performance
Eliminate call to getFormattedValue() when not required
2022-11-20 21:46:55 +01:00
MarkBaker bc3903a751 Eliminate call to getFormattedValue() when not required 2022-11-20 10:04:49 +01:00
MarkBaker 2e356821b3 Eliminate duplicate call to set Conditional Styles in the model when loading an Xls file 2022-11-18 10:41:22 +01:00
Adrien Crivelli 8f40b9841a Update GitHub Actions 2022-11-17 14:35:42 +01:00
Mark Baker 26cb1c1bcf Merge pull request #3163 from fox34/chart-write-y-axis-line-styles
Chart: Correctly handle axis line styles
2022-11-17 10:46:38 +01:00
fox34 95d929441c Test different colors for different axis 2022-11-15 11:35:07 +01:00
fox34 8714b2e728 Also verify x-axis line color 2022-11-14 17:14:17 +01:00
fox34 4e6ac96e07 Remove unused imports 2022-11-14 16:51:41 +01:00
fox34 97c1a421ff Removing whitespace at end of line 2022-11-14 16:45:05 +01:00
fox34 d9d2484341 Formatting: Indent empty lines 2022-11-14 16:41:49 +01:00
fox34 18714e3ba2 Read axis line styles correctly 2022-11-14 16:39:34 +01:00
fox34 894b78eb2f Merge branch 'master' into chart-write-y-axis-line-styles 2022-11-14 16:05:21 +01:00
fox34 c2cdc36bb3 Create PR3163Test.php 2022-11-14 16:04:13 +01:00
fox34 e6d5616e2b Include PR in Changelog 2022-11-12 10:05:42 +01:00
Mark Baker c928bfd048 Merge pull request #3164 from PHPOffice/CalcEngine-Refactor_Formatted-Numbers
Refactoring for checks on strings containing formatted numeric values
2022-11-11 17:19:05 +01:00
MarkBaker 6a50973a8b Update Change Log 2022-11-11 12:28:26 +01:00
MarkBaker d7a2315c8e Additional unit tests 2022-11-11 12:28:26 +01:00
MarkBaker f5beafd845 Refactoring for checks on strings containing formatted numeric values when used in mathematical operations in the Calculation Engine 2022-11-11 12:28:26 +01:00
fox34 f574456ff0 Update CHANGELOG.md 2022-11-10 13:37:01 +01:00
fox34 ff10c83e09 Write line styles for chart y-axis
Bugfix: Also write line styles for y-axis of charts
2022-11-10 13:34:51 +01:00
Mark Baker 6f71efcb58 Merge pull request #3156 from fdjohnston/master
Convert percentages stored as strings to numerics in formula calculations
2022-11-10 12:10:03 +01:00
Mark Baker 04fb3bb37a Merge branch 'master' into master 2022-11-10 10:55:29 +01:00
Mark Baker 8a06e1b846 Merge pull request #3160 from PHPOffice/Version_PHP74_Minimum
Drop support for PHP 7.3
2022-11-10 10:31:59 +01:00
MarkBaker 6f3f450101 Improve readability 2022-11-10 10:11:07 +01:00
MarkBaker 64a197ee42 Styling fixes 2022-11-10 09:45:01 +01:00
MarkBaker 2ee4542c75 Add PHP 8.2 to "must pass", and "nightly" to "allow fail" 2022-11-10 04:22:54 +01:00
MarkBaker 36c25b4427 Drop support for PHP 7.3 2022-11-09 22:55:31 +01:00
fjohnston@avatarasoftware.com bb845fae23 Further Simplification
As was pointed out, the entire `pow` piece, as well as extracting exponent and exponent sign, was not necessary as casting to `float` will correctly handle scientific notation in a string.
Also added case-insensitive flag to the regexp to handle upper and lower case `e`.
2022-11-09 14:57:28 -05:00
fjohnston@avatarasoftware.com 0b350b144b Slight optimization: Only use pow if exponent is greater than zero
Originally thought I was being clever by using zero in `pow` to get 1, however after thinking about it all day I think it's probably better to avoid the call to `pow` if the exponent is zero; one less function call that has to be made.

I didn't take the time to look into benchmarks of `pow` to the zero vs the ternary to multiply by 1, but my gut tells me this is likely slightly faster.
2022-11-09 14:27:16 -05:00
oleibman f3c181dffb Update Change Log 2022-11-08 (#3158)
Add several changes merged since last similar change 2022-10-20.
2022-11-08 23:28:44 -08:00