Skip to content

Commit 4d5432a

Browse files
Merge pull request #20056 from MauricioFauth/export-plugins-refactor
Extract dependencies from export plugins
2 parents 4a8bee4 + d88e37c commit 4d5432a

37 files changed

Lines changed: 999 additions & 1482 deletions

‎phpstan-baseline.neon‎

Lines changed: 2 additions & 200 deletions
Original file line numberDiff line numberDiff line change
@@ -8655,93 +8655,30 @@ parameters:
86558655
count: 1
86568656
path: src/Plugins/AuthenticationPluginFactory.php
86578657

8658-
-
8659-
message: '''
8660-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Dbal\\DatabaseInterface\:
8661-
Use dependency injection instead\.$#
8662-
'''
8663-
identifier: staticMethod.deprecated
8664-
count: 2
8665-
path: src/Plugins/Export/ExportCodegen.php
8666-
86678658
-
86688659
message: '#^Parameter \#4 \$column of method PhpMyAdmin\\Plugins\\ExportPlugin\:\:getColumnAlias\(\) expects string, string\|null given\.$#'
86698660
identifier: argument.type
86708661
count: 2
86718662
path: src/Plugins/Export/ExportCodegen.php
86728663

8673-
-
8674-
message: '''
8675-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Dbal\\DatabaseInterface\:
8676-
Use dependency injection instead\.$#
8677-
'''
8678-
identifier: staticMethod.deprecated
8679-
count: 2
8680-
path: src/Plugins/Export/ExportCsv.php
8681-
8682-
-
8683-
message: '''
8684-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Dbal\\DatabaseInterface\:
8685-
Use dependency injection instead\.$#
8686-
'''
8687-
identifier: staticMethod.deprecated
8688-
count: 2
8689-
path: src/Plugins/Export/ExportExcel.php
8690-
86918664
-
86928665
message: '#^Parameter \#3 \$subject of function str_replace expects array\<string\>\|string, string\|null given\.$#'
86938666
identifier: argument.type
86948667
count: 3
86958668
path: src/Plugins/Export/ExportExcel.php
86968669

8697-
-
8698-
message: '''
8699-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Dbal\\DatabaseInterface\:
8700-
Use dependency injection instead\.$#
8701-
'''
8702-
identifier: staticMethod.deprecated
8703-
count: 4
8704-
path: src/Plugins/Export/ExportHtmlword.php
8705-
87068670
-
87078671
message: '#^Loose comparison via "\!\=" is not allowed\.$#'
87088672
identifier: notEqual.notAllowed
87098673
count: 2
87108674
path: src/Plugins/Export/ExportHtmlword.php
87118675

87128676
-
8713-
message: '''
8714-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Dbal\\DatabaseInterface\:
8715-
Use dependency injection instead\.$#
8716-
'''
8717-
identifier: staticMethod.deprecated
8718-
count: 2
8719-
path: src/Plugins/Export/ExportJson.php
8720-
8721-
-
8722-
message: '#^Parameter \#4 \$aliases of method PhpMyAdmin\\Plugins\\Export\\ExportJson\:\:doExportForQuery\(\) expects array\<string, array\{tables\: array\<string, array\{columns\: array\<string, string\>\}\>\}\>\|null, array\<mixed\> given\.$#'
8677+
message: '#^Parameter \#3 \$aliases of method PhpMyAdmin\\Plugins\\Export\\ExportJson\:\:doExportForQuery\(\) expects array\<string, array\{tables\: array\<string, array\{columns\: array\<string, string\>\}\>\}\>\|null, array\<mixed\> given\.$#'
87238678
identifier: argument.type
87248679
count: 1
87258680
path: src/Plugins/Export/ExportJson.php
87268681

8727-
-
8728-
message: '''
8729-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
8730-
Use dependency injection instead\.$#
8731-
'''
8732-
identifier: staticMethod.deprecated
8733-
count: 1
8734-
path: src/Plugins/Export/ExportLatex.php
8735-
8736-
-
8737-
message: '''
8738-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Dbal\\DatabaseInterface\:
8739-
Use dependency injection instead\.$#
8740-
'''
8741-
identifier: staticMethod.deprecated
8742-
count: 4
8743-
path: src/Plugins/Export/ExportLatex.php
8744-
87458682
-
87468683
message: '#^Cannot call method fetchAssoc\(\) on PhpMyAdmin\\Dbal\\ResultInterface\|false\.$#'
87478684
identifier: method.nonObject
@@ -8772,24 +8709,6 @@ parameters:
87728709
count: 1
87738710
path: src/Plugins/Export/ExportLatex.php
87748711

