Commit Graph

48 Commits

Author SHA1 Message Date
William Desportes
34a8dfb6b1
Merge branch 'QA_4_9' into QA_5_0
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-10-11 17:56:52 +02:00
William Desportes
b5654b02df
Fix failing tests
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-10-11 17:36:59 +02:00
Maurício Meneghini Fauth
7ef47312db Remove remaining calls to old DI container
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-17 15:02:08 -03:00
Maurício Meneghini Fauth
5c519cc819 Remove old DI container in Table\StructureControllerTest
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-17 14:51:54 -03:00
Maurício Meneghini Fauth
54667a0085 Remove old DI container in Table\RelationControllerTest
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-17 14:43:06 -03:00
Maurício Meneghini Fauth
d984b07ba6 Remove old DI container in Table\SearchControllerTest
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-15 23:00:56 -03:00
Maurício Meneghini Fauth
9aa85d058b Remove old DI container in Table\IndexesControllerTest
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-15 22:27:25 -03:00
Maurício Meneghini Fauth
e1f9ae00cd Add a trailing comma in multi-line arrays
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-14 14:09:26 -03:00
Maurício Meneghini Fauth
7be0f6bfae Reference class names in use statements
Sort use statements

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-06-12 00:14:26 -03:00
Hugues Peccatte
9abd308837 Inject dependencies (#15271)
Inject dependencies instead of building them.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-06-01 15:13:41 -03:00
Hugues Peccatte
380707fbcd Define controllers as services in an external configuration file
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
2019-05-19 01:54:44 +02:00
Maurício Meneghini Fauth
5254ec1b65 Refactor Navigation\NavigationTree
- Extract HTML from renderState() and renderDbSelect()
- Use DI for $dbi instead of global
- Fix tests

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2019-04-24 02:25:48 -03:00
Maurício Meneghini Fauth
92cc67fbf7 Replace assertContains() with assertStringContainsString()
Using assertContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringContainsString() or assertStringContainsStringIgnoringCase() instead.
Using assertNotContains() with string haystacks is deprecated and will not be supported in PHPUnit 9. Refactor your test to use assertStringNotContainsString() or assertStringNotContainsStringIgnoringCase() instead.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-02-24 16:32:28 -03:00
Maurício Meneghini Fauth
182491a73f Add void return type declaration for tests
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-02-22 21:33:55 -03:00
Maurício Meneghini Fauth
b97460a320 Rename TableStructureController to StructureController
Renames PhpMyAdmin\Controllers\Table\TableStructureController to
PhpMyAdmin\Controllers\Table\StructureController.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-02-14 16:30:49 -02:00
Maurício Meneghini Fauth
505af51a1c Rename TableSearchController to SearchController
Renames PhpMyAdmin\Controllers\Table\TableSearchController to
PhpMyAdmin\Controllers\Table\SearchController.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-02-14 16:08:18 -02:00
Maurício Meneghini Fauth
6c29e58ef7 Rename TableRelationController to RelationController
Renames PhpMyAdmin\Controllers\Table\TableRelationController to
PhpMyAdmin\Controllers\Table\RelationController.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-02-14 15:43:07 -02:00
Maurício Meneghini Fauth
a440e52541 Rename TableIndexesController to IndexesController
Renames PhpMyAdmin\Controllers\Table\TableIndexesController to
PhpMyAdmin\Controllers\Table\IndexesController.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-02-14 14:45:57 -02:00
Maurício Meneghini Fauth
23c3579804 Format array declarations
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2019-01-07 14:31:39 -02:00
Maurício Meneghini Fauth
76d8bfdafa Merge branch 'QA_4_8'
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-12-12 21:04:19 -02:00
William Desportes
bcefdd79fa
phpstan level 2 - Fix phpdoc
Signed-off-by: William Desportes <williamdes@wdes.fr>
2018-11-25 13:57:55 +01:00
Maurício Meneghini Fauth
6fd9bfb75b Retrieve parameters from $_POST in table search
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-11-10 20:48:59 -02:00
Maurício Meneghini Fauth
d1d90b59b2 Retrieve parameters from $_POST in table relation
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-11-10 20:48:59 -02:00
Maurício Meneghini Fauth
d01ece698a Retrieve parameters from $_POST in tbl_indexes.php
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-11-10 20:48:59 -02:00
Maurício Meneghini Fauth
9219b28f47 Retrieve parameters from $_POST in table structure
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-11-10 20:48:58 -02:00
Maurício Meneghini Fauth
d4b4124a5e Remove $GLOBALS['dbi'] from Relation class
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-08-30 19:05:09 -03:00
William Desportes
e816e45c18 phpstan level 0 (#14405)
* Fix phpdoc @return

- Fixed @return typehint

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Fix incorrect case on function calls

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Type hint + typo fix

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Fixes

- @return fix
- @var fix
- Class names
- Throws fix
- test/classes/Plugins/Export/ExportSqlTest.php any() invoked with 1 parameter, 0 required
-  libraries/classes/Controllers/Table/TableStructureController.php Array has 2 duplicate keys with value 'columns_list'
- Call parent constructor  libraries/classes/Error.php

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Update config

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Access to an undefined property

- Access to an undefined property PhpMyAdmin\Plugins\Schema\Pdf\PdfRelationSchema::$diagram_row
- Access to an undefined property PhpMyAdmin\Plugins\Schema\Pdf\Pdf::$cMargin
- Undefined properties

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Update config

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Fix bootstrap-phpstan

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Fix typos and phpstan config

Fixes: #14399
Signed-off-by: William Desportes <williamdes@wdes.fr>
2018-06-25 20:34:46 -03:00
Maurício Meneghini Fauth
2d58411bee Some coding style fixes
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-06-18 21:30:06 -03:00
Maurício Meneghini Fauth
2005cca77f Fix methods and properties visibility issues
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 21:02:26 -03:00
Maurício Meneghini Fauth
285e38e931 Fix some PSR-2 coding standard errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 09:07:56 -03:00
Maurício Meneghini Fauth
b9c0463d96 Use short array syntax instead of long array syntax
Replaces array() with [].

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 01:42:21 -03:00
Maurício Meneghini Fauth
baf0985e5f Fix phpcs errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-18 01:59:38 -03:00
Maurício Meneghini Fauth
dc8c92bfd8 Enable strict mode in test files
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-16 04:36:04 -03:00
Maurício Meneghini Fauth
b5cac84182 Fix TableSearchController::_generateWhereClause() test
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-12 04:17:45 -03:00
Lakshay arora
0da5857b5d Fix for issues with spatial fields (#14125)
*  Fix for issues with spatial fields

Fixes the following issues:

1.    #14068 SPATIAL fields with no unique index/autoincrement error when clicking
      This error occurs when there is no unique column to uniquely identify a tuple. I've disabled the geomtery view and made view as wkt the default view in such cases.

2.    #14121 View spatial fields as WKT doesn't work

1.    #14067 IS NULL search operator produces no WHERE SQL with spatial fields

Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>

* Fix for issues with spatial fields
This commit fixes view as BINARY not working in the previous commit.
Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>

* Fix for issues with spatial fields

Fixes typo in previous commits.

Signed-Off-By: Lakshay arora <arora.lakshya123@gmail.com>
(cherry picked from commit 9231620c2d)
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-12 03:54:28 -03:00
Maurício Meneghini Fauth
d98658187a Replace PhpMyAdmin\Relation static calls
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-03-25 19:32:13 -03:00
Maurício Meneghini Fauth
4c661bd1fd Move current server user global to constructor
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-02-04 16:37:27 -02:00
Maurício Meneghini Fauth
b2f0fac2c3 Fix TableStructureControllerTest dependencies
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-12-20 18:53:35 -02:00
Maurício Meneghini Fauth
97f02eaf2b Fix TableRelationControllerTest dependencies
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-12-20 18:51:05 -02:00
Maurício Meneghini Fauth
53824020c6 Fix TableIndexesControllerTest global dependency
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-12-20 17:49:38 -02:00
Maurício Meneghini Fauth
29f03d1138 Fix ServerCollationsControllerTest dependencies
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-12-20 17:27:20 -02:00
Maurício Meneghini Fauth
452b624dc4 Move dependencies to outside of abstract controllers
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-11-04 12:41:57 -02:00
Scrutinizer Auto-Fixer
40f56c0a95 Remove not needed use statements
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-23 18:49:37 +02:00
Michal Čihař
d574aede08 Bind Types to DatabaseInterface
This wayt it's automatically passed with DBI.

Issue #11731

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-10 12:05:02 +02:00
Michal Čihař
b5e391f006 Merge Types and TypesMySQL classes
These were separate from time we've supported Drizzle, but this no
longer makes sense.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-10 11:33:45 +02:00
Maurício Meneghini Fauth
c00245fa0a Move PMATestCase to PhpMyAdmin\Tests\PmaTestCase
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-30 16:34:53 -03:00
Maurício Meneghini Fauth
1d4125f15c Add array type declarations
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-24 23:49:59 -03:00
Maurício Meneghini Fauth
c48f579832 Add namespace to controllers tests
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2017-09-20 11:20:57 -03:00