Replies: 3 comments
-
Find the directory with Or, if
That will show you all the installed packages with their versions. |
Beta Was this translation helpful? Give feedback.
-
Thank you oleibman for your contribution. My problem is, there is no composer.lock. My precursor just copied all required packages to this server. The server is just for internal use and has not realy an internet connection. |
Beta Was this translation helpful? Give feedback.
-
Something like the following might work for you: use PhpOffice\PhpSpreadsheet\Cell\StringValueBinder;
use PhpOffice\PhpSpreadsheet\Reader\Html as HtmlReader;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
class DeduceRelease {
public static function deduce(): void
{
$reader = new HtmlReader();
if (!method_exists($reader, 'listWorksheetInfo')) {
echo "Release 1.*.*\n";
return;
}
if (!method_exists($reader, 'getIgnoreRowsWithNoCells')) {
echo "Release 2.0.* or 2.1.*\n";
return;
}
$binder = new StringValueBinder();
if (!method_exists($binder, 'setSetIgnoredErrors')) {
echo "Release 2.*.* >= 2.2.0\n";
return;
}
$sheet = new Worksheet();
if (method_exists($sheet, 'getStyles')) {
echo "Release 3.*.*\n";
return;
}
echo "Release 4+\n";
}
} If you need more specificity, it would probably be easy to add, based on what you can see in CHANGELOG.md. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
how can I find out, which version of phpspreadsheet is installed on the server?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions