15 Commits

Author SHA1 Message Date
Adrien Crivelli c01abbce09 Merge branch 'master' into powerkiki 2024-01-04 11:51:54 +08:00
oleibman 0cd725d000 Automate Function-by-Name and Function-by-Category Docs (#3818)
* Automate Function-by-Name and Function-by-Category Docs

Examining whether it is possible to analyze the 2 Php scripts in the bin directory even though they lack a .php extension, I found that the docs generated by `generate-document` had not been updated in over a year even though support for a number of functions (e.g. ARRAYTOTEXT) had long ago been implemented. The files generated by the other script `generate-locales` are automatically generated as part of the unit test suite, and I can't see any reason not to do the same for `generate-document`.

It isn't totally clear that the 2 scripts in bin are needed any more now that each has an equivalent in the unit test suite. For now, I'm keeping them, and allowing them to be analyzed by phpcs, php-cs-fixer, and phpstan.

* Reflection Not Required

Remove it from bin scripts and DocumentGeneratorTest.

* Better Html/Css Display for Function Lists

* Redesign Features Cross Reference Doc

It was inaccurate, and pretty much impossible to read in entirety. This version should be easier to read, and to correct. That's important, because there are almost certainly new inaccuracies in this version.

* Add Html to Features Cross-Reference Readers
2023-12-11 07:38:13 -08:00
Adrien Crivelli 816b91d0b4 BREAKING Drop all deprecated things 2023-12-10 19:04:19 +01:00
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
oleibman e9cf27354d PhpUnit 10 Compatibility Part 2 (#3526)
Successor to PR #3523. There are 494 single-line changes (`public function provider` to `public static function provider`) in this PR. None of these were made manually; they were all created with the following script (adapted from
https://stackoverflow.com/questions/25909820/how-to-recursively-iterate-through-files-in-php):
```php
$dir = 'C:/git/unit10prep2/tests/PhpSpreadsheetTests';
$it = new RecursiveDirectoryIterator($dir);

// Loop through files
foreach(new RecursiveIteratorIterator($it) as $file) {
    if ($file->getExtension() === 'php') {
        $contents = file_get_contents($file);
        $new = preg_replace('/public function (\\w*)([Pp])rovider/', 'public static function $1$2rovider', $contents);
        if ($new !== $contents) {
            echo "changing $file\n";
            file_put_contents($file, $new);
        }
    }
}
```

After this PR, there will be one more, with a small number of test changes, and enabling PhpUnit 10 for Php 8.1+.
2023-04-20 13:48:00 -07:00
MarkBaker 5839533dc1 Handling the new _xlws. prefix used for SORT() and FILTER() functions in both the Calculation Engine, and in the Xlsx Writer
Create stubs for new uncategorised ANCHORARRAY(), LAMBDA(), and SINGLE(); and for the new Logical functions BYCOL() and BYROW()
2022-12-15 13:16:45 +01:00
Adrien Crivelli f122dc62be heredoc syntax does not break indentation anymore 2022-12-02 15:33:30 +01:00
MarkBaker e0e5a81d69 Move documentation builder to infra so that it isn't included in non --dev composer downloads
Unit test for locale builder
Add new function stubs (as dummy) to Calculation list of functions
2021-05-28 22:35:37 +02:00
MarkBaker 65309dbe78 Fix unit tests for function list markdown, and style issues for DOLLAR/USDOLLAR 2021-05-20 20:41:09 +02:00
Owen Leibman 1a0aab1a4f Improve Coverage in src/PhpSpreadsheet
There are no changes to code. Additional tests are added,
so that the following 6 items now have 100% test coverage:
- Comment
- DefinedName
- DocumentGenerator
- IOFactory
- NamedFormula
- NamedRange
2020-11-27 06:50:01 -08:00
paulkned 7f23ccb69d Added support for the WEBSERVICE function (#1409)
Co-authored-by: Paul Kievits <kievits@rsm.nl>
2020-06-29 10:17:58 +09:00
Adrien Crivelli fcd9f10663 Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
Adrien Crivelli 7e79782dae Remove @throws comment
Those are extremely hard to maintain properly and bring almost
no value, especially if they are outdated
2020-05-16 20:33:25 +09:00
池下克彦 23f26fa616 phpcs fix 2020-02-25 10:41:00 +09:00
池下克彦 32a8ef5e33 DocumentGeneratorTest 2020-02-25 09:52:32 +09:00