Commit Graph

4873 Commits

Author SHA1 Message Date
oleibman 1d73598d67 Restore 2 Disabled Tests
For some https requests for file_get_contents, "context" needs to be added to function call. It is not clear why this has changed recently.
2024-09-24 17:10:37 -07:00
oleibman 9d7aaffe8a Merge pull request #4169 from oleibman/urltests
Disable 2 Tests
2024-09-24 05:06:31 +00:00
oleibman 7366a16cd7 Disable 2 Tests
Test for url image used file_get_contents on file which we have read successfully for years. Today it started returning error 403. Disable tests while I study whether there is a suitable replacement.
2024-09-23 22:01:40 -07:00
oleibman 4b8a929fc1 Merge commit from fork
* Validate Mime Type for Images

* Extend Change to Xlsx Reader

* Attach Drawing to Sheet Only If Valid

* Suppress Some Theoretical Warning Messages

* Minor Tweak
2024-09-23 13:28:31 -07:00
oleibman c91c8c9a62 Merge pull request #4164 from oleibman/amordegrc
Tweak for AMORDEGRC
2024-09-15 12:30:27 +00:00
oleibman 2d493d731b Merge commit from fork 2024-09-14 05:20:37 -07:00
oleibman 90162a143e Merge branch 'master' into amordegrc 2024-09-13 19:04:26 -07:00
oleibman 63ccb02ab9 Merge commit from fork
* Check for Whitespace Around Xml Encoding

* More Tests
2024-09-13 18:17:30 -07:00
oleibman 381584309e Merge pull request #4165 from oleibman/dompdf84
Dompdf and Php8.4
2024-09-08 02:55:35 +00:00
oleibman 995d9c794e Dompdf and Php8.4
Lots of deprecation messages. They are a major distraction at this stage. Suppress them until Dompdf is fixed.
2024-09-07 18:01:26 -07:00
oleibman a0f811fd38 Merge branch 'master' into amordegrc 2024-09-07 08:35:31 -07:00
oleibman 6c9b2a8209 Merge pull request #4162 from oleibman/csv84
Php 8.4 Will Deprecate fgetcsv Parameter
2024-09-07 15:25:02 +00:00
oleibman 2a8fb60fbb Some Long-Term Prep
Enable us to determine if user has explicitly changed escape character vs. using default.
2024-09-07 07:35:04 -07:00
oleibman a25775ace0 Tweak for AMORDEGRC
Changes to Php8.4 floating point calculations caused failures in unit tests for ROUNDDOWN, ROUNDUP, and AMORDEGRC. These were addressed in a kludgey manner by PR #3897. Then someone reported a problem (not specifically related to Php8.4) with TRUNC. That was fixed by PR #4115, in which I applied the method used by TRUNC to ROUNDDOWN and ROUNDUP as well. The method used to fix these was to cast a floating point value to string and then cast it back to float again. It's a bit surprising that this works, but it seems effective for all our test cases, and is less kludgey than what had been done earlier. Missing from that PR was a similar change for AMORDEGRC. This PR applies that change to AMORDEGRC, which again passes the unit test suite for all releases of Php.
2024-09-07 06:53:44 -07:00
oleibman 352eaae3ee Php 8.4 Will Deprecate fgetcsv Parameter
As described in issue #4161, Php seems to be prepared to break the fgetcsv function in release 9, marking the existing usage deprecated in 8.4. This gives us a long-term problem. This PR provides a short-term solution.
2024-09-06 01:11:34 -07:00
oleibman fd9656689e Merge pull request #4150 from marc-mabe/fix-Date-roundMicroseconds
Fix Date::roundMicroseconds() not resetting microsecond part
2024-09-05 16:53:12 +00:00
oleibman 5c931e94cb Merge commit from fork
* Validate POST Input in Sample 45

Errors will result if inputs are not numeric.

* Update 45_Quadratic_equation_solver.php

---------

Co-authored-by: Owen Leibman <owenleibman@fico.com>
2024-09-05 07:42:34 -07:00
oleibman 50ec30b34c Merge pull request #4153 from oleibman/issue4128b
Improve Xlsx Reader Speed
2024-09-05 02:38:18 +00:00
oleibman bba5719da2 Merge branch 'master' into issue4128b 2024-09-04 19:35:20 -07:00
oleibman b3769577b6 Update CHANGELOG.md 2024-09-04 19:33:32 -07:00
oleibman f023e0d2d7 Merge pull request #4155 from PHPOffice/dependabot/composer/friendsofphp/php-cs-fixer-3.64.0
Bump friendsofphp/php-cs-fixer from 3.61.1 to 3.64.0
2024-09-01 13:04:26 +00:00
dependabot[bot] 94a14e6a23 Bump friendsofphp/php-cs-fixer from 3.61.1 to 3.64.0
Bumps [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) from 3.61.1 to 3.64.0.
- [Release notes](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases)
- [Changelog](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.61.1...v3.64.0)