8775-
-
8776-
message: '''
8777-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Dbal\\DatabaseInterface\:
8778-
Use dependency injection instead\.$#
8779-
'''
8780-
identifier: staticMethod.deprecated
8781-
count: 3
8782-
path: src/Plugins/Export/ExportMediawiki.php
8783-
8784-
-
8785-
message: '''
8786-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Dbal\\DatabaseInterface\:
8787-
Use dependency injection instead\.$#
8788-
'''
8789-
identifier: staticMethod.deprecated
8790-
count: 2
8791-
path: src/Plugins/Export/ExportOds.php
8792-
87938712
-
87948713
message: '#^Parameter \#1 \$string of function bin2hex expects string, string\|null given\.$#'
87958714
identifier: argument.type
@@ -8802,15 +8721,6 @@ parameters:
88028721
count: 3
88038722
path: src/Plugins/Export/ExportOds.php
88048723

8805-
-
8806-
message: '''
8807-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Dbal\\DatabaseInterface\:
8808-
Use dependency injection instead\.$#
8809-
'''
8810-
identifier: staticMethod.deprecated
8811-
count: 5
8812-
path: src/Plugins/Export/ExportOdt.php
8813-
88148724
-
88158725
message: '#^Only booleans are allowed in an if condition, array\|false given\.$#'
88168726
identifier: if.condNotBoolean
@@ -8841,15 +8751,6 @@ parameters:
88418751
count: 1
88428752
path: src/Plugins/Export/ExportOdt.php
88438753

8844-
-
8845-
message: '''
8846-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Dbal\\DatabaseInterface\:
8847-
Use dependency injection instead\.$#
8848-
'''
8849-
identifier: staticMethod.deprecated
8850-
count: 1
8851-
path: src/Plugins/Export/ExportPdf.php
8852-
88538754
-
88548755
message: '#^Class PhpMyAdmin\\Plugins\\Export\\ExportPdf has an uninitialized property \$pdf\. Give it default value or assign it in the constructor\.$#'
88558756
identifier: property.uninitialized
@@ -8868,39 +8769,12 @@ parameters:
88688769
count: 1
88698770
path: src/Plugins/Export/ExportPdf.php
88708771

8871-
-
8872-
message: '''
8873-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Dbal\\DatabaseInterface\:
8874-
Use dependency injection instead\.$#
8875-
'''
8876-
identifier: staticMethod.deprecated
8877-
count: 2
8878-
path: src/Plugins/Export/ExportPhparray.php
8879-
88808772
-
88818773
message: '#^Parameter \#2 \$subject of function preg_match expects string, string\|null given\.$#'
88828774
identifier: argument.type
88838775
count: 1
88848776
path: src/Plugins/Export/ExportPhparray.php
88858777

8886-
-
8887-
message: '''
8888-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
8889-
Use dependency injection instead\.$#
8890-
'''
8891-
identifier: staticMethod.deprecated
8892-
count: 4
8893-
path: src/Plugins/Export/ExportSql.php
8894-
8895-
-
8896-
message: '''
8897-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Dbal\\DatabaseInterface\:
8898-
Use dependency injection instead\.$#
8899-
'''
8900-
identifier: staticMethod.deprecated
8901-
count: 15
8902-
path: src/Plugins/Export/ExportSql.php
8903-
89048778
-
89058779
message: '#^Cannot access property \$database on PhpMyAdmin\\SqlParser\\Components\\Expression\|null\.$#'
89068780
identifier: property.nonObject
@@ -9039,15 +8913,6 @@ parameters:
90398913
count: 1
90408914
path: src/Plugins/Export/ExportSql.php
90418915

9042-
-
9043-
message: '''
9044-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Dbal\\DatabaseInterface\:
9045-
Use dependency injection instead\.$#
9046-
'''
9047-
identifier: staticMethod.deprecated
9048-
count: 5
9049-
path: src/Plugins/Export/ExportTexytext.php
9050-
90518916
-
90528917
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
90538918
identifier: empty.notAllowed
@@ -9060,24 +8925,6 @@ parameters:
90608925
count: 2
90618926
path: src/Plugins/Export/ExportTexytext.php
90628927

9063-
-
9064-
message: '''
9065-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
9066-
Use dependency injection instead\.$#
9067-
'''
9068-
identifier: staticMethod.deprecated
9069-
count: 1
9070-
path: src/Plugins/Export/ExportXml.php
9071-
9072-
-
9073-
message: '''
9074-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Dbal\\DatabaseInterface\:
9075-
Use dependency injection instead\.$#
9076-
'''
9077-
identifier: staticMethod.deprecated
9078-
count: 3
9079-
path: src/Plugins/Export/ExportXml.php
9080-
90818928
-
90828929
message: '#^Construct empty\(\) is not allowed\. Use more strict comparison\.$#'
90838930
identifier: empty.notAllowed
@@ -9096,15 +8943,6 @@ parameters:
90968943
count: 1
90978944
path: src/Plugins/Export/ExportXml.php
90988945

