0591458ef6
Merge branch 'stable' into next-minor
2019-10-22 18:49:22 +01:00
305c63ba4d
MainLogger: initialize shutdown field in the conventional manner
...
this avoids uninitialized uses
2019-10-22 10:21:17 +01:00
348c2a599b
Internet: report PM version in user agent
...
this is useful for statistics
2019-10-04 10:59:32 +01:00
bb048fb361
Merge branch 'stable' into next-minor
2019-07-26 19:50:17 +01:00
622f93df45
remove usages of deprecated {} string access, closes #3035
2019-07-22 16:39:33 +01:00
7fc45bc5c3
partial fix for #2986
2019-07-04 18:18:42 +01:00
7b98d203f4
Merge branch 'stable' into next-minor
2019-06-16 14:47:01 +01:00
dbf4054b1f
backport 209135492
: UUID: add type docs
2019-06-16 14:44:13 +01:00
82e4ef6d48
backport d8c81c0a1
: UUID: remove useless default values
...
these are overwritten by the constructor, so they have no use here.
2019-06-16 14:43:28 +01:00
4635b93f4d
backport 23071d257
+ deprecations: Extract process-related functions from Utils into a separate Process class
2019-06-16 14:40:51 +01:00
a8433697ad
backport aaaddd1fd
: Terminal: stick a RESET on the end when writing a newline
2019-06-16 14:25:16 +01:00
d0d300a6f8
backport 342b48b75
: VersionString: Use the correct bitwise operators
2019-06-16 14:21:02 +01:00
680cdb8e3e
backport f5dbbea5f
: Utils: added recursiveUnlink()
2019-06-16 14:20:05 +01:00
eaa78fe849
backport 205e13d88
: Config: add getPath() ( #2758 )
...
Config->getPath() returns the path of the config i.e. the place where the config file is located.
2019-06-16 14:18:50 +01:00
eedea4998b
Terminal: Added write() and writeLine() to allow easily emitting Minecraft-formatted text to the console
2019-06-16 14:16:14 +01:00
0058bfcd23
Utils: Limit length of printed stack trace strings to 80 characters
2019-06-06 14:56:19 +01:00
9f31b479e1
Improve stack trace rendering, show array and string lengths
2019-06-06 14:53:50 +01:00
22d9260a3b
remove unused import
2019-04-26 13:56:32 +01:00
c2c210e25a
Fixed --enable-ansi and --disable-ansi not being respected on threads
...
this causes some breakage to the behaviour of Terminal, and for that reason this is going on 4.0.
Terminal::hasFormattingCodes() will no longer auto-detect whether colour codes are supported.
2019-04-26 12:30:24 +01:00
142d750b9f
TextFormat: clean() now removes private-use area Unicode characters
...
the console can't print these, and these are being abused to cause mass crashes in the wild.
2019-04-15 18:42:09 +01:00
383ec8a8e3
TextFormat: Fixed tokenize() not being Unicode-aware
2019-04-08 15:45:26 +01:00
6f36fa504b
TextFormat: make clean() less confusing, deduplicate some regex
2019-02-14 16:52:39 +00:00
c433fad0a7
another /u modifier
2019-02-14 13:50:56 +00:00
8fad5a6e30
TextFormat: use mb_scrub() in clean()
...
this redacts invalid characters to prevent them appearing in places that might break the client.
2019-02-13 20:01:36 +00:00
7a6f279825
TextFormat: fixed clean() not being unicode-aware
2019-02-13 17:06:44 +00:00
5da48f429f
Fixed some remaining one-line field declarations, added type docs
2019-02-05 14:03:27 +00:00
71d17c50d6
Fixed internal IP detection ( #2711 ), closes #2702
2019-01-29 12:51:53 +00:00
c83b7d9b69
Utils: fixed getNiceClosureName() not processing namespaced closures properly
2019-01-26 12:08:07 +00:00
3380aa3ac2
Config: Assert only whitespace precedes .properties key, fixes #commented properties not being skipped
2019-01-07 12:25:05 +00:00
2cdf97b7b5
CrashDump: Scan full stack trace to determine plugin involvement
2019-01-06 18:07:29 +00:00
4b9a142a5d
Import global functions and constants for enhanced performance
...
This is better for performance because these then don't need to be reevaluated every time they are called.
When encountering an unqualified function or constant reference, PHP will first try to locate a symbol in the current namespace by that name, and then fall back to the global namespace.
This short-circuits the check, which has substantial performance effects in some cases - in particular, ord(), chr() and strlen() show ~1500x faster calls when they are fully qualified.
However, this doesn't mean that PM is getting a massive amount faster. In real world terms, this translates to about 10-15% performance improvement.
But before anyone gets excited, you should know that the CodeOptimizer in the PreProcessor repo has been applying fully-qualified symbol optimizations to Jenkins builds for years, which is one of the reasons why Jenkins builds have better performance than home-built or source installations.
We're choosing to do this for the sake of future SafePHP integration and also to be able to get rid of the buggy CodeOptimizer, so that phar and source are more consistent.
2019-01-04 20:43:15 +00:00
d71a543d10
Fixed a bunch of things PHPStan finds unpalatable
...
close #2614 , fix a bunch of docs bugs, fix sendCreativeContents() crash on Human holders, move some inline variable declarations
2019-01-04 00:23:09 +00:00
1455c38dbe
Utils: fixed crash in getCoreCount(), closes #2600
...
this should just default to 2 instead of shitting its pants.
2018-12-22 13:27:11 +00:00
34a899e28b
Clean up Utils error handling functions (internal)
2018-12-16 17:50:00 +00:00
b80868040e
Utils: fixed getTrace() including itself in trace when no alt trace is given
...
it always seemed a little strange that crashdump trace would pop 4 frames when only 3 are written in the comment...
2018-12-16 17:15:16 +00:00
762405d16a
Add daverandom/callback-validator as a dependency
2018-12-04 17:14:37 +00:00
b0060caaf7
Config: don't catch-all in save()
2018-11-25 16:35:59 +00:00
788b278fc3
Utils: fixed handling of non-anonymous closure functions
2018-11-11 19:43:00 +00:00
755db3dac8
Added a ClosureTask implementation for easier task scheduling ( #2497 )
2018-11-04 22:55:40 +00:00
3dabf90b0e
Merge branch 'release/3.3' into release/3.4
2018-11-04 22:38:58 +00:00
7b24fbc8db
Utils: fix a mistake in getNiceClassName() doc
2018-11-04 22:38:38 +00:00
265b61b3e6
Merge branch 'release/3.3' into release/3.4
2018-10-31 18:55:26 +00:00
ab48d85c35
Properly deal with anonymous tasks in timings
2018-10-31 18:51:30 +00:00
6dd2597934
Merge branch 'release/3.3' into release/3.4
2018-10-21 18:17:07 +01:00
45c9caa38c
Fixup some formatting issues
2018-10-21 18:15:25 +01:00
4c8ffce86f
Merge branch 'release/3.2' into release/3.3
2018-10-16 16:46:39 +01:00
78923177f9
VersionString: use appropriate regex for number matching
2018-10-16 16:46:27 +01:00
557fd34754
Make MainLogger independent of runtime-defined INI entries
...
Previously every thread using the logger had to inherit runtime-defined INI entries in order for the timezone to be set correctly. This removes that requirement.
2018-09-04 15:57:45 +01:00
9d17c9a09d
Merge branch 'release/3.1' into release/3.2
2018-08-19 11:22:58 +01:00
3892f2f404
Config: Properly prevent keys getting transformed into bools
...
The original regex almost completely failed at its objective, because it a) only worked if there was no value for the key, and b) did not prevent all such occurrences getting transformed, while quoting patterns that would not get transformed anyway.
2018-08-19 11:22:36 +01:00