Merge branch 'develop' into 4.6

This commit is contained in:
John Paul E. Balandan, CPA 2025-01-08 02:49:47 +08:00
commit e475fd8fa4
No known key found for this signature in database
GPG Key ID: E60D48954743FDBF
7 changed files with 5 additions and 28 deletions

View File

@ -28,7 +28,7 @@
"phpunit/phpcov": "^9.0.2 || ^10.0",
"phpunit/phpunit": "^10.5.16 || ^11.2",
"predis/predis": "^1.1 || ^2.3",
"rector/rector": "2.0.5",
"rector/rector": "2.0.6",
"shipmonk/phpstan-baseline-per-identifier": "^2.0"
},
"replace": {

View File

@ -400,7 +400,7 @@ final class CommonFunctionsTest extends CIUnitTestCase
public function testModelNotExists(): void
{
$this->assertNull(model(UnexsistenceClass::class));
$this->assertNull(model(UnexsistenceClass::class)); // @phpstan-ignore class.notFound
}
public function testModelExistsBasename(): void

View File

@ -142,13 +142,13 @@ final class CommonHelperTest extends CIUnitTestCase
// this chunk is not needed really; just added so that IDEs will be happy
if (! function_exists('foo_bar_baz')) {
function foo_bar_baz(): string
function foo_bar_baz(): string // @phpstan-ignore function.inner
{
return __FILE__;
}
}
$this->assertSame($this->dummyHelpers[0], foo_bar_baz()); // @phpstan-ignore-line function.notFound
$this->assertSame($this->dummyHelpers[0], foo_bar_baz()); // @phpstan-ignore function.notFound
}
public function testNamespacedHelperNotFound(): void

View File

@ -53,7 +53,7 @@ final class ControllerTestTraitTest extends CIUnitTestCase
$logger = new Logger(new LoggerConfig());
$this->withUri('http://example.com')
->withLogger($logger)
->controller(NeverHeardOfIt::class)
->controller(NeverHeardOfIt::class) // @phpstan-ignore class.notFound
->execute('index');
}

View File

@ -1,13 +0,0 @@
# total 2 errors
parameters:
ignoreErrors:
-
message: '#^Class CodeIgniter\\UnexsistenceClass not found\.$#'
count: 1
path: ../../tests/system/CommonFunctionsTest.php
-
message: '#^Class App\\Controllers\\NeverHeardOfIt not found\.$#'
count: 1
path: ../../tests/system/Test/ControllerTestTraitTest.php

View File

@ -1,8 +0,0 @@
# total 1 error
parameters:
ignoreErrors:
-
message: '#^Inner named functions are not supported by PHPStan\. Consider refactoring to an anonymous function, class method, or a top\-level\-defined function\. See issue \#165 \(https\://github\.com/phpstan/phpstan/issues/165\) for more details\.$#'
count: 1
path: ../../tests/system/CommonHelperTest.php

View File

@ -2,7 +2,6 @@ includes:
- argument.type.neon
- assign.propertyType.neon
- booleanAnd.rightAlwaysTrue.neon
- class.notFound.neon
- codeigniter.cacheHandlerInstance.neon
- codeigniter.configArgumentInstanceof.neon
- codeigniter.frameworkExceptionInstance.neon
@ -17,7 +16,6 @@ includes:
- empty.property.neon
- expr.resultUnused.neon
- function.alreadyNarrowedType.neon
- function.inner.neon
- generator.valueType.neon
- isset.offset.neon
- isset.property.neon