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
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
Maurício Meneghini Fauth
e5de6ef1bd
Merge pull request #18081 from kamil-tekiela/rector-property-type
...
Convert var annotations to typed properties
2023-02-12 22:55:17 -03:00
Kamil Tekiela
8a1d6f1eaa
Convert var annotations to typed properties
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-12 21:31:04 +00:00
Maurício Meneghini Fauth
f19d22c671
Merge pull request #18080 from kamil-tekiela/ImageWrapper-property-promotion
...
Use property promotion in ImageWrapper
2023-02-12 17:39:05 -03:00
Kamil Tekiela
5163263221
Use property promotion in ImageWrapper
...
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
2023-02-12 20:29:50 +00:00
Maurício Meneghini Fauth
ed87488d70
Merge branch 'QA_5_2'
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-12 14:36:41 -03:00
Maurício Meneghini Fauth
1a6eef84e9
Remove PHPCS version restriction
...
[ci skip]
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
(cherry picked from commit 618b5d2e38 )
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-12 14:32:44 -03:00
Maurício Meneghini Fauth
930f8826d3
Remove dead code for old PHP versions
...
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-12 13:59:40 -03:00
Maurício Meneghini Fauth
66c640dade
Bump Symfony packages to version 6
...
Bump Twig version to 3.5
Bump Symfony polyfills to version 1.24
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-12 13:26:18 -03:00
Maurício Meneghini Fauth
618b5d2e38
Remove PHPCS version restriction
...
[ci skip]
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-12 13:01:18 -03:00
Maurício Meneghini Fauth
1ae669a8ec
Remove PHP 8.0 polyfill
...
[ci skip]
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-12 12:22:34 -03:00
Maurício Meneghini Fauth
1694c6f10e
Bump Psalm version to 5.6
...
Updates the Psalm baseline.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2023-02-12 12:15:52 -03:00
Maurício Meneghini Fauth
c66ecc99a8
Merge pull request #18078 from MauricioFauth/pma6-php81
...
[RFC] Change phpMyAdmin version from 5.3 to 6.0 and bump min PHP version
2023-02-12 11:43:04 -03:00
Bartosz Pazoła
724db52009
Translated using Weblate (Polish)
...
Currently translated at 45.6% (1563 of 3427 strings)
[ci skip]
Translation: phpMyAdmin/5.2
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/pl/
Signed-off-by: Bartosz Pazoła <mmmalfc@gmail.com>
2023-02-12 07:12:52 +01:00
angelchovski
82adb1ae89
Translated using Weblate (Bulgarian)
...
Currently translated at 63.5% (2179 of 3427 strings)
[ci skip]
Translation: phpMyAdmin/5.2
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/bg/
Signed-off-by: angelchovski <toni.linux@gmail.com>
2023-02-12 07:12:51 +01:00
Hosted Weblate
569e472175
Merge branch 'origin/master' into Weblate.
...
[ci skip]
Translation: phpMyAdmin/Development
Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/master/
2023-02-12 01:21:49 +01:00
Bartosz Pazoła
43f0b365e0
Translated using Weblate (Polish)
...
Currently translated at 95.8% (3300 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-12 01:21:47 +01:00