Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix errors on merging develop to 4.6 #9332

Merged
merged 2 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
},
"require-dev": {
"codeigniter/phpstan-codeigniter": "^1.5.1",
"fakerphp/faker": "^1.9",
"kint-php/kint": "^5.0.4",
"mikey179/vfsstream": "^1.6",
"fakerphp/faker": "^1.24",
"kint-php/kint": "^6.0",
"mikey179/vfsstream": "^1.6.12",
"nexusphp/tachycardia": "^2.0",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^2.0",
"phpstan/phpstan-strict-rules": "^2.0",
"phpunit/phpcov": "^9.0.2 || ^10.0",
"phpunit/phpunit": "^10.5.16 || ^11.2",
"predis/predis": "^1.1 || ^2.0",
"predis/predis": "^1.1 || ^2.3",
"rector/rector": "2.0.3",
"shipmonk/phpstan-baseline-per-identifier": "^2.0"
},
Expand Down
12 changes: 1 addition & 11 deletions utils/phpstan-baseline/argument.type.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 75 errors
# total 73 errors

parameters:
ignoreErrors:
Expand Down Expand Up @@ -307,16 +307,6 @@ parameters:
count: 1
path: ../../tests/system/Test/TestResponseTest.php

-
message: '#^Parameter \#1 \$config of class CodeIgniter\\Validation\\Validation constructor expects Config\\Validation, stdClass given\.$#'
count: 1
path: ../../tests/system/Validation/CreditCardRulesTest.php

-
message: '#^Parameter \#1 \$config of class CodeIgniter\\Validation\\Validation constructor expects Config\\Validation, stdClass given\.$#'
count: 1
path: ../../tests/system/Validation/FileRulesTest.php

-
message: '#^Parameter \#1 \$config of class CodeIgniter\\Validation\\Validation constructor expects Config\\Validation, stdClass given\.$#'
count: 1
Expand Down
2 changes: 1 addition & 1 deletion utils/phpstan-baseline/assign.propertyType.neon
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ parameters:
path: ../../system/Controller.php

-
message: '#^Property class@anonymous/tests/system/API/ResponseTraitTest\.php\:639\:\:\$format \(''html''\|''json''\|''xml''\|null\) does not accept ''txt''\.$#'
message: '#^Property class@anonymous/tests/system/API/ResponseTraitTest\.php\:621\:\:\$format \(''html''\|''json''\|''xml''\|null\) does not accept ''txt''\.$#'
count: 1
path: ../../tests/system/API/ResponseTraitTest.php

Expand Down
7 changes: 1 addition & 6 deletions utils/phpstan-baseline/booleanNot.exprNotBoolean.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 13 errors
# total 12 errors

parameters:
ignoreErrors:
Expand Down Expand Up @@ -37,11 +37,6 @@ parameters:
count: 1
path: ../../system/Test/CIUnitTestCase.php

-
message: '#^Only booleans are allowed in a negated boolean, array\|null given\.$#'
count: 6
path: ../../system/Validation/FileRules.php

-
message: '#^Only booleans are allowed in a negated boolean, mixed given\.$#'
count: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ parameters:

-
message: '#^Assigning ''GET'' directly on offset ''REQUEST_METHOD'' of \$_SERVER is discouraged\.$#'
count: 36
count: 38
path: ../../tests/system/Filters/FiltersTest.php

-
Expand Down
22 changes: 1 addition & 21 deletions utils/phpstan-baseline/method.childReturnType.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 43 errors
# total 39 errors

parameters:
ignoreErrors:
Expand Down Expand Up @@ -127,26 +127,6 @@ parameters:
count: 1
path: ../../system/HTTP/OutgoingRequest.php

-
message: '#^Return type \(CodeIgniter\\I18n\\Time\) of method CodeIgniter\\I18n\\Time\:\:setTimestamp\(\) should be covariant with return type \(static\(DateTimeImmutable\)\) of method DateTimeImmutable\:\:setTimestamp\(\)$#'
count: 1
path: ../../system/I18n/Time.php

-
message: '#^Return type \(CodeIgniter\\I18n\\Time\) of method CodeIgniter\\I18n\\Time\:\:setTimezone\(\) should be covariant with return type \(static\(DateTimeImmutable\)\) of method DateTimeImmutable\:\:setTimezone\(\)$#'
count: 1
path: ../../system/I18n/Time.php

