44 Commits

Author SHA1 Message Date
Dylan K. Taylor
974d08efd6
Bump PHP minimum requirement to 8.0
PHPStan failed on 7.4 after updating to 0.12.99, and I figured it was less hassle to just do this than fix the build. In any case, we stopped shipping 7.4 months ago, and warned at 3.22 release that 7.4 support would soon be dropped.
2021-10-09 20:09:42 +01:00
Dylan K. Taylor
e38866c4ba
phpstan 0.12.99 2021-10-09 19:33:43 +01:00
Dylan K. Taylor
a27c14c00c phpstan: exclude build/php from analysis
in case I built PHP in there, I don't want the install_data getting analysed and screwing up the analysis.
2021-10-05 00:14:44 +00:00
Dylan K. Taylor
c948aa94aa
Fixed new files in build/ keeping getting missed 2021-09-07 12:39:54 +01:00
Dylan K. Taylor
5d0d1aa4c5
Include build/generate-build-info-json.php in analysis 2021-09-07 12:36:42 +01:00
Dylan K. Taylor
9b8be22015
Sort phpstan.neon 2021-09-07 12:32:19 +01:00
Dylan K. Taylor
f506c922b5
phpstan.neon.dist: fix indentation inconsistency
fuck you, phpstorm!

it doesn't have an option to use tabs for indentation in YAML, and YAML is the closest thing to NEON, so ...
2021-08-29 23:19:35 +01:00
Dylan K. Taylor
ff4aa148ef
phpstan 0.12.95 2021-08-20 22:47:29 +01:00
Dylan K. Taylor
01fe497c49
phpstan: use PHP 8.0 as primary version
I'm using 8.0 for local development now, so having the phpstan configs targeted at 7.4 by default makes things inconvenient.
2021-07-26 14:34:47 +01:00
Yosshi999
cbc8576d4a
Implement UPnP support without dotNET (#3378)
UPnP forwarding is now available on all supported platforms.
com_dotnet is no longer required for UPnP forwarding to work.

Closes #3216 .
2021-03-14 22:50:33 +00:00
Dylan K. Taylor
16fa958416
phpstan: better hack for any-callable parameters
variadics are a bad fit for this because what we really need is to accept callable with any number of arguments. LSP requires that the provided number of arguments must be >= than the required number of arguments.
2021-01-27 19:25:28 +00:00
Dylan K. Taylor
34c1d455a7
phpstan: enable checkMissingCallableSignature 2021-01-24 20:27:53 +00:00
Dylan K. Taylor
8564912149 phpstan: define LEVELDB_ZLIB_RAW_COMPRESSION if it doesn't exist (for phpstan)
this improves the analysis quality by informing phpstan of the type of whatever should be there.
2020-10-11 23:01:21 +01:00
Dylan K. Taylor
b7578fef9c Fixup TesterPlugin to PHPStan standards 2020-08-28 21:17:21 +01:00
Dylan K. Taylor
a9d98bdf73 phpstan: baseline our way into checkExplicitMixed territory 2020-06-18 18:07:21 +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
42613618a5 phpstan: add LevelDB::get() stub to fix return type 2020-06-10 10:31:54 +01:00
Dylan K. Taylor
673e444456 phpstan: fix build failure 2020-05-31 13:02:32 +01:00
Dylan K. Taylor
fffa4b9501 phpstan: baseline our way to level 8
we really need the level 8 checks on new code now, and waiting until old code is clean is not going to benefit us much because the issues that are there already exist.
2020-05-18 20:09:25 +01:00
Dylan K. Taylor
4c1b10b24b restructure ignoreErrors to allow regenerating them file by file 2020-04-25 11:59:06 +01:00
Dylan K. Taylor
61dc9d7f6b phpstan: split up phpstan-bugs and phpstan-bugs-generated configs 2020-04-25 11:26:54 +01:00
Dylan K. Taylor
da9731ef59 phpstan: add stub defines to improve analysis 2020-04-25 11:07:05 +01:00
Dylan K. Taylor
5c12a95151 phpstan: force static reflection for COM class
com_dotnet has crap reflection exports and the class name case doesn't match.
2020-04-14 01:43:02 +01:00
Dylan K. Taylor
6c7dada232 finally, integrate phpstan-strict-rules 2020-02-06 19:44:10 +00:00
Dylan K. Taylor
3a5709bf5e start using phpstan-phpunit
not using extension-installer because I want to part-integrate phpstan-strict-rules later on.
2020-02-06 13:23:18 +00:00
Dylan K. Taylor
7885b54824 phpstan: run static analysis on tests 2020-02-06 13:13:12 +00:00
Dylan K. Taylor
fd2a7797bd include make-release.php in phpstan analysis 2020-02-05 15:55:41 +00:00
Dylan K. Taylor
4bc2f28c6d Provide a ChunkUtils stub for PHPStan, so it doesn't get confused when the extension is loaded
for some reason the presence of the type problems were reported as
problems on ChunkUtils.php, despite being outside of the project scope
and the errors not applying to the polyfill.
2020-02-02 18:12:41 +00:00
Dylan K. Taylor
af82a6bbe1 phpstan: enable checkMissingIterableValueType 2020-01-30 22:31:42 +00:00
Dylan K. Taylor
004f7ef82e phpstan: stub out the iterable bullshit with pthreads
this isn't a perfect fix, but it's better than it whining about all the things.
2020-01-30 22:31:15 +00:00
Dylan K. Taylor
89ebd2b880 remove some dead ignoreErrors 2020-01-30 22:30:04 +00:00
Dylan K. Taylor
5a97c378fc phpstan: green on level 6, minus iterable types
iterable types are a big pain in the ass because of pthreads' awful architecture, and there's nothing I can do about that without BC-breaking changes to pthreads.
2020-01-20 17:54:55 +00:00
Dylan K. Taylor
651ef500a3 Make pocketmine\PATH and pocketmine\RESOURCE_PATH always available
these are non-dependent on environment, so they can be determined with no external input.
    This fixes 2 PHPStan issues, fixes some code that couldn't run outside of PM, and makes it easier to write code that depends on PM.
2020-01-13 10:55:54 +00:00
Dylan K. Taylor
30f2e75278 phpstan 0.12.5 2020-01-12 16:57:43 +00:00
Dylan K. Taylor
6dcd2a4ece phpstan: start phasing in some level 6 checks 2020-01-09 19:56:04 +00:00
Dylan K. Taylor
08e3b8ffdc build: added specialized script to create a server phar
this is much easier to use than devtools, and allows us to make additional specializations for PM build that would otherwise just be a colossal pain in the ass.
2020-01-04 14:56:53 +00:00
Dylan K. Taylor
3e23a568ca phpstan: properly fixing FPs on constant comparisons 2019-12-29 14:25:44 +00:00
Dylan K. Taylor
76994f15ac phpstan: green on level 5 2019-12-12 18:27:26 +00:00
Dylan K. Taylor
70c3008b7b phpstan: green on level 4 2019-12-12 13:00:57 +00:00
Dylan K. Taylor
7b1ae2a822 phpstan: green on level 3 2019-12-04 22:12:14 +00:00
Dylan K. Taylor
c35d91a104 phpstan: allow blanket ignoreErrors in src to reduce merge work for master 2019-12-04 19:42:18 +00:00
Dylan K. Taylor
9fc260fb1a keep phpstan.neon.dist ignoreErrors sorted by file 2019-12-04 19:38:54 +00:00
Dylan K. Taylor
73d0f799c2 Update to PHPStan 0.12.0 2019-12-04 10:29:49 +00:00
Dylan K. Taylor
00e415fc79 move phpstan.neon to phpstan.neon.dist to allow phpstan.neon to be locally modified for development 2019-12-03 19:57:19 +00:00