343 Commits

Author SHA1 Message Date
Dylan K. Taylor
3b6ff3c42b
Apply union types in some places (BC breaks) 2022-11-23 14:03:35 +00:00
Dylan K. Taylor
a205d64732
Merge branch 'next-minor' into next-major 2022-11-12 17:02:56 +00:00
Dylan K. Taylor
a3502a711d
Merge branch 'stable' into next-minor 2022-11-12 17:01:58 +00:00
Dylan K. Taylor
d5e3636908
Timezone: Apparently timezone_id returned by timezone_abbreviations_list() may be null... 2022-11-12 14:40:37 +00:00
Artem Turov
ef100b248b
Improved doc comment for Internet::getIP() (#5406) 2022-11-12 13:52:49 +00:00
Dylan K. Taylor
01bad344a0
Merge branch 'next-minor' into next-major 2022-11-04 20:47:26 +00:00
Dylan K. Taylor
cdbdcb5d67
Merge branch 'stable' into next-minor 2022-11-04 20:44:28 +00:00
Dylan K. Taylor
2fdc46c165
PHPStan 1.9 features 2022-11-04 20:23:34 +00:00
Dylan K. Taylor
bfd1b2c635
PHPStan 1.9.1 2022-11-04 18:28:07 +00:00
Dylan K. Taylor
7bcc663b60
Migrate core code to using symfony/filesystem
webmozart/path-util is retained for plugin compatibility, but is dropped in 5.0
2022-10-14 21:51:29 +01:00
Dylan K. Taylor
f88ae93897
BC break: Replaced webmozart/path-util with symfony/filesystem, closes #5332 2022-10-13 16:43:36 +01:00
Dylan K. Taylor
4b41b2f9ae
Merge remote-tracking branch 'origin/next-minor' into next-major 2022-09-28 16:15:35 +01:00
Dylan T
b87e4d8bd3
Introduce and use TextFormat::addBase() (#5268)
This function adds "base" format to a string. The given formats are inserted directly after any RESET code in the sequence.

An example of where this is needed is in the logger.

Without this change, the following code:
$logger->notice("I'm a " . TextFormat::RED . "special" . TextFormat::RESET . " cookie");

causes the "cookie" part of the message to show as grey, instead of the expected aqua for NOTICE level messages.

There are also many workarounds for this problem throughout the server, mostly in command outputs, being forced to use WHITE instead of RESET to avoid breaking the logger output.
2022-09-28 16:13:11 +01:00
Dylan K. Taylor
6f4ea886b0
Merge branch 'next-minor' into next-major 2022-09-28 00:39:00 +01:00
Dylan T
83e5b0adb6
ConsoleCommandSender is no longer responsible for forwarding broadcast messages to the logger (#5311)
This is a step towards implementing #2543.
2022-09-27 20:58:33 +01:00
Dylan K. Taylor
f80ffd8de0
Merge branch 'next-minor' into next-major 2022-09-15 13:59:21 +01:00
Dylan K. Taylor
88eafdd614
Improve type info for RegistryTrait::getAll() and its users 2022-09-02 19:57:22 +01:00
Dylan K. Taylor
66cd156d80
Utils: use static property for core count cache, instead of local static variable 2022-09-02 19:18:01 +01:00
Dylan K. Taylor
1d253bc8c2
Utils: remove 32-bit specific code from javaStringHash()
this was necessary in the days of 32-bit, but for 64-bit, the 0xffffffff mask is sufficient and produces the exact same result.
2022-09-02 18:23:49 +01:00
Dylan K. Taylor
d4c4ae3d7a
Merge branch 'next-minor' into next-major 2022-08-25 19:27:29 +01:00
Dylan K. Taylor
7f175b47e6
Fix CS 2022-08-25 18:19:22 +01:00
Dylan K. Taylor
0e73ffe555
CrashDump: Added JIT mode to data
this is necessary for identifying JIT-specific bugs, which, unfortunately, are very common.
2022-08-25 17:39:40 +01:00
Dylan K. Taylor
1ffd38b37b
Utils: fixed currentTrace() when xdebug is loaded, but not in develop mode
this is really dumb... why does it register the functions at all if they aren't usable ???
2022-08-25 16:56:26 +01:00
Dylan K. Taylor
1ecb10acba
Merge branch 'next-minor' into next-major 2022-08-21 19:19:07 +01:00
Dylan K. Taylor
dce8bd6d21
CS: Standardize new with braces 2022-08-15 17:16:23 +01:00
Dylan K. Taylor
43a3151de3
Merge branch 'next-minor' into next-major 2022-08-14 18:49:19 +01:00
Dylan K. Taylor
d669a6f0c7
ReversePriorityQueue: add ReturnTypeWillChange attribute
it's doubtful any plugin dev is extending this, but nonetheless, we can't change it in a patch.
2022-07-27 03:51:06 +01:00
Dylan K. Taylor
aa9f8781ff
Merge branch 'next-minor' into next-major 2022-06-07 19:56:26 +01:00
Dylan K. Taylor
083a35f970
Modernize property type declarations 2022-06-04 18:16:32 +01:00
Dylan K. Taylor
38d6284671
Use PHP-CS-Fixer to enforce file header presence 2022-06-04 17:34:49 +01:00
Dylan K. Taylor
df3a69dcb7
Modernize private property declarations in Threaded classes
I previously avoided this due to being unsure of the effects; however, it's clear that we already use typed properties on Threaded things in other places anyway, and the only known issues are with uninit properties, and arrays.
2022-05-17 22:42:18 +01:00
Dylan K. Taylor
d4b7f66e15
Promote some constructors 2022-05-17 22:34:58 +01:00
Dylan K. Taylor
9ff1bf6deb
Merge remote-tracking branch 'origin/stable' into next-minor 2022-05-11 13:12:45 +01:00
Dylan K. Taylor
a913736235
fix CS 2022-05-10 14:13:01 +01:00
Dylan K. Taylor
124edeacaf
fix build 2022-05-10 14:11:46 +01:00
Dylan K. Taylor
a216f4d089
Utils: improve representation of int, float and null in stack trace parameters 2022-05-10 14:07:07 +01:00
Dylan K. Taylor
17b0e0be84
Utils: use match to clean up stringifyValueForTrace() 2022-05-10 14:04:52 +01:00
Dylan K. Taylor
81d8aed2e2
Utils: account for named variadic arguments in printableTrace() 2022-05-10 13:59:42 +01:00
Dylan K. Taylor
6d7bf1c5d8
Utils: fixed missing property initializer 2022-04-28 14:52:21 +01:00
Dylan K. Taylor
0e7e776862
Modernize property declarations in src/utils 2022-04-28 13:12:12 +01:00
Dylan K. Taylor
8cc7fb9dd9
fix CS 2022-03-28 17:16:35 +01:00
Dylan K. Taylor
194cb1fb84
phpstan 1.5.1 2022-03-28 17:12:00 +01:00
Dylan K. Taylor
4a94cb85a2
fix CS 2022-03-22 15:44:11 +00:00
Dylan K. Taylor
b7e6854189
RegistryTrait: enforce name validation rules on everything, not just enums
fixes #4916
2022-03-22 15:41:17 +00:00
PJZ9n
f4f5c3128f
EnumTrait: fixed regex not accepting member names with 1 character
this also fixes EnumTrait accepting invalid non-numeric characters for the first character, such as @.
2022-03-19 16:47:36 +00:00
Dylan K. Taylor
f97ce6afef
Harden APIs which accept Vector3/Position/Location in event namespace 2022-03-09 22:22:37 +00:00
EndermanbugZJFC
f181c60209
Fixed typo (occured => occurred) (#4873)
[ci skip]
2022-03-02 16:28:02 +00:00
Dylan K. Taylor
282b430b1f
Replace disallowed operators in src/utils/ 2022-01-20 19:02:26 +00:00
Dylan K. Taylor
ee6548aa50
Merge branch 'stable' into next-minor 2022-01-14 00:45:49 +00:00
Dylan K. Taylor
a5c0958adf
Filesystem::safeFilePutContents() now consistently throws RuntimeException in all expected failure cases
unexpected cases may still throw ErrorException (such as undefined variables) but we don't want to capture those.
2022-01-09 16:33:31 +00:00