mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-25 04:18:18 +00:00
e0e5a81d69
Unit test for locale builder Add new function stubs (as dummy) to Calculation list of functions
26 lines
759 B
PHP
26 lines
759 B
PHP
#!/usr/bin/env php
|
|
<?php
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Calculation;
|
|
use PhpOffice\PhpSpreadsheetInfra\LocaleGenerator;
|
|
|
|
require_once 'vendor/autoload.php';
|
|
|
|
try {
|
|
$phpSpreadsheetFunctionsProperty = (new ReflectionClass(Calculation::class))
|
|
->getProperty('phpSpreadsheetFunctions');
|
|
$phpSpreadsheetFunctionsProperty->setAccessible(true);
|
|
$phpSpreadsheetFunctions = $phpSpreadsheetFunctionsProperty->getValue();
|
|
|
|
$localeGenerator = new LocaleGenerator(
|
|
realpath(__DIR__ . '/../src/PhpSpreadsheet/Calculation/locale/'),
|
|
'Translations.xlsx',
|
|
$phpSpreadsheetFunctions,
|
|
true
|
|
);
|
|
$localeGenerator->generateLocales();
|
|
} catch (\Exception $e) {
|
|
fwrite(STDERR, (string) $e);
|
|
exit(1);
|
|
}
|