| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Postgres connection handling gave the caller a way to specify what sort
of domain it needed, whereas the base class was implicitly relying on
the sequence of installer steps to ensure that the current connection
was correctly configured. The PG way of doing this is better for planned
work in this area. Exposing PG-style connection management in the base
class reduces the number of differences between PG and everything else.
Instead of PG's method of having up to three connections open, I am just
holding a single connection open, with state transitions properly
implemented.
Also:
* Deprecate direct access to $this->db.
* Factor out definitelyGetConnection(), a throwing variant of
getConnection().
* Deprecate caling getConnection() with no parameter.
* Remove setupSchemaVars(), since this was a sequence-dependent pattern.
Instead configure schema vars on transition to the create-schema
connection type.
* Use SelectQueryBuilder in databaseExists().
* Remove the pg-commit install step. This commit dates back to
bca55fa58f85fd5 (March 2007), where in the old installer a commit was
done after all installation. It was moved here in 2010, but now we
have a commit in createTables() serving the same purpose. If we need a
transaction around interwiki insertion, we could do that in the base
class, but that's not what the original code was trying to do.
Change-Id: I073fb57c1b578361ac2a46ecd0cd1312c31747d4
|
|
|
|
|
|
|
|
|
|
| |
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: I45c62ed8b6c2893b66f12dc60580c0267b475945
|
|
|
|
|
|
| |
The documentation does not mention false as an accepted value
Change-Id: Iff79788884e8cc8686af08bfbde1704698b6c400
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DatabaseInstaller had some LSP violations, such as calling undeclared
methods of the supplied Installer object, assuming that it was a
WebInstaller. It was also large.
So, split the web form parts of DatabaseInstaller into separate classes.
We have a class hierarchy for the connect forms, and a class hierarchy
for the settings forms, with a base class DatabaseForm mostly as a place
to put protected helper methods.
Also, have DatabaseInstaller::getConnection() return a special subclass
of Status, so that we can remove many Phan type overrides.
Change-Id: Ie84025f8f70b895fa6882848b9a21ba1750d60e2
|
|
|
|
| |
Change-Id: I11a8df30a2117ef29a4ade25f1082f25eb18490a
|
|
|
|
| |
Change-Id: If58d96c311bef728446b517bb7a81316b23aad4d
|
|
|
|
|
|
| |
* Minor comment tweaks
Change-Id: I76b44fcd88f27f6182f2b245301298a182e870f5
|
|
|
|
|
|
|
|
|
| |
It is not perfect, but it's a major improvement compared the existing
one. We need to clean up a lot more once it has landed but it's a good
start.
Bug: T337435
Change-Id: I1f85110e754546c797d3325b8dd6878093790266
|
|
|
|
| |
Change-Id: Ic8d411152f5c031db6f30fc243af999f0ba5509e
|
|
|
|
|
|
|
|
| |
I fixed some edge cases in the script that migrates to SQB and it
managed to fix these now.
Bug: T344971
Change-Id: I00cc9a6660d9bd4c64c976121b2121ccd7aae1f0
|
|
|
|
|
|
|
|
|
|
| |
This class is used heavily basically everywhere, moving it to Utils
wouldn't make much sense. Also with this change, we can move
StatusValue to MediaWiki\Status as well.
Bug: T321882
Depends-On: I5f89ecf27ce1471a74f31c6018806461781213c3
Change-Id: I04c1dcf5129df437589149f0f3e284974d7c98fa
|
|
|
|
|
|
|
|
|
| |
It always passed as the checked MySql version 5.7 is always higher as a
MariaDB version.
Distinct also the error message on type.
Bug: T237898
Change-Id: Ie4853e90a7c8ea655feff2b7bd6402d587c08d50
|
|
|
|
|
|
|
|
| |
Only MySQL/MariaDB and PostgreSQL will show this option,
as SQLite connects to a file.
Bug: T335828
Change-Id: If29429bcf32807620755dd0b8797d12a13668266
|
|
|
|
|
|
|
|
| |
They have been soft-deprecated since 1.39 and the first one is not used
anywhere, ::factory is used in some third party code but not in
Wikimedia-deployed ones
Change-Id: Icd0f743d9c76554dd02471485ee732e25b9fb932
|
|
|
|
|
| |
Bug: T321882
Change-Id: I5dc1f7e9c303cd3f5b9dd7010d6bb470d8400a18
|
|
|
|
| |
Change-Id: I0e5f9d82d487a1f74348942609625c58a7b1df32
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We also bring along Database::attributesFromType(), which relied on the
private ::getClass(). This requires us to inject DatabaseFactory through
the LBFactory/LoadBalancer hierarchy.
Database::factory() is now soft deprecated. All callers outside of
includes/installer/ still need migration.
Bug: T299691
Bug: T315270
Change-Id: I7d057a9438f1b097554679975e4e9b2fc99e7c2b
|
|
|
|
|
|
|
|
|
|
| |
For now, runtime detection remains limited to the pseudo-version of
MySQL as reported by MariaDB. Logic for this exists in
rdbms/DatabaseMysqlBase which we could use in a later change.
Bug: T273375
Bug: T299447
Change-Id: I102371a05cae4a0299e517703f2d56bbd799be6f
|
|
|
|
|
| |
Bug: T299471
Change-Id: I5acae5e72de2f85fd6e68e391297895c86ffb10e
|
|
|
|
| |
Change-Id: I5ab88a01ba3e5ea2aae853bb6f06492fbc84ceb5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
developer's intention
array_fill_keys() was introduced in PHP 5.2.0 and works like
array_flip() except that it does only one thing (copying keys) instead
of two things (copying keys and values). That makes it faster and more
obvious.
When array_flip() calls were paired, I left them as is, because that
pattern is too cute. I couldn't kill something so cute.
Sometimes it was hard to figure out whether the values in array_flip()
result were used. That's the point of this change. If you use
array_fill_keys(), the intention is obvious.
Change-Id: If8d340a8bc816a15afec37e64f00106ae45e10ed
|
|
|
|
| |
Change-Id: I94a0ae83c65e8ee419bbd1ae1e86ab21ed4d8210
|
|
|
|
|
|
|
| |
Also improve the description a bit and explain at a high level
how this code is used, and which classes back those entry points.
Change-Id: Ia69531858e714d0b43a29a7d5b6dcc5c7edd8240
|
|
|
|
|
|
|
| |
Bug: T231636
Depends-On: I2cd24e73726394e3200a570c45d5e86b6849bfa9
Depends-On: I4fa3e6aad872434ca397325ed7a83f94973661d0
Change-Id: Ie6233561de78457cae5e4e44e220feec2d1272d8
|
|
|
|
|
|
|
|
| |
calls
The methods were renamed in 2010 (r68908, c4100fb83b5b12bd).
Change-Id: I076ec8d9c11f5bd33cb0ad19e5be8e239401b9c6
|
|
|
|
|
| |
Bug: T224449
Change-Id: I4d76f900770f74ce668abf71ea5e7a9f167f5950
|
|
|
|
| |
Change-Id: I0d0ef26f59721039b2c24ab322fa3bf6ab16fea1
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace
@var $foo type
by
@var type $foo
Change-Id: Iec8b90ffea4028a1005daef422b7c4ec38c2715f
|
|
|
|
| |
Change-Id: If9d4be5d88c8927f63cbb84dfc8181baf62ea3eb
|
|
|
|
|
|
|
| |
Query the information schema rather than seeing if selectDB() returns false.
This makes the installer able to handle an exception based failure mode.
Change-Id: I7912b9d3b8501fbc92cb731547ae10fa2b0176db
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It was possible to pass --dbmysql5 to the command line installer to
enable this experimental option. This removes that ability, and removes
setting of $wgDBmysql5 in the generated LocalSettings.php, so new
installs will fallback to the default of false.
Bug: T196185
Change-Id: Id5ff69f493d14cf7b16157f729fbe4f4b4e2e8c8
|
|/
|
|
|
|
|
|
|
| |
This is still used internally for the preUpgrade() checks that see if
the user has an existing table using the utf8 charset, but hide it from
users so they don't accidentally pick utf8.
Bug: T196092
Change-Id: Iaace2e5bf9df7563e1d233496366c95b3f1faf16
|
|
|
|
|
|
|
|
|
| |
This PHP extension was deprecated in PHP 5.5 and removed in PHP 7.0.
The newer MySQL driver 'mysqli' is the default driver since MediaWiki
1.22 and 'mysql' was deprecated in MediaWiki 1.30.
Bug: T120333
Change-Id: Icff7a63ab47ae1483de87ba6486945974699362b
|
|
|
|
|
|
|
|
|
| |
If MediaWiki has increased the minimum database server version that is
required, check it when running update.php to ensure it is still
compatible. Previously this was only checked during the installer.
Bug: T162044
Change-Id: I47092c9557f4706a4dcb3a23150647e68af4317f
|
|
|
|
|
|
| |
Add missing @return and @param to function docs and fixed some @param
Change-Id: I810727961057cfdcc274428b239af5975c57468d
|
|
|
|
|
|
|
|
|
| |
Like other tags, @var should have the type information before the
variable name.
<https://docs.phpdoc.org/references/phpdoc/tags/var.html>
Change-Id: I9eca6957b1990fa8cc687103dc02ee38af5f9086
|
|
|
|
|
| |
Bug: T161232
Change-Id: I5f7d08ad7e58ce89c9fd766f0ac45fa996bf6a44
|
|\ |
|
| |
| |
| |
| |
| |
| | |
This reverts commit a7b9cc4946a2f7fb081f64d9230bf944736a185b.
Change-Id: I91d4b821df126703f83377dd8aff3a79b629f720
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
May be causing beta to break, if that's true then we are going to revert 6519c42d248a78d2d42edee1beb21f926d227044
This reverts commit 5d56bcb925af653fed427e90a1cfb982de386720.
Change-Id: I5e9df08dc1583266bb11b52d5d68bf393e4c0fff
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The called method does not exist. Replaced with getMessage(),
similar to PostgresInstaller.php.
Bug: T165319
Change-Id: I900ec8c18307ce6f9e8c9f4cda79b1e33ed66dff
|
|/
|
|
|
|
|
| |
It kept failing with Error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ESCAPE '`'' at line 1 (localhost)
Bug: T165805
Change-Id: I2671415fc34b1e6226104c88ca21fafc860bb7fb
|
|
|
|
| |
Change-Id: I463bd86123501abc68fdb78b4cda6110f7af2549
|
|
|
|
| |
Change-Id: I52bef87512f9ddd155d1f4cc0052f6b7a0db5b42
|
|
|
|
|
|
|
|
|
|
| |
Copied from rSVN45497.
I'm not sure how to reproduce the circumstances in which this code gets
called, so I didn't test it. But what we did before was clearly wrong.
Bug: T154670
Change-Id: Id9b0282e7e65543999c9737950f5073ba2e81962
|
|
|
|
| |
Change-Id: If37a7909056bf2c31a8228cbc84f0fbbf5f1c517
|
|
|
|
| |
Change-Id: I3919b04eb2de4fa0bf8a02239fb5bbf17d347511
|