-
message: '#^Return type \(CodeIgniter\\I18n\\TimeLegacy\) of method CodeIgniter\\I18n\\TimeLegacy\:\:setTimestamp\(\) should be covariant with return type \(static\(DateTime\)\) of method DateTime\:\:setTimestamp\(\)$#'
count: 1
path: ../../system/I18n/TimeLegacy.php

-
message: '#^Return type \(CodeIgniter\\I18n\\TimeLegacy\) of method CodeIgniter\\I18n\\TimeLegacy\:\:setTimezone\(\) should be covariant with return type \(static\(DateTime\)\) of method DateTime\:\:setTimezone\(\)$#'
count: 1
path: ../../system/I18n/TimeLegacy.php

-
message: '#^Return type \(CodeIgniter\\Images\\Handlers\\BaseHandler\) of method CodeIgniter\\Images\\Handlers\\BaseHandler\:\:fit\(\) should be covariant with return type \(\$this\(CodeIgniter\\Images\\ImageHandlerInterface\)\) of method CodeIgniter\\Images\\ImageHandlerInterface\:\:fit\(\)$#'
count: 1
Expand Down
32 changes: 1 addition & 31 deletions utils/phpstan-baseline/method.notFound.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 47 errors
# total 41 errors

parameters:
ignoreErrors:
Expand All @@ -17,36 +17,6 @@ parameters:
count: 2
path: ../../system/Debug/Toolbar/Collectors/Views.php

-
message: '#^Call to an undefined method CodeIgniter\\Router\\RouteCollectionInterface\:\:getDefaultNamespace\(\)\.$#'
count: 2
path: ../../system/Router/Router.php

-
message: '#^Call to an undefined method CodeIgniter\\Router\\RouteCollectionInterface\:\:getFiltersForRoute\(\)\.$#'
count: 1
path: ../../system/Router/Router.php

-
message: '#^Call to an undefined method CodeIgniter\\Router\\RouteCollectionInterface\:\:getRegisteredControllers\(\)\.$#'
count: 1
path: ../../system/Router/Router.php

-
message: '#^Call to an undefined method CodeIgniter\\Router\\RouteCollectionInterface\:\:getRoutesOptions\(\)\.$#'
count: 1
path: ../../system/Router/Router.php

-
message: '#^Call to an undefined method CodeIgniter\\Router\\RouteCollectionInterface\:\:isFiltered\(\)\.$#'
count: 1
path: ../../system/Router/Router.php

-
message: '#^Call to an undefined method CodeIgniter\\Router\\RouteCollectionInterface\:\:setHTTPVerb\(\)\.$#'
count: 1
path: ../../system/Router/Router.php

-
message: '#^Call to an undefined method CodeIgniter\\Database\\ConnectionInterface\:\:tableExists\(\)\.$#'
count: 1
Expand Down
79 changes: 7 additions & 72 deletions utils/phpstan-baseline/missingType.iterableValue.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 1686 errors
# total 1673 errors

parameters:
ignoreErrors:
Expand Down Expand Up @@ -532,16 +532,6 @@ parameters:
count: 1
path: ../../system/Commands/Translation/LocalizationFinder.php

-
message: '#^Method CodeIgniter\\Commands\\Utilities\\FilterCheck\:\:addRequiredFilters\(\) has parameter \$filters with no value type specified in iterable type array\.$#'
count: 1
path: ../../system/Commands/Utilities/FilterCheck.php

-
message: '#^Method CodeIgniter\\Commands\\Utilities\\FilterCheck\:\:addRequiredFilters\(\) return type has no value type specified in iterable type array\.$#'
count: 1
path: ../../system/Commands/Utilities/FilterCheck.php

-
message: '#^Method CodeIgniter\\Commands\\Utilities\\Namespaces\:\:outputAllNamespaces\(\) has parameter \$params with no value type specified in iterable type array\.$#'
count: 1
Expand Down Expand Up @@ -1352,11 +1342,6 @@ parameters:
count: 1
path: ../../system/Database/BaseConnection.php

-
message: '#^Property CodeIgniter\\Database\\BaseConnection\:\:\$aliasedTables type has no value type specified in iterable type array\.$#'
count: 1
path: ../../system/Database/BaseConnection.php

-
message: '#^Property CodeIgniter\\Database\\BaseConnection\:\:\$dataCache type has no value type specified in iterable type array\.$#'
count: 1
Expand Down Expand Up @@ -3107,21 +3092,6 @@ parameters:
count: 1
path: ../../system/Filters/Filters.php

