Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9443682

Browse files
committed
Maintenance: Addressed a range of deprecations
Updated deps to address deprecations fixed in newer Laravel framework version.
1 parent 0311e3d commit 9443682

File tree

5 files changed

+49
-35
lines changed

5 files changed

+49
-35
lines changed

app/Exports/ZipExports/ZipExportBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected function build(): string
7676

7777
$zipFile = tempnam(sys_get_temp_dir(), 'bszip-');
7878
$zip = new ZipArchive();
79-
$opened = $zip->open($zipFile, ZipArchive::CREATE);
79+
$opened = $zip->open($zipFile, ZipArchive::OVERWRITE);
8080
if ($opened !== true) {
8181
throw new ZipExportException('Failed to create zip file for export.');
8282
}

composer.lock

Lines changed: 44 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

database/factories/Entities/Models/PageFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Database\Factories\Entities\Models;
44

5+
use BookStack\Entities\Tools\PageEditorType;
56
use Illuminate\Database\Eloquent\Factories\Factory;
67
use Illuminate\Support\Str;
78

@@ -29,6 +30,7 @@ public function definition()
2930
'html' => $html,
3031
'text' => strip_tags($html),
3132
'revision_count' => 1,
33+
'editor' => 'wysiwyg',
3234
];
3335
}
3436
}

tests/Exports/ZipImportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function test_error_shown_if_missing_data()
7676
{
7777
$zipFile = tempnam(sys_get_temp_dir(), 'bstest-');
7878
$zip = new ZipArchive();
79-
$zip->open($zipFile, ZipArchive::CREATE);
79+
$zip->open($zipFile, ZipArchive::OVERWRITE);
8080
$zip->addFromString('beans', 'cat');
8181
$zip->close();
8282

tests/Exports/ZipTestHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static function zipUploadFromData(array $data, array $files = []): Upload
4646
$zipFile = tempnam(sys_get_temp_dir(), 'bstest-');
4747

4848
$zip = new ZipArchive();
49-
$zip->open($zipFile, ZipArchive::CREATE);
49+
$zip->open($zipFile, ZipArchive::OVERWRITE);
5050
$zip->addFromString('data.json', json_encode($data));
5151

5252
foreach ($files as $name => $file) {

0 commit comments

Comments
 (0)