Skip to content

Commit 67972a0

Browse files
dependabot-preview[bot]lcobucci
authored andcommitted
Update doctrine/coding-standard requirement from ^7.0 to ^8.0
Updates the requirements on [doctrine/coding-standard](https://github.com/doctrine/coding-standard) to permit the latest version. - [Release notes](https://github.com/doctrine/coding-standard/releases) - [Commits](doctrine/coding-standard@7.0.0...8.0.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
1 parent 183c0d3 commit 67972a0

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"require": {
1313
"php": "^7.4 || ^8.0",
14-
"doctrine/coding-standard": "^7.0"
14+
"doctrine/coding-standard": "^8.0"
1515
},
1616
"require-dev": {
1717
"roave/security-advisories": "dev-master"

src/Lcobucci/ruleset.xml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
>
55
<description>The coding stardard used by lcobucci's projects.</description>
66

7-
<rule ref="Doctrine">
8-
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment.MultiLinePropertyComment" />
9-
</rule>
7+
<rule ref="Doctrine" />
108

119
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
1210
<properties>
@@ -16,12 +14,6 @@
1614
</properties>
1715
</rule>
1816

19-
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing">
20-
<properties>
21-
<property name="spacesCountBeforeColon" value="0"/>
22-
</properties>
23-
</rule>
24-
2517
<rule ref="SlevomatCodingStandard.Commenting.DocCommentSpacing">
2618
<properties>
2719
<property name="linesCountBeforeFirstContent" value="0"/>

tests/ExampleClassWithNoViolation.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,27 @@
33

44
namespace Lcobucci;
55

6+
use RuntimeException;
7+
8+
use function count;
69
use function sprintf;
10+
711
use const PHP_EOL;
812

913
/**
1014
* @runTestsInSeparateProcesses
1115
*
1216
* @coversDefaultClass
1317
*
14-
* @uses \RuntimeException
18+
* @uses RuntimeException
1519
*/
1620
final class ExampleClassWithNoViolation
1721
{
1822
private int $test = 0;
1923

24+
/** @var list<int> */
25+
private array $testing = [];
26+
2027
/**
2128
* @internal
2229
* @deprecated
@@ -61,6 +68,8 @@ public function aMethodWithAllUsefulAnnotations(): void
6168
{
6269
echo PHP_EOL;
6370
echo $this->test;
71+
72+
throw new RuntimeException('Exception class must be properly imported');
6473
}
6574

6675
/**
@@ -86,5 +95,6 @@ public function sampleForPHPUnitTests(): void
8695
{
8796
echo sprintf('Testing %d', 1);
8897
echo $this->test;
98+
echo count($this->testing);
8999
}
90100
}

0 commit comments

Comments
 (0)