Skip to content

Commit 4aaf6de

Browse files
Update dependency slam/php-cs-fixer-extensions to ^3.15.0 (#94)
* Update dependency slam/php-cs-fixer-extensions to ^3.15.0 | datasource | package | from | to | | ---------- | ---------------------------- | ------ | ------ | | packagist | slam/php-cs-fixer-extensions | 3.14.0 | 3.15.0 | * CS Fix --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Filippo Tessarotto <zoeslam@gmail.com>
1 parent dede5ae commit 4aaf6de

10 files changed

Lines changed: 35 additions & 26 deletions

.php-cs-fixer.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?php
22

3-
$config = new SlamCsFixer\Config();
3+
$config = new SlamCsFixer\Config([
4+
'php_unit_data_provider_name' => false,
5+
'php_unit_data_provider_return_type' => false,
6+
]);
47
$config->getFinder()
58
->in(__DIR__ . '/src')
69
->in(__DIR__ . '/tests')

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.5
1+
FROM php:8.4
22

33
ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
44

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"phpstan/phpstan-deprecation-rules": "^2.0.4",
3434
"phpstan/phpstan-phpunit": "^2.0.16",
3535
"phpunit/phpunit": "^11.5.55",
36-
"slam/php-cs-fixer-extensions": "^3.14.0"
36+
"slam/php-cs-fixer-extensions": "^3.15.0"
3737
},
3838
"conflict": {
3939
"laminas/laminas-filter": "<2.41",

phpunit.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?xml version="1.0"?>
2-
<phpunit
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
colors="true"
5-
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4+
colors="true"
5+
failOnAllIssues="true"
6+
displayDetailsOnAllIssues="true"
67
>
78
<coverage>
89
<report>

src/Rules/Laminas/ServiceManagerGetMethodCallRule.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ public function processNode(Node $node, Scope $scope): array
9898
/** @phpstan-assert-if-true ObjectType $type */
9999
private function isTypeInstanceOfContainer(Type $type): bool
100100
{
101-
return (new ObjectType(ServiceLocatorInterface::class))->isSuperTypeOf($type)->yes()
102-
|| (new ObjectType(InteropContainerInterface::class))->isSuperTypeOf($type)->yes()
103-
|| (new ObjectType(PsrContainerInterface::class))->isSuperTypeOf($type)->yes();
101+
return new ObjectType(ServiceLocatorInterface::class)->isSuperTypeOf($type)->yes()
102+
|| new ObjectType(InteropContainerInterface::class)->isSuperTypeOf($type)->yes()
103+
|| new ObjectType(PsrContainerInterface::class)->isSuperTypeOf($type)->yes();
104104
}
105105
}

tests/LaminasIntegration/IntegrationTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@
55
namespace LaminasPhpStan\Tests\LaminasIntegration;
66

77
use PHPStan\Testing\LevelsTestCase;
8+
use PHPUnit\Framework\Attributes\CoversNothing;
9+
use PHPUnit\Framework\Attributes\DataProvider;
810

9-
/**
10-
* @coversNothing
11-
*/
11+
#[CoversNothing]
1212
final class IntegrationTest extends LevelsTestCase
1313
{
14+
#[DataProvider('dataTopics')]
15+
public function testLevels(string $topic): void
16+
{
17+
parent::testLevels($topic);
18+
}
19+
1420
public static function dataTopics(): array
1521
{
1622
return [

tests/Rules/Laminas/ServiceManagerGetMethodCallRuleTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,19 @@
88
use Laminas\ServiceManager\ServiceManager;
99
use LaminasPhpStan\Rules\Laminas\ServiceManagerGetMethodCallRule;
1010
use LaminasPhpStan\ServiceManagerLoader;
11+
use LaminasPhpStan\UnmappedAliasServiceLocatorProxy;
1112
use PhpParser\Node\Expr\MethodCall;
1213
use PHPStan\Rules\Rule;
1314
use PHPStan\Testing\RuleTestCase;
15+
use PHPUnit\Framework\Attributes\CoversClass;
16+
use PHPUnit\Framework\Attributes\DataProvider;
1417
use Psr\Container\ContainerInterface as PsrContainerInterface;
1518

1619
/**
17-
* @covers \LaminasPhpStan\Rules\Laminas\ServiceManagerGetMethodCallRule
18-
* @covers \LaminasPhpStan\UnmappedAliasServiceLocatorProxy
19-
*
2020
* @extends RuleTestCase<ServiceManagerGetMethodCallRule>
2121
*/
22+
#[CoversClass(ServiceManagerGetMethodCallRule::class)]
23+
#[CoversClass(UnmappedAliasServiceLocatorProxy::class)]
2224
final class ServiceManagerGetMethodCallRuleTest extends RuleTestCase
2325
{
2426
private ServiceManagerLoader $serviceManagerLoader;
@@ -34,7 +36,7 @@ protected function getRule(): Rule
3436
return new ServiceManagerGetMethodCallRule($this->createReflectionProvider(), $this->serviceManagerLoader);
3537
}
3638

37-
/** @dataProvider provideRuleCases */
39+
#[DataProvider('provideRuleCases')]
3840
public function testRule(string $filename, string $containerClassname): void
3941
{
4042
$this->analyse([__DIR__ . '/ServiceManagerGetMethodCallRule/' . $filename], [

tests/Type/Laminas/ObjectServiceManagerTypeTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
namespace LaminasPhpStan\Tests\Type\Laminas;
66

77
use LaminasPhpStan\Type\Laminas\ObjectServiceManagerType;
8+
use PHPUnit\Framework\Attributes\CoversClass;
89
use PHPUnit\Framework\TestCase;
910
use stdClass;
1011

11-
/**
12-
* @covers \LaminasPhpStan\Type\Laminas\ObjectServiceManagerType
13-
*/
12+
#[CoversClass(ObjectServiceManagerType::class)]
1413
final class ObjectServiceManagerTypeTest extends TestCase
1514
{
1615
public function testTrivialUsage(): void

tests/Type/Laminas/PluginMethodReflectionTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@
99
use PHPStan\Testing\PHPStanTestCase;
1010
use PHPStan\TrinaryLogic;
1111
use PHPStan\Type\ObjectType;
12+
use PHPUnit\Framework\Attributes\CoversClass;
1213
use stdClass;
1314

14-
/**
15-
* @covers \LaminasPhpStan\Type\Laminas\PluginMethodReflection
16-
*/
15+
#[CoversClass(PluginMethodReflection::class)]
1716
final class PluginMethodReflectionTest extends PHPStanTestCase
1817
{
1918
public function testTrivialUsage(): void

tests/Type/Laminas/ServiceManagerLoaderTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@
1010
use LaminasPhpStan\TestAsset\BarService;
1111
use LaminasPhpStan\TestAsset\FooService;
1212
use PHPStan\ShouldNotHappenException;
13+
use PHPUnit\Framework\Attributes\CoversClass;
1314
use PHPUnit\Framework\TestCase;
1415

15-
/**
16-
* @covers \LaminasPhpStan\ServiceManagerLoader
17-
*/
16+
#[CoversClass(ServiceManagerLoader::class)]
1817
final class ServiceManagerLoaderTest extends TestCase
1918
{
2019
public function testLoaderMustBeAValidFile(): void

0 commit comments

Comments
 (0)