| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Change-Id: I90cfe8366c0245c9c67e598d17800684897a4e27
|
|
|
|
| |
Change-Id: I94a0ae83c65e8ee419bbd1ae1e86ab21ed4d8210
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Scalar casts are still allowed (for now), because there's a huge amount
of false positives. Ditto for invalid array offsets.
Thoughts about the rest: luckily, many false positives with array offsets
have gone. Moreover, since *Internal issues are suppressed in the base
config, we can remove inline suppressions.
Unfortunately, there are a couple of new issues about array additions
with only false positives, because apparently they don't take
branches into account.
Change-Id: I5a3913c6e762f77bfdae55051a395fae95d1f841
|
|
|
|
|
|
|
|
| |
It is converted to a valid sql string from the abstract database layer
Also use array for GROUP BY and column alias
Change-Id: I293a563607d115a42c8456c9b9ac66665d71d943
|
|
|
|
| |
Change-Id: I44c82fbe65e1d002803ce065df6563f06dd39cd4
|
|
|
|
| |
Change-Id: I11f8801ef47ec1a1f63d840116e69667e6f3ae3c
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following function are set to public in the parent class and cannot
have another visibility in subclasses
Maintenance::__construct
Maintenance::execute
Maintenance::getDbType
Maintenance::validateParamsAndArgs
Maintenance::setDB
Change-Id: I0cd6514642d479aca20f1221bf673b0713c21631
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- fixT22757.php appears to have been written for T22757 which has been
resolved, I assume it can be removed.
- compressOld.php - rev_text_id access is gated on MCRSchemaMigrationStage
READ_OLD. IT's safe to use the old_text and old_flags directly as we
select for them. Also the query ensures external blobs are not selected,
so we can use decompressData instead of Revision::getRevisionText.
Tested locally.
- recompressTracked.php uses a temporary table for tracking the blobs.
Table is populated by trackBlobs which explicitly queries for old_id,
so using it directly in recompressTracked is ok.
Tested locally.
- checkStorage.php the affected code attempts to fix broken revisions
from a dump, however, it looks like it doesn't work - the code expects
revision IDs as input, however it receives an array of text table old_id
values. Untested.
Bug: T198343
Change-Id: I753019565c15d270c831c995c07c7f1aad887cb6
|
|/
|
|
|
|
|
| |
The forbidden word was used in two senses, confusing the search and
replace done in 3d5016569da984050e.
Change-Id: I220a58fd536c828ab5e03a779e45f222d0298f9a
|
|
|
|
|
|
|
|
|
|
| |
Use the cluster and master server info array instead, when possible.
Also add initializeTable() method based on the one in addWiki.php.
This lets some internals be hidden from that script a bit more.
Bug: T231162
Change-Id: I694f12cc800684bcc13351021d9abc9a01bddfe9
|
|
|
|
|
|
|
| |
All uses were checked with codesearch, and the visibility was chosen as
strict as possible.
Change-Id: I56666299cc04ccc418e05949422876583982eb3c
|
|
|
|
|
|
|
|
|
| |
Follows-up 4a55e578ff8d73e. This must be the same type as
RecompressTracked::dispatchToReplica().
Caught by PhanTypeMismatchArgument, to be enabled in I34d65fe3ff1916f.
Change-Id: Ifff0d92752e6664d7745efeb4840c8b5ddb974a4
|
|
|
|
|
|
|
|
| |
This allows us to remove many suppressions for phan false positives.
Bug: T231636
Depends-On: I82a279e1f7b0fdefd3bb712e46c7d0665429d065
Change-Id: I5c251e9584a1ae9fb1577afcafb5001e0dcd41c7
|
|
|
|
|
|
|
| |
Bug: T231636
Depends-On: I2cd24e73726394e3200a570c45d5e86b6849bfa9
Depends-On: I4fa3e6aad872434ca397325ed7a83f94973661d0
Change-Id: Ie6233561de78457cae5e4e44e220feec2d1272d8
|
|
|
|
|
|
| |
Bug: T231636
Depends-On: I50377746f01749b058c39fd8229f9d566224cc43
Change-Id: I2cd24e73726394e3200a570c45d5e86b6849bfa9
|
|
|
|
|
|
| |
Bug: T231636
Depends-On: I58e67c2b38389df874438deada4239510d21654f
Change-Id: I6e5fba7bd273219b1206559420b5bdb78734aa84
|
|
|
|
| |
Change-Id: I8944a052f51a1941ad3b76a40fc9c46d1363c426
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Ide4518292bd9392d09f701b2c301673687d19f3b
|
| |
| |
| |
| |
| |
| |
| | |
Update deprecated Revision::* constants to use RevisionRecord::*
equivalents.
Change-Id: Icae1ebb088e4efadbc7c2806127a2073d337fa05
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: Idc2980c05873c428fb5ffa6ab89f723d33217a8e
|
|/
|
|
| |
Change-Id: Iced52ae65d31d1ca0cd2c64ebc9ab56b2aef9617
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Inject settings and global instances as dependencies to the
ExternalStoreMedium instances. This includes the local wiki
domain, so that wfWikiId() calls are not scattered around.
* Create ExternalStoreAccess service for read/write logic.
* Deprecate the ExternalStore wrapper methods.
* Add some exception cases for bogus store URLs are used instead
of just giving PHP warnings and failing later.
* Make moveToExternal.php require the type/protocol to decide
which ExternalStoreMedium to use instead of assuming "DB".
* Convert logging calls to use LoggerInterface.
Change-Id: I40c3b5534fc8a31116c4c5eb64ee6e4903a6197a
|
|
|
|
|
|
|
|
| |
Field rev_text_id is being retired as part of MCR Schema Migration.
Remove references to this field from maintenance scripts.
Bug: T198341
Change-Id: I43ab93c44cbd0a2a2479baf848f50348e1e4762b
|
|
|
|
|
|
|
|
|
|
|
| |
Field rev_text_id will no longer be populated once the legacy
schema is disabled, so joins against it will not work.
Remove all usages of the 'text' flag in calls to both
Revision::getQueryInfo() and RevisionStore::getQueryInfo()
so that these joins are no longer attempted.
Bug: T198342
Change-Id: I9be6a544c6f68555d4ea856f949f0040d05eac0f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
HHVM does not support variadic arguments with type hints. This is
mostly not a big problem, because we can just drop the type hint, but
for some reason PHPUnit adds a type hint of "array" when it creates
mocks, so a class with a variadic method can't be mocked (at least in
some cases). As such, I left alone all the classes that seem like
someone might like to mock them, like Title and User. If anyone wants
to mock them in the future, they'll have to switch back to
func_get_args(). Some of the changes are definitely safe, like
functions and test classes.
In most cases, func_get_args() (and/or func_get_arg(), func_num_args() )
were only present because the code was written before we required PHP
5.6, and writing them as variadic functions is strictly superior. In
some cases I left them alone, aside from HHVM compatibility:
* Forwarding all arguments to another function. It's useful to keep
func_get_args() here where we want to keep the list of expected
arguments and their meanings in the function signature line for
documentation purposes, but don't want to copy-paste a long line of
argument names.
* Handling deprecated calling conventions.
* One or two miscellaneous cases where we're basically using the
arguments individually but want to use them as an array as well for
some reason.
Change-Id: I066ec95a7beb7c0665146195a08e7cce1222c788
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replace
@var $foo type
by
@var type $foo
Change-Id: Iec8b90ffea4028a1005daef422b7c4ec38c2715f
|
|/
|
|
| |
Change-Id: I0acca592c6909e91b28b904da49dcbd6a43cd2a5
|
|
|
|
| |
Change-Id: I4046d593d1450cfffc489ca2abadba1084a540e4
|
|
|
|
|
|
| |
Add lots of missing return statements, or remove incorrect doc blocks.
Change-Id: I0881e98fbb9d0d4cf79ecc824064d24538055d3f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Benefit of keeping the parameter optional:
- In maintenance scripts that really only have one parameter, it's a
little more convenient to be able to ask for *the* parameter via an
empty getArg().
Disadvantages:
- It's unclear what getArg() means when there is no indication *which*
argument the code asks for. This might as well return the last
argument, or an array of all arguments.
- In scripts with two or more arguments, it's confusing to see
getArg( 1 ) next to an empty getArg().
- The methods are more complex and a bit more complicated to use with
the extra feature of this parameter being optional. Users need to
look up what the default is to be able to use it safely.
Change-Id: I22a43bfdfc0f0c9ffdb468c13aba73b888d1f15e
|
|
|
|
|
| |
Bug: T26712
Change-Id: Ie97b6f3e3cfc4dc010900ebde5ff8e5afec10727
|
|
|
|
| |
Change-Id: I66b1775b7c1d36076d9ca78cbeb42787a743f2aa
|
|
|
|
|
|
|
|
|
| |
Replace
if ( 42 === $foo )
by
if ( $foo === 42 )
Change-Id: Ice320ef1ae64a59ed035c20134326b35d454f943
|
|
|
|
| |
Change-Id: Ia86f8433f30a166d38ee63d0d1745b26740767b9
|
|
|
|
|
|
|
| |
"continue" statements in a switch are equivalent to "break". In PHP 7.3, will generate a warning.
Bug: T206974
Change-Id: I54bcec013ff52ab81bff09f8f7ef02f3944a5b7d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During development a lot of classes were placed in MediaWiki\Storage\.
The precedent set would mean that every class relating to something
stored in a database table, plus all related value classes and such,
would go into that namespace.
Let's put them into MediaWiki\Revision\ instead. Then future classes
related to the 'page' table can go into MediaWiki\Page\, future classes
related to the 'user' table can go into MediaWiki\User\, and so on.
Note I didn't move DerivedPageDataUpdater, PageUpdateException,
PageUpdater, or RevisionSlotsUpdate in this patch. If these are kept
long-term, they probably belong in MediaWiki\Page\ or MediaWiki\Edit\
instead.
Bug: T204158
Change-Id: I16bea8927566a3c73c07e4f4afb3537e05aa04a5
|
|
|
|
|
| |
Bug: T202142
Change-Id: I97a74e5a029b014f3c2195188936d5c8233c1b7f
|
|
|
|
|
|
| |
Swap some ResultWrapper/Database to interface IResultWrapper/IDatabase
Change-Id: I312cb3cca5742f72efdb0965ba35362f2eb1129d
|
|
|
|
| |
Change-Id: Idcc7e4fcdd4d8302ceda44bf6d294fa8c2219381
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Uses new PHP 5.6 syntax like ...parameter unpacking and
calling anything looking like a callback to make the code more readable.
There are much more occurrences but this commit is intentionally limited
to an easily reviewable size.
In one occurrence, a simple conditional instead of trickery was much more readable.
This patch finishes all the easy stuf in the core, the remainder is either unobvious
or would result in smaller readability gains. It will be carefully dealt with in
further commits.
Change-Id: I79a16c48bfb98b75e5b99f2f6f4fa07b3ae02c5b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '
(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)
Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).
Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
|
|
|
|
| |
Change-Id: Ieb22e1dbfcffaa4e7b3dcfabbcc999e5dd59a4bf
|
|
|
|
|
|
|
|
|
|
|
| |
* https://www.unicode.org/ instead of http://www.unicode.org/ or
http://unicode.org/
* https://secure.php.net/ instead of http://www.php.net/ or
http://php.net/
* https://hhvm.com/ instead of http://hhvm.com/
* https://www.iis.net/ instead of http://www.iis.net/
Change-Id: I84d818a7e0ced5ffb9485ec89a75efb28a77c1e0
|
|
|
|
|
|
|
| |
* The method fetchBlob() is private.
* Also remove all of the code duplication.
Change-Id: Ie307a937bcfd835a3239af23fb8deeb78704e0fe
|
|
|
|
|
|
|
|
|
|
| |
This should have been done long ago. Now it is being done.
This also changes ar_text_id to NOT NULL, since it should never be null
anymore, and DEFAULT 0 in preparation for MCR stopping writing it.
Bug: T33223
Change-Id: I18f1c740b7537c7dc3cfeba9b241d0a9f31caa34
|
|\ |
|