From e1db42a0f6a729ec74d78968fd2bd71967d34179 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 21 Dec 2019 09:57:41 +0100 Subject: [PATCH 01/12] Fix phpdoc for Sami Ref: #14345 Signed-off-by: William Desportes --- libraries/classes/Bookmark.php | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/libraries/classes/Bookmark.php b/libraries/classes/Bookmark.php index 9543f3e209..d3f14c5b63 100644 --- a/libraries/classes/Bookmark.php +++ b/libraries/classes/Bookmark.php @@ -207,6 +207,7 @@ class Bookmark /** * Defines the bookmark parameters for the current user * + * @param string $user Current user * @return array the bookmark parameters for the current user * @access public */ @@ -236,10 +237,12 @@ class Bookmark /** * Creates a Bookmark object from the parameters * - * @param array $bkm_fields the properties of the bookmark to add; here, - * $bkm_fields['bkm_sql_query'] is urlencoded - * @param boolean $all_users whether to make the bookmark available - * for all users + * @param DatabaseInterface $dbi DatabaseInterface object + * @param string $user Current user + * @param array $bkm_fields the properties of the bookmark to add; here, + * $bkm_fields['bkm_sql_query'] is urlencoded + * @param boolean $all_users whether to make the bookmark + * available for all users * * @return Bookmark|false */ @@ -269,7 +272,9 @@ class Bookmark /** * Gets the list of bookmarks defined for the current database * - * @param string|bool $db the current database name or false + * @param DatabaseInterface $dbi DatabaseInterface object + * @param string $user Current user + * @param string|bool $db the current database name or false * * @return Bookmark[] the bookmarks list * @@ -320,12 +325,14 @@ class Bookmark /** * Retrieve a specific bookmark * - * @param string $db the current database name - * @param mixed $id an identifier of the bookmark to get - * @param string $id_field which field to look up the identifier - * @param boolean $action_bookmark_all true: get all bookmarks regardless - * of the owning user - * @param boolean $exact_user_match whether to ignore bookmarks with no user + * @param DatabaseInterface $dbi DatabaseInterface object + * @param string $user Current user + * @param string $db the current database name + * @param mixed $id an identifier of the bookmark to get + * @param string $id_field which field to look up the identifier + * @param boolean $action_bookmark_all true: get all bookmarks regardless + * of the owning user + * @param boolean $exact_user_match whether to ignore bookmarks with no user * * @return Bookmark the bookmark * From 313da618bd49569cfc68a7dd3f1e72941e0e73eb Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 21 Dec 2019 10:13:42 +0100 Subject: [PATCH 02/12] Fix redirection form secure.php.net to www.php.net Signed-off-by: William Desportes --- doc/config.rst | 14 +++++++------- doc/faq.rst | 8 ++++---- doc/glossary.rst | 10 +++++----- doc/require.rst | 8 ++++---- doc/setup.rst | 2 +- doc/transformations.rst | 4 ++-- libraries/classes/Database/DatabaseList.php | 2 +- libraries/classes/IpAllowDeny.php | 2 +- .../classes/Plugins/Export/ExportPhparray.php | 2 +- libraries/classes/Plugins/Schema/Dia/Dia.php | 2 +- libraries/classes/Plugins/Schema/Eps/Eps.php | 2 +- libraries/classes/Plugins/Schema/Svg/Svg.php | 2 +- .../Plugins/Transformations/TEMPLATE_ABSTRACT | 2 +- libraries/classes/Session.php | 2 +- libraries/classes/Util.php | 2 +- 15 files changed, 32 insertions(+), 32 deletions(-) diff --git a/doc/config.rst b/doc/config.rst index 9d9b5a6c01..183b9f5ce9 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -709,7 +709,7 @@ Server connection settings More information on regular expressions can be found in the `PCRE pattern syntax - `_ portion + `_ portion of the PHP reference manual. .. config:option:: $cfg['Servers'][$i]['verbose'] @@ -1450,7 +1450,7 @@ Server connection settings An associative array of session cookie parameters of other authentication system. It is not needed if the other system doesn't use session_set_cookie_params(). Keys should include 'lifetime', 'path', 'domain', 'secure' or 'httponly'. - Valid values are mentioned in `session_get_cookie_params `_, they should be set to same values as the other application uses. Takes effect only if :config:option:`$cfg['Servers'][$i]['SignonScript']` is not configured. @@ -1580,14 +1580,14 @@ Generic settings :type: boolean :default: false - Whether `persistent connections `_ should be used or not. Works with following extensions: - * mysql (`mysql\_pconnect `_), * mysqli (requires PHP 5.3.0 or newer, `more information - `_). + `_). .. config:option:: $cfg['ForceSSL'] @@ -1624,7 +1624,7 @@ Generic settings :default: ``''`` Path for storing session data (`session\_save\_path PHP parameter - `_). + `_). .. warning:: @@ -1781,7 +1781,7 @@ Cookie authentication options Define how long a login cookie is valid. Please note that php configuration option `session.gc\_maxlifetime - `_ might limit session validity and if the session is lost, the login cookie is also invalidated. So it is a good idea to set ``session.gc_maxlifetime`` at least to the same value of diff --git a/doc/faq.rst b/doc/faq.rst index 47506e13a1..ddb90479bb 100644 --- a/doc/faq.rst +++ b/doc/faq.rst @@ -212,7 +212,7 @@ your server - as mentioned in :ref:`faq1_17`. This problem is generally caused by using MySQL version 4.1 or newer. MySQL changed the authentication hash and your PHP is trying to use the old method. The proper solution is to use the `mysqli extension -`_ with the proper client library to match +`_ with the proper client library to match your MySQL installation. More information (and several workarounds) are located in the `MySQL Documentation `_. @@ -823,7 +823,7 @@ Here are a few points to check: --------------------------------- To be able to see a progress bar during your uploads, your server must -have the `APC `_ extension, the +have the `APC `_ extension, the `uploadprogress `_ one, or you must be running PHP 5.4.0 or higher. Moreover, the JSON extension has to be enabled in your PHP. @@ -1052,7 +1052,7 @@ is no way for PHP to set the charset before authenticating. .. seealso:: `phpMyAdmin issue 12232 `_, - `MySQL documentation note `_ + `MySQL documentation note `_ .. _faqmultiuser: @@ -1788,7 +1788,7 @@ in Browse mode or on the Structure page. ----------------------------------- In all places where phpMyAdmin accepts format strings, you can use -``@VARIABLE@`` expansion and `strftime `_ +``@VARIABLE@`` expansion and `strftime `_ format strings. The expanded variables depend on a context (for example, if you haven't chosen a table, you can not get the table name), but the following variables can be used: diff --git a/doc/glossary.rst b/doc/glossary.rst index 4250c690cb..08a15099c3 100644 --- a/doc/glossary.rst +++ b/doc/glossary.rst @@ -208,7 +208,7 @@ From Wikipedia, the free encyclopedia If you have troubles installing this extension, please follow :ref:`faqmysql`, it provides useful hints. - .. seealso:: + .. seealso:: MCrypt a cryptographic library. @@ -218,7 +218,7 @@ From Wikipedia, the free encyclopedia mcrypt the MCrypt PHP extension. - .. seealso:: + .. seealso:: MIME Multipurpose Internet Mail Extensions is @@ -243,12 +243,12 @@ From Wikipedia, the free encyclopedia mysqli the improved MySQL client PHP extension. - .. seealso:: + .. seealso:: mysql the MySQL client PHP extension. - .. seealso:: + .. seealso:: OpenDocument an open standard for office documents. @@ -276,7 +276,7 @@ From Wikipedia, the free encyclopedia Perl Compatible Regular Expressions is the perl-compatible regular expression functions for PHP - .. seealso:: + .. seealso:: PHP short for "PHP: Hypertext Preprocessor", is an open-source, reflective diff --git a/doc/require.rst b/doc/require.rst index e9a48e50b9..6a2c9ebde6 100644 --- a/doc/require.rst +++ b/doc/require.rst @@ -24,19 +24,19 @@ PHP ("image/jpeg: inline") with their original aspect ratio. * When using the cookie authentication (the default), the `openssl - `_ extension is strongly suggested. + `_ extension is strongly suggested. * To support upload progress bars, see :ref:`faq2_9`. * To support XML and Open Document Spreadsheet importing, you need the - `libxml `_ extension. + `libxml `_ extension. * To support reCAPTCHA on the login page, you need the - `openssl `_ extension. + `openssl `_ extension. * To support displaying phpMyAdmin's latest version, you need to enable ``allow_url_open`` in your :file:`php.ini` or to have the - `curl `_ extension. + `curl `_ extension. .. seealso:: :ref:`faq1_31`, :ref:`authentication_modes` diff --git a/doc/setup.rst b/doc/setup.rst index 16f3f4e3b1..5f16cd1145 100644 --- a/doc/setup.rst +++ b/doc/setup.rst @@ -1008,7 +1008,7 @@ are always ways to make your installation more secure: * Serve phpMyAdmin on HTTPS only. Preferably, you should use HSTS as well, so that you're protected from protocol downgrade attacks. * Ensure your PHP setup follows recommendations for production sites, for example - `display_errors `_ + `display_errors `_ should be disabled. * Remove the ``test`` directory from phpMyAdmin, unless you are developing and need a test suite. * Remove the ``setup`` directory from phpMyAdmin, you will probably not diff --git a/doc/transformations.rst b/doc/transformations.rst index 02f43c5454..9eeb754080 100644 --- a/doc/transformations.rst +++ b/doc/transformations.rst @@ -134,9 +134,9 @@ The applyTransformation() method always gets passed three variables: function as an array. #. **$meta** - Contains an object with information about your column. The data is drawn from the output of the `mysql\_fetch\_field() - `_ function. This means, all + `_ function. This means, all object properties described on the `manual page - `_ are available in this + `_ are available in this variable and can be used to transform a column accordingly to unsigned/zerofill/not\_null/... properties. The $meta->mimetype variable contains the original MIME-type of the column (i.e. diff --git a/libraries/classes/Database/DatabaseList.php b/libraries/classes/Database/DatabaseList.php index cc383eec77..ab4c6598df 100644 --- a/libraries/classes/Database/DatabaseList.php +++ b/libraries/classes/Database/DatabaseList.php @@ -30,7 +30,7 @@ class DatabaseList * @param string $param parameter name * * @return mixed - * @see https://secure.php.net/language.oop5.overloading + * @see https://www.php.net/language.oop5.overloading */ public function __get($param) { diff --git a/libraries/classes/IpAllowDeny.php b/libraries/classes/IpAllowDeny.php index dd3ea382ef..efc37b6540 100644 --- a/libraries/classes/IpAllowDeny.php +++ b/libraries/classes/IpAllowDeny.php @@ -46,7 +46,7 @@ class IpAllowDeny /** * Based on IP Pattern Matcher * Originally by J.Adams - * Found on + * Found on * Modified for phpMyAdmin * * Matches: diff --git a/libraries/classes/Plugins/Export/ExportPhparray.php b/libraries/classes/Plugins/Export/ExportPhparray.php index 051ee3bfad..d5d157a35b 100644 --- a/libraries/classes/Plugins/Export/ExportPhparray.php +++ b/libraries/classes/Plugins/Export/ExportPhparray.php @@ -197,7 +197,7 @@ class ExportPhparray extends ExportPlugin } // fix variable names (based on - // https://secure.php.net/manual/language.variables.basics.php) + // https://www.php.net/manual/en/language.variables.basics.php) if (!preg_match( '/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/', $table_alias diff --git a/libraries/classes/Plugins/Schema/Dia/Dia.php b/libraries/classes/Plugins/Schema/Dia/Dia.php index b1fe5027c0..469038297b 100644 --- a/libraries/classes/Plugins/Schema/Dia/Dia.php +++ b/libraries/classes/Plugins/Schema/Dia/Dia.php @@ -17,7 +17,7 @@ use XMLWriter; * * @package PhpMyAdmin * @access public - * @see https://secure.php.net/manual/en/book.xmlwriter.php + * @see https://www.php.net/manual/en/book.xmlwriter.php */ class Dia extends XMLWriter { diff --git a/libraries/classes/Plugins/Schema/Eps/Eps.php b/libraries/classes/Plugins/Schema/Eps/Eps.php index e71b1357da..4f037e7dd2 100644 --- a/libraries/classes/Plugins/Schema/Eps/Eps.php +++ b/libraries/classes/Plugins/Schema/Eps/Eps.php @@ -16,7 +16,7 @@ use PhpMyAdmin\Response; * * @package PhpMyAdmin * @access public - * @see https://secure.php.net/manual/en/book.xmlwriter.php + * @see https://www.php.net/manual/en/book.xmlwriter.php */ class Eps { diff --git a/libraries/classes/Plugins/Schema/Svg/Svg.php b/libraries/classes/Plugins/Schema/Svg/Svg.php index 624bf10632..c41012b5e0 100644 --- a/libraries/classes/Plugins/Schema/Svg/Svg.php +++ b/libraries/classes/Plugins/Schema/Svg/Svg.php @@ -17,7 +17,7 @@ use XMLWriter; * * @package PhpMyAdmin * @access public - * @see https://secure.php.net/manual/en/book.xmlwriter.php + * @see https://www.php.net/manual/en/book.xmlwriter.php */ class Svg extends XMLWriter { diff --git a/libraries/classes/Plugins/Transformations/TEMPLATE_ABSTRACT b/libraries/classes/Plugins/Transformations/TEMPLATE_ABSTRACT index 54ef4901e3..fc81543032 100644 --- a/libraries/classes/Plugins/Transformations/TEMPLATE_ABSTRACT +++ b/libraries/classes/Plugins/Transformations/TEMPLATE_ABSTRACT @@ -51,7 +51,7 @@ abstract class [TransformationName]TransformationsPlugin // further operations on $buffer using the $options[] array. - // You can evaluate the propagated $meta Object. It's contained fields are described in https://secure.php.net/mysql_fetch_field. + // You can evaluate the propagated $meta Object. It's contained fields are described in https://www.php.net/mysql_fetch_field. // This stored information can be used to get the field information about the transformed field. // $meta->mimetype contains the original MimeType of the field (i.e. 'text/plain', 'image/jpeg' etc.) diff --git a/libraries/classes/Session.php b/libraries/classes/Session.php index 4290fd6081..df66a282bc 100644 --- a/libraries/classes/Session.php +++ b/libraries/classes/Session.php @@ -5,7 +5,7 @@ * * @package PhpMyAdmin * - * @see https://secure.php.net/session + * @see https://www.php.net/manual/en/features.sessions.php */ namespace PhpMyAdmin; diff --git a/libraries/classes/Util.php b/libraries/classes/Util.php index 9365affbf2..50945d6b5d 100644 --- a/libraries/classes/Util.php +++ b/libraries/classes/Util.php @@ -1518,7 +1518,7 @@ class Util __('Sat')); if ($format == '') { - /* l10n: See https://secure.php.net/manual/en/function.strftime.php */ + /* l10n: See https://www.php.net/manual/en/function.strftime.php */ $format = __('%B %d, %Y at %I:%M %p'); } From 171bc9a456cd7064e01a0d64f0af1b3221565253 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 21 Dec 2019 10:16:54 +0100 Subject: [PATCH 03/12] Ignore yubico.com from links checks Ref: fa2f887703d3971395286e4382c4abf90c983799 Signed-off-by: William Desportes --- doc/conf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index e6ff04538b..64860689d5 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -313,6 +313,8 @@ linkcheck_ignore = [ r'https://pecl.php.net/.*', # 403 Client Error: Forbidden r'https://authy.com/.*', + # Site often changes links and reverts changes (9362bde02d0535a2f8cb74a18797249cb734c4b0) + r'https://www.yubico.com/.*', # 500 Server Error: Internal Server Error r'http://www.scriptalicious.com/.*', ] From 83d05641bb3b6703000fc3d9bb1b3a02c416c94a Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 21 Dec 2019 10:49:18 +0100 Subject: [PATCH 04/12] Fix OSX build Signed-off-by: William Desportes --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d5da9faa34..47f4574e4f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -72,14 +72,14 @@ matrix: - php: "7.1" env: CI_MODE=apidocs - os: osx - name: "PHP 7.3" + name: "PHP 7.4" language: node_js node_js: 10 env: CI_MODE=test before_install: - brew link --force gettext - - echo "memory_limit=-1" > /usr/local/etc/php/7.3/conf.d/50-travis.ini - - echo "pcre.jit=0" >> /usr/local/etc/php/7.3/conf.d/50-travis.ini + - echo "memory_limit=-1" > /usr/local/etc/php/7.4/conf.d/50-travis.ini + - echo "pcre.jit=0" >> /usr/local/etc/php/7.4/conf.d/50-travis.ini - mysql.server start addons: homebrew: From 6337a888c5156ac2b8380a46ca426a1d7bc4557b Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 21 Dec 2019 11:42:00 +0100 Subject: [PATCH 05/12] Add php 7.4 step using phpunit 8 Signed-off-by: William Desportes --- .travis.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 47f4574e4f..73eba73190 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,6 @@ services: - mysql php: - - "7.4" - "7.3" - "7.2" - "7.1" @@ -103,6 +102,18 @@ matrix: - "find test/ -type f -print0 | xargs -0 sed -i 's/function setUpBeforeClass()/function setUpBeforeClass(): void/g'" - "find test/ -type f -print0 | xargs -0 sed -i 's/function setUp()/function setUp(): void/g'" - "find test/ -type f -print0 | xargs -0 sed -i 's/function tearDown()/function tearDown(): void/g'" + - php: "7.4" + env: CI_MODE=test + name: "PHP: 7.4" + install: + - composer require --no-interaction php>=7.1 + - composer remove phpunit/phpunit-selenium --dev --no-interaction + - composer remove phpunit/phpunit --dev --no-interaction + - composer require --dev --no-interaction phpunit/phpunit ^8 + - rm -rf test/selenium + - "find test/ -type f -print0 | xargs -0 sed -i 's/function setUpBeforeClass()/function setUpBeforeClass(): void/g'" + - "find test/ -type f -print0 | xargs -0 sed -i 's/function setUp()/function setUp(): void/g'" + - "find test/ -type f -print0 | xargs -0 sed -i 's/function tearDown()/function tearDown(): void/g'" - php: "7.1" env: CI_MODE=test DBASE=true install: From e88b6bfc80a9309bbb15a8754868ffab69b24f2f Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 21 Dec 2019 12:17:13 +0100 Subject: [PATCH 06/12] Disable xdebug for php 7.4 CI Signed-off-by: William Desportes --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 73eba73190..2d175a6e03 100644 --- a/.travis.yml +++ b/.travis.yml @@ -114,6 +114,7 @@ matrix: - "find test/ -type f -print0 | xargs -0 sed -i 's/function setUpBeforeClass()/function setUpBeforeClass(): void/g'" - "find test/ -type f -print0 | xargs -0 sed -i 's/function setUp()/function setUp(): void/g'" - "find test/ -type f -print0 | xargs -0 sed -i 's/function tearDown()/function tearDown(): void/g'" + - phpenv config-rm xdebug.ini - php: "7.1" env: CI_MODE=test DBASE=true install: From 6e7e90169a9e4de45c246d67486ae9bd35b7ded6 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 21 Dec 2019 15:44:28 +0100 Subject: [PATCH 07/12] Fix a possibly undefined index as reported to our server Signed-off-by: William Desportes --- libraries/classes/DatabaseInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/classes/DatabaseInterface.php b/libraries/classes/DatabaseInterface.php index 4e5d5ef963..ab467fb3d3 100644 --- a/libraries/classes/DatabaseInterface.php +++ b/libraries/classes/DatabaseInterface.php @@ -307,7 +307,7 @@ class DatabaseInterface public function tryQuery($query, $link = DatabaseInterface::CONNECT_USER, $options = 0, $cache_affected_rows = true ) { - $debug = $GLOBALS['cfg']['DBG']['sql']; + $debug = isset($GLOBALS['cfg']['DBG']) ? $GLOBALS['cfg']['DBG']['sql'] : false; if (! isset($this->_links[$link])) { return false; } From d40f89ebd916a1d7a771d7ab10d3079417230f68 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 21 Dec 2019 15:45:21 +0100 Subject: [PATCH 08/12] Fix a possible php7.4 error / failing tests "Trying to access array offset on value of type null" Signed-off-by: William Desportes --- libraries/classes/Rte/Routines.php | 3 ++- test/classes/Rte/RoutinesTest.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/classes/Rte/Routines.php b/libraries/classes/Rte/Routines.php index adba6f1ba8..5c49f70cbc 100644 --- a/libraries/classes/Rte/Routines.php +++ b/libraries/classes/Rte/Routines.php @@ -699,7 +699,8 @@ class Routines */ public static function getParameterRow(array $routine = array(), $index = null, $class = '') { - global $param_directions, $param_opts_num, $titles; + $titles = Util::buildActionTitles(); + global $param_directions, $param_opts_num; if ($index === null) { // template row for AJAX request diff --git a/test/classes/Rte/RoutinesTest.php b/test/classes/Rte/RoutinesTest.php index 27484c19ef..2bf34bce8e 100644 --- a/test/classes/Rte/RoutinesTest.php +++ b/test/classes/Rte/RoutinesTest.php @@ -43,6 +43,7 @@ class RoutinesTest extends TestCase $GLOBALS['cfg']['Confirm'] = true; $GLOBALS['cfg']['LoginCookieValidity'] = 1440; $GLOBALS['cfg']['Server']['DisableIS'] = false; + $GLOBALS['cfg']['ActionLinksMode'] = 'icons'; $GLOBALS['server'] = 0; $GLOBALS['db'] = 'db'; $GLOBALS['table'] = 'table'; From 5000171c40a3ebae7257779a1ac12714c5662c1e Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 21 Dec 2019 16:37:20 +0100 Subject: [PATCH 09/12] Fix mysql password issue on OSX build Signed-off-by: William Desportes --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2d175a6e03..0250cc3261 100644 --- a/.travis.yml +++ b/.travis.yml @@ -80,6 +80,9 @@ matrix: - echo "memory_limit=-1" > /usr/local/etc/php/7.4/conf.d/50-travis.ini - echo "pcre.jit=0" >> /usr/local/etc/php/7.4/conf.d/50-travis.ini - mysql.server start + - sleep 5 + # Enable password access + - mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('');" addons: homebrew: packages: From 931a6ecffab102ae6d2bc70ab5bc9923cb18eb70 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 21 Dec 2019 17:25:32 +0100 Subject: [PATCH 10/12] Use phpunit 8 on OSX CI and fix file filter Signed-off-by: William Desportes --- .travis.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0250cc3261..f6c08e7854 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,6 +83,15 @@ matrix: - sleep 5 # Enable password access - mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('');" + install: + - composer require --no-interaction php>=7.1 + - composer remove phpunit/phpunit-selenium --dev --no-interaction + - composer remove phpunit/phpunit --dev --no-interaction + - composer require --dev --no-interaction phpunit/phpunit ^8 + - rm -rf test/selenium + - "find test/ -type f -iname '*.php' -print0 | xargs -0 sed -i.bak~ 's/function setUpBeforeClass()/function setUpBeforeClass(): void/g'" + - "find test/ -type f -iname '*.php' -print0 | xargs -0 sed -i.bak~ 's/function setUp()/function setUp(): void/g'" + - "find test/ -type f -iname '*.php' -print0 | xargs -0 sed -i.bak~ 's/function tearDown()/function tearDown(): void/g'" addons: homebrew: packages: @@ -102,9 +111,9 @@ matrix: - composer remove phpunit/phpunit --dev --no-interaction - composer require --dev --no-interaction phpunit/phpunit ^8 - rm -rf test/selenium - - "find test/ -type f -print0 | xargs -0 sed -i 's/function setUpBeforeClass()/function setUpBeforeClass(): void/g'" - - "find test/ -type f -print0 | xargs -0 sed -i 's/function setUp()/function setUp(): void/g'" - - "find test/ -type f -print0 | xargs -0 sed -i 's/function tearDown()/function tearDown(): void/g'" + - "find test/ -type f -iname '*.php' -print0 | xargs -0 sed -i 's/function setUpBeforeClass()/function setUpBeforeClass(): void/g'" + - "find test/ -type f -iname '*.php' -print0 | xargs -0 sed -i 's/function setUp()/function setUp(): void/g'" + - "find test/ -type f -iname '*.php' -print0 | xargs -0 sed -i 's/function tearDown()/function tearDown(): void/g'" - php: "7.4" env: CI_MODE=test name: "PHP: 7.4" @@ -114,9 +123,9 @@ matrix: - composer remove phpunit/phpunit --dev --no-interaction - composer require --dev --no-interaction phpunit/phpunit ^8 - rm -rf test/selenium - - "find test/ -type f -print0 | xargs -0 sed -i 's/function setUpBeforeClass()/function setUpBeforeClass(): void/g'" - - "find test/ -type f -print0 | xargs -0 sed -i 's/function setUp()/function setUp(): void/g'" - - "find test/ -type f -print0 | xargs -0 sed -i 's/function tearDown()/function tearDown(): void/g'" + - "find test/ -type f -iname '*.php' -print0 | xargs -0 sed -i 's/function setUpBeforeClass()/function setUpBeforeClass(): void/g'" + - "find test/ -type f -iname '*.php' -print0 | xargs -0 sed -i 's/function setUp()/function setUp(): void/g'" + - "find test/ -type f -iname '*.php' -print0 | xargs -0 sed -i 's/function tearDown()/function tearDown(): void/g'" - phpenv config-rm xdebug.ini - php: "7.1" env: CI_MODE=test DBASE=true From 774fc686bb1e874cae5a73e0960fd81abe605fea Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 21 Dec 2019 19:29:20 +0100 Subject: [PATCH 11/12] Fix #15641 - Replication actions are not sent to a mysql link Signed-off-by: William Desportes --- libraries/classes/ReplicationGui.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/classes/ReplicationGui.php b/libraries/classes/ReplicationGui.php index 716cb4f75e..86806e1f29 100644 --- a/libraries/classes/ReplicationGui.php +++ b/libraries/classes/ReplicationGui.php @@ -1075,11 +1075,11 @@ class ReplicationGui $count = $_POST['sr_skip_errors_count'] * 1; } - $qStop = Replication::slaveControl("STOP"); + $qStop = Replication::slaveControl("STOP", null, DatabaseInterface::CONNECT_USER); $qSkip = $GLOBALS['dbi']->tryQuery( "SET GLOBAL SQL_SLAVE_SKIP_COUNTER = " . $count . ";" ); - $qStart = Replication::slaveControl("START"); + $qStart = Replication::slaveControl("START", null, DatabaseInterface::CONNECT_USER); $result = ($qStop !== false && $qStop !== -1 && $qSkip !== false && $qSkip !== -1 && From a3d621762229b3dd0cf600095241eab3c01d57f3 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 21 Dec 2019 20:56:34 +0100 Subject: [PATCH 12/12] Disable xdebug for php 7.4 Linux CI Signed-off-by: William Desportes --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 6db32c7072..404c9a2315 100644 --- a/.travis.yml +++ b/.travis.yml @@ -89,6 +89,7 @@ jobs: php: 7.4 name: "PHP 7.4" env: CI_MODE=test + before_install: phpenv config-rm xdebug.ini - stage: "PHP Unit tests" php: nightly