wiki.techinc.nl/tests/phpunit/includes/parser
C. Scott Ananian c39ef6c6c9 Change return value of ParserOutput::getPageProperty() when property is missing
The old ParserOutput::getProperty() method returned `false` when a property
was missing.  This requires callers to use the `?:` syntax to supply default
values, which then causes any falsey value to be treated as missing.
So, for example, setting the defaultsort to '0' will cause the default
sort to be ignored.

Modern php convention is to use `null` for missing values, and the `??`
syntax is a better/more restrictive alternative to `?:`.

We renamed `ParserOutput::getProperty()` to `::getPageProperty()` in
1.38 (Ie963eea5aa0f0e984ced7c4dfa0fd65d57313cfa/T287216) but kept the
return value convention.  Before this actually makes it into a 1.38
release, take the opportunity to fix the return value for the new
`ParserOutput::getPageProperty()` method to return `null` when the
property is missing.

We need to do some temporary workarounds to the places we'd
already swapped over to use the new `::getPageProperty()` method
to allow them to handle either `false` or `null` as a return value;
we'll clean that up once this is merged.

Code search:
https://codesearch.wmcloud.org/deployed/?q=-%3EgetPageProperty%5C%28|T301915&i=nope&files=&excludeFiles=&repos=

Bug: T301915
Depends-On: I3f11ce604970e47b41fc1c123792df8c3045626f
Depends-On: Ie7533f49fe4cad01ebfda29760d23c61e9867b10
Depends-On: Ic5c09f5caa4c897bc553c614fbae9cee159566a2
Depends-On: I0278b2eafd90e77e4fee41c45a1165fb79ddf47e
Depends-On: I383abb6b7dc5e96c0061af13957609f6e31a1065
Depends-On: I79f9f4078e415284af29b15047bafd1c823d7f5b
Depends-On: I02276c48c49f5d2d241a69eb0a6cdf439b572d8b
Depends-On: I71628661b4539a4e35ae32846e719f92bcf782e0
Depends-On: I7e215cb43de0ce150a6bcc00f92481dcdcfed383
Change-Id: Iaa25c390118d2db2b6578cdd558f2defd5351d15
2022-02-18 21:15:58 +00:00
..
CacheTimeTest.php Tests: remove unneeded tearDown functions 2021-07-27 13:15:40 +00:00
CoreParserFunctionsTest.php phpunit: use ->getServiceContainer() in integration tests 2022-01-27 22:04:16 +01:00
LinkHolderArrayIntegrationTest.php Strict return types for PageIdentity 2021-01-18 17:33:14 +01:00
MagicVariableTest.php phpunit: use ->getServiceContainer() in integration tests 2022-01-27 22:04:16 +01:00
ParserCacheSerializationTestCases.php Change return value of ParserOutput::getPageProperty() when property is missing 2022-02-18 21:15:58 +00:00
ParserCacheTest.php Cleanup mixed space/tab line indent 2021-09-04 00:52:31 +02:00
ParserMethodsTest.php Clean up tests that misused the parameters of assertSame/Equals 2022-02-08 07:21:10 +00:00
ParserOptionsTest.php remove access to config globals from includes/parser 2022-02-01 07:48:57 -08:00
ParserOutputTest.php Change return value of ParserOutput::getPageProperty() when property is missing 2022-02-18 21:15:58 +00:00
ParserPreloadTest.php phpunit: use ->getServiceContainer() in integration tests 2022-01-27 22:04:16 +01:00
ParserTest.php remove access to config globals from includes/parser 2022-02-01 07:48:57 -08:00
PreprocessorTest.php phpunit: use ->getServiceContainer() in integration tests 2022-01-27 22:04:16 +01:00
RevisionOutputCacheTest.php Tests: remove unneeded tearDown functions 2021-07-27 13:15:40 +00:00
SanitizerTest.php Sanitizer: Replace RFC 3454 by RFC 8264 for clearUrl 2021-08-26 21:02:21 +00:00
StripStateTest.php build: Updating dependencies 2021-07-22 03:36:05 +00:00
TagHooksTest.php phpunit: use ->getServiceContainer() in integration tests 2022-01-27 22:04:16 +01:00
validateParserCacheSerializationTestData.php Hard-deprecate all public property access on CacheTime and ParserOutput. 2021-10-13 13:27:16 -04:00