Feature: Versicherungsexport

This commit is contained in:
2025-10-24 12:25:51 +02:00
parent 345d22958f
commit b81164279f
17 changed files with 2033 additions and 557 deletions

View File

@@ -2,6 +2,7 @@
"require": { "require": {
"guzzlehttp/guzzle": "^7.0", "guzzlehttp/guzzle": "^7.0",
"twbs/bootstrap": "^4.5", "twbs/bootstrap": "^4.5",
"chillerlan/php-qrcode": "^5.0" "chillerlan/php-qrcode": "^5.0",
"phpoffice/phpspreadsheet": "^5.1"
} }
} }

425
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "835e7de75184b16aa06d8ba899283281", "content-hash": "c9528d74b4d0e8d7d422bc83b0965351",
"packages": [ "packages": [
{ {
"name": "chillerlan/php-qrcode", "name": "chillerlan/php-qrcode",
@@ -166,6 +166,85 @@
], ],
"time": "2024-01-05T23:20:55+00:00" "time": "2024-01-05T23:20:55+00:00"
}, },
{
"name": "composer/pcre",
"version": "3.3.2",
"source": {
"type": "git",
"url": "https://github.com/composer/pcre.git",
"reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e",
"reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e",
"shasum": ""
},
"require": {
"php": "^7.4 || ^8.0"
},
"conflict": {
"phpstan/phpstan": "<1.11.10"
},
"require-dev": {
"phpstan/phpstan": "^1.12 || ^2",
"phpstan/phpstan-strict-rules": "^1 || ^2",
"phpunit/phpunit": "^8 || ^9"
},
"type": "library",
"extra": {
"phpstan": {
"includes": [
"extension.neon"
]
},
"branch-alias": {
"dev-main": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Composer\\Pcre\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "PCRE wrapping library that offers type-safe preg_* replacements.",
"keywords": [
"PCRE",
"preg",
"regex",
"regular expression"
],
"support": {
"issues": "https://github.com/composer/pcre/issues",
"source": "https://github.com/composer/pcre/tree/3.3.2"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2024-11-12T16:29:46+00:00"
},
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
"version": "7.8.1", "version": "7.8.1",
@@ -491,6 +570,297 @@
], ],
"time": "2023-12-03T20:05:35+00:00" "time": "2023-12-03T20:05:35+00:00"
}, },
{
"name": "maennchen/zipstream-php",
"version": "3.1.2",
"source": {
"type": "git",
"url": "https://github.com/maennchen/ZipStream-PHP.git",
"reference": "aeadcf5c412332eb426c0f9b4485f6accba2a99f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/aeadcf5c412332eb426c0f9b4485f6accba2a99f",
"reference": "aeadcf5c412332eb426c0f9b4485f6accba2a99f",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"ext-zlib": "*",
"php-64bit": "^8.2"
},
"require-dev": {
"brianium/paratest": "^7.7",
"ext-zip": "*",
"friendsofphp/php-cs-fixer": "^3.16",
"guzzlehttp/guzzle": "^7.5",
"mikey179/vfsstream": "^1.6",
"php-coveralls/php-coveralls": "^2.5",
"phpunit/phpunit": "^11.0",
"vimeo/psalm": "^6.0"
},
"suggest": {
"guzzlehttp/psr7": "^2.4",
"psr/http-message": "^2.0"
},
"type": "library",
"autoload": {
"psr-4": {
"ZipStream\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Paul Duncan",
"email": "pabs@pablotron.org"
},
{
"name": "Jonatan Männchen",
"email": "jonatan@maennchen.ch"
},
{
"name": "Jesse Donat",
"email": "donatj@gmail.com"
},
{
"name": "András Kolesár",
"email": "kolesar@kolesar.hu"
}
],
"description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
"keywords": [
"stream",
"zip"
],
"support": {
"issues": "https://github.com/maennchen/ZipStream-PHP/issues",
"source": "https://github.com/maennchen/ZipStream-PHP/tree/3.1.2"
},
"funding": [
{
"url": "https://github.com/maennchen",
"type": "github"
}
],
"time": "2025-01-27T12:07:53+00:00"
},
{
"name": "markbaker/complex",
"version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/MarkBaker/PHPComplex.git",
"reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9",
"reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
"phpcompatibility/php-compatibility": "^9.3",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"squizlabs/php_codesniffer": "^3.7"
},
"type": "library",
"autoload": {
"psr-4": {
"Complex\\": "classes/src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mark Baker",
"email": "mark@lange.demon.co.uk"
}
],
"description": "PHP Class for working with complex numbers",
"homepage": "https://github.com/MarkBaker/PHPComplex",
"keywords": [
"complex",
"mathematics"
],
"support": {
"issues": "https://github.com/MarkBaker/PHPComplex/issues",
"source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2"
},
"time": "2022-12-06T16:21:08+00:00"
},
{
"name": "markbaker/matrix",
"version": "3.0.1",
"source": {
"type": "git",
"url": "https://github.com/MarkBaker/PHPMatrix.git",
"reference": "728434227fe21be27ff6d86621a1b13107a2562c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c",
"reference": "728434227fe21be27ff6d86621a1b13107a2562c",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
"phpcompatibility/php-compatibility": "^9.3",
"phpdocumentor/phpdocumentor": "2.*",
"phploc/phploc": "^4.0",
"phpmd/phpmd": "2.*",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"sebastian/phpcpd": "^4.0",
"squizlabs/php_codesniffer": "^3.7"
},
"type": "library",
"autoload": {
"psr-4": {
"Matrix\\": "classes/src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mark Baker",
"email": "mark@demon-angel.eu"
}
],
"description": "PHP Class for working with matrices",
"homepage": "https://github.com/MarkBaker/PHPMatrix",
"keywords": [
"mathematics",
"matrix",
"vector"
],
"support": {
"issues": "https://github.com/MarkBaker/PHPMatrix/issues",
"source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1"
},
"time": "2022-12-02T22:17:43+00:00"
},
{
"name": "phpoffice/phpspreadsheet",
"version": "5.1.0",
"source": {
"type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
"reference": "fd26e45a814e94ae2aad0df757d9d1739c4bf2e0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fd26e45a814e94ae2aad0df757d9d1739c4bf2e0",
"reference": "fd26e45a814e94ae2aad0df757d9d1739c4bf2e0",
"shasum": ""
},
"require": {
"composer/pcre": "^1||^2||^3",
"ext-ctype": "*",
"ext-dom": "*",
"ext-fileinfo": "*",
"ext-gd": "*",
"ext-iconv": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-simplexml": "*",
"ext-xml": "*",
"ext-xmlreader": "*",
"ext-xmlwriter": "*",
"ext-zip": "*",
"ext-zlib": "*",
"maennchen/zipstream-php": "^2.1 || ^3.0",
"markbaker/complex": "^3.0",
"markbaker/matrix": "^3.0",
"php": "^8.1",
"psr/http-client": "^1.0",
"psr/http-factory": "^1.0",
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "dev-main",
"dompdf/dompdf": "^2.0 || ^3.0",
"friendsofphp/php-cs-fixer": "^3.2",
"mitoteam/jpgraph": "^10.3",
"mpdf/mpdf": "^8.1.1",
"phpcompatibility/php-compatibility": "^9.3",
"phpstan/phpstan": "^1.1 || ^2.0",
"phpstan/phpstan-deprecation-rules": "^1.0 || ^2.0",
"phpstan/phpstan-phpunit": "^1.0 || ^2.0",
"phpunit/phpunit": "^10.5",
"squizlabs/php_codesniffer": "^3.7",
"tecnickcom/tcpdf": "^6.5"
},
"suggest": {
"dompdf/dompdf": "Option for rendering PDF with PDF Writer",
"ext-intl": "PHP Internationalization Functions",
"mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers",
"mpdf/mpdf": "Option for rendering PDF with PDF Writer",
"tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer"
},
"type": "library",
"autoload": {
"psr-4": {
"PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Maarten Balliauw",
"homepage": "https://blog.maartenballiauw.be"
},
{
"name": "Mark Baker",
"homepage": "https://markbakeruk.net"
},
{
"name": "Franck Lefevre",
"homepage": "https://rootslabs.net"
},
{
"name": "Erik Tilt"
},
{
"name": "Adrien Crivelli"
}
],
"description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
"homepage": "https://github.com/PHPOffice/PhpSpreadsheet",
"keywords": [
"OpenXML",
"excel",
"gnumeric",
"ods",
"php",
"spreadsheet",
"xls",
"xlsx"
],
"support": {
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/5.1.0"
},
"time": "2025-09-04T05:34:49+00:00"
},
{ {
"name": "psr/http-client", "name": "psr/http-client",
"version": "1.0.3", "version": "1.0.3",
@@ -651,6 +1021,57 @@
}, },
"time": "2023-04-04T09:54:51+00:00" "time": "2023-04-04T09:54:51+00:00"
}, },
{
"name": "psr/simple-cache",
"version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/simple-cache.git",
"reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865",
"reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865",
"shasum": ""
},
"require": {
"php": ">=8.0.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\SimpleCache\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interfaces for simple caching",
"keywords": [
"cache",
"caching",
"psr",
"psr-16",
"simple-cache"
],
"support": {
"source": "https://github.com/php-fig/simple-cache/tree/3.0.0"
},
"time": "2021-10-29T13:26:27+00:00"
},
{ {
"name": "ralouphie/getallheaders", "name": "ralouphie/getallheaders",
"version": "3.0.3", "version": "3.0.3",
@@ -826,5 +1247,5 @@
"prefer-lowest": false, "prefer-lowest": false,
"platform": [], "platform": [],
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.0.0" "plugin-api-version": "2.6.0"
} }

