Dylan K. Taylor
31d8cc1cb5
Generate and use constants for pocketmine.yml constant names
...
a couple of usages of properties that no longer exist couldn't be migrated.
in addition, this revealed a couple of dead properties in the default file.
this is not an ideal solution (I'd much rather model the configs using classes and map them) but in the absence of a good and reliable library to do that, this is the next best thing.
2023-08-25 13:23:38 +01:00
Dylan K. Taylor
d2fe537159
Merge branch 'minor-next' into major-next
2023-05-31 22:12:39 +01:00
Muqsit Rayyan
3948dc4f75
Remove calls to ReflectionProperty::setAccessible() ( #5783 )
...
This is a no-op in PHP 8.1 and up.
2023-05-31 14:03:14 +01:00
Dylan K. Taylor
6db2b022fb
Merge branch 'next-minor' into next-major
2023-03-04 16:58:03 +00:00
Dylan K. Taylor
035d4b7263
MemoryManager: stringify floats, fixes #5598
2023-03-04 16:47:58 +00:00
Dylan K. Taylor
2f283678c7
Merge branch 'next-minor' into next-major
2023-01-30 13:26:29 +00:00
zSALLAZAR
7eca3e8081
Fix typo
...
closes #5533
2023-01-26 14:52:50 +00:00
Dylan K. Taylor
8909aa6a18
Merge branch 'next-minor' into next-major
2023-01-13 17:29:25 +00:00
Dylan K. Taylor
dff3f45d22
Constify more tick-related things
2023-01-13 16:29:09 +00:00
Dylan K. Taylor
2a81a421f3
Merge branch 'next-minor' into next-major
2022-12-24 17:23:30 +00:00
Dylan K. Taylor
4c91c4aaf1
ÂMemoryManager: replace switch with match
2022-12-23 17:36:08 +00:00
Dylan K. Taylor
4d79aced07
Merge branch 'next-minor' into next-major
2022-12-15 19:50:27 +00:00
Dylan K. Taylor
99996b62d6
Align PhpDoc @param tags according to PHP-CS-Fixer
2022-12-06 13:21:20 +00:00
Dylan K. Taylor
fdb07cdbcd
Added more missing native types according to 8.0 standards
2022-11-23 14:21:38 +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
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
38d6284671
Use PHP-CS-Fixer to enforce file header presence
2022-06-04 17:34:49 +01:00
Dylan K. Taylor
d4b7f66e15
Promote some constructors
2022-05-17 22:34:58 +01:00
Dylan K. Taylor
bd4c2b5245
MemoryManager: scrub string keys for dumping
...
fixes crashes such as https://crash.pmmp.io/view/5986490
this also ensures that the order of elements is maintained when decoded by another software.
2022-02-20 20:54:03 +00:00
Dylan K. Taylor
4e956d5d1d
Replace remaining disallowed operators
2022-01-20 19:23:19 +00:00
Dylan K. Taylor
8a94aa10a4
Merge branch 'stable' into next-minor
2021-12-14 00:34:54 +00:00
Dylan K. Taylor
3be8472ae2
MemoryManager: fixed dumping of uninitialized properties
...
closes #4643
2021-12-13 12:11:49 +00:00
Dylan K. Taylor
889d048ca3
Make use of Utils::assumeNotFalse() in a bunch of places
...
I've stuck to only doing this in the places where I'm sure we should never get false back. Other places I'm less sure of (and I found more bugs along the way).
2021-12-08 19:39:04 +00:00
Dylan K. Taylor
8b73549355
Use JSON_THROW_ON_ERROR for json_encode() and json_decode()
2021-12-08 19:14:07 +00:00
Dylan K. Taylor
9346ecdc39
Merge branch 'stable'
2021-11-25 00:01:48 +00:00
Dylan K. Taylor
269231c228
Ban foreach(arrayWithStringKeys as k => v)
...
this is not as good as phpstan/phpstan-src#769 (e.g. array_key_first()/array_key_last() aren't covered by this, nor is array_rand()) but it does eliminate the most infuriating cases where this usually crops up.
2021-11-15 22:52:05 +00:00
Dylan K. Taylor
5db3915aad
Make MemoryManager aware of ChunkCache
2021-10-28 20:28:00 +01:00
Dylan K. Taylor
078347b44a
MemoryManager: fixed a PHPStan error
2021-09-03 20:26:58 +01:00
Dylan K. Taylor
565cf84e1b
MemoryManager: use typed properties
2021-08-03 15:13:28 +01:00
Dylan K. Taylor
3466fbe3e3
MemoryManager: remove unused variable declaration
...
it's overwritten further down anyway.
2021-07-21 19:25:01 +01:00
Dylan T
32d7b1e6af
Start using webmozart/pathutil for joining paths ( #4287 )
2021-06-29 19:40:43 +01:00
Dylan K. Taylor
981b0285d1
Isolate config casting nastiness in one place
...
this doesn't solve the underlying problem, but it does reduce the amount of noise made by PHPStan about it, as well as avoiding code litter.
2021-06-19 19:14:02 +01:00
Dylan K. Taylor
bbae02264d
Merge branch 'stable'
2021-01-27 20:04:13 +00:00
Dylan K. Taylor
5384e2ba9d
Revert "MemoryDump: fixed duplicated properties, reduce useless noise"
...
This reverts commit efd67a132ed432b47a74c8b98211597557c419d5.
2021-01-26 20:26:35 +00:00
Dylan K. Taylor
bcc3e87730
Timings: rename core timers to remove 'timer' from the names
...
this makes them shorter and more consistent.
2020-12-23 17:52:25 +00:00
Dylan K. Taylor
e192c75019
MemoryManager: Analyze contents of function/method static variables
...
it's possible for stuff to hide inside these things that would cause leaks.
2020-09-26 15:18:34 +01:00
Dylan K. Taylor
b8e1bdbed4
MemoryManager: Look inside Closure objects to resolve dependencies
...
the lack of closure analysis allowed several memory leaks to be unable to be debugged using memory dumps.
2020-09-26 15:11:47 +01:00
Dylan K. Taylor
75e3a0aa0f
Merge branch 'stable' into master
...
# Conflicts:
# composer.lock
# resources/vanilla
# src/command/defaults/StatusCommand.php
# src/pocketmine/entity/Entity.php
# src/pocketmine/level/format/SubChunk.php
2020-09-26 13:27:08 +01:00
Dylan K. Taylor
1500668d4e
imports cleanup
2020-07-25 19:21:22 +01:00
Dylan K. Taylor
1050485164
MemoryManager: remove class name from object references
...
it's possible to see this information by looking up the hash, which it's necessary to do in order to see any interesting information anyway.
2020-07-13 11:51:25 +01:00
Dylan K. Taylor
efd67a132e
MemoryDump: fixed duplicated properties, reduce useless noise
2020-07-13 11:44:21 +01:00
Dylan K. Taylor
46c4c65022
MemoryManager: remove duplicated information from memory dump
2020-07-13 11:10:22 +01:00
Dylan K. Taylor
e199f403dc
MemoryManager: remove useless information from object dumps
2020-07-13 11:08:03 +01:00
Dylan K. Taylor
d0c8d64b40
Merge commit '097c260db'
...
# Conflicts:
# resources/vanilla
# src/item/enchantment/Enchantment.php
# src/plugin/PluginDescription.php
# src/pocketmine/entity/Effect.php
# src/pocketmine/item/ItemFactory.php
# src/pocketmine/plugin/PluginManager.php
2020-06-14 19:28:05 +01:00
Dylan K. Taylor
fe649d8d70
Extract ServerConfigGroup from Server
...
this API isn't very nice, but it's pretty much the same as the original, and at least this can be _kinda_ unit-tested...
2020-05-24 15:48:03 +01:00
Dylan K. Taylor
cc8aed5979
Merge commit '56883f9ff9d2a0934dd3585e565d109ea322f583'
...
# Conflicts:
# resources/vanilla
2020-05-13 13:51:55 +01:00
Dylan K. Taylor
152da604be
MemoryManager::dumpMemory() should never throw an exception that matters to calling code
2020-05-12 22:37:23 +01:00
Dylan K. Taylor
d4594d6114
Merge commit '06a9c98'
...
# Conflicts:
# resources/vanilla
2020-04-18 13:48:26 +01:00
Dylan K. Taylor
7b3c2a3703
Merge commit '3907a2b6ba58fa49022e3e7c8256731dfa2e0d00'
2020-03-14 13:32:35 +00:00