diff --git a/composer.json b/composer.json index af07345..1d16c90 100644 --- a/composer.json +++ b/composer.json @@ -11,16 +11,16 @@ "require": { "php": ">=8.1", "ext-yaml": "*", - "phpoffice/phpspreadsheet": "^1.27" + "phpoffice/phpspreadsheet": "^1.28" }, "require-dev": { - "phpunit/phpunit": "^9.6", - "symfony/var-dumper": "^6.2", - "phpstan/phpstan": "^1.9", + "phpunit/phpunit": "^9.6.6", + "symfony/var-dumper": "^6.2.8", + "phpstan/phpstan": "^1.10.11", "phpstan/extension-installer": "^1.2", - "phpstan/phpstan-phpunit": "^1.3", - "squizlabs/php_codesniffer": "^3.7", - "friendsofphp/php-cs-fixer": "^3.14", + "phpstan/phpstan-phpunit": "^1.3.11", + "squizlabs/php_codesniffer": "^3.7.2", + "friendsofphp/php-cs-fixer": "^3.16", "dealerdirect/phpcodesniffer-composer-installer": "^1.0", "phpunit/php-code-coverage": "*" }, diff --git a/composer.lock b/composer.lock index e69a98c..7240241 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b1516628d5cd4b9f8c5c7ca7a4fa5b02", + "content-hash": "dd26291797c275fb138619e7ab15fe57", "packages": [ { "name": "ezyang/htmlpurifier", @@ -317,16 +317,16 @@ }, { "name": "phpoffice/phpspreadsheet", - "version": "1.27.0", + "version": "1.28.0", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "eeb8582f9cabf5a7f4ef78015691163233a1834f" + "reference": "6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/eeb8582f9cabf5a7f4ef78015691163233a1834f", - "reference": "eeb8582f9cabf5a7f4ef78015691163233a1834f", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a", + "reference": "6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a", "shasum": "" }, "require": { @@ -353,7 +353,7 @@ "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "dealerdirect/phpcodesniffer-composer-installer": "dev-main", "dompdf/dompdf": "^1.0 || ^2.0", "friendsofphp/php-cs-fixer": "^3.2", "mitoteam/jpgraph": "^10.2.4", @@ -416,9 +416,9 @@ ], "support": { "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.27.0" + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.28.0" }, - "time": "2023-01-24T20:07:45+00:00" + "time": "2023-02-25T12:24:49+00:00" }, { "name": "psr/http-client", @@ -529,25 +529,25 @@ }, { "name": "psr/http-message", - "version": "1.0.1", + "version": "1.1", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", + "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -576,9 +576,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/master" + "source": "https://github.com/php-fig/http-message/tree/1.1" }, - "time": "2016-08-06T14:39:51+00:00" + "time": "2023-04-04T09:50:52+00:00" }, { "name": "psr/simple-cache", @@ -1154,16 +1154,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.14.3", + "version": "v3.16.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "b418036b95b4936a33fe906245d3044395935e73" + "reference": "d40f9436e1c448d309fa995ab9c14c5c7a96f2dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/b418036b95b4936a33fe906245d3044395935e73", - "reference": "b418036b95b4936a33fe906245d3044395935e73", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/d40f9436e1c448d309fa995ab9c14c5c7a96f2dc", + "reference": "d40f9436e1c448d309fa995ab9c14c5c7a96f2dc", "shasum": "" }, "require": { @@ -1174,7 +1174,7 @@ "ext-json": "*", "ext-tokenizer": "*", "php": "^7.4 || ^8.0", - "sebastian/diff": "^4.0", + "sebastian/diff": "^4.0 || ^5.0", "symfony/console": "^5.4 || ^6.0", "symfony/event-dispatcher": "^5.4 || ^6.0", "symfony/filesystem": "^5.4 || ^6.0", @@ -1230,9 +1230,15 @@ } ], "description": "A tool to automatically fix PHP code style", + "keywords": [ + "Static code analysis", + "fixer", + "standards", + "static analysis" + ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.14.3" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.16.0" }, "funding": [ { @@ -1240,20 +1246,20 @@ "type": "github" } ], - "time": "2023-01-30T00:24:29+00:00" + "time": "2023-04-02T19:30:06+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.0", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { @@ -1291,7 +1297,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, "funding": [ { @@ -1299,20 +1305,20 @@ "type": "tidelift" } ], - "time": "2022-03-03T13:19:32+00:00" + "time": "2023-03-08T13:26:56+00:00" }, { "name": "nikic/php-parser", - "version": "v4.15.3", + "version": "v4.15.4", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039" + "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039", - "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290", + "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290", "shasum": "" }, "require": { @@ -1353,9 +1359,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4" }, - "time": "2023-01-16T22:05:37+00:00" + "time": "2023-03-05T19:49:14+00:00" }, { "name": "phar-io/manifest", @@ -1514,16 +1520,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.9.14", + "version": "1.10.11", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "e5fcc96289cf737304286a9b505fbed091f02e58" + "reference": "8aa62e6ea8b58ffb650e02940e55a788cbc3fe21" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e5fcc96289cf737304286a9b505fbed091f02e58", - "reference": "e5fcc96289cf737304286a9b505fbed091f02e58", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8aa62e6ea8b58ffb650e02940e55a788cbc3fe21", + "reference": "8aa62e6ea8b58ffb650e02940e55a788cbc3fe21", "shasum": "" }, "require": { @@ -1552,8 +1558,11 @@ "static analysis" ], "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.9.14" + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" }, "funding": [ { @@ -1569,25 +1578,25 @@ "type": "tidelift" } ], - "time": "2023-01-19T10:47:09+00:00" + "time": "2023-04-04T19:17:42+00:00" }, { "name": "phpstan/phpstan-phpunit", - "version": "1.3.3", + "version": "1.3.11", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "54a24bd23e9e80ee918cdc24f909d376c2e273f7" + "reference": "9e1b9de6d260461f6e99b6a8f2dbb0bbb98b579c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/54a24bd23e9e80ee918cdc24f909d376c2e273f7", - "reference": "54a24bd23e9e80ee918cdc24f909d376c2e273f7", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/9e1b9de6d260461f6e99b6a8f2dbb0bbb98b579c", + "reference": "9e1b9de6d260461f6e99b6a8f2dbb0bbb98b579c", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.9.3" + "phpstan/phpstan": "^1.10" }, "conflict": { "phpunit/phpunit": "<7.0" @@ -1619,29 +1628,29 @@ "description": "PHPUnit extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.3" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.11" }, - "time": "2022-12-21T15:25:00+00:00" + "time": "2023-03-25T19:42:13+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.24", + "version": "9.2.26", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed" + "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed", - "reference": "2cf940ebc6355a9d430462811b5aaa308b174bed", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", + "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.14", + "nikic/php-parser": "^4.15", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -1656,8 +1665,8 @@ "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { @@ -1690,7 +1699,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26" }, "funding": [ { @@ -1698,7 +1707,7 @@ "type": "github" } ], - "time": "2023-01-26T08:26:55+00:00" + "time": "2023-03-06T12:58:08+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1943,16 +1952,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.3", + "version": "9.6.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e7b1615e3e887d6c719121c6d4a44b0ab9645555" + "reference": "b65d59a059d3004a040c16a82e07bbdf6cfdd115" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7b1615e3e887d6c719121c6d4a44b0ab9645555", - "reference": "e7b1615e3e887d6c719121c6d4a44b0ab9645555", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b65d59a059d3004a040c16a82e07bbdf6cfdd115", + "reference": "b65d59a059d3004a040c16a82e07bbdf6cfdd115", "shasum": "" }, "require": { @@ -1985,8 +1994,8 @@ "sebastian/version": "^3.0.2" }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "bin": [ "phpunit" @@ -2025,7 +2034,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.3" + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.6" }, "funding": [ { @@ -2041,7 +2051,7 @@ "type": "tidelift" } ], - "time": "2023-02-04T13:37:15+00:00" + "time": "2023-03-27T11:43:46+00:00" }, { "name": "psr/cache", @@ -3211,16 +3221,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.7.1", + "version": "3.7.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619" + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619", - "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", "shasum": "" }, "require": { @@ -3256,27 +3266,28 @@ "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "keywords": [ "phpcs", - "standards" + "standards", + "static analysis" ], "support": { "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2022-06-18T07:21:10+00:00" + "time": "2023-02-22T23:07:41+00:00" }, { "name": "symfony/console", - "version": "v6.2.5", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3e294254f2191762c1d137aed4b94e966965e985" + "reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3e294254f2191762c1d137aed4b94e966965e985", - "reference": "3e294254f2191762c1d137aed4b94e966965e985", + "url": "https://api.github.com/repos/symfony/console/zipball/3582d68a64a86ec25240aaa521ec8bc2342b369b", + "reference": "3582d68a64a86ec25240aaa521ec8bc2342b369b", "shasum": "" }, "require": { @@ -3338,12 +3349,12 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command line", + "command-line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.2.5" + "source": "https://github.com/symfony/console/tree/v6.2.8" }, "funding": [ { @@ -3359,20 +3370,20 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:38:09+00:00" + "time": "2023-03-29T21:42:15+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.2.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", - "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", + "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", "shasum": "" }, "require": { @@ -3410,7 +3421,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.1" }, "funding": [ { @@ -3426,20 +3437,20 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2023-03-01T10:25:55+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.2.5", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "f02d108b5e9fd4a6245aa73a9d2df2ec060c3e68" + "reference": "04046f35fd7d72f9646e721fc2ecb8f9c67d3339" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f02d108b5e9fd4a6245aa73a9d2df2ec060c3e68", - "reference": "f02d108b5e9fd4a6245aa73a9d2df2ec060c3e68", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/04046f35fd7d72f9646e721fc2ecb8f9c67d3339", + "reference": "04046f35fd7d72f9646e721fc2ecb8f9c67d3339", "shasum": "" }, "require": { @@ -3493,7 +3504,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.2.5" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.2.8" }, "funding": [ { @@ -3509,20 +3520,20 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:38:09+00:00" + "time": "2023-03-20T16:06:02+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.2.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "0782b0b52a737a05b4383d0df35a474303cabdae" + "reference": "0ad3b6f1e4e2da5690fefe075cd53a238646d8dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0782b0b52a737a05b4383d0df35a474303cabdae", - "reference": "0782b0b52a737a05b4383d0df35a474303cabdae", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0ad3b6f1e4e2da5690fefe075cd53a238646d8dd", + "reference": "0ad3b6f1e4e2da5690fefe075cd53a238646d8dd", "shasum": "" }, "require": { @@ -3572,7 +3583,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.2.1" }, "funding": [ { @@ -3588,20 +3599,20 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2023-03-01T10:32:47+00:00" }, { "name": "symfony/filesystem", - "version": "v6.2.5", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "e59e8a4006afd7f5654786a83b4fcb8da98f4593" + "reference": "82b6c62b959f642d000456f08c6d219d749215b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/e59e8a4006afd7f5654786a83b4fcb8da98f4593", - "reference": "e59e8a4006afd7f5654786a83b4fcb8da98f4593", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/82b6c62b959f642d000456f08c6d219d749215b3", + "reference": "82b6c62b959f642d000456f08c6d219d749215b3", "shasum": "" }, "require": { @@ -3635,7 +3646,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.2.5" + "source": "https://github.com/symfony/filesystem/tree/v6.2.7" }, "funding": [ { @@ -3651,20 +3662,20 @@ "type": "tidelift" } ], - "time": "2023-01-20T17:45:48+00:00" + "time": "2023-02-14T08:44:56+00:00" }, { "name": "symfony/finder", - "version": "v6.2.5", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "c90dc446976a612e3312a97a6ec0069ab0c2099c" + "reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/c90dc446976a612e3312a97a6ec0069ab0c2099c", - "reference": "c90dc446976a612e3312a97a6ec0069ab0c2099c", + "url": "https://api.github.com/repos/symfony/finder/zipball/20808dc6631aecafbe67c186af5dcb370be3a0eb", + "reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb", "shasum": "" }, "require": { @@ -3699,7 +3710,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.2.5" + "source": "https://github.com/symfony/finder/tree/v6.2.7" }, "funding": [ { @@ -3715,20 +3726,20 @@ "type": "tidelift" } ], - "time": "2023-01-20T17:45:48+00:00" + "time": "2023-02-16T09:57:23+00:00" }, { "name": "symfony/options-resolver", - "version": "v6.2.5", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "e8324d44f5af99ec2ccec849934a242f64458f86" + "reference": "aa0e85b53bbb2b4951960efd61d295907eacd629" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/e8324d44f5af99ec2ccec849934a242f64458f86", - "reference": "e8324d44f5af99ec2ccec849934a242f64458f86", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/aa0e85b53bbb2b4951960efd61d295907eacd629", + "reference": "aa0e85b53bbb2b4951960efd61d295907eacd629", "shasum": "" }, "require": { @@ -3766,7 +3777,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v6.2.5" + "source": "https://github.com/symfony/options-resolver/tree/v6.2.7" }, "funding": [ { @@ -3782,7 +3793,7 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:38:09+00:00" + "time": "2023-02-14T08:44:56+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4278,16 +4289,16 @@ }, { "name": "symfony/process", - "version": "v6.2.5", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "9ead139f63dfa38c4e4a9049cc64a8b2748c83b7" + "reference": "75ed64103df4f6615e15a7fe38b8111099f47416" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/9ead139f63dfa38c4e4a9049cc64a8b2748c83b7", - "reference": "9ead139f63dfa38c4e4a9049cc64a8b2748c83b7", + "url": "https://api.github.com/repos/symfony/process/zipball/75ed64103df4f6615e15a7fe38b8111099f47416", + "reference": "75ed64103df4f6615e15a7fe38b8111099f47416", "shasum": "" }, "require": { @@ -4319,7 +4330,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.2.5" + "source": "https://github.com/symfony/process/tree/v6.2.8" }, "funding": [ { @@ -4335,20 +4346,20 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:38:09+00:00" + "time": "2023-03-09T16:20:02+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.2.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75" + "reference": "a8c9cedf55f314f3a186041d19537303766df09a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/aac98028c69df04ee77eb69b96b86ee51fbf4b75", - "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a8c9cedf55f314f3a186041d19537303766df09a", + "reference": "a8c9cedf55f314f3a186041d19537303766df09a", "shasum": "" }, "require": { @@ -4404,7 +4415,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.2.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.2.1" }, "funding": [ { @@ -4420,20 +4431,20 @@ "type": "tidelift" } ], - "time": "2022-11-25T10:21:52+00:00" + "time": "2023-03-01T10:32:47+00:00" }, { "name": "symfony/stopwatch", - "version": "v6.2.5", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "00b6ac156aacffc53487c930e0ab14587a6607f6" + "reference": "f3adc98c1061875dd2edcd45e5b04e63d0e29f8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/00b6ac156aacffc53487c930e0ab14587a6607f6", - "reference": "00b6ac156aacffc53487c930e0ab14587a6607f6", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f3adc98c1061875dd2edcd45e5b04e63d0e29f8f", + "reference": "f3adc98c1061875dd2edcd45e5b04e63d0e29f8f", "shasum": "" }, "require": { @@ -4466,7 +4477,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.2.5" + "source": "https://github.com/symfony/stopwatch/tree/v6.2.7" }, "funding": [ { @@ -4482,20 +4493,20 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:36:55+00:00" + "time": "2023-02-14T08:44:56+00:00" }, { "name": "symfony/string", - "version": "v6.2.5", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0" + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", - "reference": "b2dac0fa27b1ac0f9c0c0b23b43977f12308d0b0", + "url": "https://api.github.com/repos/symfony/string/zipball/193e83bbd6617d6b2151c37fff10fa7168ebddef", + "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef", "shasum": "" }, "require": { @@ -4552,7 +4563,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.2.5" + "source": "https://github.com/symfony/string/tree/v6.2.8" }, "funding": [ { @@ -4568,20 +4579,20 @@ "type": "tidelift" } ], - "time": "2023-01-01T08:38:09+00:00" + "time": "2023-03-20T16:06:02+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.2.5", + "version": "v6.2.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "44b7b81749fd20c1bdf4946c041050e22bc8da27" + "reference": "d37ab6787be2db993747b6218fcc96e8e3bb4bd0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/44b7b81749fd20c1bdf4946c041050e22bc8da27", - "reference": "44b7b81749fd20c1bdf4946c041050e22bc8da27", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/d37ab6787be2db993747b6218fcc96e8e3bb4bd0", + "reference": "d37ab6787be2db993747b6218fcc96e8e3bb4bd0", "shasum": "" }, "require": { @@ -4640,7 +4651,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.2.5" + "source": "https://github.com/symfony/var-dumper/tree/v6.2.8" }, "funding": [ { @@ -4656,7 +4667,7 @@ "type": "tidelift" } ], - "time": "2023-01-20T17:45:48+00:00" + "time": "2023-03-29T21:42:15+00:00" }, { "name": "theseer/tokenizer", diff --git a/src/PowerParser.php b/src/PowerParser.php index b276f29..6c42df2 100644 --- a/src/PowerParser.php +++ b/src/PowerParser.php @@ -4,6 +4,8 @@ use HusamAwadhi\PowerParser\Blueprint\Blueprint; use HusamAwadhi\PowerParser\Blueprint\BlueprintBuilder; +use HusamAwadhi\PowerParser\Blueprint\BlueprintHelper; +use HusamAwadhi\PowerParser\Parser\Extension\Spreadsheet\Spreadsheet; use HusamAwadhi\PowerParser\Parser\ParserBuilder; class PowerParser implements PowerParserInterface @@ -11,17 +13,32 @@ class PowerParser implements PowerParserInterface /** * @inheritDoc */ - public function getParserBuilder(int $maxFileLength = 15_000): ParserBuilder - { - return new ParserBuilder(maxFileLength: 15_000); + public static function getParserBuilder( + string $stream, + string $file, + int $maxFileLength = 15_000, + ?BlueprintBuilder $blueprintBuilder = null, + ?BlueprintHelper $blueprintHelper = null, + ): ParserBuilder { + return (new ParserBuilder(maxFileLength: $maxFileLength)) + ->registerExtension(ext: new Spreadsheet()) + ->addBlueprint( + blueprint: self::createBlueprint( + stream: $stream, + builder: ($blueprintBuilder ?? new BlueprintBuilder( + $blueprintHelper ?? new BlueprintHelper() + )) + ) + ) + ->addFile(path: $file); } /** * @inheritDoc */ - public function createBlueprint(string $stream, BlueprintBuilder $builder, bool $isPath = false): Blueprint + public static function createBlueprint(string $stream, BlueprintBuilder $builder): Blueprint { - if ($isPath) { + if (is_file($stream) && is_readable($stream)) { $builder->load($stream); } else { $builder->parse($stream); diff --git a/src/PowerParserInterface.php b/src/PowerParserInterface.php index 36c06d2..88663ad 100644 --- a/src/PowerParserInterface.php +++ b/src/PowerParserInterface.php @@ -4,17 +4,25 @@ use HusamAwadhi\PowerParser\Blueprint\Blueprint; use HusamAwadhi\PowerParser\Blueprint\BlueprintBuilder; +use HusamAwadhi\PowerParser\Blueprint\BlueprintHelper; use HusamAwadhi\PowerParser\Parser\ParserBuilder; interface PowerParserInterface { /** - * get PowerParser parser builder. + * get PowerParser parser builder. it adds default extension + * and load blueprint in the process. */ - public function getParserBuilder(int $maxFileLength = 15_000): ParserBuilder; + public static function getParserBuilder( + string $stream, + string $file, + int $maxFileLength = 15_000, + ?BlueprintBuilder $blueprintBuilder = null, + ?BlueprintHelper $blueprintHelper = null, + ): ParserBuilder; /** * create PowerParser blueprint object. */ - public function createBlueprint(string $stream, BlueprintBuilder $builder, bool $isPath = false): Blueprint; + public static function createBlueprint(string $stream, BlueprintBuilder $builder): Blueprint; } diff --git a/tests/Parser/ParserTest.php b/tests/Parser/ParserTest.php index f1ff634..9aa33f8 100644 --- a/tests/Parser/ParserTest.php +++ b/tests/Parser/ParserTest.php @@ -201,93 +201,93 @@ public function parsedCSVContentDataProvider(): array ], "info" => [ [ - 12000, + "12000", "Grier", "Arvo", "Grier.Arvo@email.com", "developer", - 31, + "31", "2022-12-17" ], [ - 12001, + "12001", "Tierney", "Tremayne", "Tierney.Tremayne@email.com", "worker", - 51, + "51", "2022-08-28" ], [ - 12002, + "12002", "Rori", "Virgin", "Rori.Virgin@email.com", "police officer", - 18, + "18", "2022-07-11" ], [ - 12003, + "12003", "Doralynne", "Tiffa", "Doralynne.Tiffa@email.com", "doctor", - 50, + "50", "2023-01-25" ], [ - 12004, + "12004", "Ardenia", "O'Rourke", "Ardenia.O'Rourke@email.com", "doctor", - 36, + "36", "2022-09-07" ], [ - 12005, + "12005", "Dale", "Francyne", "Dale.Francyne@email.com", "firefighter", - 54, + "54", "2022-02-12" ], [ - 12006, + "12006", "Kittie", "Yorick", "Kittie.Yorick@email.com", "doctor", - 58, + "58", "2022-03-27" ], [ - 12007, + "12007", "Layla", "Krystle", "Layla.Krystle@email.com", "doctor", - 45, + "45", "2022-09-27" ], [ - 12008, + "12008", "Rosene", "Donell", "Rosene.Donell@email.com", "doctor", - 40, + "40", "2022-12-24" ], [ - 12009, + "12009", "Jessamyn", "McCutcheon", "Jessamyn.McCutcheon@email.com", "developer", - 21, + "21", "2022-11-23" ] ] @@ -351,227 +351,227 @@ public function parsedExcelContentDataProvider(): array { return [ [[ - "header_info" => ["currency" => "SR", "cashier" => 1], - "balance_info" => ["opening_balance" => 9152.251285], + "header_info" => ["currency" => "SR", "cashier" => "1"], + "balance_info" => ["opening_balance" => "9152.251285"], "transaction_table" => [ [ "date" => "21/09/2022", - "type" => "Journal Entry", "document_number" => 30, + "type" => "Journal Entry", "document_number" => "30", "description" => "Cash purchase invoices", "reference_number" => null, - "credit" => 23380.63, + "credit" => "23380.63", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Payment Voucher", - "document_number" => 331, + "document_number" => "331", "description" => null, "reference_number" => null, "credit" => null, - "debit" => 580, + "debit" => "580", ], [ "date" => "21/09/2022", "type" => "Payment Voucher", - "document_number" => 332, + "document_number" => "332", "description" => null, "reference_number" => null, "credit" => null, - "debit" => 980, + "debit" => "980", ], [ "date" => "21/09/2022", "type" => "Payment Voucher", - "document_number" => 333, + "document_number" => "333", "description" => null, "reference_number" => null, "credit" => null, - "debit" => 170, + "debit" => "170", ], [ "date" => "21/09/2022", "type" => "Invoice", - "document_number" => 3627, + "document_number" => "3627", "description" => "Sales", "reference_number" => null, - "credit" => 639.997, + "credit" => "639.997", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Invoice", - "document_number" => 3628, + "document_number" => "3628", "description" => "Sales", "reference_number" => null, - "credit" => 45.011, + "credit" => "45.011", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Invoice", - "document_number" => 3629, + "document_number" => "3629", "description" => "Sales", "reference_number" => null, - "credit" => 460, + "credit" => "460", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Invoice", - "document_number" => 3630, + "document_number" => "3630", "description" => "Sales", "reference_number" => null, - "credit" => 28.014, + "credit" => "28.014", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Invoice", - "document_number" => 3631, + "document_number" => "3631", "description" => "Sales", "reference_number" => null, - "credit" => 227.0035, + "credit" => "227.0035", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Invoice", - "document_number" => 3632, + "document_number" => "3632", "description" => "Sales", "reference_number" => null, - "credit" => 28.014, + "credit" => "28.014", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Invoice", - "document_number" => 3633, + "document_number" => "3633", "description" => "Sales", "reference_number" => null, - "credit" => 280.002, + "credit" => "280.002", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Invoice", - "document_number" => 3634, + "document_number" => "3634", "description" => "Sales", "reference_number" => null, - "credit" => 104.9985, + "credit" => "104.9985", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Invoice", - "document_number" => 3635, + "document_number" => "3635", "description" => "Sales", "reference_number" => null, - "credit" => 220, + "credit" => "220", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Invoice", - "document_number" => 3636, + "document_number" => "3636", "description" => "Sales", "reference_number" => null, - "credit" => 140, + "credit" => "140", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Invoice", - "document_number" => 3637, + "document_number" => "3637", "description" => "Sales", "reference_number" => null, - "credit" => 708.009, + "credit" => "708.009", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Invoice", - "document_number" => 3638, + "document_number" => "3638", "description" => "Sales", "reference_number" => null, - "credit" => 1360.013, + "credit" => "1360.013", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Invoice", - "document_number" => 3639, + "document_number" => "3639", "description" => "Sales", "reference_number" => null, - "credit" => 152.076, + "credit" => "152.076", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Invoice", - "document_number" => 3640, + "document_number" => "3640", "description" => "Sales", "reference_number" => null, - "credit" => 90.022, + "credit" => "90.022", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Invoice", - "document_number" => 3641, + "document_number" => "3641", "description" => "Sales", "reference_number" => null, - "credit" => 460, + "credit" => "460", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Invoice", - "document_number" => 3642, + "document_number" => "3642", "description" => "Sales", "reference_number" => null, - "credit" => 180.09, + "credit" => "180.09", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Invoice", - "document_number" => 3643, + "document_number" => "3643", "description" => "Sales", "reference_number" => null, - "credit" => 432.331, + "credit" => "432.331", "debit" => null, ], [ "date" => "21/09/2022", "type" => "Return", - "document_number" => 248, + "document_number" => "248", "description" => "Return for Invoice No. 3625", "reference_number" => null, "credit" => null, - "debit" => 269.9985, + "debit" => "269.9985", ], [ "date" => "21/09/2022", "type" => "Return", - "document_number" => 249, + "document_number" => "249", "description" => "Return", "reference_number" => null, "credit" => null, - "debit" => 100.004, + "debit" => "100.004", ], [ "date" => "21/09/2022", "type" => "Return", - "document_number" => 250, + "document_number" => "250", "description" => "Return for Invoice No. 3599", "reference_number" => null, "credit" => null, - "debit" => 992.0015, + "debit" =>"992.0015", ], [ "date" => "21/09/2022", "type" => "Return", - "document_number" => 251, + "document_number" => "251", "description" => "Return for Invoice No. 3631", "reference_number" => null, "credit" => null, - "debit" => 111.996, + "debit" => "111.996", ], [ "date" => "21/09/2022", "type" => "Purchase", - "document_number" => 127, + "document_number" => "127", "description" => null, "reference_number" => null, "credit" => null, - "debit" => 1030.63, + "debit" => "1030.63", ], [ "date" => "21/09/2022", "type" => "Purchase", - "document_number" => 128, + "document_number" => "128", "description" => null, "reference_number" => null, "credit" => null, - "debit" => 22350, + "debit" => "22350", ] ], - "total" => ["total_credit" => 28936.211, "total_debit" => 26584.63] + "total" => ["total_credit" => "28936.211", "total_debit" => "26584.63"] ]] ]; } diff --git a/tests/PowerParserTest.php b/tests/PowerParserTest.php index f3faf04..9c3e805 100644 --- a/tests/PowerParserTest.php +++ b/tests/PowerParserTest.php @@ -24,7 +24,10 @@ protected function setUp(): void public function testSuccessfullyCreateParserBuilder() { - $builder = $this->powerParser->getParserBuilder(); + $builder = $this->powerParser->getParserBuilder( + $this->blueprintsDirectory . 'valid.yaml', + $this->excelFile + ); $this->assertInstanceOf(ParserBuilder::class, $builder); } @@ -33,8 +36,7 @@ public function testSuccessfullyCreateBlueprint() { $blueprint = $this->powerParser->createBlueprint( $this->blueprintsDirectory . 'valid.yaml', - new BlueprintBuilder(new BlueprintHelper()), - true + new BlueprintBuilder(new BlueprintHelper()) ); $this->assertInstanceOf(BlueprintInterface::class, $blueprint);