-
message: '#^Method CodeIgniter\\Filters\\Filters\:\:enableFilters\(\) has parameter \$names with no value type specified in iterable type array\.$#'
count: 1
path: ../../system/Filters/Filters.php

-
message: '#^Method CodeIgniter\\Filters\\Filters\:\:getFilters\(\) return type has no value type specified in iterable type array\.$#'
count: 1
path: ../../system/Filters/Filters.php

-
message: '#^Method CodeIgniter\\Filters\\Filters\:\:getFiltersClass\(\) return type has no value type specified in iterable type array\.$#'
count: 1
path: ../../system/Filters/Filters.php

-
message: '#^Method CodeIgniter\\Filters\\Filters\:\:getRequiredFilters\(\) return type has no value type specified in iterable type array\.$#'
count: 1
Expand All @@ -3132,36 +3102,11 @@ parameters:
count: 1
path: ../../system/Filters/Filters.php

-
message: '#^Method CodeIgniter\\Filters\\Filters\:\:registerArguments\(\) has parameter \$arguments with no value type specified in iterable type array\.$#'
count: 1
path: ../../system/Filters/Filters.php

-
message: '#^Method CodeIgniter\\Filters\\Filters\:\:runAfter\(\) has parameter \$filterClasses with no value type specified in iterable type array\.$#'
count: 1
path: ../../system/Filters/Filters.php

-
message: '#^Method CodeIgniter\\Filters\\Filters\:\:runBefore\(\) has parameter \$filterClasses with no value type specified in iterable type array\.$#'
count: 1
path: ../../system/Filters/Filters.php

-
message: '#^Method CodeIgniter\\Filters\\Filters\:\:setToolbarToLast\(\) return type has no value type specified in iterable type array\.$#'
count: 1
path: ../../system/Filters/Filters.php

-
message: '#^Property CodeIgniter\\Filters\\Filters\:\:\$filters type has no value type specified in iterable type array\.$#'
count: 1
path: ../../system/Filters/Filters.php

-
message: '#^Property CodeIgniter\\Filters\\Filters\:\:\$filtersClass type has no value type specified in iterable type array\.$#'
count: 1
path: ../../system/Filters/Filters.php

-
message: '#^Method CodeIgniter\\Filters\\ForceHTTPS\:\:after\(\) has parameter \$arguments with no value type specified in iterable type array\.$#'
count: 1
Expand Down Expand Up @@ -6653,32 +6598,32 @@ parameters:
path: ../../tests/system/API/ResponseTraitTest.php

-
message: '#^Method class@anonymous/tests/system/API/ResponseTraitTest\.php\:639\:\:fail\(\) has parameter \$messages with no value type specified in iterable type array\.$#'
message: '#^Method class@anonymous/tests/system/API/ResponseTraitTest\.php\:621\:\:fail\(\) has parameter \$messages with no value type specified in iterable type array\.$#'
count: 1
path: ../../tests/system/API/ResponseTraitTest.php

-
message: '#^Method class@anonymous/tests/system/API/ResponseTraitTest\.php\:639\:\:format\(\) has parameter \$data with no value type specified in iterable type array\.$#'
message: '#^Method class@anonymous/tests/system/API/ResponseTraitTest\.php\:621\:\:format\(\) has parameter \$data with no value type specified in iterable type array\.$#'
count: 1
path: ../../tests/system/API/ResponseTraitTest.php

-
message: '#^Method class@anonymous/tests/system/API/ResponseTraitTest\.php\:639\:\:respond\(\) has parameter \$data with no value type specified in iterable type array\.$#'
message: '#^Method class@anonymous/tests/system/API/ResponseTraitTest\.php\:621\:\:respond\(\) has parameter \$data with no value type specified in iterable type array\.$#'
count: 1
path: ../../tests/system/API/ResponseTraitTest.php

-
message: '#^Method class@anonymous/tests/system/API/ResponseTraitTest\.php\:639\:\:respondCreated\(\) has parameter \$data with no value type specified in iterable type array\.$#'
message: '#^Method class@anonymous/tests/system/API/ResponseTraitTest\.php\:621\:\:respondCreated\(\) has parameter \$data with no value type specified in iterable type array\.$#'
count: 1
path: ../../tests/system/API/ResponseTraitTest.php