371
dist/insurance.php vendored Normal file
View File

@@ -0,0 +1,371 @@
<?php
// insurance.php Versicherungsgeräte (liegt in /dist)
require('../config.php');
require('../EpiApi.php');
require_once __DIR__ . '/../vendor/autoload.php'; // PhpSpreadsheet Autoload
date_default_timezone_set('Europe/Berlin');
$Epi = new Epirent();
function formatEuro(float $amount): string {
$formatted = number_format(abs($amount), 2, ',', '.') . ' €';
return $amount < 0 ? '-' . $formatted : $formatted;
}
/* =========================
Excel-Export: Konfiguration
========================= */
$EXCEL_CUSTOM_HEADER = [
['EpiWebview Versicherungsgeräte'],
['Exportdatum: ' . date('d.m.Y H:i') . ' | Mandant: ' . (defined('Epirent_Mandant') ? Epirent_Mandant : '')]
];
$EXCEL_COLS = ['#','Name','Warengruppe(n)','Versicherung netto','Seriennummer','Anschaffung','Kaufpreis','Besitzer'];
/* =========================
1) Daten einmalig holen & Zeilen bauen
========================= */
$result = $Epi->requestEpiApi('/v1/product/all?ia=true&ir=true&cl=' . Epirent_Mandant);
$productList = json_decode($result)->payload;
$filteredProductArray = [];
foreach ($productList as $product) {
if ($product->is_stock_control && $product->is_stock_single_entry && !$product->is_virtual) {
if (!empty($product->stock_data[0]->stock_rent) && $product->stock_data[0]->stock_rent > 0) {
$filteredProductArray[] = $product;
}
}
}
$rows = [];
foreach ($filteredProductArray as $filteredProduct) {
$detailRes = $Epi->requestEpiApi('/v1/product/' . $filteredProduct->primary_key . '?cl=' . Epirent_Mandant);
$insuredProduct = json_decode($detailRes)->payload[0] ?? null;
if (!$insuredProduct || empty($insuredProduct->pricing) || !isset($insuredProduct->pricing->insurance_net)) {
continue;
}
if ((float)$insuredProduct->pricing->insurance_net == 0.0) {
continue;
}
// Materials
$MaterialList = "";
if (!empty($insuredProduct->materials)) {
foreach ($insuredProduct->materials as $material) {
if ($MaterialList !== "") $MaterialList .= ", ";
if (!empty($material->is_free_material) && $material->is_free_material) {
$MaterialList .= $material->name;
} else {
$materialResult = $Epi->requestEpiApi('/v1/product/' . $material->mat_product_pk . '?cl=' . Epirent_Mandant);
$materialProductObject = json_decode($materialResult)->payload[0] ?? null;
$MaterialList .= $materialProductObject ? $materialProductObject->name : '';
}
}
}
// Warengruppen
$groupOfGoodsList = "";
if (!empty($insuredProduct->group_of_goods)) {
foreach ($insuredProduct->group_of_goods as $groupOfGoods) {
if ($groupOfGoodsList !== "") $groupOfGoodsList .= ", ";
$groupOfGoodsList .= str_replace(";", "->", $groupOfGoods->sequence_name);
}
}
// Geräte (Stocks) nur einmal je Produkt
$stockRes = $Epi->requestEpiApi('/v1/stock/filter?ppk=' . $insuredProduct->primary_key . '&cl=' . Epirent_Mandant);
$deviceStockObjectArray = json_decode($stockRes)->payload ?? [];
foreach ($deviceStockObjectArray as $device) {
$rows[] = [
'pk' => $insuredProduct->product_no,
'name' => $insuredProduct->name,
'materials' => $MaterialList,
'groups' => $groupOfGoodsList,
'insurance_net' => (float)$insuredProduct->pricing->insurance_net,
'serial_no' => (string)($device->serial_no ?? ''),
'date_purchase' => (string)($device->date_purchase ?? ''),
'purchase_price'=> (float)($device->purchase_price ?? 0.0),
'owner' => (string)($device->owner ?? ''),
];
}
}
/* =========================
2) XLSX sofort erzeugen (ohne setCellValueByColumnAndRow)
========================= */
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
use PhpOffice\PhpSpreadsheet\Style\Alignment;
use PhpOffice\PhpSpreadsheet\Cell\Coordinate;
use PhpOffice\PhpSpreadsheet\Cell\DataType;
use PhpOffice\PhpSpreadsheet\Shared\Date as ExcelDate;
use PhpOffice\PhpSpreadsheet\Style\Fill;
$exportDir = __DIR__ . '/exports';
if (!is_dir($exportDir)) {
@mkdir($exportDir, 0775, true);
}
$timestamp = date('Ymd_His');
$excelFileName = "Versicherungsgeraete_{$timestamp}.xlsx";
$excelFilePath = $exportDir . '/' . $excelFileName;
$excelDownloadUrl = 'exports/' . $excelFileName;
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
$sheet->setTitle('Versicherungsgeräte');
// kleine Helfer zum Adressieren per Spaltenbuchstaben
$cell = function(int $colIndex, int $rowIndex): string {
return Coordinate::stringFromColumnIndex($colIndex) . $rowIndex;
};
$colCount = count($EXCEL_COLS);
$lastCol = Coordinate::stringFromColumnIndex($colCount);
// Spaltenindex-Konstanten für Summen
$INSURANCE_COL = 4; // "Versicherung netto"
$PURCHASE_COL = 7; // "Kaufpreis"
// Custom Header
$rowIdx = 1;
foreach ($EXCEL_CUSTOM_HEADER as $hdrLine) {
$text = implode(' ', $hdrLine);
$sheet->setCellValue($cell(1, $rowIdx), $text);
$sheet->mergeCells($cell(1, $rowIdx) . ':' . $cell($colCount, $rowIdx));
$sheet->getStyle($cell(1, $rowIdx) . ':' . $cell($colCount, $rowIdx))
->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);
$sheet->getStyle($cell(1, $rowIdx) . ':' . $cell($colCount, $rowIdx))
->getFont()->setBold(true)->setSize($rowIdx === 1 ? 14 : 11);
$rowIdx++;
}
$rowIdx++;
// Tabellen-Header
foreach ($EXCEL_COLS as $i => $label) {
$addr = $cell($i+1, $rowIdx);
$sheet->setCellValue($addr, $label);
$sheet->getStyle($addr)->getFont()->setBold(true);
$sheet->getStyle($addr)->getAlignment()->setHorizontal(Alignment::HORIZONTAL_CENTER);
$sheet->getColumnDimension(Coordinate::stringFromColumnIndex($i+1))->setAutoSize(true);
}
$headerRow = $rowIdx;
$rowIdx++;
// Daten
$dataStartRow = $rowIdx;
foreach ($rows as $r) {
$c = 1;
// #
$sheet->setCellValue($cell($c++, $rowIdx), $r['pk']);
// Name (+ Materials)
$nameOut = $r['name'] . ($r['materials'] ? " | {$r['materials']}" : "");
$sheet->setCellValue($cell($c++, $rowIdx), $nameOut);
// Warengruppen
$sheet->setCellValue($cell($c++, $rowIdx), $r['groups']);
// Versicherung netto (numerisch, EU-Format)
$sheet->setCellValueExplicit($cell($c, $rowIdx), (float)$r['insurance_net'], DataType::TYPE_NUMERIC);
$sheet->getStyle($cell($c, $rowIdx))->getNumberFormat()->setFormatCode('#,##0.00 [$€-de-DE]');
$c++;
// Seriennummer
$sheet->setCellValue($cell($c++, $rowIdx), $r['serial_no']);
// Anschaffung (Datum)
$excelDate = '';
if (!empty($r['date_purchase'])) {
$ts = strtotime($r['date_purchase']);
if ($ts !== false) {
$excelDate = ExcelDate::PHPToExcel($ts);
}
}
if ($excelDate !== '') {
$sheet->setCellValue($cell($c, $rowIdx), $excelDate);
$sheet->getStyle($cell($c, $rowIdx))->getNumberFormat()->setFormatCode('dd.mm.yyyy');
} else {
$sheet->setCellValue($cell($c, $rowIdx), '');
}
$c++;
// Kaufpreis (numerisch, EU-Format)
$sheet->setCellValueExplicit($cell($c, $rowIdx), abs((float)$r['purchase_price']), DataType::TYPE_NUMERIC);
$sheet->getStyle($cell($c, $rowIdx))->getNumberFormat()->setFormatCode('#,##0.00 [$€-de-DE]');
$c++;
// Besitzer
$sheet->setCellValue($cell($c++, $rowIdx), $r['owner']);
$rowIdx++;
}
$dataEndRow = $rowIdx - 1;
/* === Summenzeile mit grauer Hinterlegung === */
$totalRow = $rowIdx + 1;
// Label in Spalte A
$sheet->setCellValue($cell(1, $totalRow), 'Gesamtsummen:');
$sheet->getStyle($cell(1, $totalRow))->getFont()->setBold(true);
// SUM-Formel Versicherung netto (Spalte 4)
$insColLetter = Coordinate::stringFromColumnIndex($INSURANCE_COL);
$sheet->setCellValue(
$cell($INSURANCE_COL, $totalRow),
"=SUM({$insColLetter}{$dataStartRow}:{$insColLetter}{$dataEndRow})"
);
$sheet->getStyle($cell($INSURANCE_COL, $totalRow))
->getNumberFormat()->setFormatCode('#,##0.00 [$€-de-DE]');
$sheet->getStyle($cell($INSURANCE_COL, $totalRow))->getFont()->setBold(true);
// SUM-Formel Kaufpreis (Spalte 7)
$purColLetter = Coordinate::stringFromColumnIndex($PURCHASE_COL);
$sheet->setCellValue(
$cell($PURCHASE_COL, $totalRow),
"=SUM({$purColLetter}{$dataStartRow}:{$purColLetter}{$dataEndRow})"
);
$sheet->getStyle($cell($PURCHASE_COL, $totalRow))
->getNumberFormat()->setFormatCode('#,##0.00 [$€-de-DE]');
$sheet->getStyle($cell($PURCHASE_COL, $totalRow))->getFont()->setBold(true);
// graue Hinterlegung über die ganze Summenzeile
$sheet->getStyle($cell(1, $totalRow) . ':' . $cell($colCount, $totalRow))
->getFill()->setFillType(Fill::FILL_SOLID)->getStartColor()->setARGB('FFEFEFEF');
// Filter + Freeze
$sheet->setAutoFilter("A{$headerRow}:{$lastCol}{$headerRow}");
$sheet->freezePane("A" . ($headerRow + 1));
// Datei speichern
$writer = new Xlsx($spreadsheet);
$writer->save($excelFilePath);
/* =========================
3) HTML-Ausgabe (Tabelle aus $rows) + Download-Link
========================= */
// Summen für HTML
$totalInsurance = array_sum(array_column($rows, 'insurance_net'));
$totalPurchase = array_sum(array_map(fn($r) => abs($r['purchase_price']), $rows));
?>
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Dashboard - EpiWebview</title>
<!-- Styles -->
<link href="css/styles.css" rel="stylesheet" />
<link href="https://cdn.datatables.net/1.10.20/css/dataTables.bootstrap4.min.css" rel="stylesheet" crossorigin="anonymous" />
<!-- JS -->
<script src="js/jquery-3.5.1.min.js"></script>
<script src="https://kit.fontawesome.com/93d71de8bc.js" crossorigin="anonymous"></script>
<style>
.opacity-50 { opacity: .5; }
.card .h2, .card .display-4 { font-weight: 700; }
.kpi-updated { font-size: .82rem; opacity: .85; }
</style>
<script>
$(function () {
$('#layoutSidenav_nav').load('../sources/getSidenav.php');
$('#footerholder').load('../sources/getFooter.php');
});
</script>
</head>
<body class="sb-nav-fixed">
<nav class="sb-topnav navbar navbar-expand navbar-dark bg-dark">
<a class="navbar-brand" href="index.php">Epi Webview</a>
<button class="btn btn-link btn-sm order-1 order-lg-0" id="sidebarToggle"><i class="fas fa-bars"></i></button>
</nav>
<div id="layoutSidenav">
<div id="layoutSidenav_nav"></div>
<div id="layoutSidenav_content">
<main>
<div class="container-fluid">
<h1 class="mt-4">Versicherung</h1>
<ol class="breadcrumb mb-4">
<li class="breadcrumb-item active">Versicherung</li>
</ol>
<div class="card mb-4">
<div class="card-header d-flex justify-content-between align-items-center">
<div><i class="fas fa-table mr-1"></i> Versicherungsgeräte</div>
<a class="btn btn-sm btn-success" href="<?php echo htmlspecialchars($excelDownloadUrl); ?>">
<i class="fas fa-file-excel"></i> Export nach Excel
</a>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<tr>
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">Warengruppe(n)</th>
<th scope="col">Versicherung netto</th>
<th scope="col">Seriennummer</th>
<th scope="col">Anschaffung</th>
<th scope="col">Kaufpreis</th>
<th scope="col">Besitzer</th>
</tr>
<?php foreach ($rows as $r): ?>
<tr>
<th><?php echo htmlspecialchars((string) $r['pk']); ?></th>
<th>
<?php
echo htmlspecialchars($r['name']);
if (!empty($r['materials'])) {
echo "<br><small>" . htmlspecialchars($r['materials']) . "</small>";
}
?>
</th>
<th><?php echo htmlspecialchars($r['groups']); ?></th>
<th><?php echo formatEuro((float)$r['insurance_net']); ?></th>
<th><?php echo htmlspecialchars($r['serial_no']); ?></th>
<th>
<?php
$purchaseDateOut = '';
if (!empty($r['date_purchase'])) {
try { $purchaseDateOut = date_format(new \DateTime($r['date_purchase']), 'd.m.Y'); } catch (\Throwable $e) {}
}
echo htmlspecialchars($purchaseDateOut);
?>
</th>
<th><?php echo formatEuro(abs((float)$r['purchase_price'])); ?></th>
<th><?php echo htmlspecialchars($r['owner']); ?></th>
</tr>
<?php endforeach; ?>
<!-- Summenzeile in HTML -->
<tr style="font-weight:bold; background:#f8f9fa;">
<td colspan="3" class="text-right">Gesamtsummen:</td>
<td><?php echo formatEuro($totalInsurance); ?></td>
<td></td>
<td></td>
<td><?php echo formatEuro($totalPurchase); ?></td>
<td></td>
</tr>
</table>
</div>
</div>
</div>
</div>
</main>
<div id="footerholder"></div>
</div>
</div>
<!-- Bootstrap Bundle -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
</body>
</html>

