Commit graph

8 commits

Author SHA1 Message Date
Tim Starling
0077c5da15 Use short array destructuring instead of list()
Introduced in PHP 7.1. Because it's shorter and looks nice.

I used regex replacement.

Change-Id: I0555e199d126cd44501f859cb4589f8bd49694da
2022-10-21 15:33:37 +11:00
Umherirrender
5c5498a202 Remove unused key variable from foreach loops
Change-Id: Id2d91e30a6f7cc4eb93427b50efc1c5c77f14b75
2022-09-21 21:18:43 +02:00
Tim Starling
c5ef6e3091 PHP 8.1: add ENT_COMPAT to some htmlspecialchars() calls
In PHP 8.1 the default $flags argument to htmlspecialchars() has changed
from ENT_COMPAT to ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401. This
breaks some tests.

I changed all the calls that break unit tests, and some others
based on a quick code review. A lot of callers just use the default for
convenience, and were already over-quoting, so the default should still
be good enough for them.

Change-Id: Ie9fbeae6f0417c6cf29dceaf429243a135f9fecb
2022-01-25 16:30:44 +11:00
Umherirrender
39a4ddf689 Improve docs from parser objects PPNode/PPFrame
Change-Id: Ie1bd0fb52a16277482ce461a50b16550332b6768
2021-02-01 19:37:33 +00:00
Aaron Schulz
de6eeead21 parser: convert Preprocessor to WANCache and inject dependencies
Make the caching logic use getWithSetCallback() and simplify
the code given that there is only one Preprocessor subclass.
Also, keep the cached values JSON serializable but rely on
the serialization in BagOStuff instead for simplicity.

Add related class constants for injecting preprocessor flags.

Bug: T254608
Change-Id: I72f9f0c0bc352ed5120469090c71294ff0c24999
2021-01-11 20:21:10 -08:00
Reedy
b038d6333a Fix even more PSR12.Properties.ConstantVisibility.NotFound
Change-Id: I6d98efcfac1f1c0ab6a442e0af6d5daa6ef7801a
2020-05-16 00:28:41 +00:00
Umherirrender
dd25f3df6b Improve type hints in parser related classes
Change-Id: Ia07a2eb32894f96b195fa3189fb5f617e68f2581
2019-07-05 21:29:32 +00:00
Zoranzoki21
4226fada45 Split parser related files to have one class in one file
Change-Id: I36b26609ccb3f135a22961b32a46cdc06603b3e4
2019-04-27 00:41:47 +00:00