Skip to content

Commit 8347fb9

Browse files
authored
chore(deps): Vendor-Updates (#6517)
1 parent 960b717 commit 8347fb9

41 files changed

Lines changed: 718 additions & 984 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.tools/phpstan/baseline/argument.type.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,26 @@
33
declare(strict_types=1);
44

55
$ignoreErrors = [];
6+
$ignoreErrors[] = [
7+
'rawMessage' => 'Parameter #1 $job of method rex_cronjob_manager_sql::tryExecuteJob() expects array{id: int, interval: string, name: string, parameters: string|null, type: class-string<rex_cronjob>}, array<string, bool|float|int|string|null> given.',
8+
'count' => 1,
9+
'path' => __DIR__ . '/../../../redaxo/src/addons/cronjob/lib/manager_sql.php',
10+
];
11+
$ignoreErrors[] = [
12+
'rawMessage' => 'Parameter #1 $job of method rex_cronjob_manager_sql::tryExecuteJob() expects array{id: int, interval: string, name: string, parameters: string|null, type: class-string<rex_cronjob>}, non-empty-array<string, bool|float|int|string|null> given.',
13+
'count' => 2,
14+
'path' => __DIR__ . '/../../../redaxo/src/addons/cronjob/lib/manager_sql.php',
15+
];
16+
$ignoreErrors[] = [
17+
'rawMessage' => 'Parameter #1 $data of static method rex_media_service::addMedia() expects array{category_id: int, title: string, file: array{name: string, path?: string, tmp_name?: string, error?: int}}, non-empty-array given.',
18+
'count' => 1,
19+
'path' => __DIR__ . '/../../../redaxo/src/addons/mediapool/functions/function_rex_mediapool.php',
20+
];
21+
$ignoreErrors[] = [
22+
'rawMessage' => 'Parameter #2 $data of static method rex_media_service::updateMedia() expects array{category_id: int, title: string, file?: array{name: string, path?: string, tmp_name?: string, error?: int}}, array{category_id: mixed, title: mixed, file?: non-empty-array} given.',
23+
'count' => 1,
24+
'path' => __DIR__ . '/../../../redaxo/src/addons/mediapool/functions/function_rex_mediapool.php',
25+
];
626
$ignoreErrors[] = [
727
'rawMessage' => 'Parameter #2 $createCallback of static method rex_media::getInstance() expects (callable(mixed ...): (static|null))|null, Closure(mixed): (static|null) given.',
828
'count' => 1,
@@ -38,6 +58,11 @@
3858
'count' => 1,
3959
'path' => __DIR__ . '/../../../redaxo/src/addons/mediapool/lib/service_media.php',
4060
];
61+
$ignoreErrors[] = [
62+
'rawMessage' => 'Parameter #1 $data of static method rex_media_service::addMedia() expects array{category_id: int, title: string, file: array{name: string, path?: string, tmp_name?: string, error?: int}}, array{title: mixed, category_id: int, filename: mixed, file: array{name: mixed, path: non-empty-string}} given.',
63+
'count' => 1,
64+
'path' => __DIR__ . '/../../../redaxo/src/addons/mediapool/pages/sync.php',
65+
];
4166
$ignoreErrors[] = [
4267
'rawMessage' => 'Parameter #2 $createCallback of static method rex_structure_element::getInstance() expects (callable(mixed ...): (static|null))|null, Closure(mixed, mixed): (static|null) given.',
4368
'count' => 1,
@@ -68,6 +93,11 @@
6893
'count' => 1,
6994
'path' => __DIR__ . '/../../../redaxo/src/core/lib/autoload.php',
7095
];
96+
$ignoreErrors[] = [
97+
'rawMessage' => 'Parameter #1 $options of method rex_form_options_element::addOptions() expects array<array{0: string, 1?: int|string}|string>, list<array<int, bool|float|int|string|null>> given.',
98+
'count' => 2,
99+
'path' => __DIR__ . '/../../../redaxo/src/core/lib/form/elements/options.php',
100+
];
71101
$ignoreErrors[] = [
72102
'rawMessage' => 'Parameter #1 $options of method rex_password_policy::__construct() expects array<string, array{min?: int, max?: int}>, array{no_reuse_of_last?: int, no_reuse_within?: string, force_renew_after?: string, block_account_after?: string} given.',
73103
'count' => 1,

.tools/phpstan/baseline/assign.propertyType.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
declare(strict_types=1);
44

55
$ignoreErrors = [];
6+
$ignoreErrors[] = [
7+
'rawMessage' => 'Static property rex_install_packages::$addPackages (array<string, array{name: string, author: string, shortdescription: string, description: string, website: string, counter: int, created: string, updated: string, ...}>|null) does not accept array<string, array{name: string, author: string, shortdescription: string, description: string, website: string, counter: int, created: string, updated: string, ...}>.',
8+
'count' => 1,
9+
'path' => __DIR__ . '/../../../redaxo/src/addons/install/lib/packages.php',
10+
];
11+
$ignoreErrors[] = [
12+
'rawMessage' => 'Static property rex_install_packages::$updatePackages (array<string, array{name: string, author: string, shortdescription: string, description: string, website: string, counter: int, created: string, updated: string, ...}>|null) does not accept array<string, array{name: string, author: string, shortdescription: string, description: string, website: string, counter: int, created: string, updated: string, ...}>.',
13+
'count' => 1,
14+
'path' => __DIR__ . '/../../../redaxo/src/addons/install/lib/packages.php',
15+
];
616
$ignoreErrors[] = [
717
'rawMessage' => 'Static property rex_media::$instances (array<class-string, array<string, static(rex_media)|null>>) does not accept array<class-string, array<string, rex_media|null>>.',
818
'count' => 1,

.tools/phpstan/baseline/missingType.iterableValue.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -873,11 +873,6 @@
873873
'count' => 1,
874874
'path' => __DIR__ . '/../../../redaxo/src/core/lib/fragment.php',
875875
];
876-
$ignoreErrors[] = [
877-
'rawMessage' => 'Method rex_list::addColumn() has parameter $columnLayout with no value type specified in iterable type array.',
878-
'count' => 1,
879-
'path' => __DIR__ . '/../../../redaxo/src/core/lib/list.php',
880-
];
881876
$ignoreErrors[] = [
882877
'rawMessage' => 'Method rex_list::addTableColumnGroup() has parameter $columns with no value type specified in iterable type array.',
883878
'count' => 1,
@@ -918,11 +913,6 @@
918913
'count' => 1,
919914
'path' => __DIR__ . '/../../../redaxo/src/core/lib/list.php',
920915
];
921-
$ignoreErrors[] = [
922-
'rawMessage' => 'Method rex_list::setColumnLayout() has parameter $columnLayout with no value type specified in iterable type array.',
923-
'count' => 1,
924-
'path' => __DIR__ . '/../../../redaxo/src/core/lib/list.php',
925-
];
926916
$ignoreErrors[] = [
927917
'rawMessage' => 'Method rex_list::setColumnParams() has parameter $params with no value type specified in iterable type array.',
928918
'count' => 1,

.tools/phpstan/baseline/return.type.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@
33
declare(strict_types=1);
44

55
$ignoreErrors = [];
6+
$ignoreErrors[] = [
7+
'rawMessage' => 'Method rex_install_packages::getAddPackages() should return array<string, array{name: string, author: string, shortdescription: string, description: string, website: string, counter: int, created: string, updated: string, ...}> but returns array<string, array{name: string, author: string, shortdescription: string, description: string, website: string, counter: int, created: string, updated: string, ...}>.',
8+
'count' => 1,
9+
'path' => __DIR__ . '/../../../redaxo/src/addons/install/lib/packages.php',
10+
];
11+
$ignoreErrors[] = [
12+
'rawMessage' => 'Method rex_login::getCookieParams() should return array{lifetime: int|null, path: string|null, domain: string|null, secure: bool|null, httponly: bool|null, samesite: string|null} but returns array{lifetime: mixed, path: mixed, domain: mixed, secure: mixed, httponly: mixed, samesite: mixed, ...<mixed>}.',
13+
'count' => 1,
14+
'path' => __DIR__ . '/../../../redaxo/src/core/lib/login/login.php',
15+
];
16+
$ignoreErrors[] = [
17+
'rawMessage' => 'Method rex_package::splitId() should return array{string, string|null} but returns non-empty-list<string|null>.',
18+
'count' => 1,
19+
'path' => __DIR__ . '/../../../redaxo/src/core/lib/packages/package.php',
20+
];
621
$ignoreErrors[] = [
722
'rawMessage' => 'Method rex_socket::factory() should return static(rex_socket) but returns rex_socket_proxy.',
823
'count' => 1,

.tools/psalm/baseline.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4384,9 +4384,6 @@
43844384
<PossiblyNullOperand>
43854385
<code><![CDATA[$sortType]]></code>
43864386
</PossiblyNullOperand>
4387-
<PropertyTypeCoercion>
4388-
<code><![CDATA[$this->columnLayouts]]></code>
4389-
</PropertyTypeCoercion>
43904387
</file>
43914388
<file src="redaxo/src/core/lib/login/api_has_user_session.php">
43924389
<MixedArgument>

composer.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,38 @@
1313
"require-dev": {
1414
"jetbrains/phpstorm-attributes": "^1.2",
1515
"phpstan/extension-installer": "1.4.3",
16-
"phpstan/phpstan": "2.1.54",
16+
"phpstan/phpstan": "2.2.1",
1717
"phpstan/phpstan-deprecation-rules": "2.0.4",
1818
"phpstan/phpstan-phpunit": "2.0.16",
19-
"phpstan/phpstan-symfony": "2.0.15",
20-
"phpunit/phpunit": "^12.5.17 || ^13.1.8",
19+
"phpstan/phpstan-symfony": "2.0.18",
20+
"phpunit/phpunit": "^12.5.17 || ^13.1.13",
2121
"psalm/plugin-phpunit": "0.19.7",
2222
"psalm/plugin-symfony": "v5.3.0",
23-
"rector/rector": "2.4.2",
23+
"rector/rector": "2.4.5",
2424
"redaxo/php-cs-fixer-config": "3.0.0",
2525
"redaxo/psalm-plugin": "2.2.0",
2626
"shipmonk/phpstan-baseline-per-identifier": "2.3.0",
2727
"vimeo/psalm": "6.16.1"
2828
},
2929
"replace": {
30-
"composer/ca-bundle": "1.5.11",
30+
"composer/ca-bundle": "1.5.12",
3131
"enshrined/svg-sanitize": "0.22.0",
3232
"erusev/parsedown": "1.8.0",
3333
"erusev/parsedown-extra": "0.9.0",
3434
"filp/whoops": "2.18.4",
3535
"itsgoingd/clockwork": "v5.3.5",
3636
"lbuchs/webauthn": "v2.2.0",
37-
"phpmailer/phpmailer": "v7.0.2",
37+
"phpmailer/phpmailer": "v7.1.1",
3838
"psr/container": "2.0.2",
3939
"psr/http-message": "2.0",
4040
"psr/log": "3.0.2",
4141
"ramsey/collection": "2.1.1",
4242
"ramsey/http-range": "2.0.0",
4343
"scssphp/scssphp": "v1.13.0",
44-
"splitbrain/php-archive": "1.4.1",
45-
"symfony/console": "v7.4.9",
44+
"splitbrain/php-archive": "1.4.2",
45+
"symfony/console": "v7.4.13",
4646
"symfony/deprecation-contracts": "v3.7.0",
47-
"symfony/http-foundation": "v7.4.8",
47+
"symfony/http-foundation": "v7.4.13",
4848
"symfony/polyfill-ctype": "*",
4949
"symfony/polyfill-iconv": "*",
5050
"symfony/polyfill-intl-grapheme": "*",
@@ -55,9 +55,9 @@
5555
"symfony/polyfill-php82": "*",
5656
"symfony/polyfill-php83": "*",
5757
"symfony/service-contracts": "v3.7.0",
58-
"symfony/string": "v7.4.8",
58+
"symfony/string": "v7.4.13",
5959
"symfony/var-dumper": "v7.4.8",
60-
"symfony/yaml": "v7.4.10",
60+
"symfony/yaml": "v7.4.13",
6161
"voku/anti-xss": "4.1.43",
6262
"voku/portable-ascii": "2.1.1",
6363
"voku/portable-utf8": "6.1.1"

redaxo/src/addons/backup/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"type": "project",
33

44
"require": {
5-
"splitbrain/php-archive": "^1.4.1"
5+
"splitbrain/php-archive": "^1.4.2"
66
},
77

88
"config": {

redaxo/src/addons/backup/composer.lock

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

redaxo/src/addons/backup/vendor/splitbrain/php-archive/src/Zip.php

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ class Zip extends Archive
1717
{
1818
const LOCAL_FILE_HEADER_CRC_OFFSET = 14;
1919

20+
const SIG_LOCAL_FILE_HEADER = "\x50\x4b\x03\x04";
21+
const SIG_CENTRAL_FILE_HEADER = "\x50\x4b\x01\x02";
22+
const SIG_END_OF_CENTRAL_DIR = "\x50\x4b\x05\x06";
23+
2024
protected $file = '';
2125
protected $fh;
2226
protected $memory = '';
@@ -89,6 +93,7 @@ public function contents()
8993
*
9094
* @see contents()
9195
* @throws ArchiveIOException
96+
* @throws ArchiveCorruptedException
9297
* @return FileInfo[]
9398
*/
9499
public function yieldContents()
@@ -129,6 +134,7 @@ public function yieldContents()
129134
* @param string $exclude a regular expression of files to exclude
130135
* @param string $include a regular expression of files to include
131136
* @throws ArchiveIOException
137+
* @throws ArchiveCorruptedException
132138
* @return FileInfo[]
133139
*/
134140
public function extract($outdir, $strip = '', $exclude = '', $include = '')
@@ -478,7 +484,7 @@ public function close()
478484
$this->writebytes($ctrldir);
479485

480486
// write end of central directory record
481-
$this->writebytes("\x50\x4b\x05\x06"); // end of central dir signature
487+
$this->writebytes(self::SIG_END_OF_CENTRAL_DIR);
482488
$this->writebytes(pack('v', 0)); // number of this disk
483489
$this->writebytes(pack('v', 0)); // number of the disk with the start of the central directory
484490
$this->writebytes(pack('v',
@@ -538,6 +544,7 @@ public function save($file)
538544
* This key-value list contains general information about the ZIP file
539545
*
540546
* @return array
547+
* @throws ArchiveCorruptedException when the file is not a valid ZIP archive
541548
*/
542549
protected function readCentralDir()
543550
{
@@ -550,21 +557,31 @@ protected function readCentralDir()
550557

551558
@fseek($this->fh, $size - $maximum_size);
552559
$pos = ftell($this->fh);
553-
$bytes = 0x00000000;
560+
$bytes = '';
554561

555562
while ($pos < $size) {
556-
$byte = @fread($this->fh, 1);
557-
$bytes = (($bytes << 8) & 0xFFFFFFFF) | ord($byte);
558-
if ($bytes == 0x504b0506) {
563+
$bytes = substr($bytes . (string)@fread($this->fh, 1), -4);
564+
if ($bytes === self::SIG_END_OF_CENTRAL_DIR) {
559565
break;
560566
}
561567
$pos++;
562568
}
563569

570+
if ($bytes !== self::SIG_END_OF_CENTRAL_DIR) {
571+
throw new ArchiveCorruptedException(
572+
'End of central directory signature not found - not a valid ZIP file'
573+
);
574+
}
575+
564576
$data = unpack(
565577
'vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size',
566578
fread($this->fh, 18)
567579
);
580+
if ($data === false) {
581+
throw new ArchiveCorruptedException(
582+
'Could not read end of central directory record'
583+
);
584+
}
568585

569586
if ($data['comment_size'] != 0) {
570587
$centd['comment'] = fread($this->fh, $data['comment_size']);
@@ -912,7 +929,7 @@ protected function makeCentralFileRecord($offset, $ts, $crc, $len, $clen, $name,
912929

913930
list($name, $extra) = $this->encodeFilename($name);
914931

915-
$header = "\x50\x4b\x01\x02"; // central file header signature
932+
$header = self::SIG_CENTRAL_FILE_HEADER;
916933
$header .= pack('v', 14); // version made by - VFAT
917934
$header .= pack('v', 20); // version needed to extract - 2.0
918935
$header .= pack('v', 0); // general purpose flag - no flags set
@@ -959,7 +976,7 @@ protected function makeLocalFileHeader($ts, $crc, $len, $clen, $name, $comp = nu
959976

960977
list($name, $extra) = $this->encodeFilename($name);
961978

962-
$header = "\x50\x4b\x03\x04"; // local file header signature
979+
$header = self::SIG_LOCAL_FILE_HEADER;
963980
$header .= pack('v', 20); // version needed to extract - 2.0
964981
$header .= pack('v', 0); // general purpose flag - no flags set
965982
$header .= pack('v', $comp); // compression method - deflate|none

redaxo/src/addons/media_manager/lib/managed_media.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class rex_managed_media
3232
/** @var bool */
3333
private $asImage = false;
3434

35-
/** @var array{width: ?int, height: ?int, src?: GdImage}&array<string, mixed> */
35+
/** @var array{width: ?int, height: ?int, src?: GdImage, ...<string, mixed>} */
3636
private $image = [
3737
'width' => null,
3838
'height' => null,

0 commit comments

Comments
 (0)