9099-
-
9100-
message: '''
9101-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Dbal\\DatabaseInterface\:
9102-
Use dependency injection instead\.$#
9103-
'''
9104-
identifier: staticMethod.deprecated
9105-
count: 2
9106-
path: src/Plugins/Export/ExportYaml.php
9107-
91088946
-
91098947
message: '#^Binary operation "\+" between \(float\|int\) and mixed results in an error\.$#'
91108948
identifier: binaryOp.invalid
@@ -9189,15 +9027,6 @@ parameters:
91899027
count: 2
91909028
path: src/Plugins/Export/Helpers/Pdf.php
91919029

9192-
-
9193-
message: '''
9194-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Dbal\\DatabaseInterface\:
9195-
Use dependency injection instead\.$#
9196-
'''
9197-
identifier: staticMethod.deprecated
9198-
count: 4
9199-
path: src/Plugins/Export/Helpers/Pdf.php
9200-
92019030
-
92029031
message: '#^Cannot access offset ''columns'' on mixed\.$#'
92039032
identifier: offsetAccess.nonOffsetAccessible
@@ -16551,15 +16380,6 @@ parameters:
1655116380
count: 1
1655216381
path: tests/unit/Plugins/Export/ExportHtmlwordTest.php
1655316382

16554-
-
16555-
message: '''
16556-
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
16557-
Use dependency injection instead\.$#
16558-
'''
16559-
identifier: staticMethod.deprecated
16560-
count: 3
16561-
path: tests/unit/Plugins/Export/ExportLatexTest.php
16562-
1656316383
-
1656416384
message: '#^Parameter \#2 \$haystack of static method PHPUnit\\Framework\\Assert\:\:assertStringContainsString\(\) expects string, string\|false given\.$#'
1656516385
identifier: argument.type
@@ -16587,7 +16407,7 @@ parameters:
1658716407
Use dependency injection instead\.$#
1658816408
'''
1658916409
identifier: staticMethod.deprecated
16590-
count: 9
16410+
count: 1
1659116411
path: tests/unit/Plugins/Export/ExportSqlTest.php
1659216412

1659316413
-
@@ -16596,18 +16416,6 @@ parameters:
1659616416
count: 2
1659716417
path: tests/unit/Plugins/Export/ExportSqlTest.php
1659816418

16599-
-
16600-
message: '#^Parameter \#2 \$haystack of static method PHPUnit\\Framework\\Assert\:\:assertStringContainsString\(\) expects string, string\|null given\.$#'
16601-
identifier: argument.type
16602-
count: 3
16603-
path: tests/unit/Plugins/Export/ExportSqlTest.php
16604-
16605-
-
16606-
message: '#^Property PhpMyAdmin\\Config\:\:\$selectedServer \(array\{host\: string, port\: string, socket\: string, ssl\: bool, ssl_key\: string\|null, ssl_cert\: string\|null, ssl_ca\: string\|null, ssl_ca_path\: string\|null, \.\.\.\}\) does not accept array\{host\: string, port\: 80, socket\: string, ssl\: bool, ssl_key\: string\|null, ssl_cert\: string\|null, ssl_ca\: string\|null, ssl_ca_path\: string\|null, \.\.\.\}\.$#'
16607-
identifier: assign.propertyType
16608-
count: 1
16609-
path: tests/unit/Plugins/Export/ExportSqlTest.php
16610-
1661116419
-
1661216420
message: '''
1661316421
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:
@@ -16626,12 +16434,6 @@ parameters:
1662616434
count: 2
1662716435
path: tests/unit/Plugins/Export/ExportXmlTest.php
1662816436

16629-
-
16630-
message: '#^Property PhpMyAdmin\\Config\:\:\$selectedServer \(array\{host\: string, port\: string, socket\: string, ssl\: bool, ssl_key\: string\|null, ssl_cert\: string\|null, ssl_ca\: string\|null, ssl_ca_path\: string\|null, \.\.\.\}\) does not accept array\{host\: string, port\: 80, socket\: string, ssl\: bool, ssl_key\: string\|null, ssl_cert\: string\|null, ssl_ca\: string\|null, ssl_ca_path\: string\|null, \.\.\.\}\.$#'
16631-
identifier: assign.propertyType
16632-
count: 1
16633-
path: tests/unit/Plugins/Export/ExportXmlTest.php
16634-
1663516437
-
1663616438
message: '''
1663716439
#^Call to deprecated method getInstance\(\) of class PhpMyAdmin\\Config\:

0 commit comments

Comments
 (0)