Skip to content

Commit

Permalink
Use a shallower tree
Browse files Browse the repository at this point in the history
This should make it easier to use fuzzy matchers. Also, it make
configuration files for tools more legible.
  • Loading branch information
greg0ire committed Sep 29, 2022
1 parent 6ca4391 commit e1751ba
Show file tree
Hide file tree
Showing 33 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
},
"autoload": {
"psr-4": {
"Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections"
"Doctrine\\Common\\Collections\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Doctrine\\Tests\\": "tests/Doctrine/Tests"
"Doctrine\\Tests\\": "tests"
}
},
"config": {
Expand Down
14 changes: 7 additions & 7 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<!-- Ignore warnings, show progress of the run and show sniff names -->
<arg value="nps"/>

<file>lib</file>
<file>src</file>
<file>tests</file>

<rule ref="Doctrine" >
Expand All @@ -27,19 +27,19 @@
</rule>

<rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming">
<exclude-pattern>lib/Doctrine/Common/Collections/AbstractLazyCollection.php</exclude-pattern>
<exclude-pattern>src/AbstractLazyCollection.php</exclude-pattern>
</rule>

<rule ref="Squiz.NamingConventions.ValidVariableName.NotCamelCaps">
<exclude-pattern>tests/Doctrine/Tests/Common/Collections/ClosureExpressionVisitorTest.php</exclude-pattern>
<exclude-pattern>tests/Common/Collections/ClosureExpressionVisitorTest.php</exclude-pattern>
</rule>
<rule ref="Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps">
<exclude-pattern>tests/Doctrine/Tests/Common/Collections/ClosureExpressionVisitorTest.php</exclude-pattern>
<exclude-pattern>tests/Common/Collections/ClosureExpressionVisitorTest.php</exclude-pattern>
</rule>

<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint">
<exclude-pattern>lib/Doctrine/Common/Collections/AbstractLazyCollection.php</exclude-pattern>
<exclude-pattern>lib/Doctrine/Common/Collections/ArrayCollection.php</exclude-pattern>
<exclude-pattern>lib/Doctrine/Common/Collections/Collection.php</exclude-pattern>
<exclude-pattern>src/AbstractLazyCollection.php</exclude-pattern>
<exclude-pattern>src/ArrayCollection.php</exclude-pattern>
<exclude-pattern>src/Collection.php</exclude-pattern>
</rule>
</ruleset>
6 changes: 3 additions & 3 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
parameters:
level: 8
paths:
- lib
- src

ignoreErrors:
-
message: '~Parameter #1 \$key of method Doctrine\\Common\\Collections\\ArrayCollection<TKey of \(int\|string\),T>::set\(\) expects TKey of \(int\|string\), int\|string given\.~'
path: 'lib/Doctrine/Common/Collections/ArrayCollection.php'
path: 'src/ArrayCollection.php'
-
message: '~Cannot call method .* on Doctrine\\Common\\Collections\\Collection<TKey of \(int\|string\), T>\|null\.~'
path: 'lib/Doctrine/Common/Collections/AbstractLazyCollection.php'
path: 'src/AbstractLazyCollection.php'

includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
Expand Down
4 changes: 2 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
>
<testsuites>
<testsuite name="Doctrine Collections Test Suite">
<directory>./tests/Doctrine/</directory>
<directory>./tests/</directory>
</testsuite>
</testsuites>

<coverage>
<include>
<directory>./lib/Doctrine/</directory>
<directory>./src/</directory>
</include>
</coverage>
</phpunit>
8 changes: 4 additions & 4 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="lib" />
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
<directory name="lib/Doctrine/Common/Collections/Expr"/>
<directory name="src/Expr"/>
</ignoreFiles>
</projectFiles>

Expand All @@ -27,7 +27,7 @@

<UnsafeGenericInstantiation>
<errorLevel type="suppress">
<file name="lib/Doctrine/Common/Collections/ArrayCollection.php"/>
<file name="src/ArrayCollection.php"/>
</errorLevel>
</UnsafeGenericInstantiation>

Expand All @@ -41,7 +41,7 @@
<InvalidTemplateParam>
<errorLevel type="suppress">
<!-- https://github.com/vimeo/psalm/issues/8212 -->
<file name="lib/Doctrine/Common/Collections/ReadableCollection.php"/>
<file name="src/ReadableCollection.php"/>
</errorLevel>
</InvalidTemplateParam>
</issueHandlers>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e1751ba

Please sign in to comment.