Skip to content

Commit 60aa390

Browse files
committed
Merge branch '6.1' into 6.2
2 parents 99ef74a + 9da8046 commit 60aa390

File tree

297 files changed

+6566
-5211
lines changed

Some content is hidden

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

297 files changed

+6566
-5211
lines changed

com.woltlab.wcf/fileDelete.xml

Lines changed: 11 additions & 3614 deletions
Large diffs are not rendered by default.

com.woltlab.wcf/package.xml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<packagedescription>Free CMS and web-framework, designed for awesome websites and communities.</packagedescription>
66
<packagedescription language="de">Freies CMS und Web-Framework, das eindrucksvolle Websites und Communities ermöglicht.</packagedescription>
77
<isapplication>1</isapplication>
8-
<version>6.2.0 dev 1</version>
9-
<date>2025-03-24</date>
8+
<version>6.1.11</version>
9+
<date>2025-06-18</date>
1010
</packageinformation>
1111

1212
<authorinformation>
@@ -50,11 +50,7 @@
5050
<instruction type="script">acp/install_com.woltlab.wcf_step2.php</instruction>
5151
</instructions>
5252

53-
<!--
54-
Required order of the following steps for the update to 6.2:
55-
<instruction type="script">acp/update_com.woltlab.wcf_6.2_backgroundJob.php</instruction>
56-
<instruction type="database" run="standalone">acp/database/update_com.woltlab.wcf_62_step1.php</instruction>
57-
<instruction type="script">acp/update_com.woltlab.wcf_6.2_contactOptions.php</instruction>
58-
<instruction type="database" run="standalone">acp/database/update_com.woltlab.wcf_62_step2.php</instruction>
59-
-->
53+
<instructions type="update" fromversion="6.1.10">
54+
<instruction type="file">files_update.tar</instruction>
55+
</instructions>
6056
</package>

wcfsetup/install/files/lib/acp/form/UserEditForm.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ public function assignVariables()
363363
parent::assignVariables();
364364

365365
$signatureProcessor = new HtmlUpcastProcessor();
366-
$signatureProcessor->process($this->signature, 'com.woltlab.wcf.user.signature', $this->user->userID);
366+
$signatureProcessor->process($this->signature ?: '', 'com.woltlab.wcf.user.signature', $this->user->userID);
367367