-
message: '#^Method class@anonymous/tests/system/API/ResponseTraitTest\.php\:639\:\:respondDeleted\(\) has parameter \$data with no value type specified in iterable type array\.$#'
message: '#^Method class@anonymous/tests/system/API/ResponseTraitTest\.php\:621\:\:respondDeleted\(\) has parameter \$data with no value type specified in iterable type array\.$#'
count: 1
path: ../../tests/system/API/ResponseTraitTest.php

-
message: '#^Method class@anonymous/tests/system/API/ResponseTraitTest\.php\:639\:\:respondUpdated\(\) has parameter \$data with no value type specified in iterable type array\.$#'
message: '#^Method class@anonymous/tests/system/API/ResponseTraitTest\.php\:621\:\:respondUpdated\(\) has parameter \$data with no value type specified in iterable type array\.$#'
count: 1
path: ../../tests/system/API/ResponseTraitTest.php

Expand Down Expand Up @@ -7867,16 +7812,6 @@ parameters:
count: 1
path: ../../tests/system/Throttle/ThrottleTest.php

-
message: '#^Method CodeIgniter\\Validation\\CreditCardRulesTest\:\:calculateLuhnChecksum\(\) has parameter \$digits with no value type specified in iterable type array\.$#'
count: 1
path: ../../tests/system/Validation/CreditCardRulesTest.php

-
message: '#^Method CodeIgniter\\Validation\\CreditCardRulesTest\:\:provideValidCCNumber\(\) return type has no value type specified in iterable type iterable\.$#'
count: 1
path: ../../tests/system/Validation/CreditCardRulesTest.php

-
message: '#^Property CodeIgniter\\Validation\\CreditCardRulesTest\:\:\$config type has no value type specified in iterable type array\.$#'
count: 1
Expand Down
4 changes: 2 additions & 2 deletions utils/phpstan-baseline/missingType.parameter.neon
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ parameters:
path: ../../tests/system/API/ResponseTraitTest.php

-
message: '#^Method class@anonymous/tests/system/API/ResponseTraitTest\.php\:639\:\:__construct\(\) has parameter \$request with no type specified\.$#'
message: '#^Method class@anonymous/tests/system/API/ResponseTraitTest\.php\:621\:\:__construct\(\) has parameter \$request with no type specified\.$#'
count: 1
path: ../../tests/system/API/ResponseTraitTest.php

-
message: '#^Method class@anonymous/tests/system/API/ResponseTraitTest\.php\:639\:\:__construct\(\) has parameter \$response with no type specified\.$#'
message: '#^Method class@anonymous/tests/system/API/ResponseTraitTest\.php\:621\:\:__construct\(\) has parameter \$response with no type specified\.$#'
count: 1
path: ../../tests/system/API/ResponseTraitTest.php

Expand Down
4 changes: 2 additions & 2 deletions utils/phpstan-baseline/missingType.property.neon
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@ parameters:
path: ../../tests/system/API/ResponseTraitTest.php

-
message: '#^Property class@anonymous/tests/system/API/ResponseTraitTest\.php\:639\:\:\$request has no type specified\.$#'
message: '#^Property class@anonymous/tests/system/API/ResponseTraitTest\.php\:621\:\:\$request has no type specified\.$#'
count: 1
path: ../../tests/system/API/ResponseTraitTest.php

-
message: '#^Property class@anonymous/tests/system/API/ResponseTraitTest\.php\:639\:\:\$response has no type specified\.$#'
message: '#^Property class@anonymous/tests/system/API/ResponseTraitTest\.php\:621\:\:\$response has no type specified\.$#'
count: 1
path: ../../tests/system/API/ResponseTraitTest.php

Expand Down
7 changes: 6 additions & 1 deletion utils/phpstan-baseline/property.notFound.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# total 29 errors
# total 30 errors

parameters:
ignoreErrors:
Expand Down Expand Up @@ -42,6 +42,11 @@ parameters:
count: 2
path: ../../tests/system/Database/BaseConnectionTest.php

-
message: '#^Access to an undefined property CodeIgniter\\Database\\BaseConnection\:\:\$foundRows\.$#'
count: 2
path: ../../tests/system/Database/Live/MySQLi/FoundRowsTest.php

-
message: '#^Access to an undefined property CodeIgniter\\Database\\BaseConnection\:\:\$numberNative\.$#'
count: 2
Expand Down
Loading