View File

@@ -6,4 +6,4 @@ remote.connection=SV-WEB-157879
remote.directory=/html/EpiWebview remote.directory=/html/EpiWebview
remote.upload=ON_SAVE remote.upload=ON_SAVE
run.as=REMOTE run.as=REMOTE
url=http://10.10.18.17(EpiWebview url=http://10.10.18.17/EpiWebview

View File

@@ -11,6 +11,10 @@
<div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div> <div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
Aufträge Aufträge
</a> </a>
<a class="nav-link" href=insurance.php>
<div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
Versicherung
</a>
<div class="sb-sidenav-menu-heading">Addons</div> <div class="sb-sidenav-menu-heading">Addons</div>
<a class="nav-link" target="_blank" href="../Packmonitor.php"> <a class="nav-link" target="_blank" href="../Packmonitor.php">
@@ -25,6 +29,8 @@
<div class="sb-nav-link-icon"><i class="fas fa-list"></i></div> <div class="sb-nav-link-icon"><i class="fas fa-list"></i></div>
Pack- & Aufgabenmonitor Pack- & Aufgabenmonitor
</a> </a>
<div class="sb-sidenav-menu-heading">Config</div> <div class="sb-sidenav-menu-heading">Config</div>
<a class="nav-link" href=editconfig.php> <a class="nav-link" href=editconfig.php>
<div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div> <div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>

18
vendor/autoload.php vendored
View File

@@ -2,6 +2,24 @@
// autoload.php @generated by Composer // autoload.php @generated by Composer
if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitab00f29709bdbfe3a1abd7d2d66d569c::getLoader(); return ComposerAutoloaderInitab00f29709bdbfe3a1abd7d2d66d569c::getLoader();

