1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-12-04 05:22:38 +03:00

Maintenance: Addressed a range of deprecations

Updated deps to address deprecations fixed in newer Laravel framework
version.
This commit is contained in:
Dan Brown
2025-08-15 12:20:35 +01:00
parent 0311e3d2d7
commit 9443682ae4
5 changed files with 49 additions and 35 deletions

View File

@@ -76,7 +76,7 @@ class ZipExportBuilder
$zipFile = tempnam(sys_get_temp_dir(), 'bszip-'); $zipFile = tempnam(sys_get_temp_dir(), 'bszip-');
$zip = new ZipArchive(); $zip = new ZipArchive();
$opened = $zip->open($zipFile, ZipArchive::CREATE); $opened = $zip->open($zipFile, ZipArchive::OVERWRITE);
if ($opened !== true) { if ($opened !== true) {
throw new ZipExportException('Failed to create zip file for export.'); throw new ZipExportException('Failed to create zip file for export.');
} }

76
composer.lock generated
View File

@@ -62,16 +62,16 @@
}, },
{ {
"name": "aws/aws-sdk-php", "name": "aws/aws-sdk-php",
"version": "3.352.5", "version": "3.354.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/aws/aws-sdk-php.git", "url": "https://github.com/aws/aws-sdk-php.git",
"reference": "e226dcc96c0a1165d9c8248ec637d1006b883609" "reference": "014ce3465277cf78a05e60c04ce04c9893733bf2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/e226dcc96c0a1165d9c8248ec637d1006b883609", "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/014ce3465277cf78a05e60c04ce04c9893733bf2",
"reference": "e226dcc96c0a1165d9c8248ec637d1006b883609", "reference": "014ce3465277cf78a05e60c04ce04c9893733bf2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -153,9 +153,9 @@
"support": { "support": {
"forum": "https://github.com/aws/aws-sdk-php/discussions", "forum": "https://github.com/aws/aws-sdk-php/discussions",
"issues": "https://github.com/aws/aws-sdk-php/issues", "issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.352.5" "source": "https://github.com/aws/aws-sdk-php/tree/3.354.0"
}, },
"time": "2025-08-08T18:09:38+00:00" "time": "2025-08-14T18:10:08+00:00"
}, },
{ {
"name": "bacon/bacon-qr-code", "name": "bacon/bacon-qr-code",
@@ -1739,16 +1739,16 @@
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",
"version": "v11.45.1", "version": "v11.45.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/framework.git", "url": "https://github.com/laravel/framework.git",
"reference": "b09ba32795b8e71df10856a2694706663984a239" "reference": "d134bf11e2208c0c5bd488cf19e612ca176b820a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/b09ba32795b8e71df10856a2694706663984a239", "url": "https://api.github.com/repos/laravel/framework/zipball/d134bf11e2208c0c5bd488cf19e612ca176b820a",
"reference": "b09ba32795b8e71df10856a2694706663984a239", "reference": "d134bf11e2208c0c5bd488cf19e612ca176b820a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1856,7 +1856,7 @@
"league/flysystem-read-only": "^3.25.1", "league/flysystem-read-only": "^3.25.1",
"league/flysystem-sftp-v3": "^3.25.1", "league/flysystem-sftp-v3": "^3.25.1",
"mockery/mockery": "^1.6.10", "mockery/mockery": "^1.6.10",
"orchestra/testbench-core": "^9.13.2", "orchestra/testbench-core": "^9.16.0",
"pda/pheanstalk": "^5.0.6", "pda/pheanstalk": "^5.0.6",
"php-http/discovery": "^1.15", "php-http/discovery": "^1.15",
"phpstan/phpstan": "^2.0", "phpstan/phpstan": "^2.0",
@@ -1950,7 +1950,7 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2025-06-03T14:01:40+00:00" "time": "2025-08-13T20:28:00+00:00"
}, },
{ {
"name": "laravel/prompts", "name": "laravel/prompts",
@@ -3540,16 +3540,16 @@
}, },
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
"version": "v5.6.0", "version": "v5.6.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nikic/PHP-Parser.git", "url": "https://github.com/nikic/PHP-Parser.git",
"reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56" "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/221b0d0fdf1369c71047ad1d18bb5880017bbc56", "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2",
"reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56", "reference": "f103601b29efebd7ff4a1ca7b3eeea9e3336a2a2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3568,7 +3568,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "5.0-dev" "dev-master": "5.x-dev"
} }
}, },
"autoload": { "autoload": {
@@ -3592,9 +3592,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/nikic/PHP-Parser/issues", "issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v5.6.0" "source": "https://github.com/nikic/PHP-Parser/tree/v5.6.1"
}, },
"time": "2025-07-27T20:03:57+00:00" "time": "2025-08-13T20:13:15+00:00"
}, },
{ {
"name": "nunomaduro/termwind", "name": "nunomaduro/termwind",
@@ -9024,16 +9024,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "11.5.31", "version": "11.5.32",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "fc44414e0779e94640663b809557b0b599548260" "reference": "101e132dcf9e74a1eb3a309b4f686114ae8f7f36"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fc44414e0779e94640663b809557b0b599548260", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/101e132dcf9e74a1eb3a309b4f686114ae8f7f36",
"reference": "fc44414e0779e94640663b809557b0b599548260", "reference": "101e132dcf9e74a1eb3a309b4f686114ae8f7f36",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -9105,7 +9105,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy", "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.31" "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.32"
}, },
"funding": [ "funding": [
{ {
@@ -9129,7 +9129,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-08-11T05:27:39+00:00" "time": "2025-08-12T07:32:49+00:00"
}, },
{ {
"name": "sebastian/cli-parser", "name": "sebastian/cli-parser",
@@ -9908,23 +9908,23 @@
}, },
{ {
"name": "sebastian/recursion-context", "name": "sebastian/recursion-context",
"version": "6.0.2", "version": "6.0.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git", "url": "https://github.com/sebastianbergmann/recursion-context.git",
"reference": "694d156164372abbd149a4b85ccda2e4670c0e16" "reference": "f6458abbf32a6c8174f8f26261475dc133b3d9dc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/694d156164372abbd149a4b85ccda2e4670c0e16", "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/f6458abbf32a6c8174f8f26261475dc133b3d9dc",
"reference": "694d156164372abbd149a4b85ccda2e4670c0e16", "reference": "f6458abbf32a6c8174f8f26261475dc133b3d9dc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=8.2" "php": ">=8.2"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^11.0" "phpunit/phpunit": "^11.3"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@@ -9960,15 +9960,27 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/recursion-context/issues", "issues": "https://github.com/sebastianbergmann/recursion-context/issues",
"security": "https://github.com/sebastianbergmann/recursion-context/security/policy", "security": "https://github.com/sebastianbergmann/recursion-context/security/policy",
"source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.2" "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.3"
}, },
"funding": [ "funding": [
{ {
"url": "https://github.com/sebastianbergmann", "url": "https://github.com/sebastianbergmann",
"type": "github" "type": "github"
},
{
"url": "https://liberapay.com/sebastianbergmann",
"type": "liberapay"
},
{
"url": "https://thanks.dev/u/gh/sebastianbergmann",
"type": "thanks_dev"
},
{
"url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context",
"type": "tidelift"
} }
], ],
"time": "2024-07-03T05:10:34+00:00" "time": "2025-08-13T04:42:22+00:00"
}, },
{ {
"name": "sebastian/type", "name": "sebastian/type",

View File

@@ -2,6 +2,7 @@
namespace Database\Factories\Entities\Models; namespace Database\Factories\Entities\Models;
use BookStack\Entities\Tools\PageEditorType;
use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str; use Illuminate\Support\Str;
@@ -29,6 +30,7 @@ class PageFactory extends Factory
'html' => $html, 'html' => $html,
'text' => strip_tags($html), 'text' => strip_tags($html),
'revision_count' => 1, 'revision_count' => 1,
'editor' => 'wysiwyg',
]; ];
} }
} }

View File

@@ -76,7 +76,7 @@ class ZipImportTest extends TestCase
{ {
$zipFile = tempnam(sys_get_temp_dir(), 'bstest-'); $zipFile = tempnam(sys_get_temp_dir(), 'bstest-');
$zip = new ZipArchive(); $zip = new ZipArchive();
$zip->open($zipFile, ZipArchive::CREATE); $zip->open($zipFile, ZipArchive::OVERWRITE);
$zip->addFromString('beans', 'cat'); $zip->addFromString('beans', 'cat');
$zip->close(); $zip->close();

View File

@@ -46,7 +46,7 @@ class ZipTestHelper
$zipFile = tempnam(sys_get_temp_dir(), 'bstest-'); $zipFile = tempnam(sys_get_temp_dir(), 'bstest-');
$zip = new ZipArchive(); $zip = new ZipArchive();
$zip->open($zipFile, ZipArchive::CREATE); $zip->open($zipFile, ZipArchive::OVERWRITE);
$zip->addFromString('data.json', json_encode($data)); $zip->addFromString('data.json', json_encode($data));
foreach ($files as $name => $file) { foreach ($files as $name => $file) {