Commit graph

16 commits

Author SHA1 Message Date
DannyS712
bd73c48744 StubObject: add magic __get() and __set()
We will soon be converting $wgUser to be a stub
object wrapping a User, and we want to be able
to access the public properties of that object
(doing so will still trigger deprecation warnings,
but it won't break). This will also work for
non-existent properties that are handled via
the __get() and __set() methods of whatever
inner object the StubObject is wrapping.

Bug: T267861
Change-Id: I4c29c615bcb107d4ef8bf4b8e48db2ecf863e5f7
2021-09-04 05:37:25 +00:00
DannyS712
4b9b4763d1 DeprecatedGlobal: remove unneeded phpcs suppression
Change-Id: I123e4dd57e0a05aa7498bdfa822a9ec6c23ca2c4
2021-02-16 16:30:43 +00:00
Fomafix
6a3f192d11 Forbid wfDeprecated with $version = true
$version = true is not supported.

Change-Id: Id08ada32cd0273564c638d242354351333a9f163
2019-12-31 13:53:36 +01:00
Umherirrender
925e3eb30b Set method visibility in some classes
Change-Id: I3c3d59d4b3edf2459efeac890721a43475e27198
2019-12-05 17:42:55 +00:00
Umherirrender
0688dd7c6d Set method visibility for various constructors
Change-Id: Id3c88257e866923b06e878ccdeddded7f08f2c98
2019-12-03 20:17:30 +01:00
Umherirrender
255d76f2a1 build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
Clean up use of @codingStandardsIgnore
- @codingStandardsIgnoreFile -> phpcs:ignoreFile
- @codingStandardsIgnoreLine -> phpcs:ignore
- @codingStandardsIgnoreStart -> phpcs:disable
- @codingStandardsIgnoreEnd -> phpcs:enable

For phpcs:disable always the necessary sniffs are provided.
Some start/end pairs are changed to line ignore

Change-Id: I92ef235849bcc349c69e53504e664a155dd162c8
2018-01-01 14:10:16 +01:00
Kunal Mehta
1d77070f19 DeprecatedGlobal: Support lazy-loading via StubObject
Either a factory function or the class name should be passed in.
Providing the actual value is no longer supported.

And provide tests for DeprecatedGlobal.

Change-Id: I7180cc99c3a01e34f39a9abe54bd1d08137117ed
2017-07-05 19:55:00 -07:00
Umherirrender
b5cddfb27b Remove empty lines at begin of function, if, foreach, switch
Organize phpcs.xml a bit

Change-Id: Ifb767729b481b4b686e6d6444cf48b1f580cc478
2017-07-01 11:34:16 +00:00
jenkins-bot
b941a11623 Merge "Remove silly 'm' prefix from StubObject/DeprecatedGlobal members" 2014-05-27 18:53:00 +00:00
Siebrand Mazeland
a7fbdd6503 Make phpcs-strict pass on includes/ (7/7)
Change-Id: Ia9baaf0b3cdbe1a3c6b50ef8c4fe86fead88f909
2014-05-15 20:07:09 +02:00
Chad Horohoe
67b2557da1 Remove silly 'm' prefix from StubObject/DeprecatedGlobal members
Nothing uses them outside of these two classes

Change-Id: I83a8eaff0d2d2d60592106d0e37572f898e482e9
2014-05-15 09:05:24 -07:00
Chad Horohoe
2f28d7dd70 Kill $wgArticle
This has been deprecated since 1.18, throwing warnings for over a
year and a half now, and nothing uses it anywhere in core or deployed
extensions.

No extensions in SVN seem to have this anymore (we must've cleaned
up well), and the only affected extensions in Git are:

- BlueSpiceExtensions
- DynamicPageList (commented, so shouldn't be a worry)
- SemanticPageMaker
- TwitterCards

If you're the author of one of these extensions or are feeling like
cleaning up ancient code, please get them fixed.

Change-Id: I8f3a54c14be4b38a8b917e32ba3a832e0a7ca116
2013-11-01 14:17:26 -07:00
umherirrender
1044b0b8df fix some spacing
Change-Id: I8f976013f33c5818e4402604fe8610aa3f43b0c6
2013-02-04 20:18:33 +00:00
Alexandre Emsenhuber
3bbda787b8 Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ic1ba00472ef62fa4fd746f8f590fe694d490ecd9
2012-05-20 17:56:43 +02:00
Brian Wolff
11f4db8b2a follow-up r111342. Document the callerOffset paramter being used per CR. 2012-02-13 20:29:41 +00:00
Brian Wolff
d5b26e049a Give a warning when people use $wgArticle. Add's a class that can be used to give warnings for other globals too.
See discussion on r111168.

Of course no one will see warning because trunk has $wgDeprecationReleaseLimit set to 1.17 by default
(<rant>have I mentioned how I don't like that variable. People enable warnings to be *warned* about
things. Making it so people won't get warned about things until a couple months after we've decided people
should stop using function/interface/etc defeats the purpose of having warnings</rant>)

p.s. Wasn't sure if this waranted something in the release notes, I don't think it does (It's just adding a warning)
but wasn't sure.
2012-02-13 00:19:06 +00:00