You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the remaining 32-bit-unsafe date handling that remains in PhpSpreadsheet is in AutoFilter. Cleaning this up demonstrated that there are a lot of problems with AutoFilter, and I will do it in two pieces. Part 1 was PR #2141 which I have just merged.
In this PR:
- Fix remaining 32-bit dates in filterTestInDateGroupSet.
- Also in some of the existing AutoFilter samples. Note that the comments in two of those said the filter was being set for the first day of each month, but the code specifies the last day - I have corrected the comments.
- Remove mocking in unit tests for AutoFilter in favor of 'real' tests.
- Code coverage is now 100% in all of AutoFilter, AutoFilter/Column, and AutoFilter/Common/Rule.
- No remaining AutoFilter(/Column(/Rule)) exceptions in Phpstan baseline.
- Documentation for escaping of asterisk, question mark, and tilde in text filters included spurious backslashes which are now removed.
- Text filter escaping of question mark did not work. There had been no unit tests for any text filtering.
- Likewise there had been no testing for TopTen.
- Above- and below- average filters were not working because they acquired their Calculation instance incorrectly. There had been no tests.
- Several unchanging private static arrays in Rule were changed to private const arrays.
- Clones are now tested.
- RuleTest is moved to same directory as other tests.
message:"#^Parameter \\#1 \\$number of function floor expects float, float\\|int\\<1, max\\>\\|string given\\.$#"
5305
-
count:1
5306
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5307
-
5308
-
-
5309
-
message:"#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\:\\:\\$toReplace has no typehint specified\\.$#"
5310
-
count:1
5311
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5312
-
5313
-
-
5314
-
message:"#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\:\\:calculateTopTenValue\\(\\) has no return typehint specified\\.$#"
5315
-
count:1
5316
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5317
-
5318
-
-
5319
-
message:"#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\:\\:calculateTopTenValue\\(\\) has parameter \\$columnID with no typehint specified\\.$#"
5320
-
count:1
5321
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5322
-
5323
-
-
5324
-
message:"#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\:\\:calculateTopTenValue\\(\\) has parameter \\$endRow with no typehint specified\\.$#"
5325
-
count:1
5326
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5327
-
5328
-
-
5329
-
message:"#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\:\\:calculateTopTenValue\\(\\) has parameter \\$ruleType with no typehint specified\\.$#"
5330
-
count:1
5331
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5332
-
5333
-
-
5334
-
message:"#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\:\\:calculateTopTenValue\\(\\) has parameter \\$ruleValue with no typehint specified\\.$#"
5335
-
count:1
5336
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5337
-
5338
-
-
5339
-
message:"#^Method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\:\\:calculateTopTenValue\\(\\) has parameter \\$startRow with no typehint specified\\.$#"
5340
-
count:1
5341
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5342
-
5343
-
-
5344
-
message:"#^Cannot call method rangeToArray\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
5345
-
count:1
5346
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5347
-
5348
-
-
5349
-
message:"#^Cannot call method getRowDimension\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
5350
-
count:2
5351
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5352
-
5353
-
-
5354
-
message:"#^Cannot assign offset 'year' to array\\<string\\>\\|string\\.$#"
5355
-
count:1
5356
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5357
-
5358
-
-
5359
-
message:"#^Cannot assign offset 'month' to array\\<string\\>\\|string\\.$#"
5360
-
count:1
5361
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5362
-
5363
-
-
5364
-
message:"#^Cannot assign offset 'day' to array\\<string\\>\\|string\\.$#"
5365
-
count:1
5366
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5367
-
5368
-
-
5369
-
message:"#^Cannot assign offset 'hour' to array\\<string\\>\\|string\\.$#"
5370
-
count:1
5371
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5372
-
5373
-
-
5374
-
message:"#^Cannot assign offset 'minute' to array\\<string\\>\\|string\\.$#"
5375
-
count:1
5376
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5377
-
5378
-
-
5379
-
message:"#^Cannot assign offset 'second' to array\\<string\\>\\|string\\.$#"
5380
-
count:1
5381
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5382
-
5383
-
-
5384
-
message:"#^Parameter \\#1 \\$str of function preg_quote expects string, array\\<string\\>\\|string given\\.$#"
5385
-
count:1
5386
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5387
-
5388
-
-
5389
-
message:"#^Cannot call method getCell\\(\\) on PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\Worksheet\\|null\\.$#"
5390
-
count:2
5391
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5392
-
5393
-
-
5394
-
message:"#^Binary operation \"\\*\" between 0\\|array\\<string\\>\\|string and float\\|int results in an error\\.$#"
5395
-
count:1
5396
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5397
-
5398
-
-
5399
-
message:"#^Left side of && is always true\\.$#"
5400
-
count:1
5401
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5402
-
5403
-
-
5404
-
message:"#^Parameter \\#1 \\$function of function call_user_func_array expects callable\\(\\)\\: mixed, array\\('PhpOffice\\\\\\\\PhpSpreadsheet\\\\\\\\Worksheet\\\\\\\\AutoFilter', mixed\\) given\\.$#"
5405
-
count:1
5406
-
path:src/PhpSpreadsheet/Worksheet/AutoFilter.php
5407
-
5408
-
-
5409
-
message:"#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\\\Rule\\:\\:\\$ruleTypes has no typehint specified\\.$#"
message:"#^Property PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\\\Rule\\:\\:\\$parent \\(PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\|null\\.$#"
message:"#^Parameter \\#1 \\$pValue of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\\\Rule\\:\\:setValue\\(\\) expects array\\<string\\>\\|string, int given\\.$#"
message:"#^Parameter \\#2 \\$pValue of method PhpOffice\\\\PhpSpreadsheet\\\\Worksheet\\\\AutoFilter\\\\Column\\:\\:setAttribute\\(\\) expects string, int given\\.$#"
0 commit comments