Commit Graph

125549 Commits

Author SHA1 Message Date
phpMyAdmin bot
7752a1d59f Update po files
[ci skip]

Signed-off-by: phpMyAdmin bot <bot@phpmyadmin.net>
2023-02-19 00:20:36 +00:00
Maurício Meneghini Fauth
98cf06a55d
Mark arm32v6 tests as experimental
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-18 13:19:58 -03:00
Kamil Tekiela
7f898f9fc3
Refactor gis scale data set calculation (#18100)
* Add better array types through automatic inference

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Create VO for ScaleData

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Fix bug with calculation of minimum X/Y

0.0 cannot be used as a sentinel value because it's one of the possible values.

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Update baselines

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

---------

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-17 08:24:37 -03:00
Kristijan \"Fremen\" Velkovski
a0f859b1d1
Translated using Weblate (Macedonian)
Currently translated at 26.5% (913 of 3442 strings)

[ci skip]

Translation: phpMyAdmin/Development
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/mk/
Signed-off-by: "Kristijan \"Fremen\" Velkovski" <me@krisfremen.com>
2023-02-17 11:24:26 +01:00
Kristijan \"Fremen\" Velkovski
8862c6d0e0
Translated using Weblate (Macedonian)
Currently translated at 26.2% (905 of 3442 strings)

[ci skip]

Translation: phpMyAdmin/Development
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/mk/
Signed-off-by: "Kristijan \"Fremen\" Velkovski" <me@krisfremen.com>
2023-02-17 02:47:45 +01:00
Anders Johansson
08ca877ffb
Translated using Weblate (Swedish)
Currently translated at 83.5% (2876 of 3442 strings)

[ci skip]

Translation: phpMyAdmin/Development
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/sv/
Signed-off-by: Anders Johansson <johansson@aljmedia.se>
2023-02-17 02:47:43 +01:00
Bartosz Pazoła
0c40ce18ce
Translated using Weblate (Polish)
Currently translated at 95.9% (3302 of 3442 strings)

[ci skip]

Translation: phpMyAdmin/Development
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/pl/
Signed-off-by: Bartosz Pazoła <mmmalfc@gmail.com>
2023-02-17 02:47:42 +01:00
Maurício Meneghini Fauth
54104869dc
Merge pull request #18102 from kamil-tekiela/create-view-bugs
Fixed a bug disable the create view button
2023-02-16 17:31:32 -03:00
Kamil Tekiela
e0ef08d871 Extract functionality into methods for better readability
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-16 12:38:49 +00:00
Kamil Tekiela
87419d3cd2 Fix bug caused by earlier refactoring
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-16 12:13:33 +00:00
Kamil Tekiela
cb2e1932f8
Better array types part 1 (#18096)
* Plugins getScripts() return array of strings

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* These methods always return an array

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* extractPrivInfo returns an array of strings

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* getInfoPages returns an array of strings

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* returnClassNamesFromMenuButtons returns a string map

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Use array shape for getDatabasesForSelectOptions

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Some methods in Table return array of strings

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* getLines returns an array if ints

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* Array shapes in TwoFactor

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

* parseEnumSetValues always returns an array of strings

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>

---------

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-15 16:52:00 -03:00
Maurício Meneghini Fauth
d28982e1ab
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-15 16:43:41 -03:00
Maurício Meneghini Fauth
b4f15ab6a0
Fix missing default_action parameter when copying rows
Related to https://github.com/phpmyadmin/phpmyadmin/pull/17923

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-15 16:37:05 -03:00
Maurício Meneghini Fauth
05963de7a8
Fix unused variable after merge
Introduced by 0819043d0e.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-15 15:58:20 -03:00
Maurício Meneghini Fauth
4ab4348fee
Merge pull request #18084 from kamil-tekiela/union-types
Add union types
2023-02-15 14:47:32 -03:00
Maurício Meneghini Fauth
fc8707a676
Increase Infection minimum thresholds
Based on 4e4e2e56fd results.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-15 14:18:21 -03:00
Kamil Tekiela
cfe54a501b Add union types
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-15 15:23:28 +00:00
Maurício Meneghini Fauth
4e4e2e56fd
Refactor NodeFactory::getInstance() to use class strings
Improves type inference.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-15 11:46:04 -03:00
Maurício Meneghini Fauth
4d756588d3
Merge pull request #18047 from kamil-tekiela/columnMap
Move getColumnMapFromSql() to SystemDatabase
2023-02-15 10:54:57 -03:00
Kamil Tekiela
164bf08f4c Move getColumnMapFromSql() to SystemDatabase
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-15 12:41:47 +00:00
Kamil Tekiela
9187dc8ec2
Export plugins refactoring (#18071)
This is a simplification of the code to remove confusing ($row[$j] == '0' || $row[$j] != ''). To make the code simpler, I added a @var annotation and replace for with foreach.

I realize this adds Psalm warnings, and they are valid warnings. But they are because of dead code related to $GLOBALS['what']. This just looks like another nonsense of its own that needs a little more work to be removed so I kept it out of this PR. For the time being, let's keep them in Psalm baseline.

* Simplify ExportCsv
* Simplify ExportHtmlword
* Simplify ExportTexytext
* Fix broken tests

https://github.com/phpmyadmin/phpmyadmin/pull/18071

---------

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-15 09:18:05 -03:00
Kamil Tekiela
2b35303aae
Remove redundant code (#18063)
PHPStorm has been a little annoying with showing all these code issues. I took some time to analyse most of them and fix whichever were easy to fix. This kind of change should improve future maintenance as developers do not need to wonder what a line of code does. Code that has no impact on functionality should be removed.

* Remove redundant variables
* Invert condition for better clarity
* Remove some of the redundant casts
* Replace switch with an if
* Fix foreach variable
* Remove redundant variable concat
* Remove redundant concats
* Replace for loop with str_repeat
* Remove always true param
* Turn property $position into local var
* Turn Pdf properties into local vars
* Remove unused properties in Pdf
* Change ternary into condition
* Remove redundant assignments
   They are immediately overwritten with a different value.
* Redundant array append
* Collapse if statements into assignments
* Use boolean constants instead of variables
* Remove unneeded parameter
* Remove null-coalesce
* Unnecessary assignment
* Remove redundant isset
* Remove readOnly flag for InsertEdit fields
* Remove function_exists and $mode var
* Remove duplicate condition
* Remove redundant elseif
* Remove redundant isset
* Use hasBodyParam()
* Simplify isRoutesCacheFileValid()
   Psalm complains but is wrong.

https://github.com/phpmyadmin/phpmyadmin/pull/18063

---------

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-15 09:11:05 -03:00
Maurício Meneghini Fauth
c3516962c1
Merge pull request #18094 from kamil-tekiela/new-phpstan-checks
New phpstan checks
2023-02-14 20:06:19 -03:00
Maurício Meneghini Fauth
e854e79d3b
Merge pull request #18086 from kamil-tekiela/Replace-switch-with-match
Replace switch with match
2023-02-14 20:04:17 -03:00
Kamil Tekiela
c9f29281a9 Enable polluteScopeWithLoopInitialAssignments
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-14 21:29:56 +00:00
Kamil Tekiela
affd2b9d7f Enable checkTooWideReturnTypesInProtectedAndPublicMethods
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-14 21:29:56 +00:00
Kamil Tekiela
51a855a5cc Enable checkDynamicProperties
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-14 21:17:15 +00:00
Kamil Tekiela
f944f7dcd2 Enable polluteScopeWithAlwaysIterableForeach
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-14 21:13:19 +00:00
Kamil Tekiela
e41cfea7e5 Enable checkUninitializedProperties
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-14 21:09:37 +00:00
Kamil Tekiela
f85b88d1e1 Enable checkAlwaysTrue*
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-14 21:08:31 +00:00
Maurício Meneghini Fauth
26b5860484
Merge pull request #18089 from kamil-tekiela/first-class-callable
Convert to first class callables
2023-02-14 17:36:13 -03:00
Maurício Meneghini Fauth
a8afdb2237
Merge pull request #18092 from kamil-tekiela/PHPStan-benevelovent-unions
Enable PHPStan checkBenevolentUnionTypes
2023-02-14 17:32:18 -03:00
Maurício Meneghini Fauth
56446c0b15
Refactor Config::checkServers() method
Add more tests and ensures it has at least one valid server config.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-14 17:24:02 -03:00
Maurício Meneghini Fauth
ab80bd8730
Remove trigger_error from Config::checkServers()
Silent removes invalid server keys.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-14 16:36:06 -03:00
Kamil Tekiela
9d03da9ba4 Enable PHPStan checkBenevolentUnionTypes
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-14 19:10:01 +00:00
Maurício Meneghini Fauth
2801ece589
Merge pull request #18087 from kamil-tekiela/Short-closures
Use short closures where possible
2023-02-14 15:29:47 -03:00
Maurício Meneghini Fauth
bbc70218e1
Replace deprecated method in ServerRequestFactoryTest
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-14 15:22:47 -03:00
Isaac Bennetch
b6101dc4f9 Merge branch 'QA_5_2' 2023-02-14 13:16:14 -05:00
Isaac Bennetch
8944383e53 Some improvements to the description of the customizations of the browser title bar text.
Fixes #18082

Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2023-02-14 13:14:54 -05:00
Maurício Meneghini Fauth
0ab9e4ac77
Change PHPUnit data providers to use static methods
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-14 12:42:16 -03:00
Kamil Tekiela
b6f0da1c09 Convert to first class callables
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-14 14:18:23 +00:00
Kamil Tekiela
87e42d591c Use short closures where possible
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-14 13:44:42 +00:00
Kamil Tekiela
69f8d9f85c Replace switch with match
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-14 13:07:00 +00:00
Maurício Meneghini Fauth
c3223892a8
Merge pull request #18085 from kamil-tekiela/remove-unused-variable-in-catch
Remove unused variable in catch
2023-02-14 09:55:34 -03:00
Kamil Tekiela
8433f66447 Remove unused variable in catch
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-14 12:10:23 +00:00
Maurício Meneghini Fauth
ef941c2080
Merge pull request #18083 from kamil-tekiela/Fix-PHP-8-issues
Fix PHP 8 issues due to changed internal functions
2023-02-13 19:04:31 -03:00
Kamil Tekiela
5c5eeb9346 substr() now returns an empty string
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-13 21:11:17 +00:00
Kamil Tekiela
31bdc9067b array_combine does not return false anymore
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-13 21:11:17 +00:00
Maurício Meneghini Fauth
3716f94dd3
Bump PHPUnit version to 9.6
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-13 11:14:03 -03:00
Maurício Meneghini Fauth
07594eda44
Remove Image\ImageWrapper::destroy method
This method has no operation in PHP 8.0.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-13 10:34:12 -03:00