Dylan K. Taylor
f3063e797f
ChunkUtils: provide a more explicit parameter type
2020-06-15 23:05:52 +01:00
Dylan K. Taylor
8dcc88712c
ChunkUtils: fixed phpstan level 7 type inference error
2020-06-15 23:04:12 +01:00
Dylan K. Taylor
04191ec44a
Rail: specify type for local static variable
...
fixes a phpstan level 7 error
phpstan doesn't make any assumptions about local static variable types because analysing them would require too much work, apparently.
2020-06-15 22:47:20 +01:00
Dylan K. Taylor
62ea7c93a9
added a dedicated InvalidSkinException
2020-06-15 21:48:24 +01:00
Dylan K. Taylor
cf06b5b8cf
Player: explicitly check for false return of dataPacket()
...
fixes a phpstan error on l7
this won't ever actually be a problem, but this isn't obvious from the type system.
2020-06-15 21:24:19 +01:00
Dylan K. Taylor
a8ec51daac
Player: do not assign maybe-false result of json_encode() to ModalFormRequestPacket
...
fixes a phpstan error on l7
2020-06-15 21:22:33 +01:00
Dylan K. Taylor
6a7b77fee2
first look at making region writes reuse old space
2020-06-15 18:36:54 +01:00
dependabot-preview[bot]
da42c8d020
Bump phpunit/phpunit from 9.2.2 to 9.2.3 ( #3588 )
2020-06-15 16:30:50 +00:00
Dylan K. Taylor
b902f9ded0
RegionLoader: fixed 2 phpstan level 7 errors (eof reading region header)
2020-06-15 15:09:37 +01:00
Dylan K. Taylor
9bb8a8f761
RegionLoader: added utility function getProportionUnusedSpace()
2020-06-15 13:49:03 +01:00
Dylan K. Taylor
63b14a083c
RegionLoader: added utility function generateSectorMap()
...
this proved very useful while debugging some internal issues.
2020-06-15 13:48:17 +01:00
Dylan K. Taylor
627a7c951a
RegionLoader: added missing const import
2020-06-15 13:46:03 +01:00
Dylan K. Taylor
bb2685ca65
RegionLocationTableEntry: cap firstSector at 16777216
...
this is the biggest sector start that the location table can represent, due to the binary format. Larger values than this will overflow and cause corruption.
This provides an effective limit of 64 GB on region files.
2020-06-15 13:23:08 +01:00
Dylan K. Taylor
d38709a7ae
RegionLoader: remove unused variable
2020-06-15 12:26:20 +01:00
Dylan K. Taylor
b559a65346
RegionLoader: account for possible corrupted header pointing to itself
2020-06-15 12:13:42 +01:00
Dylan K. Taylor
b92a2ded8a
RegionLoader: check for zero sector count when loading location table
...
implementations shouldn't be writing location entries that have an offset but zero sectors, but just in case they do, we need to be aware of it.
2020-06-15 12:08:55 +01:00
Dylan K. Taylor
22f25dfbdb
RegionLocationTableEntry: require sector count to be at least 1
2020-06-15 12:05:48 +01:00
Dylan K. Taylor
6bf840c72e
RegionLoader: use actual null instead of zeroed entry for non-allocated chunks
...
this forces the code to be properly aware of non-allocated chunks, because it'll crash with NPE if it isn't.
2020-06-15 12:02:03 +01:00
Dylan K. Taylor
745be19a56
RegionLoader: fixed regions ballooning when writing chunks to the end of file
...
we already have a region growth problem due to the lack of garbage collection, but this bug was making it worse. If the region already contained 1024 allocated chunks, 4MB of file space would get wasted before the next chunk would be appended to the file.
2020-06-14 23:40:33 +01:00
Dylan K. Taylor
e05bee5ffb
RegionLoader: do a full check for chunk overlaps during initial load
2020-06-14 22:39:01 +01:00
Dylan K. Taylor
087ba0cc1d
phpstan: update config to use new 0.12.26+ options
2020-06-14 19:57:36 +01:00
Dylan K. Taylor
d8d994351b
phpstan 0.12.29
2020-06-14 16:25:55 +01:00
Dylan K. Taylor
0029efa370
Server: add getPlayerDataPath(), reduce logic duplication
2020-06-14 12:40:24 +01:00
Dylan K. Taylor
df13e967fd
imports cleanup
2020-06-14 10:27:15 +01:00
Dylan K. Taylor
097c260dbb
Eradicate all usages of strtoupper()
...
strtoupper() is an evil function whose behaviour depends on the system locale. mb_strtoupper() has more consistent behaviour.
2020-06-13 19:47:00 +01:00
Dylan K. Taylor
a219b727f2
updated build/php submodule to pmmp/php-build-scripts@cec63c3093
2020-06-13 11:14:21 +01:00
Dylan K. Taylor
710c162604
QueryRegenerateEvent: fixed possible type violation on listPlugins
2020-06-10 12:11:39 +01:00
Dylan K. Taylor
409c8c1703
TimingsCommand: workaround a PHPStan type specifying bug
2020-06-10 12:11:10 +01:00
Dylan K. Taylor
376926c700
TimingsCommand: fix missing type information for async task local storage
2020-06-10 12:10:33 +01:00
Dylan K. Taylor
c3fabe833e
FileWriteTask: mark as deprecated
2020-06-10 11:22:18 +01:00
Dylan K. Taylor
3e09ff5350
EnchantTable: fix formatting issue [ci skip]
2020-06-10 10:54:22 +01:00
Dylan K. Taylor
7255065106
LevelDB: stop passing false to places where it's not expected
2020-06-10 10:45:54 +01:00
Dylan K. Taylor
a7f10d8ccf
phpstan: ignore a FP (fixed in 0.12.26, but we can't upgrade yet)
2020-06-10 10:45:28 +01:00
Dylan K. Taylor
76f1add3b3
Timezone: return false if date_parse() fails
...
I hate this, but I don't want to change it to throw right now because it'll create a bunch of extra work.
2020-06-10 10:34:34 +01:00
Dylan K. Taylor
fcc9e62c65
CommandEnum: specify enumValues type
...
phpstan 0.12.26 starts reporting errors about the result of array_search() being given to some constructor or another because of the lack of key type specification.
2020-06-10 10:33:35 +01:00
Dylan K. Taylor
42613618a5
phpstan: add LevelDB::get() stub to fix return type
2020-06-10 10:31:54 +01:00
dependabot-preview[bot]
1bbeb62457
Bump phpunit/phpunit from 9.2.1 to 9.2.2 ( #3566 )
2020-06-08 17:32:39 +00:00
dependabot-preview[bot]
64893426fa
Bump phpunit/phpunit from 8.5.5 to 9.2.1 ( #3557 )
2020-06-06 10:13:46 +00:00
Dylan K. Taylor
3d50aafcc4
ShapedRecipe: remove a curly-brace array-access that nothing noticed
2020-06-06 11:12:45 +01:00
Dylan T
50fed41642
README: we're now on travis-ci.com
2020-06-05 13:02:31 +01:00
Dylan K. Taylor
3f971a0c65
phpstan: fixed analyze failure caused by a27b29897c58ec91c497f9bd7cd6bedb64ce77b4
2020-06-05 12:58:18 +01:00
Dylan K. Taylor
a27b29897c
TimingsCommand: tell operators what's going on for audit purposes
...
previously nobody except the person who was managing timings would know that timings was running, being pasted or whatever else. Since timings can impact performance (and, for example, block the main thread when writing timings to a file), access to it should be logged so that server owners know what's going on.
2020-06-05 11:12:36 +01:00
Dylan K. Taylor
a90132a30e
added missing 3.12.6 changelog
2020-06-04 20:38:06 +01:00
Dylan K. Taylor
dfbd857771
3.13.1 is next
2020-06-04 20:01:28 +01:00
Dylan K. Taylor
323d96d5c1
Release 3.13.0
3.13.0
2020-06-04 20:01:27 +01:00
Dylan K. Taylor
f495ba1d0b
Merge branch 'next-minor' into stable
2020-06-04 19:59:46 +01:00
Dylan K. Taylor
643cf0ebf8
3.12.7 is next
2020-06-04 19:55:09 +01:00
Dylan K. Taylor
1614206a6d
Release 3.12.6
3.12.6
2020-06-04 19:55:09 +01:00
Dylan K. Taylor
0ae2c6302a
Merge branch 'stable' into next-minor
2020-06-04 13:59:30 +01:00
Dylan K. Taylor
4f59c1b26c
.gitignore: ignore some extra crap
2020-06-04 13:58:46 +01:00