View File

@@ -42,21 +42,76 @@ namespace Composer\Autoload;
*/ */
class ClassLoader class ClassLoader
{ {
/** @var \Closure(string):void */
private static $includeFile;
/** @var string|null */
private $vendorDir;
// PSR-4 // PSR-4
/**
* @var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array(); private $prefixLengthsPsr4 = array();
/**
* @var array<string, list<string>>
*/
private $prefixDirsPsr4 = array(); private $prefixDirsPsr4 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr4 = array(); private $fallbackDirsPsr4 = array();
// PSR-0 // PSR-0
/**
* List of PSR-0 prefixes
*
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
*
* @var array<string, array<string, list<string>>>
*/
private $prefixesPsr0 = array(); private $prefixesPsr0 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr0 = array(); private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false; private $useIncludePath = false;
/**
* @var array<string, string>
*/
private $classMap = array(); private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false; private $classMapAuthoritative = false;
/**
* @var array<string, bool>
*/
private $missingClasses = array(); private $missingClasses = array();
/** @var string|null */
private $apcuPrefix; private $apcuPrefix;
/**
* @var array<string, self>
*/
private static $registeredLoaders = array();
/**
* @param string|null $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}
/**
* @return array<string, list<string>>
*/
public function getPrefixes() public function getPrefixes()
{ {
if (!empty($this->prefixesPsr0)) { if (!empty($this->prefixesPsr0)) {
@@ -66,28 +121,42 @@ class ClassLoader
return array(); return array();
} }
/**
* @return array<string, list<string>>
*/
public function getPrefixesPsr4() public function getPrefixesPsr4()
{ {
return $this->prefixDirsPsr4; return $this->prefixDirsPsr4;
} }
/**
* @return list<string>
*/
public function getFallbackDirs() public function getFallbackDirs()
{ {
return $this->fallbackDirsPsr0; return $this->fallbackDirsPsr0;
} }
/**
* @return list<string>
*/
public function getFallbackDirsPsr4() public function getFallbackDirsPsr4()
{ {
return $this->fallbackDirsPsr4; return $this->fallbackDirsPsr4;
} }
/**
* @return array<string, string> Array of classname => path
*/
public function getClassMap() public function getClassMap()
{ {
return $this->classMap; return $this->classMap;
} }
/** /**
* @param array $classMap Class to filename map * @param array<string, string> $classMap Class to filename map
*
* @return void
*/ */
public function addClassMap(array $classMap) public function addClassMap(array $classMap)
{ {
@@ -103,21 +172,24 @@ class ClassLoader
* appending or prepending to the ones previously set for this prefix. * appending or prepending to the ones previously set for this prefix.
* *
* @param string $prefix The prefix * @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories * @param list<string>|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories * @param bool $prepend Whether to prepend the directories
*
* @return void
*/ */
public function add($prefix, $paths, $prepend = false) public function add($prefix, $paths, $prepend = false)
{ {
$paths = (array) $paths;
if (!$prefix) { if (!$prefix) {
if ($prepend) { if ($prepend) {
$this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0 = array_merge(
(array) $paths, $paths,
$this->fallbackDirsPsr0 $this->fallbackDirsPsr0
); );
} else { } else {
$this->fallbackDirsPsr0 = array_merge( $this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0, $this->fallbackDirsPsr0,
(array) $paths $paths
); );
} }
@@ -126,19 +198,19 @@ class ClassLoader
$first = $prefix[0]; $first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) { if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths; $this->prefixesPsr0[$first][$prefix] = $paths;
return; return;
} }
if ($prepend) { if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths, $paths,
$this->prefixesPsr0[$first][$prefix] $this->prefixesPsr0[$first][$prefix]
); );
} else { } else {
$this->prefixesPsr0[$first][$prefix] = array_merge( $this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix], $this->prefixesPsr0[$first][$prefix],
(array) $paths $paths
); );
} }
} }
@@ -148,24 +220,27 @@ class ClassLoader
* appending or prepending to the ones previously set for this namespace. * appending or prepending to the ones previously set for this namespace.
* *
* @param string $prefix The prefix/namespace, with trailing '\\' * @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories * @param list<string>|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories * @param bool $prepend Whether to prepend the directories
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*
* @return void
*/ */
public function addPsr4($prefix, $paths, $prepend = false) public function addPsr4($prefix, $paths, $prepend = false)
{ {
$paths = (array) $paths;
if (!$prefix) { if (!$prefix) {
// Register directories for the root namespace. // Register directories for the root namespace.
if ($prepend) { if ($prepend) {
$this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4 = array_merge(
(array) $paths, $paths,
$this->fallbackDirsPsr4 $this->fallbackDirsPsr4
); );
} else { } else {
$this->fallbackDirsPsr4 = array_merge( $this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4, $this->fallbackDirsPsr4,
(array) $paths $paths
); );
} }
} elseif (!isset($this->prefixDirsPsr4[$prefix])) { } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
@@ -175,18 +250,18 @@ class ClassLoader
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
} }
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths; $this->prefixDirsPsr4[$prefix] = $paths;
} elseif ($prepend) { } elseif ($prepend) {
// Prepend directories for an already registered namespace. // Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths, $paths,
$this->prefixDirsPsr4[$prefix] $this->prefixDirsPsr4[$prefix]
); );
} else { } else {
// Append directories for an already registered namespace. // Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge( $this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix], $this->prefixDirsPsr4[$prefix],
(array) $paths $paths
); );
} }
} }
@@ -196,7 +271,9 @@ class ClassLoader
* replacing any others previously set for this prefix. * replacing any others previously set for this prefix.
* *
* @param string $prefix The prefix * @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories * @param list<string>|string $paths The PSR-0 base directories
*
* @return void
*/ */
public function set($prefix, $paths) public function set($prefix, $paths)
{ {
@@ -212,9 +289,11 @@ class ClassLoader
* replacing any others previously set for this namespace. * replacing any others previously set for this namespace.
* *
* @param string $prefix The prefix/namespace, with trailing '\\' * @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories * @param list<string>|string $paths The PSR-4 base directories
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*
* @return void
*/ */
public function setPsr4($prefix, $paths) public function setPsr4($prefix, $paths)
{ {
@@ -234,6 +313,8 @@ class ClassLoader
* Turns on searching the include path for class files. * Turns on searching the include path for class files.
* *
* @param bool $useIncludePath * @param bool $useIncludePath
*
* @return void
*/ */
public function setUseIncludePath($useIncludePath) public function setUseIncludePath($useIncludePath)
{ {
@@ -256,6 +337,8 @@ class ClassLoader
* that have not been registered with the class map. * that have not been registered with the class map.
* *
* @param bool $classMapAuthoritative * @param bool $classMapAuthoritative
*
* @return void
*/ */
public function setClassMapAuthoritative($classMapAuthoritative) public function setClassMapAuthoritative($classMapAuthoritative)
{ {
@@ -276,6 +359,8 @@ class ClassLoader
* APCu prefix to use to cache found/not-found classes, if the extension is enabled. * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
* *
* @param string|null $apcuPrefix * @param string|null $apcuPrefix
*
* @return void
*/ */
public function setApcuPrefix($apcuPrefix) public function setApcuPrefix($apcuPrefix)
{ {
@@ -296,33 +381,55 @@ class ClassLoader
* Registers this instance as an autoloader. * Registers this instance as an autoloader.
* *
* @param bool $prepend Whether to prepend the autoloader or not * @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/ */
public function register($prepend = false) public function register($prepend = false)
{ {
spl_autoload_register(array($this, 'loadClass'), true, $prepend); spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
return;
}
if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
} }
/** /**
* Unregisters this instance as an autoloader. * Unregisters this instance as an autoloader.
*
* @return void
*/ */
public function unregister() public function unregister()
{ {
spl_autoload_unregister(array($this, 'loadClass')); spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
} }
/** /**
* Loads the given class or interface. * Loads the given class or interface.
* *
* @param string $class The name of the class * @param string $class The name of the class
* @return bool|null True if loaded, null otherwise * @return true|null True if loaded, null otherwise
*/ */
public function loadClass($class) public function loadClass($class)
{ {
if ($file = $this->findFile($class)) { if ($file = $this->findFile($class)) {
includeFile($file); $includeFile = self::$includeFile;
$includeFile($file);
return true; return true;
} }
return null;
} }
/** /**
@@ -367,6 +474,21 @@ class ClassLoader
return $file; return $file;
} }
/**
* Returns the currently registered loaders keyed by their corresponding vendor directories.
*
* @return array<string, self>
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext) private function findFileWithExtension($class, $ext)
{ {
// PSR-4 lookup // PSR-4 lookup
@@ -432,14 +554,26 @@ class ClassLoader
return false; return false;
} }
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
} }
/** /**
* Scope isolated include. * Scope isolated include.
* *
* Prevents access to $this/self from included files. * Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/ */
function includeFile($file) self::$includeFile = \Closure::bind(static function($file) {
{
include $file; include $file;
}, null, null);
}
} }

View File

@@ -1,346 +1,359 @@
<?php <?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer; namespace Composer;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser; use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
*
* @final
*/
class InstalledVersions class InstalledVersions
{ {
private static $installed = array ( /**
'root' => * @var mixed[]|null
array ( * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
'pretty_version' => '1.0.0+no-version-set', */
'version' => '1.0.0.0', private static $installed;
'aliases' =>
array (
),
'reference' => NULL,
'name' => '__root__',
),
'versions' =>
array (
'__root__' =>
array (
'pretty_version' => '1.0.0+no-version-set',
'version' => '1.0.0.0',
'aliases' =>
array (
),
'reference' => NULL,
),
'chillerlan/php-qrcode' =>
array (
'pretty_version' => '5.0.1',
'version' => '5.0.1.0',
'aliases' =>
array (
),
'reference' => 'e81ed39ca3c94357aa021c7525fa9ffb451018d1',
),
'chillerlan/php-settings-container' =>
array (
'pretty_version' => '2.1.5',
'version' => '2.1.5.0',
'aliases' =>
array (
),
'reference' => 'f705310389264c3578fdd9ffb15aa2cd6d91772e',
),
'guzzlehttp/guzzle' =>
array (
'pretty_version' => '7.8.1',
'version' => '7.8.1.0',
'aliases' =>
array (
),
'reference' => '41042bc7ab002487b876a0683fc8dce04ddce104',
),
'guzzlehttp/promises' =>
array (
'pretty_version' => '2.0.2',
'version' => '2.0.2.0',
'aliases' =>
array (
),
'reference' => 'bbff78d96034045e58e13dedd6ad91b5d1253223',
),
'guzzlehttp/psr7' =>
array (
'pretty_version' => '2.6.2',
'version' => '2.6.2.0',
'aliases' =>
array (
),
'reference' => '45b30f99ac27b5ca93cb4831afe16285f57b8221',
),
'psr/http-client' =>
array (
'pretty_version' => '1.0.3',
'version' => '1.0.3.0',
'aliases' =>
array (
),
'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90',
),
'psr/http-client-implementation' =>
array (
'provided' =>
array (
0 => '1.0',
),
),
'psr/http-factory' =>
array (
'pretty_version' => '1.0.2',
'version' => '1.0.2.0',
'aliases' =>
array (
),
'reference' => 'e616d01114759c4c489f93b099585439f795fe35',
),
'psr/http-factory-implementation' =>
array (
'provided' =>
array (
0 => '1.0',
),
),
'psr/http-message' =>
array (
'pretty_version' => '2.0',
'version' => '2.0.0.0',
'aliases' =>
array (
),
'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71',
),
'psr/http-message-implementation' =>
array (
'provided' =>
array (
0 => '1.0',
),
),
'ralouphie/getallheaders' =>
array (
'pretty_version' => '3.0.3',
'version' => '3.0.3.0',
'aliases' =>
array (
),
'reference' => '120b605dfeb996808c31b6477290a714d356e822',
),
'symfony/deprecation-contracts' =>
array (
'pretty_version' => 'v2.5.2',
'version' => '2.5.2.0',
'aliases' =>
array (
),
'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66',
),
'twbs/bootstrap' =>
array (
'pretty_version' => 'v4.6.2',
'version' => '4.6.2.0',
'aliases' =>
array (
),
'reference' => 'e5643aaa89eb67327a5b4abe7db976f0ea276b70',
),
'twitter/bootstrap' =>
array (
'replaced' =>
array (
0 => 'v4.6.2',
),
),
),
);
/**
* @var bool|null
*/
private static $canGetVendors;
/**
* @var array[]
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static $installedByVendor = array();
/**
* Returns a list of all package names which are present, either by being installed, replaced or provided
*
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackages() public static function getInstalledPackages()
{ {
return array_keys(self::$installed['versions']); $packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
} }
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
/**
* Returns a list of all package names with a specific type e.g. 'library'
*
* @param string $type
* @return string[]
* @psalm-return list<string>
public static function isInstalled($packageName) */
public static function getInstalledPackagesByType($type)
{ {
return isset(self::$installed['versions'][$packageName]); $packagesByType = array();
foreach (self::getInstalled() as $installed) {
foreach ($installed['versions'] as $name => $package) {
if (isset($package['type']) && $package['type'] === $type) {
$packagesByType[] = $name;
}
}
} }
return $packagesByType;
}
/**
* Checks whether the given package is installed
*
* This also returns true if the package name is provided or replaced by another package
*
* @param string $packageName
* @param bool $includeDevRequirements
* @return bool
*/
public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}
return false;
}
/**
* Checks whether the given package satisfies a version constraint
*
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
*
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
*
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
* @param string $packageName
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
* @return bool
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint) public static function satisfies(VersionParser $parser, $packageName, $constraint)
{ {
$constraint = $parser->parseConstraints($constraint); $constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName)); $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint); return $provided->matches($constraint);
} }
/**
* Returns a version constraint representing all the range(s) which are installed for a given package
*
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
* whether a given version of a package is installed, and not just whether it exists
*
* @param string $packageName
* @return string Version constraint usable with composer/semver
*/
public static function getVersionRanges($packageName) public static function getVersionRanges($packageName)
{ {
if (!isset(self::$installed['versions'][$packageName])) { foreach (self::getInstalled() as $installed) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); if (!isset($installed['versions'][$packageName])) {
continue;
} }
$ranges = array(); $ranges = array();
if (isset(self::$installed['versions'][$packageName]['pretty_version'])) { if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = self::$installed['versions'][$packageName]['pretty_version']; $ranges[] = $installed['versions'][$packageName]['pretty_version'];
} }
if (array_key_exists('aliases', self::$installed['versions'][$packageName])) { if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['aliases']); $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
} }
if (array_key_exists('replaced', self::$installed['versions'][$packageName])) { if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['replaced']); $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
} }
if (array_key_exists('provided', self::$installed['versions'][$packageName])) { if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, self::$installed['versions'][$packageName]['provided']); $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
} }
return implode(' || ', $ranges); return implode(' || ', $ranges);
} }
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getVersion($packageName) public static function getVersion($packageName)
{ {
if (!isset(self::$installed['versions'][$packageName])) { foreach (self::getInstalled() as $installed) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); if (!isset($installed['versions'][$packageName])) {
continue;
} }
if (!isset(self::$installed['versions'][$packageName]['version'])) { if (!isset($installed['versions'][$packageName]['version'])) {
return null; return null;
} }
return self::$installed['versions'][$packageName]['version']; return $installed['versions'][$packageName]['version'];
} }
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getPrettyVersion($packageName) public static function getPrettyVersion($packageName)
{ {
if (!isset(self::$installed['versions'][$packageName])) { foreach (self::getInstalled() as $installed) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); if (!isset($installed['versions'][$packageName])) {
continue;
} }
if (!isset(self::$installed['versions'][$packageName]['pretty_version'])) { if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null; return null;
} }
return self::$installed['versions'][$packageName]['pretty_version']; return $installed['versions'][$packageName]['pretty_version'];
} }
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
*/
public static function getReference($packageName) public static function getReference($packageName)
{ {
if (!isset(self::$installed['versions'][$packageName])) { foreach (self::getInstalled() as $installed) {
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); if (!isset($installed['versions'][$packageName])) {
continue;
} }
if (!isset(self::$installed['versions'][$packageName]['reference'])) { if (!isset($installed['versions'][$packageName]['reference'])) {
return null; return null;
} }
return self::$installed['versions'][$packageName]['reference']; return $installed['versions'][$packageName]['reference'];
} }
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
*/
public static function getInstallPath($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @return array
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
*/
public static function getRootPackage() public static function getRootPackage()
{ {
return self::$installed['root']; $installed = self::getInstalled();
return $installed[0]['root'];
} }
/**
* Returns the raw installed.php data for custom implementations
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
*/
public static function getRawData() public static function getRawData()
{ {
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
return self::$installed; return self::$installed;
} }
/**
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
public static function getAllRawData()
{
return self::getInstalled();
}
/**
* Lets you reload the static array from another file
*
* This is only useful for complex integrations in which a project needs to use
* this class but then also needs to execute another project's autoloader in process,
* and wants to ensure both projects have access to their version of installed.php.
*
* A typical case would be PHPUnit, where it would need to make sure it reads all
* the data it needs from this class, then call reload() with
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
* the project in which it runs can then also use this class safely, without
* interference between PHPUnit's dependencies and the project's dependencies.
*
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
*/
public static function reload($data) public static function reload($data)
{ {
self::$installed = $data; self::$installed = $data;
self::$installedByVendor = array();
}
/**
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
if (self::$canGetVendors) {
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
$installed[] = self::$installedByVendor[$vendorDir] = $required;
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
}
}
}
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else {
self::$installed = array();
}
}
if (self::$installed !== array()) {
$installed[] = self::$installed;
}
return $installed;
} }
} }

View File

@@ -2,7 +2,7 @@
// autoload_classmap.php @generated by Composer // autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(

View File

@@ -2,7 +2,7 @@
// autoload_files.php @generated by Composer // autoload_files.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(

View File

@@ -2,7 +2,7 @@
// autoload_namespaces.php @generated by Composer // autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(

View File

@@ -2,15 +2,21 @@
// autoload_psr4.php @generated by Composer // autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__)); $vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(
'chillerlan\\Settings\\' => array($vendorDir . '/chillerlan/php-settings-container/src'), 'chillerlan\\Settings\\' => array($vendorDir . '/chillerlan/php-settings-container/src'),
'chillerlan\\QRCode\\' => array($vendorDir . '/chillerlan/php-qrcode/src'), 'chillerlan\\QRCode\\' => array($vendorDir . '/chillerlan/php-qrcode/src'),
'ZipStream\\' => array($vendorDir . '/maennchen/zipstream-php/src'),
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'), 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'),
'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'), 'Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
'PhpOffice\\PhpSpreadsheet\\' => array($vendorDir . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet'),
'Matrix\\' => array($vendorDir . '/markbaker/matrix/classes/src'),
'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),
'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'),
'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
'Composer\\Pcre\\' => array($vendorDir . '/composer/pcre/src'),
'Complex\\' => array($vendorDir . '/markbaker/complex/classes/src'),
); );

View File

@@ -25,51 +25,26 @@ class ComposerAutoloaderInitab00f29709bdbfe3a1abd7d2d66d569c
require __DIR__ . '/platform_check.php'; require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInitab00f29709bdbfe3a1abd7d2d66d569c', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInitab00f29709bdbfe3a1abd7d2d66d569c', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitab00f29709bdbfe3a1abd7d2d66d569c', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInitab00f29709bdbfe3a1abd7d2d66d569c', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php'; require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitab00f29709bdbfe3a1abd7d2d66d569c::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInitab00f29709bdbfe3a1abd7d2d66d569c::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
}
$loader->register(true); $loader->register(true);
if ($useStaticLoader) { $filesToLoad = \Composer\Autoload\ComposerStaticInitab00f29709bdbfe3a1abd7d2d66d569c::$files;
$includeFiles = Composer\Autoload\ComposerStaticInitab00f29709bdbfe3a1abd7d2d66d569c::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
} else { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$includeFiles = require __DIR__ . '/autoload_files.php'; $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
} }
foreach ($includeFiles as $fileIdentifier => $file) { }, null, null);
composerRequireab00f29709bdbfe3a1abd7d2d66d569c($fileIdentifier, $file); foreach ($filesToLoad as $fileIdentifier => $file) {
$requireFile($fileIdentifier, $file);
} }
return $loader; return $loader;
} }
} }
function composerRequireab00f29709bdbfe3a1abd7d2d66d569c($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
}
}

View File

@@ -18,10 +18,20 @@ class ComposerStaticInitab00f29709bdbfe3a1abd7d2d66d569c
'chillerlan\\Settings\\' => 20, 'chillerlan\\Settings\\' => 20,
'chillerlan\\QRCode\\' => 18, 'chillerlan\\QRCode\\' => 18,
), ),
'Z' =>
array (
'ZipStream\\' => 10,
),
'P' => 'P' =>
array ( array (
'Psr\\SimpleCache\\' => 16,
'Psr\\Http\\Message\\' => 17, 'Psr\\Http\\Message\\' => 17,
'Psr\\Http\\Client\\' => 16, 'Psr\\Http\\Client\\' => 16,
'PhpOffice\\PhpSpreadsheet\\' => 25,
),
'M' =>
array (
'Matrix\\' => 7,
), ),
'G' => 'G' =>
array ( array (
@@ -29,6 +39,11 @@ class ComposerStaticInitab00f29709bdbfe3a1abd7d2d66d569c
'GuzzleHttp\\Promise\\' => 19, 'GuzzleHttp\\Promise\\' => 19,
'GuzzleHttp\\' => 11, 'GuzzleHttp\\' => 11,
), ),
'C' =>
array (
'Composer\\Pcre\\' => 14,
'Complex\\' => 8,
),
); );
public static $prefixDirsPsr4 = array ( public static $prefixDirsPsr4 = array (
@@ -40,6 +55,14 @@ class ComposerStaticInitab00f29709bdbfe3a1abd7d2d66d569c
array ( array (
0 => __DIR__ . '/..' . '/chillerlan/php-qrcode/src', 0 => __DIR__ . '/..' . '/chillerlan/php-qrcode/src',
), ),
'ZipStream\\' =>
array (
0 => __DIR__ . '/..' . '/maennchen/zipstream-php/src',
),
'Psr\\SimpleCache\\' =>
array (
0 => __DIR__ . '/..' . '/psr/simple-cache/src',
),
'Psr\\Http\\Message\\' => 'Psr\\Http\\Message\\' =>
array ( array (
0 => __DIR__ . '/..' . '/psr/http-factory/src', 0 => __DIR__ . '/..' . '/psr/http-factory/src',
@@ -49,6 +72,14 @@ class ComposerStaticInitab00f29709bdbfe3a1abd7d2d66d569c
array ( array (
0 => __DIR__ . '/..' . '/psr/http-client/src', 0 => __DIR__ . '/..' . '/psr/http-client/src',
), ),
'PhpOffice\\PhpSpreadsheet\\' =>
array (
0 => __DIR__ . '/..' . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet',
),
'Matrix\\' =>
array (
0 => __DIR__ . '/..' . '/markbaker/matrix/classes/src',
),
'GuzzleHttp\\Psr7\\' => 'GuzzleHttp\\Psr7\\' =>
array ( array (
0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src', 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
@@ -61,6 +92,14 @@ class ComposerStaticInitab00f29709bdbfe3a1abd7d2d66d569c
array ( array (
0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src', 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
), ),
'Composer\\Pcre\\' =>
array (
0 => __DIR__ . '/..' . '/composer/pcre/src',
),
'Complex\\' =>
array (
0 => __DIR__ . '/..' . '/markbaker/complex/classes/src',
),
); );
public static $classMap = array ( public static $classMap = array (

View File

@@ -166,6 +166,88 @@
], ],
"install-path": "../chillerlan/php-settings-container" "install-path": "../chillerlan/php-settings-container"
}, },
{
"name": "composer/pcre",
"version": "3.3.2",
"version_normalized": "3.3.2.0",
"source": {
"type": "git",
"url": "https://github.com/composer/pcre.git",
"reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e",
"reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e",
"shasum": ""
},
"require": {
"php": "^7.4 || ^8.0"
},
"conflict": {
"phpstan/phpstan": "<1.11.10"
},
"require-dev": {
"phpstan/phpstan": "^1.12 || ^2",
"phpstan/phpstan-strict-rules": "^1 || ^2",
"phpunit/phpunit": "^8 || ^9"
},
"time": "2024-11-12T16:29:46+00:00",
"type": "library",
"extra": {
"phpstan": {
"includes": [
"extension.neon"
]
},
"branch-alias": {
"dev-main": "3.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Composer\\Pcre\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "http://seld.be"
}
],
"description": "PCRE wrapping library that offers type-safe preg_* replacements.",
"keywords": [
"PCRE",
"preg",
"regex",
"regular expression"
],
"support": {
"issues": "https://github.com/composer/pcre/issues",
"source": "https://github.com/composer/pcre/tree/3.3.2"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"install-path": "./pcre"
},
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
"version": "7.8.1", "version": "7.8.1",
@@ -500,6 +582,309 @@
], ],
"install-path": "../guzzlehttp/psr7" "install-path": "../guzzlehttp/psr7"
}, },
{
"name": "maennchen/zipstream-php",
"version": "3.1.2",
"version_normalized": "3.1.2.0",
"source": {
"type": "git",
"url": "https://github.com/maennchen/ZipStream-PHP.git",
"reference": "aeadcf5c412332eb426c0f9b4485f6accba2a99f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/aeadcf5c412332eb426c0f9b4485f6accba2a99f",
"reference": "aeadcf5c412332eb426c0f9b4485f6accba2a99f",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"ext-zlib": "*",
"php-64bit": "^8.2"
},
"require-dev": {
"brianium/paratest": "^7.7",
"ext-zip": "*",
"friendsofphp/php-cs-fixer": "^3.16",
"guzzlehttp/guzzle": "^7.5",
"mikey179/vfsstream": "^1.6",
"php-coveralls/php-coveralls": "^2.5",
"phpunit/phpunit": "^11.0",
"vimeo/psalm": "^6.0"
},
"suggest": {
"guzzlehttp/psr7": "^2.4",
"psr/http-message": "^2.0"
},
"time": "2025-01-27T12:07:53+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"ZipStream\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Paul Duncan",
"email": "pabs@pablotron.org"
},
{
"name": "Jonatan Männchen",
"email": "jonatan@maennchen.ch"
},
{
"name": "Jesse Donat",
"email": "donatj@gmail.com"
},
{
"name": "András Kolesár",
"email": "kolesar@kolesar.hu"
}
],
"description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
"keywords": [
"stream",
"zip"
],
"support": {
"issues": "https://github.com/maennchen/ZipStream-PHP/issues",
"source": "https://github.com/maennchen/ZipStream-PHP/tree/3.1.2"
},
"funding": [
{
"url": "https://github.com/maennchen",
"type": "github"
}
],
"install-path": "../maennchen/zipstream-php"
},
{
"name": "markbaker/complex",
"version": "3.0.2",
"version_normalized": "3.0.2.0",
"source": {
"type": "git",
"url": "https://github.com/MarkBaker/PHPComplex.git",
"reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9",
"reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
"phpcompatibility/php-compatibility": "^9.3",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"squizlabs/php_codesniffer": "^3.7"
},
"time": "2022-12-06T16:21:08+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"Complex\\": "classes/src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mark Baker",
"email": "mark@lange.demon.co.uk"
}
],
"description": "PHP Class for working with complex numbers",
"homepage": "https://github.com/MarkBaker/PHPComplex",
"keywords": [
"complex",
"mathematics"
],
"support": {
"issues": "https://github.com/MarkBaker/PHPComplex/issues",
"source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2"
},
"install-path": "../markbaker/complex"
},
{
"name": "markbaker/matrix",
"version": "3.0.1",
"version_normalized": "3.0.1.0",
"source": {
"type": "git",
"url": "https://github.com/MarkBaker/PHPMatrix.git",
"reference": "728434227fe21be27ff6d86621a1b13107a2562c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c",
"reference": "728434227fe21be27ff6d86621a1b13107a2562c",
"shasum": ""
},
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
"phpcompatibility/php-compatibility": "^9.3",
"phpdocumentor/phpdocumentor": "2.*",
"phploc/phploc": "^4.0",
"phpmd/phpmd": "2.*",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
"sebastian/phpcpd": "^4.0",
"squizlabs/php_codesniffer": "^3.7"
},
"time": "2022-12-02T22:17:43+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"Matrix\\": "classes/src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mark Baker",
"email": "mark@demon-angel.eu"
}
],
"description": "PHP Class for working with matrices",
"homepage": "https://github.com/MarkBaker/PHPMatrix",
"keywords": [
"mathematics",
"matrix",
"vector"
],
"support": {
"issues": "https://github.com/MarkBaker/PHPMatrix/issues",
"source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1"
},
"install-path": "../markbaker/matrix"
},
{
"name": "phpoffice/phpspreadsheet",
"version": "5.1.0",
"version_normalized": "5.1.0.0",
"source": {
"type": "git",
"url": "https://github.com/PHPOffice/PhpSpreadsheet.git",
"reference": "fd26e45a814e94ae2aad0df757d9d1739c4bf2e0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fd26e45a814e94ae2aad0df757d9d1739c4bf2e0",
"reference": "fd26e45a814e94ae2aad0df757d9d1739c4bf2e0",
"shasum": ""
},
"require": {
"composer/pcre": "^1||^2||^3",
"ext-ctype": "*",
"ext-dom": "*",
"ext-fileinfo": "*",
"ext-gd": "*",
"ext-iconv": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-simplexml": "*",
"ext-xml": "*",
"ext-xmlreader": "*",
"ext-xmlwriter": "*",
"ext-zip": "*",
"ext-zlib": "*",
"maennchen/zipstream-php": "^2.1 || ^3.0",
"markbaker/complex": "^3.0",
"markbaker/matrix": "^3.0",
"php": "^8.1",
"psr/http-client": "^1.0",
"psr/http-factory": "^1.0",
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "dev-main",
"dompdf/dompdf": "^2.0 || ^3.0",
"friendsofphp/php-cs-fixer": "^3.2",
"mitoteam/jpgraph": "^10.3",
"mpdf/mpdf": "^8.1.1",
"phpcompatibility/php-compatibility": "^9.3",
"phpstan/phpstan": "^1.1 || ^2.0",
"phpstan/phpstan-deprecation-rules": "^1.0 || ^2.0",
"phpstan/phpstan-phpunit": "^1.0 || ^2.0",
"phpunit/phpunit": "^10.5",
"squizlabs/php_codesniffer": "^3.7",
"tecnickcom/tcpdf": "^6.5"
},
"suggest": {
"dompdf/dompdf": "Option for rendering PDF with PDF Writer",
"ext-intl": "PHP Internationalization Functions",
"mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers",
"mpdf/mpdf": "Option for rendering PDF with PDF Writer",
"tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer"
},
"time": "2025-09-04T05:34:49+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
"psr-4": {
"PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Maarten Balliauw",
"homepage": "https://blog.maartenballiauw.be"
},
{
"name": "Mark Baker",
"homepage": "https://markbakeruk.net"
},
{
"name": "Franck Lefevre",
"homepage": "https://rootslabs.net"
},
{
"name": "Erik Tilt"
},
{
"name": "Adrien Crivelli"
}
],
"description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
"homepage": "https://github.com/PHPOffice/PhpSpreadsheet",
"keywords": [
"OpenXML",
"excel",
"gnumeric",
"ods",
"php",
"spreadsheet",
"xls",
"xlsx"
],
"support": {
"issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues",
"source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/5.1.0"
},
"install-path": "../phpoffice/phpspreadsheet"
},
{ {
"name": "psr/http-client", "name": "psr/http-client",
"version": "1.0.3", "version": "1.0.3",
@@ -669,6 +1054,60 @@
}, },
"install-path": "../psr/http-message" "install-path": "../psr/http-message"
}, },
{
"name": "psr/simple-cache",
"version": "3.0.0",
"version_normalized": "3.0.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/simple-cache.git",
"reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865",
"reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865",
"shasum": ""
},
"require": {
"php": ">=8.0.0"
},
"time": "2021-10-29T13:26:27+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-4": {
"Psr\\SimpleCache\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common interfaces for simple caching",
"keywords": [
"cache",
"caching",
"psr",
"psr-16",
"simple-cache"
],
"support": {
"source": "https://github.com/php-fig/simple-cache/tree/3.0.0"
},
"install-path": "../psr/simple-cache"
},
{ {
"name": "ralouphie/getallheaders", "name": "ralouphie/getallheaders",
"version": "3.0.3", "version": "3.0.3",

View File

@@ -1,149 +1,198 @@
<?php return array( <?php return array(
'root' => 'root' => array(
array (
'pretty_version' => '1.0.0+no-version-set',
'version' => '1.0.0.0',
'aliases' =>
array (
),
'reference' => NULL,
'name' => '__root__', 'name' => '__root__',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '345d22958f13e73a704b1765b0b1b7420f6fa78d',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev' => true,
), ),
'versions' => 'versions' => array(
array ( '__root__' => array(
'__root__' => 'pretty_version' => 'dev-main',
array ( 'version' => 'dev-main',
'pretty_version' => '1.0.0+no-version-set', 'reference' => '345d22958f13e73a704b1765b0b1b7420f6fa78d',
'version' => '1.0.0.0', 'type' => 'library',
'aliases' => 'install_path' => __DIR__ . '/../../',
array ( 'aliases' => array(),
'dev_requirement' => false,
), ),
'reference' => NULL, 'chillerlan/php-qrcode' => array(
),
'chillerlan/php-qrcode' =>
array (
'pretty_version' => '5.0.1', 'pretty_version' => '5.0.1',
'version' => '5.0.1.0', 'version' => '5.0.1.0',
'aliases' =>
array (
),
'reference' => 'e81ed39ca3c94357aa021c7525fa9ffb451018d1', 'reference' => 'e81ed39ca3c94357aa021c7525fa9ffb451018d1',
'type' => 'library',
'install_path' => __DIR__ . '/../chillerlan/php-qrcode',
'aliases' => array(),
'dev_requirement' => false,
), ),
'chillerlan/php-settings-container' => 'chillerlan/php-settings-container' => array(
array (
'pretty_version' => '2.1.5', 'pretty_version' => '2.1.5',
'version' => '2.1.5.0', 'version' => '2.1.5.0',
'aliases' =>
array (
),
'reference' => 'f705310389264c3578fdd9ffb15aa2cd6d91772e', 'reference' => 'f705310389264c3578fdd9ffb15aa2cd6d91772e',
'type' => 'library',
'install_path' => __DIR__ . '/../chillerlan/php-settings-container',
'aliases' => array(),
'dev_requirement' => false,
), ),
'guzzlehttp/guzzle' => 'composer/pcre' => array(
array ( 'pretty_version' => '3.3.2',
'version' => '3.3.2.0',
'reference' => 'b2bed4734f0cc156ee1fe9c0da2550420d99a21e',
'type' => 'library',
'install_path' => __DIR__ . '/./pcre',
'aliases' => array(),
'dev_requirement' => false,
),
'guzzlehttp/guzzle' => array(
'pretty_version' => '7.8.1', 'pretty_version' => '7.8.1',
'version' => '7.8.1.0', 'version' => '7.8.1.0',
'aliases' =>
array (
),
'reference' => '41042bc7ab002487b876a0683fc8dce04ddce104', 'reference' => '41042bc7ab002487b876a0683fc8dce04ddce104',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
'aliases' => array(),
'dev_requirement' => false,
), ),
'guzzlehttp/promises' => 'guzzlehttp/promises' => array(
array (
'pretty_version' => '2.0.2', 'pretty_version' => '2.0.2',
'version' => '2.0.2.0', 'version' => '2.0.2.0',
'aliases' =>
array (
),
'reference' => 'bbff78d96034045e58e13dedd6ad91b5d1253223', 'reference' => 'bbff78d96034045e58e13dedd6ad91b5d1253223',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/promises',
'aliases' => array(),
'dev_requirement' => false,
), ),
'guzzlehttp/psr7' => 'guzzlehttp/psr7' => array(
array (
'pretty_version' => '2.6.2', 'pretty_version' => '2.6.2',
'version' => '2.6.2.0', 'version' => '2.6.2.0',
'aliases' =>
array (
),
'reference' => '45b30f99ac27b5ca93cb4831afe16285f57b8221', 'reference' => '45b30f99ac27b5ca93cb4831afe16285f57b8221',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/psr7',
'aliases' => array(),
'dev_requirement' => false,
), ),
'psr/http-client' => 'maennchen/zipstream-php' => array(
array ( 'pretty_version' => '3.1.2',
'version' => '3.1.2.0',
'reference' => 'aeadcf5c412332eb426c0f9b4485f6accba2a99f',
'type' => 'library',
'install_path' => __DIR__ . '/../maennchen/zipstream-php',
'aliases' => array(),
'dev_requirement' => false,
),
'markbaker/complex' => array(
'pretty_version' => '3.0.2',
'version' => '3.0.2.0',
'reference' => '95c56caa1cf5c766ad6d65b6344b807c1e8405b9',
'type' => 'library',
'install_path' => __DIR__ . '/../markbaker/complex',
'aliases' => array(),
'dev_requirement' => false,
),
'markbaker/matrix' => array(
'pretty_version' => '3.0.1',
'version' => '3.0.1.0',
'reference' => '728434227fe21be27ff6d86621a1b13107a2562c',
'type' => 'library',
'install_path' => __DIR__ . '/../markbaker/matrix',
'aliases' => array(),
'dev_requirement' => false,
),
'phpoffice/phpspreadsheet' => array(
'pretty_version' => '5.1.0',
'version' => '5.1.0.0',
'reference' => 'fd26e45a814e94ae2aad0df757d9d1739c4bf2e0',
'type' => 'library',
'install_path' => __DIR__ . '/../phpoffice/phpspreadsheet',
'aliases' => array(),
'dev_requirement' => false,
),
'psr/http-client' => array(
'pretty_version' => '1.0.3', 'pretty_version' => '1.0.3',
'version' => '1.0.3.0', 'version' => '1.0.3.0',
'aliases' =>
array (
),
'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90', 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-client',
'aliases' => array(),
'dev_requirement' => false,
), ),
'psr/http-client-implementation' => 'psr/http-client-implementation' => array(
array ( 'dev_requirement' => false,
'provided' => 'provided' => array(
array (
0 => '1.0', 0 => '1.0',
), ),
), ),
'psr/http-factory' => 'psr/http-factory' => array(
array (
'pretty_version' => '1.0.2', 'pretty_version' => '1.0.2',
'version' => '1.0.2.0', 'version' => '1.0.2.0',
'aliases' =>
array (
),
'reference' => 'e616d01114759c4c489f93b099585439f795fe35', 'reference' => 'e616d01114759c4c489f93b099585439f795fe35',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-factory',
'aliases' => array(),
'dev_requirement' => false,
), ),
'psr/http-factory-implementation' => 'psr/http-factory-implementation' => array(
array ( 'dev_requirement' => false,
'provided' => 'provided' => array(
array (
0 => '1.0', 0 => '1.0',
), ),
), ),
'psr/http-message' => 'psr/http-message' => array(
array (
'pretty_version' => '2.0', 'pretty_version' => '2.0',
'version' => '2.0.0.0', 'version' => '2.0.0.0',
'aliases' =>
array (
),
'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71', 'reference' => '402d35bcb92c70c026d1a6a9883f06b2ead23d71',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-message',
'aliases' => array(),
'dev_requirement' => false,
), ),
'psr/http-message-implementation' => 'psr/http-message-implementation' => array(
array ( 'dev_requirement' => false,
'provided' => 'provided' => array(
array (
0 => '1.0', 0 => '1.0',
), ),
), ),
'ralouphie/getallheaders' => 'psr/simple-cache' => array(
array ( 'pretty_version' => '3.0.0',
'version' => '3.0.0.0',
'reference' => '764e0b3939f5ca87cb904f570ef9be2d78a07865',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/simple-cache',
'aliases' => array(),
'dev_requirement' => false,
),
'ralouphie/getallheaders' => array(
'pretty_version' => '3.0.3', 'pretty_version' => '3.0.3',
'version' => '3.0.3.0', 'version' => '3.0.3.0',
'aliases' =>
array (
),
'reference' => '120b605dfeb996808c31b6477290a714d356e822', 'reference' => '120b605dfeb996808c31b6477290a714d356e822',
'type' => 'library',
'install_path' => __DIR__ . '/../ralouphie/getallheaders',
'aliases' => array(),
'dev_requirement' => false,
), ),
'symfony/deprecation-contracts' => 'symfony/deprecation-contracts' => array(
array (
'pretty_version' => 'v2.5.2', 'pretty_version' => 'v2.5.2',
'version' => '2.5.2.0', 'version' => '2.5.2.0',
'aliases' =>
array (
),
'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66', 'reference' => 'e8b495ea28c1d97b5e0c121748d6f9b53d075c66',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
'aliases' => array(),
'dev_requirement' => false,
), ),
'twbs/bootstrap' => 'twbs/bootstrap' => array(
array (
'pretty_version' => 'v4.6.2', 'pretty_version' => 'v4.6.2',
'version' => '4.6.2.0', 'version' => '4.6.2.0',
'aliases' =>
array (
),
'reference' => 'e5643aaa89eb67327a5b4abe7db976f0ea276b70', 'reference' => 'e5643aaa89eb67327a5b4abe7db976f0ea276b70',
'type' => 'library',
'install_path' => __DIR__ . '/../twbs/bootstrap',
'aliases' => array(),
'dev_requirement' => false,
), ),
'twitter/bootstrap' => 'twitter/bootstrap' => array(
array ( 'dev_requirement' => false,
'replaced' => 'replaced' => array(
array (
0 => 'v4.6.2', 0 => 'v4.6.2',
), ),
), ),

View File

@@ -4,8 +4,12 @@
$issues = array(); $issues = array();
if (!(PHP_VERSION_ID >= 70400)) { if (!(PHP_VERSION_ID >= 80200)) {
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; $issues[] = 'Your Composer dependencies require a PHP version ">= 8.2.0". You are running ' . PHP_VERSION . '.';
}
if (PHP_INT_SIZE !== 8) {
$issues[] = 'Your Composer dependencies require a 64-bit build of PHP.';
} }
if ($issues) { if ($issues) {