From e3e0a2f39a113ff58f0faa6639700e7ff6701202 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 8 Apr 2025 10:43:25 +0200 Subject: [PATCH] #7454 @1 --- .docker/production/docker-compose.yml | 2 +- .../Commands/ConvertArchivesToFluidbook.php | 34 ++++ composer.lock | 177 +++++++++--------- config/fluidbook.php | 6 + 4 files changed, 131 insertions(+), 88 deletions(-) create mode 100644 app/Console/Commands/ConvertArchivesToFluidbook.php create mode 100644 config/fluidbook.php diff --git a/.docker/production/docker-compose.yml b/.docker/production/docker-compose.yml index 81fd17f..ae65817 100644 --- a/.docker/production/docker-compose.yml +++ b/.docker/production/docker-compose.yml @@ -83,7 +83,7 @@ services: restart: unless-stopped adminer: - image: 'shyim/adminerevo' + image: 'adminer' container_name: presquot-adminer restart: unless-stopped depends_on: diff --git a/app/Console/Commands/ConvertArchivesToFluidbook.php b/app/Console/Commands/ConvertArchivesToFluidbook.php new file mode 100644 index 0000000..c190490 --- /dev/null +++ b/app/Console/Commands/ConvertArchivesToFluidbook.php @@ -0,0 +1,34 @@ +getFluidbookByReference($pdf->slug); + if ($fluidbook) { + continue; + } + $path=\Storage::disk('local')->path($pdf->pdfPath); + dd($client->createFluidbook( + new \SplFileInfo($path), + config('fluidbook.base_fluidbook'), + $pdf->title, + config('fluidbook.external_server'), + $pdf->slug, + ['reference' => $pdf->slug] + )); + } + } + +} diff --git a/composer.lock b/composer.lock index f604757..305899a 100644 --- a/composer.lock +++ b/composer.lock @@ -344,16 +344,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.342.7", + "version": "3.342.21", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "4d42e384dac1e71107226ed72ed5e8e4d4ee3358" + "reference": "f4d501414c553ddeea2efc9c77f72e58bd899823" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/4d42e384dac1e71107226ed72ed5e8e4d4ee3358", - "reference": "4d42e384dac1e71107226ed72ed5e8e4d4ee3358", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/f4d501414c553ddeea2efc9c77f72e58bd899823", + "reference": "f4d501414c553ddeea2efc9c77f72e58bd899823", "shasum": "" }, "require": { @@ -435,9 +435,9 @@ "support": { "forum": "https://github.com/aws/aws-sdk-php/discussions", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.342.7" + "source": "https://github.com/aws/aws-sdk-php/tree/3.342.21" }, - "time": "2025-03-17T18:18:04+00:00" + "time": "2025-04-04T18:20:53+00:00" }, { "name": "biscolab/laravel-recaptcha", @@ -1202,13 +1202,13 @@ "source": { "type": "git", "url": "git://git.cubedesigners.com/cubist_util.git", - "reference": "58cc7cb26196ccf3b4b4463db4f51d31ba5257ee" + "reference": "384b10bfbbde94dc5e6c5a5243e13e2e09ce05ec" }, "dist": { "type": "tar", - "url": "https://composer.cubedesigners.com/dist/cubist/util/cubist-util-dev-master-9d1d24.tar", - "reference": "58cc7cb26196ccf3b4b4463db4f51d31ba5257ee", - "shasum": "da558afabb012eaf9c1ec24d3c8908ed5c32d4e1" + "url": "https://composer.cubedesigners.com/dist/cubist/util/cubist-util-dev-master-7f60e6.tar", + "reference": "384b10bfbbde94dc5e6c5a5243e13e2e09ce05ec", + "shasum": "9afcfe19c9da616d24014dc93173326040d483dd" }, "require": { "cubist/net": "dev-master", @@ -1242,7 +1242,7 @@ } ], "description": "Utilities class", - "time": "2025-03-13T16:12:48+00:00" + "time": "2025-04-01T10:29:05+00:00" }, { "name": "dflydev/dot-access-data", @@ -2246,13 +2246,13 @@ "source": { "type": "git", "url": "git://git.cubedesigners.com/fluidbook_toolboxapiclient.git", - "reference": "1c85c844f895bcea6704ba5994bbd628e3fecfd7" + "reference": "7d9108f6a6ff1e38218ae25dac59075ad013c60d" }, "dist": { "type": "tar", - "url": "https://composer.cubedesigners.com/dist/fluidbook/toolboxapiclient/fluidbook-toolboxapiclient-dev-master-ed747c.tar", - "reference": "1c85c844f895bcea6704ba5994bbd628e3fecfd7", - "shasum": "c7bd286e5ea4f134b18b408ae01ee7625185e64f" + "url": "https://composer.cubedesigners.com/dist/fluidbook/toolboxapiclient/fluidbook-toolboxapiclient-dev-master-807914.tar", + "reference": "7d9108f6a6ff1e38218ae25dac59075ad013c60d", + "shasum": "751b550a2348c1763acfe71f0a551abdb8f34b58" }, "require": { "ext-json": "*", @@ -2277,7 +2277,7 @@ } ], "description": "Fluidbook Toolbox API Client", - "time": "2024-10-29T13:37:45+00:00" + "time": "2025-04-07T15:09:06+00:00" }, { "name": "fruitcake/laravel-cors", @@ -2641,16 +2641,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.9.2", + "version": "7.9.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", "shasum": "" }, "require": { @@ -2747,7 +2747,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + "source": "https://github.com/guzzle/guzzle/tree/7.9.3" }, "funding": [ { @@ -2763,20 +2763,20 @@ "type": "tidelift" } ], - "time": "2024-07-24T11:22:20+00:00" + "time": "2025-03-27T13:37:11+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.4", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "url": "https://api.github.com/repos/guzzle/promises/zipball/7c69f28996b0a6920945dd20b3857e499d9ca96c", + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c", "shasum": "" }, "require": { @@ -2830,7 +2830,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.4" + "source": "https://github.com/guzzle/promises/tree/2.2.0" }, "funding": [ { @@ -2846,20 +2846,20 @@ "type": "tidelift" } ], - "time": "2024-10-17T10:06:22+00:00" + "time": "2025-03-27T13:27:01+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.7.0", + "version": "2.7.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/c2270caaabe631b3b44c85f99e5a04bbb8060d16", + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16", "shasum": "" }, "require": { @@ -2946,7 +2946,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.7.0" + "source": "https://github.com/guzzle/psr7/tree/2.7.1" }, "funding": [ { @@ -2962,7 +2962,7 @@ "type": "tidelift" } ], - "time": "2024-07-18T11:15:46+00:00" + "time": "2025-03-27T12:30:47+00:00" }, { "name": "html2text/html2text", @@ -3308,16 +3308,16 @@ }, { "name": "jean85/pretty-package-versions", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/Jean85/pretty-package-versions.git", - "reference": "3c4e5f62ba8d7de1734312e4fff32f67a8daaf10" + "reference": "4d7aa5dab42e2a76d99559706022885de0e18e1a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/3c4e5f62ba8d7de1734312e4fff32f67a8daaf10", - "reference": "3c4e5f62ba8d7de1734312e4fff32f67a8daaf10", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/4d7aa5dab42e2a76d99559706022885de0e18e1a", + "reference": "4d7aa5dab42e2a76d99559706022885de0e18e1a", "shasum": "" }, "require": { @@ -3327,8 +3327,9 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^3.2", "jean85/composer-provided-replaced-stub-package": "^1.0", - "phpstan/phpstan": "^1.4", + "phpstan/phpstan": "^2.0", "phpunit/phpunit": "^7.5|^8.5|^9.6", + "rector/rector": "^2.0", "vimeo/psalm": "^4.3 || ^5.0" }, "type": "library", @@ -3361,9 +3362,9 @@ ], "support": { "issues": "https://github.com/Jean85/pretty-package-versions/issues", - "source": "https://github.com/Jean85/pretty-package-versions/tree/2.1.0" + "source": "https://github.com/Jean85/pretty-package-versions/tree/2.1.1" }, - "time": "2024-11-18T16:19:46+00:00" + "time": "2025-03-19T14:43:43+00:00" }, { "name": "judev/php-htmltruncator", @@ -4146,16 +4147,16 @@ }, { "name": "laravel/socialite", - "version": "v5.18.0", + "version": "v5.19.0", "source": { "type": "git", "url": "https://github.com/laravel/socialite.git", - "reference": "7809dc71250e074cd42970f0f803f2cddc04c5de" + "reference": "c40f843c5643fb6b089e46ce9794b8408bf08319" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/socialite/zipball/7809dc71250e074cd42970f0f803f2cddc04c5de", - "reference": "7809dc71250e074cd42970f0f803f2cddc04c5de", + "url": "https://api.github.com/repos/laravel/socialite/zipball/c40f843c5643fb6b089e46ce9794b8408bf08319", + "reference": "c40f843c5643fb6b089e46ce9794b8408bf08319", "shasum": "" }, "require": { @@ -4172,7 +4173,7 @@ "require-dev": { "mockery/mockery": "^1.0", "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0|^9.0|^10.0", - "phpstan/phpstan": "^1.10", + "phpstan/phpstan": "^1.12.23", "phpunit/phpunit": "^8.0|^9.3|^10.4|^11.5" }, "type": "library", @@ -4214,7 +4215,7 @@ "issues": "https://github.com/laravel/socialite/issues", "source": "https://github.com/laravel/socialite" }, - "time": "2025-02-11T13:38:19+00:00" + "time": "2025-03-27T17:26:42+00:00" }, { "name": "laravel/tinker", @@ -5792,16 +5793,16 @@ }, { "name": "moneyphp/money", - "version": "v4.6.0", + "version": "v4.7.0", "source": { "type": "git", "url": "https://github.com/moneyphp/money.git", - "reference": "ddf6a86b574808f8844777ed4e8c4f92a10dac9b" + "reference": "af048f0206d3b39b8fad9de6a230cedf765365fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/moneyphp/money/zipball/ddf6a86b574808f8844777ed4e8c4f92a10dac9b", - "reference": "ddf6a86b574808f8844777ed4e8c4f92a10dac9b", + "url": "https://api.github.com/repos/moneyphp/money/zipball/af048f0206d3b39b8fad9de6a230cedf765365fa", + "reference": "af048f0206d3b39b8fad9de6a230cedf765365fa", "shasum": "" }, "require": { @@ -5823,10 +5824,12 @@ "php-http/message": "^1.16.0", "php-http/mock-client": "^1.6.0", "phpbench/phpbench": "^1.2.5", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1.9", + "phpstan/phpstan-phpunit": "^2.0", "phpunit/phpunit": "^10.5.9", - "psalm/plugin-phpunit": "^0.18.4", "psr/cache": "^1.0.1 || ^2.0 || ^3.0", - "vimeo/psalm": "~5.20.0" + "ticketswap/phpstan-error-formatter": "^1.1" }, "suggest": { "ext-gmp": "Calculate without integer limits", @@ -5874,9 +5877,9 @@ ], "support": { "issues": "https://github.com/moneyphp/money/issues", - "source": "https://github.com/moneyphp/money/tree/v4.6.0" + "source": "https://github.com/moneyphp/money/tree/v4.7.0" }, - "time": "2024-11-22T10:59:03+00:00" + "time": "2025-04-03T08:26:36+00:00" }, { "name": "monolog/monolog", @@ -6280,16 +6283,16 @@ }, { "name": "nette/utils", - "version": "v4.0.5", + "version": "v4.0.6", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96" + "reference": "ce708655043c7050eb050df361c5e313cf708309" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/736c567e257dbe0fcf6ce81b4d6dbe05c6899f96", - "reference": "736c567e257dbe0fcf6ce81b4d6dbe05c6899f96", + "url": "https://api.github.com/repos/nette/utils/zipball/ce708655043c7050eb050df361c5e313cf708309", + "reference": "ce708655043c7050eb050df361c5e313cf708309", "shasum": "" }, "require": { @@ -6360,9 +6363,9 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.0.5" + "source": "https://github.com/nette/utils/tree/v4.0.6" }, - "time": "2024-08-07T15:39:19+00:00" + "time": "2025-03-30T21:06:30+00:00" }, { "name": "nikic/php-parser", @@ -8549,16 +8552,16 @@ }, { "name": "ramsey/collection", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "3c5990b8a5e0b79cd1cf11c2dc1229e58e93f109" + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/3c5990b8a5e0b79cd1cf11c2dc1229e58e93f109", - "reference": "3c5990b8a5e0b79cd1cf11c2dc1229e58e93f109", + "url": "https://api.github.com/repos/ramsey/collection/zipball/344572933ad0181accbf4ba763e85a0306a8c5e2", + "reference": "344572933ad0181accbf4ba763e85a0306a8c5e2", "shasum": "" }, "require": { @@ -8619,9 +8622,9 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/2.1.0" + "source": "https://github.com/ramsey/collection/tree/2.1.1" }, - "time": "2025-03-02T04:48:29+00:00" + "time": "2025-03-22T05:38:12+00:00" }, { "name": "ramsey/uuid", @@ -8717,16 +8720,16 @@ }, { "name": "sabberworm/php-css-parser", - "version": "v8.7.0", + "version": "v8.8.0", "source": { "type": "git", "url": "https://github.com/MyIntervals/PHP-CSS-Parser.git", - "reference": "f414ff953002a9b18e3a116f5e462c56f21237cf" + "reference": "3de493bdddfd1f051249af725c7e0d2c38fed740" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/f414ff953002a9b18e3a116f5e462c56f21237cf", - "reference": "f414ff953002a9b18e3a116f5e462c56f21237cf", + "url": "https://api.github.com/repos/MyIntervals/PHP-CSS-Parser/zipball/3de493bdddfd1f051249af725c7e0d2c38fed740", + "reference": "3de493bdddfd1f051249af725c7e0d2c38fed740", "shasum": "" }, "require": { @@ -8734,7 +8737,7 @@ "php": "^5.6.20 || ^7.0.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "require-dev": { - "phpunit/phpunit": "5.7.27 || 6.5.14 || 7.5.20 || 8.5.40" + "phpunit/phpunit": "5.7.27 || 6.5.14 || 7.5.20 || 8.5.41" }, "suggest": { "ext-mbstring": "for parsing UTF-8 CSS" @@ -8776,9 +8779,9 @@ ], "support": { "issues": "https://github.com/MyIntervals/PHP-CSS-Parser/issues", - "source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v8.7.0" + "source": "https://github.com/MyIntervals/PHP-CSS-Parser/tree/v8.8.0" }, - "time": "2024-10-27T17:38:32+00:00" + "time": "2025-03-23T17:59:05+00:00" }, { "name": "sentry/sdk", @@ -12321,16 +12324,16 @@ }, { "name": "symfony/var-exporter", - "version": "v6.4.19", + "version": "v6.4.20", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "be6e71b0c257884c1107313de5d247741cfea172" + "reference": "998df255e9e6a15a36ae35e9c6cd818c17cf92a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/be6e71b0c257884c1107313de5d247741cfea172", - "reference": "be6e71b0c257884c1107313de5d247741cfea172", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/998df255e9e6a15a36ae35e9c6cd818c17cf92a2", + "reference": "998df255e9e6a15a36ae35e9c6cd818c17cf92a2", "shasum": "" }, "require": { @@ -12378,7 +12381,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v6.4.19" + "source": "https://github.com/symfony/var-exporter/tree/v6.4.20" }, "funding": [ { @@ -12394,7 +12397,7 @@ "type": "tidelift" } ], - "time": "2025-02-13T09:33:32+00:00" + "time": "2025-03-13T09:55:08+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -13162,16 +13165,16 @@ }, { "name": "composer/class-map-generator", - "version": "1.6.0", + "version": "1.6.1", "source": { "type": "git", "url": "https://github.com/composer/class-map-generator.git", - "reference": "ffe442c5974c44a9343e37a0abcb1cc37319f5b9" + "reference": "134b705ddb0025d397d8318a75825fe3c9d1da34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/class-map-generator/zipball/ffe442c5974c44a9343e37a0abcb1cc37319f5b9", - "reference": "ffe442c5974c44a9343e37a0abcb1cc37319f5b9", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/134b705ddb0025d397d8318a75825fe3c9d1da34", + "reference": "134b705ddb0025d397d8318a75825fe3c9d1da34", "shasum": "" }, "require": { @@ -13215,7 +13218,7 @@ ], "support": { "issues": "https://github.com/composer/class-map-generator/issues", - "source": "https://github.com/composer/class-map-generator/tree/1.6.0" + "source": "https://github.com/composer/class-map-generator/tree/1.6.1" }, "funding": [ { @@ -13231,7 +13234,7 @@ "type": "tidelift" } ], - "time": "2025-02-05T10:05:34+00:00" + "time": "2025-03-24T13:50:44+00:00" }, { "name": "doctrine/instantiator", @@ -15699,6 +15702,6 @@ "ext-dom": "*", "ext-json": "*" }, - "platform-dev": [], + "platform-dev": {}, "plugin-api-version": "2.6.0" } diff --git a/config/fluidbook.php b/config/fluidbook.php new file mode 100644 index 0000000..be5097b --- /dev/null +++ b/config/fluidbook.php @@ -0,0 +1,6 @@ + env('FLUIDBOOK_TOOLBOX_API_TOKEN'), + 'base_fluidbook' => env('FLUIDBOOK_TOOLBOX_BASE_FLUIDBOOK'), + 'external_server' => env('FLUIDBOOK_TOOLBOX_EXTERNAL_SERVER'), +]; -- 2.39.5