368368
WCF::getTPL()->assign([
369369
'userID' => $this->user->userID,

wcfsetup/install/files/lib/data/user/User.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
* @property-read int $disableAvatar is `1` if the user's avatar has been disabled, otherwise `0`
5353
* @property-read string $disableAvatarReason reason why the user's avatar is disabled
5454
* @property-read int $disableAvatarExpires timestamp at which the user's avatar will automatically be enabled again
55-
* @property-read string $signature text of the user's signature
55+
* @property-read string|null $signature text of the user's signature
5656
* @property-read int $signatureEnableHtml is `1` if HTML will rendered in the user's signature, otherwise `0`
5757
* @property-read int $disableSignature is `1` if the user's signature has been disabled, otherwise `0`
5858
* @property-read string $disableSignatureReason reason why the user's signature is disabled

wcfsetup/install/files/lib/system/WCF.class.php

Lines changed: 22 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
use wcf\data\page\Page;
1111
use wcf\system\application\ApplicationHandler;
1212
use wcf\system\application\IApplication;
13-
use wcf\system\benchmark\Benchmark;
1413
use wcf\system\box\BoxHandler;
14+
use wcf\system\cache\builder\CoreObjectCacheBuilder;
1515
use wcf\system\cache\builder\PackageUpdateCacheBuilder;
16-
use wcf\system\cache\eager\CoreObjectCache;
1716
use wcf\system\database\MySQLDatabase;
1817
use wcf\system\event\EventHandler;
1918
use wcf\system\exception\ErrorException;
2019
use wcf\system\exception\IPrintableException;
20+
use wcf\system\exception\ParentClassException;
2121
use wcf\system\exception\SystemException;
2222
use wcf\system\language\LanguageFactory;
2323
use wcf\system\package\command\RebuildBootstrapper;
@@ -31,7 +31,6 @@
3131
use wcf\system\template\EmailTemplateEngine;
3232
use wcf\system\template\TemplateEngine;
3333
use wcf\system\user\storage\UserStorageHandler;
34-
use wcf\system\user\UserProfileHandler;
3534
use wcf\util\DirectoryUtil;
3635
use wcf\util\FileUtil;
3736
use wcf\util\StringUtil;
@@ -80,7 +79,7 @@
8079
\mb_language('uni');
8180

8281
// define current woltlab suite version
83-
\define('WCF_VERSION', '6.2.0 dev 1');
82+
\define('WCF_VERSION', '6.1.11');
8483

8584
// define current unix timestamp
8685
\define('TIME_NOW', \time());
@@ -99,9 +98,6 @@
9998
* @author Marcel Werk
10099
* @copyright 2001-2019 WoltLab GmbH
101100
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
102-
*
103-
* @method static Benchmark getBenchmark()
104-
* @method static UserProfileHandler getUserProfileHandler()
105101
*/
106102
class WCF
107103
{
@@ -125,7 +121,7 @@ class WCF
125121

126122
/**
127123
* list of autoload directories
128-
* @var array<string, string>
124+
* @var array
129125
*/
130126
protected static $autoloadDirectories = [
131127
'wcf' => WCF_DIR . 'lib/',
@@ -139,10 +135,9 @@ class WCF
139135

140136
/**
141137
* list of cached core objects
142-
*
143-
* @var array<string, class-string<SingletonFactory>>
138+
* @var string[]
144139
*/
145-
protected static array $coreObjectCache;
140+
protected static $coreObjectCache = [];
146141

147142
/**
148143
* database object
@@ -180,7 +175,7 @@ class WCF
180175
*/
181176
protected static $zendOpcacheEnabled;
182177

183-
public const BOOTSTRAP_LOADER = \WCF_DIR . 'lib/bootstrap.php';
178+
public const BOOTSTRAP_LOADER = \WCF_DIR . '/lib/bootstrap.php';
184179

185180
/**
186181
* Calls all init functions of the WCF class.
@@ -234,14 +229,11 @@ final protected function runBootstrappers(): void
234229
*
235230
* You *must* not create output in here under normal circumstances, as it might get eaten
236231
* when gzip is enabled.
237-
*
238-
* @return void
239232
*/
240233
public static function destruct()
241234
{
242235
try {
243236
// database has to be initialized
244-
// @phpstan-ignore function.alreadyNarrowedType
245237
if (!\is_object(self::$dbObj)) {
246238
return;
247239
}
@@ -261,7 +253,6 @@ public static function destruct()
261253
}
262254

263255
// update session
264-
// @phpstan-ignore function.alreadyNarrowedType
265256
if (\is_object(self::getSession())) {
266257
self::getSession()->update();
267258
}
@@ -327,7 +318,7 @@ final public static function getTPL()
327318
/**
328319
* Calls the show method on the given exception.
329320
*/
330-
final public static function handleException(\Throwable $e): never
321+
final public static function handleException(\Throwable $e)
331322
{
332323
// backwards compatibility
333324
if ($e instanceof IPrintableException) {
@@ -347,8 +338,6 @@ final public static function handleException(\Throwable $e): never
347338
@\header('HTTP/1.1 500 Internal Server Error');
348339
try {
349340
\wcf\functions\exception\printThrowable($e);
350-
351-
exit;
352341
} catch (\Throwable $e2) {
353342
echo "<pre>An Exception was thrown while handling an Exception:\n\n";
354343
echo \preg_replace('/Database->__construct\(.*\)/', 'Database->__construct(...)', $e2);
@@ -369,11 +358,11 @@ final public static function handleException(\Throwable $e): never
369358
* @param int $line
370359
* @throws ErrorException
371360
*/
372-
final public static function handleError($severity, $message, $file, $line): bool
361+
final public static function handleError($severity, $message, $file, $line): void
373362
{
374363
// this is necessary for the shut-up operator
375364
if (!(\error_reporting() & $severity)) {
376-
return true;
365+
return;
377366
}
378367

379368
throw new ErrorException($message, 0, $severity, $file, $line);
@@ -423,7 +412,6 @@ protected function loadOptions(): void
423412
if (!\is_writable($filename)) {
424413
FileUtil::makeWritable($filename);
425414

426-
// @phpstan-ignore booleanNot.alwaysTrue
427415
if (!\is_writable($filename)) {
428416
throw new SystemException("The option file '" . $filename . "' is not writable.");
429417
}
@@ -512,9 +500,6 @@ protected function defineLegacyOptions(): void
512500

513501
// The option for the SFS action has been converted into a general option with version 6.1.
514502
\define('BLACKLIST_SFS_ACTION', 'disable');
515-
516-
// The option to show an article counter in the message sidebar was removed with version 6.2.
517-
\define('MESSAGE_SIDEBAR_ENABLE_ARTICLES', 0);
518503
}
519504

520505
/**
@@ -654,7 +639,6 @@ protected function loadApplication(Application $application, bool $isDependentAp
654639
$packageDir = FileUtil::getRealPath(WCF_DIR . $relativePath);
655640
self::$autoloadDirectories[$abbreviation] = $packageDir . 'lib/';
656641

657-
// @phpstan-ignore if.alwaysFalse
658642
if (\class_exists($className)) {
659643
// the class can now be found, update the `packageDir` value
660644
(new PackageEditor($package))->update(['packageDir' => $relativePath]);
@@ -755,7 +739,7 @@ protected function initCoreObjects(): void
755739
return;
756740
}
757741

758-
self::$coreObjectCache = (new CoreObjectCache())->getCache();
742+
self::$coreObjectCache = CoreObjectCacheBuilder::getInstance()->getData();
759743
}
760744

761745
/**
@@ -841,7 +825,7 @@ final public static function setLanguage(int $languageID): void
841825
final public static function autoload(string $className): void
842826
{
843827
$className = \strtr($className, '\\', '/');
844-
if (($slashPos = \strpos($className, '/')) !== false) {
828+
if (($slashPos = \strpos($className, '/')) !== null) {
845829
$applicationPrefix = \substr($className, 0, $slashPos);
846830
if (isset(self::$autoloadDirectories[$applicationPrefix])) {
847831
$classPath = self::$autoloadDirectories[$applicationPrefix] . \substr($className, $slashPos + 1) . '.class.php';
@@ -865,7 +849,7 @@ final public static function autoloadDebug(string $className): void
865849
// logic cannot be moved into a shared function, because it
866850
// measurably reduced autoloader performance.
867851
$className = \strtr($className, '\\', '/');
868-
if (($slashPos = \strpos($className, '/')) !== false) {
852+
if (($slashPos = \strpos($className, '/')) !== null) {
869853
$applicationPrefix = \substr($className, 0, $slashPos);
870854
if (isset(self::$autoloadDirectories[$applicationPrefix])) {
871855
$classPath = self::$autoloadDirectories[$applicationPrefix] . \substr($className, $slashPos + 1) . '.class.php';
@@ -888,8 +872,7 @@ final public static function autoloadDebug(string $className): void
888872
}
889873

890874
/**
891-
* @param mixed[] $arguments
892-
* @return ?object
875+
* @inheritDoc
893876
*/
894877
final public function __call(string $name, array $arguments)
895878
{
@@ -904,9 +887,9 @@ final public function __call(string $name, array $arguments)
904887
/**
905888
* Returns dynamically loaded core objects.
906889
*
907-
* @param mixed[] $arguments
908-
* @return ?object
909-
* @throws SystemException
890+
* @param array $arguments
891+
* @return object
892+
* @throws SystemException
910893
*/
911894
final public static function __callStatic(string $name, array $arguments)
912895
{
@@ -922,18 +905,20 @@ final public static function __callStatic(string $name, array $arguments)
922905
}
923906

924907
if (\class_exists($objectName)) {
908+
if (!\is_subclass_of($objectName, SingletonFactory::class)) {
909+
throw new ParentClassException($objectName, SingletonFactory::class);
910+
}
911+
925912
self::$coreObject[$className] = \call_user_func([$objectName, 'getInstance']);
926913

927914
return self::$coreObject[$className];
928915
}
929-
930-
return null;
931916
}
932917

933918
/**
934919
* Searches for cached core object definition.
935920
*
936-
* @return class-string<SingletonFactory>|null
921+
* @return string|null
937922
*/
938923
final protected static function getCoreObject(string $className)
939924
{
@@ -1002,7 +987,6 @@ public static function getActivePath(): string
1002987
}
1003988

1004989
/**
1005-
* @param string $fragment
1006990
* @deprecated 5.5 - Put a '#' followed by the fragment as the anchor's href. Make sure to |rawurlencode any variables that may contain special characters.
1007991
*/
1008992
public function getAnchor($fragment): string

wcfsetup/install/files/lib/system/api/autoload.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
echo $err;
1515
}
1616
}
17-
trigger_error(
18-
$err,
19-
E_USER_ERROR
20-
);
17+
throw new RuntimeException($err);
2118
}
2219

2320
require_once __DIR__ . '/composer/autoload_real.php';

wcfsetup/install/files/lib/system/api/brick/math/CHANGELOG.md

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

33
All notable changes to this project will be documented in this file.
44

5+
## [0.12.3](https://github.com/brick/math/releases/tag/0.12.3) - 2025-02-28
6+
7+
**New features**
8+
9+
- `BigDecimal::getPrecision()` Returns the number of significant digits in a decimal number
10+
11+
## [0.12.2](https://github.com/brick/math/releases/tag/0.12.2) - 2025-02-26
12+
13+
⚡️ **Performance improvements**
14+
15+
- Division in `NativeCalculator` is now faster for small divisors, thanks to [@Izumi-kun](https://github.com/Izumi-kun) in [#87](https://github.com/brick/math/pull/87).
16+
17+
👌 **Improvements**
18+
19+
- Add missing `RoundingNecessaryException` to the `@throws` annotation of `BigNumber::of()`
20+
521
## [0.12.1](https://github.com/brick/math/releases/tag/0.12.1) - 2023-11-29
622

723
⚡️ **Performance improvements**

wcfsetup/install/files/lib/system/api/brick/math/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"require-dev": {
2525
"phpunit/phpunit": "^10.1",
2626
"php-coveralls/php-coveralls": "^2.2",
27-
"vimeo/psalm": "5.16.0"
27+
"vimeo/psalm": "6.8.8"
2828
},
2929
"autoload": {
3030
"psr-4": {
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<files psalm-version="6.8.8@1361cd33008feb3ae2b4a93f1860e14e538ec8c2">
3+
<file src="src/BigInteger.php">
4+
<FalsableReturnStatement>
5+
<code><![CDATA[\hex2bin($hex)]]></code>
6+
</FalsableReturnStatement>
7+
<InvalidFalsableReturnType>
8+
<code><![CDATA[string]]></code>
9+
</InvalidFalsableReturnType>
10+
</file>
11+
<file src="src/Exception/DivisionByZeroException.php">
12+
<ClassMustBeFinal>
13+
<code><![CDATA[DivisionByZeroException]]></code>
14+
</ClassMustBeFinal>
15+
</file>
16+
<file src="src/Exception/IntegerOverflowException.php">
17+
<ClassMustBeFinal>
18+
<code><![CDATA[IntegerOverflowException]]></code>
19+
</ClassMustBeFinal>
20+
</file>
21+
<file src="src/Exception/NegativeNumberException.php">
22+
<ClassMustBeFinal>
23+
<code><![CDATA[NegativeNumberException]]></code>
24+
</ClassMustBeFinal>
25+
</file>
26+
<file src="src/Exception/NumberFormatException.php">
27+
<ClassMustBeFinal>
28+
<code><![CDATA[NumberFormatException]]></code>
29+
</ClassMustBeFinal>
30+
</file>
31+
<file src="src/Exception/RoundingNecessaryException.php">
32+
<ClassMustBeFinal>
33+
<code><![CDATA[RoundingNecessaryException]]></code>
34+
</ClassMustBeFinal>
35+
</file>
36+
<file src="src/Internal/Calculator/BcMathCalculator.php">
37+
<ClassMustBeFinal>
38+
<code><![CDATA[BcMathCalculator]]></code>
39+
</ClassMustBeFinal>
40+
</file>
41+
<file src="src/Internal/Calculator/GmpCalculator.php">
42+
<ClassMustBeFinal>
43+
<code><![CDATA[GmpCalculator]]></code>
44+
</ClassMustBeFinal>
45+
</file>
46+
<file src="src/Internal/Calculator/NativeCalculator.php">
47+
<ClassMustBeFinal>
48+
<code><![CDATA[NativeCalculator]]></code>
49+
</ClassMustBeFinal>
50+
<InvalidOperand>
51+
<code><![CDATA[$a * $b]]></code>
52+
<code><![CDATA[$a * 1]]></code>
53+
<code><![CDATA[$a + $b]]></code>
54+
<code><![CDATA[$b * 1]]></code>
55+
<code><![CDATA[$b * 1]]></code>
56+
<code><![CDATA[$blockA * $blockB + $carry]]></code>
57+
<code><![CDATA[$blockA + $blockB]]></code>
58+
<code><![CDATA[$blockA + $blockB + $carry]]></code>
59+
<code><![CDATA[$blockA - $blockB]]></code>
60+
<code><![CDATA[$blockA - $blockB - $carry]]></code>
61+
<code><![CDATA[$carry]]></code>
62+
<code><![CDATA[$mul % $complement]]></code>
63+
<code><![CDATA[$mul - $value]]></code>
64+
<code><![CDATA[$nb - 1]]></code>
65+
<code><![CDATA[$sum += $complement]]></code>
66+
<code><![CDATA[($mul - $value) / $complement]]></code>
67+
<code><![CDATA[($nb - 1) * 10]]></code>
68+
</InvalidOperand>
69+
</file>
70+
</files>

0 commit comments

Comments
 (0)