| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Same as Ia294bf4 did for 1-line comments. This patch removes slightly
more complex 2-line PHPDoc comments that don't add any new information
to the code, but literally repeat what the code already says.
They say "don't document the code, code the documentation", and we
are doing this more and more. We just tend to forget to remove the
obsolete comments.
Note I'm also removing a line of text in a few cases when it's very
short and literally says the same as the method name. Again, such
comments add zero new information.
Change-Id: I01535404bab458c6c47e48e5456403b7a64198ed
|
|
|
|
|
|
|
|
|
|
|
| |
Allow passing a SelectQueryBuilder to BatchRowIterator,
instead of passing only table names and then setting all
other query info using custom methods.
Hopefully offering this more familiar interface will make
BatchRowIterator easier to use.
Change-Id: I87f81ba693e0a74d414342fa5ffc2eac0bcfdf11
|
|
|
|
|
|
|
| |
A–F. Still need to do F–Z.
Bug: T353458
Change-Id: Ieb4bad0658b9cddc9403c6a55ef3bd1245aa08ae
|
|
|
|
|
|
|
| |
For a private function the $fname does not need to be optional,
it should be easy to pass it always.
Change-Id: Ifcddcd2479ae6f8bbf68210441c61ee7a45e1489
|
|
|
|
|
|
|
|
|
|
| |
Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation.
Once the sniff is enabled it avoids that new code is missing type
declarations. This is focused on documentation and does not change code.
Change-Id: I7dec01892a987a87b1b79374a1c28f97d055e8fa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
* Maintenance scripts in core have bolierplate code that is
added before and after the class to allow directly running
the maintenance script.
* Running the maintenance script directly has been deprecated
since 1.40, so this boilerplate code is only to support a now
deprecated method of running maintenance scripts.
* This code cannot also be marked as covered, due to PHPUnit
not recognising code coverage for files.
* Therefore, it is best to ignore this boilerplate code in code
coverage reports as it cannot be marked as covered and also
is for deprecated code.
What:
* Wrap the boilerplate code (requiring Maintenance.php and then
later defining the maintenance script class and running if the
maintenance script was called directly) with @codeCoverageIgnore
comments.
* Some files use a different boilerplate code, however, these
should also be marked as ignored for coverage for the same
reason that coverage is not properly reported for files.
Bug: T371167
Change-Id: I32f5c6362dfb354149a48ce9c28da9a7fc494f7c
|
|
|
|
| |
Change-Id: I0f266a034a99255b27fd96d82335d6e710a61f20
|
|
|
|
|
|
|
| |
This was somehow left out
Bug: T210206
Change-Id: I70851b5b99fa865dbfd629caf2c1866c85418350
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
empty() only makes sense when the expression it checks is possibly
undefined, otherwise it's equivalent to a truthiness check with the
additional downside of suppressing errors when it's not wanted.
Replace it with simple truthiness checks, using strict comparison when
that seems to help with polymorphic variables.
These were caught by a bespoke phan plugin.
Change-Id: Ide262162553d2da7e5388d05e8731529c44591c1
|
|
|
|
|
| |
Bug: T321882
Change-Id: I48c10343295c4eb3d9ef8037343b0070e928f040
|
|
|
|
|
|
|
| |
Done semi-automatically via a php parser written on top of ANTLR4.
Bug: T311866
Change-Id: I33f5b6703c0aa9c80c907a21c2a770e30642edd3
|
|
|
|
|
|
|
|
|
|
| |
It's an iterator. It reads. This causes a nice chain-reaction where a
lot more code (a lot in extensions) can be updated the same way.
Note this doesn't affect the stability of this code because all old
callers will continue to work with the more narrow type.
Change-Id: Ib7e0287a480af641ce2c19e856c1fb90498f3eb8
|
|
|
|
|
|
|
|
| |
This makes this code easier to read and to maintain because it's more
obvious why a DB connection is passed. For now this patrch focusses
exclusively on private methods.
Change-Id: Id60dc90b124f4cae1dfbede990f45e3c69491a25
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: T321882
Change-Id: I0b86acfdeaa3a2a0a14b7763fd088122820bafdc
|
|/
|
|
|
|
| |
Found by phan dead detection
Change-Id: I93379b7b9a733206d0e53add04fcdb9478c58755
|
|
|
|
|
|
|
| |
This should be the last of the usages in core, although I'm sure a few
are hiding somehow.
Change-Id: I7bf0b24bf23d3efb4c56a891830bbfe67945e899
|
|
|
|
|
|
| |
Found by phan strict checks
Change-Id: If41d16b473baddd92cc4261cdc2bfbe65fedcb19
|
|
|
|
|
|
|
|
| |
When the called function has a doc of int, it should be cast to be
explicit here.
Also cast for arithmetic operations to be explicit about the number
Change-Id: I905b78dfb66e66443e0e3203488bab5b548db543
|
|
|
|
|
| |
Bug: T276292
Change-Id: I93f8ce51dd1c2406d88015fcf6be9b044f424880
|
|
|
|
|
|
|
| |
To make it have a uniform prefix for index and column names
Bug: T270033
Change-Id: I8eb600416913092bd5aeb70389bba6e8a54d1d57
|
|\
| |
| |
| | |
rdf dumps"
|
| |
| |
| |
| |
| | |
Bug: T260232
Change-Id: Ia9b254cf1d561b10de7e9aae9765cb21ea83325f
|
|/
|
|
|
| |
Bug: T261014
Change-Id: I20858c486e79753a1aa62fa8cbf22afc4f59dba3
|
|
|
|
|
|
|
|
| |
Since we do brute force update (DELETE ALL+INSERT ALL) of the parent
categories we need to always write the parent category hierarchy.
Bug: T246568
Change-Id: Id9c3282a97bf3fc3d5355cc08a0c9d833c72c9b2
|
|
|
|
| |
Change-Id: Ib0f081f7b278fdd3f4083fc5020bcac97f6015b4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until I70473280, integer literals were always quoted as strings, because
the databases we support all have no problem with casting
string-literals for comparisons and such.
But it turned out that gave MySQL/MariaDB's planner problems in some
queries, so we changed it to not quote actual PHP integers.
But then we run into the fact that PHP associative arrays don't preserve
the types of keys, it converts integer-like strings into actual
integers. And when those are passed to the DB unquoted for comparison
with a string-typed column, MySQL/MariaDB screws up the comparison while
PostgreSQL simply throws an error. Sigh.
This patch adds string casting to direct uses of array_keys() to supply
values for such query conditions. It doesn't change uses where the field
being compared is a numeric field.
If anyone knows of a good way to find indirect uses of array_keys() for
passing as $conds to IDatabase methods, please do so!
Change-Id: Ie72ee33437d492904e1495b3f4ebb1fcf0118f49
|
|
|
|
| |
Change-Id: Ibc5849cc8ea7e7c4eb30ded9c1cfa5f52187c377
|
|
|
|
|
|
| |
This avoid global state
Change-Id: Id67d07597159a0bd2721a381775230c3cd1d5509
|
|
|
|
|
|
| |
Bug: T231636
Depends-On: I6e5fba7bd273219b1206559420b5bdb78734aa84
Change-Id: I50377746f01749b058c39fd8229f9d566224cc43
|
|
|
|
|
| |
Bug: T228348
Change-Id: I87b3b5831e31dc619b5eefb7854d3223acd605fc
|
|
|
|
|
|
|
|
|
|
| |
There is like a billion of these in our core codebase. I would love to
update them all. But I don't have the time, at least not to do them all
at once.
TL;DR: It's an improvement. :-)
Change-Id: I0a9c51bdcf0f261f971586bb8703f418324b0f98
|
|
|
|
|
|
|
| |
The ANSI SQL default join type is INNER and this might save
some line breaks here and there.
Change-Id: Ibd39976f46ca3f9b71190d3b60b76ca085787a00
|
|
|
|
|
|
|
|
|
| |
Previously, we handled categorization changes using wrong assumptions
- that rc_cur_id refers to the parent category. Instead, it refers to
the child page.
Change-Id: I40e886c3548ccca57db7ab83f14ec4dcd804cf2f
Bug: T201216
|
|
|
|
|
|
|
|
| |
Bug https://github.com/blazegraph/database/issues/100 happens on DELETE/INSERT
but not on separate delete and insert, try to work around it
Change-Id: Iba6a98dde6f4bea9051cd6dee91fb19db5eca10e
Bug: T201217
|
|
|
|
|
| |
Bug: T198356
Change-Id: Ic29568ecfc26da7e6d8c9a875232bfa4e0f9f380
|
|
This script creates SPARQL UPDATE statements for changes in a given time
period. These statements can be applied to an existing database to
update it.
See tests for examples of how the statements look like.
Bug: T173774
Change-Id: I9867ad566c0619b55a48a011bd3c55321b1bfcff
|