Commit Graph

315 Commits

Author SHA1 Message Date
a5babb2c9f 5.19.1 is next 2024-09-20 19:00:23 -05:00
49c2f13cf0 Release 5.19.0 2024-09-20 18:59:45 -05:00
2a7b183ab8 5.18.2 is next 2024-09-02 11:25:50 -05:00
e9b597af6c Release 5.18.1 2024-09-02 11:24:42 -05:00
e3baf3cddb 5.18.1 is next 2024-08-16 07:56:01 -05:00
9176b2494a Release 5.18.0 2024-08-16 07:54:59 -05:00
f5ab2979a0 5.17.2 is next 2024-08-13 10:56:03 -05:00
929cd63135 Release 5.17.1 2024-08-13 10:55:29 -05:00
824e270041 5.17.1 is next 2024-07-09 21:16:13 -05:00
37bf4bc0b0 Release 5.17.0 2024-07-09 21:15:18 -05:00
433bd6a8aa 5.16.1 is next 2024-06-13 18:55:21 +01:00
22a1549998 Release 5.16.0 2024-06-13 18:55:18 +01:00
be6754494f 5.15.1 is next 2024-04-25 11:52:31 +01:00
d273ccf87c Release 5.15.0 2024-04-25 11:52:30 +01:00
55cf24aa02 5.14.2 is next 2024-04-05 18:41:27 +01:00
3590d84d03 Release 5.14.1 2024-04-05 18:41:27 +01:00
1ad190024a 5.14.1 is next 2024-04-05 18:16:22 +01:00
769a149057 Release 5.14.0 2024-04-05 18:16:19 +01:00
0e5395c59b PocketMine-MP.phar self-extraction to decompressed cache (#6217)
Because ext-phar sucks, tmp gets spammed by cache files for every thread when loading files from the phar on the fly.

Instead, we convert the `.phar` into a decompressed `.tar` in the tmp directory and require files from inside it. Surprisingly, this works because `ext-phar` supports `tar` and `zip` natively. No stream wrapper is required, as the `PocketMine.php` bootstrap loads files relative to its location, so the cache is automatically used for everything.

To be honest I would rather get rid of phars entirely, but they are still the easiest way to have PhpStorm load PocketMine-MP API information for now, and the alternatives are more complicated and inconvenient.

### Caveats
Everywhere that previously used `new Phar(Phar::running(false))` in the core code needs to be updated to use `PharData` for this to work correctly. Plugins don't need to do anything.

### Why not just use `Phar::decompressFiles()`?
This requires setting `phar.readonly` to `0`, which is a security issue. Technically, we could have used a subprocess to do this, but it just didn't seem right.

### WTF? `phar://` can be used on `tar` files???
Yup. I was just as surprised to find out that `require` works in such contexts.

### Relevant issues
- Closes #6214 

## Changes
### API changes
None.

### Behavioural changes
Server startup will be slightly slower, as the phar has to decompress and convert itself into a `.tar`. However, testing showed that this generally takes less than 200 ms, so it should be barely noticeable.

## Backwards compatibility
No BC issues.

## Tests
Locally tested and the CI will also verify
2024-03-18 16:48:17 +00:00
2d24fac067 5.13.1 is next 2024-03-13 14:59:21 +00:00
f193a990b0 Release 5.13.0 2024-03-13 14:59:21 +00:00
e105c9bd76 5.12.2 is next 2024-03-13 13:48:59 +00:00
23f4632409 Release 5.12.1 2024-03-13 13:48:56 +00:00
b2c97cf2f1 5.12.1 is next 2024-02-28 18:14:41 +00:00
a35c3406a8 Release 5.12.0 2024-02-28 18:14:37 +00:00
34a5f91aa9 5.11.3 is next 2024-02-26 14:45:48 +00:00
aee3656415 Release 5.11.2 2024-02-26 14:45:47 +00:00
b744e09352 5.11.2 is next 2024-02-23 14:19:02 +00:00
7b89dda420 Release 5.11.1 2024-02-23 14:19:01 +00:00
169d3e0de8 5.11.1 is next 2024-02-07 13:01:30 +00:00
ce8fecc6ec Release 5.11.0 2024-02-07 13:01:30 +00:00
00a8ea267c 5.10.1 is next 2023-12-14 16:54:42 +00:00
daeba95101 Release 5.10.0 2023-12-14 16:54:38 +00:00
b4838f5b4e 5.9.1 is next 2023-12-06 15:02:57 +00:00
46307973e3 Release 5.9.0 2023-12-06 15:02:57 +00:00
93699024da 5.8.3 is next 2023-11-09 18:51:20 +00:00
c3c81b09e8 Release 5.8.2 2023-11-09 18:51:17 +00:00
07dff9c9e8 5.8.2 is next 2023-11-01 17:55:23 +00:00
75a39491be Release 5.8.1 2023-11-01 17:55:22 +00:00
68c6b87678 5.8.1 is next 2023-11-01 17:49:56 +00:00
e20c031aa1 Release 5.8.0 2023-11-01 17:49:53 +00:00
55f3477ed9 5.7.2 is next 2023-11-01 16:37:46 +00:00
2c17f82eb8 Release 5.7.1 2023-11-01 16:37:46 +00:00
0b2fc84827 5.7.1 is next 2023-10-26 12:51:45 +01:00
22b9e70372 Release 5.7.0 2023-10-26 12:51:45 +01:00
1c5d3b43be 5.6.2 is next 2023-10-20 10:30:50 +01:00
decc188302 Release 5.6.1 2023-10-20 10:30:50 +01:00
5eca90d478 5.6.1 is next 2023-09-20 19:00:51 +01:00
338bb3fe6d Release 5.6.0 2023-09-20 19:00:51 +01:00
79acc4fed4 5.5.1 is next 2023-09-06 12:13:26 +01:00