---
updated-dependencies:
- dependency-name: friendsofphp/php-cs-fixer
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-01 11:47:33 +00:00
oleibman 16e557350f Small Optimization 2024-08-31 03:12:44 -07:00
oleibman 60ca6c787c Very Minor Tweak 2024-08-30 15:13:04 -07:00
oleibman 8249cbd375 Scrutinizer 2024-08-30 12:45:34 -07:00
oleibman c11524d1a5 Performance Problem With Some Spreadsheets 2024-08-30 12:21:46 -07:00
oleibman 367c22c67e Slight Improvement to PR #4132
PR #4132 was needed for release 2.2.2 because of a problem with Excel 2016 introduced with 2.2.0. This is a minor tweak to that change - a little simpler, and possibly beneficial if the spreadsheet uses split screens.
2024-08-30 00:40:02 -07:00
oleibman f9192006cd Merge pull request #4143 from oleibman/deprecated2
Remove Deprecations from Release 2
2024-08-29 15:24:10 +00:00
oleibman debb07a9fb Merge pull request #4144 from oleibman/issue1402
VLOOKUP Handling of Strings and Number
2024-08-28 15:06:11 +00:00
Marc Bennewitz cd8e83735b Fix Date::roundMicroseconds() not resetting microsecond part 2024-08-26 14:32:10 +02:00
oleibman e1dae99a70 Merge pull request #4141 from oleibman/svbignoreerrors2
String Value Binder Allow Setting "Ignore Number Stored As Text"
2024-08-24 23:46:49 +00:00
oleibman 176c2c8a89 Update CHANGELOG.md 2024-08-24 16:43:59 -07:00
oleibman 9c2c976b4e Merge pull request #4139 from oleibman/pr1321
Xlsx Reader Default Cell Type
2024-08-24 23:14:41 +00:00
oleibman 47ee4da91e Merge branch 'master' into pr1321 2024-08-24 16:10:45 -07:00
oleibman aecb0b674b Update CHANGELOG.md 2024-08-23 23:56:20 -07:00
oleibman e27ccc8cea Better Handling of Stringable Objects 2024-08-20 07:58:10 -07:00
oleibman fa5ab52b66 VLOOKUP Handling of Strings and Number
Fix #1402, another in our "better late than never" series. Stalebot closed it in May 2020, and I have reopened it. @ljcag submitted the issue, and PR #1403 to resolve it, also marked stale. That change is more complicated than this one. Since there were no tests in that PR, and since this PR solves the original problem (test added), I will stick with this version, but will continue to study 1403 before merging.

This is also another in the "Excel doesn't believe in complete documentation" series. (See issue #3802 for a similar example.) Nothing that I have seen in the documentation suggests that a number will not match a numeric string, but that seems clearly to be the case. Despite the lack of complete documentation, PhpSpreadsheet implemented VLOOKUP with that in mind. Unfortunately, it did so by using `is_numeric` on its comparands, and so treats numeric strings as if they were numbers. This PR replaces those tests with `is_int() || is_float()`. The earlier PR used `is_string()` instead as a proxy for "not numeric" but that required other changes.
2024-08-20 00:02:48 -07:00
oleibman 00d23c7157 Merge pull request #4140 from oleibman/pr607
Xls Reader Some Ranges Not Handled Properly
2024-08-19 20:53:19 +00:00
oleibman 259db50132 Merge branch 'master' into pr607 2024-08-19 13:50:05 -07:00
oleibman 4a1839df78 Update CHANGELOG.md 2024-08-19 13:47:28 -07:00
oleibman 370b754a3f Remove Deprecations from Release 2
In preparation for Release 3.
2024-08-19 12:57:54 -07:00
oleibman f9837aa4b7 Merge pull request #4127 from oleibman/issue4125
Currency and Accounting Formats
2024-08-14 15:15:38 +00:00
oleibman cddf61c6ed Update CHANGELOG.md 2024-08-14 08:11:42 -07:00
oleibman 958c8c95d2 Merge branch 'master' into pr1321 2024-08-13 17:38:12 -07:00
oleibman 29c0f217d7 Merge pull request #4122 from oleibman/issue4105
Better Handling of legacyDrawing Xml
2024-08-13 22:15:54 +00:00
oleibman 362cdaf71a Update CHANGELOG.md 2024-08-13 15:13:10 -07:00
oleibman 0152f57e44 String Value Binder Allow Setting "Ignore Number Stored As Text"
When String Value Binder converts a numeric value to text, the resulting spreadsheet will be full of little green triangles to indicate to the end user that something might be wrong. It is unlikely that a spreadsheet created in this manner needs that visual clutter. This PR adds a property and setter (I can't really think of a good use case for a getter) to suppress it. Suppression should arguably be the default, but, for now, I will avoid any BC problems by leaving non-suppression as the default.
2024-08-13 14:36:45 -07:00
oleibman 30384ac043 Xls Reader Some Ranges Not Handled Properly
This supersedes PR #607 by @christian-forgacs, who deserves all the credit for reporting the problem and devising the solution. The PR went stale in 2018, and it is just easier to resubmit a clean version rather than clean up the old one. Among the suggestions in the PR was that you should try to create a spreadsheet from scratch to demonstrate the problem rather than supply one. However, my attempts to match the failing spreadsheet do not have a problem when they are read. So, a supplied spreadsheet it is.

Fix #1570. No sample spreadsheet was supplied with that issue, but I am almost certain that this is another example of the same problem. I am removing the stale label from that issue; it will be closed properly when this PR is merged.
2024-08-13 14:27:42 -07:00
oleibman a377f44463 Xlsx Reader Default Cell Type
Suggested by PR #1321 from @rtek, which was marked stale in March 2020. If the xml for a cell does not specify a type, PhpSpreadsheet has been using string; however, Excel uses numeric. PhpSpreadsheet will be changed to do the same as Excel. In theory, this is a BC break; in practice, it is doubtful that anyone will be adversely affected. No changes in the existing unit tests were required. The new test from rtek does demonstrate the change in behavior; however, the new behavior is certainly what a user would expect to happen. Unlike the original PR, this one is restricted to Xlsx Reader; I do not believe that any logic change is needed for Writer. (N.B. - changing Writer to use class constants rather than literals is a good idea, but, with no other logic change in this version, it seems risky - I may do that as separate PR.)
2024-08-13 14:10:22 -07:00
oleibman bc0460d9b3 Merge pull request #4138 from murongshaozong/master
chore: remove repetitive words
2024-08-13 16:40:05 +00:00