@taylan@fedi.feministwiki.org @john@sauropods.win @jianmin@defcon.social The first one is definitely your own fault. Every programming language has their own identifiers for code. Stuff like require() is very old and doesn't tend to get used in modern PHP development at all.
What I would do with MediaWiki is store all my settings in environment variables instead and then in the LocalSettings.php config file just write getenv('DATABASE_PASSWORD'), etc.
As for checking the contents with a null coalescing operator doing it like you did it now is completely fine, but if you really wanted t avoid the "blah" expression from being evaluated you should just use array_key_exists() on the $_SERVER array beforehand to check if your 'FOOBAR' is actually there.
And yes MediaWiki specifically a very love-hate piece of software. It's obviously 23 years old so it's actually amazing that it still works the way it does honestly. On one hand I do like that MediaWiki is very modular and easy to customize and extend, but in some modules, especially parts that don't get touched very often, its 23 year old age really shows through the cracks.
I wouldn't say MediaWiki is representative of the modern PHP experience at all however, especially compared to applications built on top of frameworks like Laravel, Lumen or Symfony.
Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
SuperDicq (superdicq@minidisc.tokyo)'s status on Friday, 11-Apr-2025 22:10:34 JST SuperDicq