Commit Graph

16 Commits

Author SHA1 Message Date
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
aa9f8781ff Merge branch 'next-minor' into next-major 2022-06-07 19:56:26 +01:00
083a35f970 Modernize property type declarations 2022-06-04 18:16:32 +01:00
38d6284671 Use PHP-CS-Fixer to enforce file header presence 2022-06-04 17:34:49 +01:00
8b73549355 Use JSON_THROW_ON_ERROR for json_encode() and json_decode() 2021-12-08 19:14:07 +00:00
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
a012e7ccc0 VersionInfo: make static methods more constant-like
if we could have class constants declared at runtime, these would be constant.
2021-08-16 16:37:36 +01:00
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
72de45f0e9 Drop pocketmine/uuid for ramsey/uuid 2021-03-16 23:03:00 +00:00
2c29634d03 Remove VERSION and GIT_COMMIT constants
these are now lazily computed in VersionInfo as needed.
2020-07-25 19:17:33 +01:00
2645b19617 Convert VersionInfo into a final class
this allows it to be loaded by the autoloader without additional changes.
2020-07-25 19:00:48 +01:00
d9c3ec5f91 Merge branch 'stable'
# Conflicts:
#	resources/vanilla
2020-07-11 20:14:42 +01:00
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
b7cf4f01f9 remove utils\UUID, switch to pocketmine/uuid package 2020-05-11 10:46:48 +01:00
f9a587d40e imports cleanup 2020-04-28 17:27:38 +01:00
f91e2f41e0 move SendUsageTask to stats namespace
maybe separate this out into a library?
2020-04-26 11:42:48 +01:00