Skip to content

Commit

Permalink
Merge pull request #975 from greg0ire/shallower-tree
Browse files Browse the repository at this point in the history
Use a shallower tree
  • Loading branch information
greg0ire committed Aug 23, 2022
2 parents f4a3687 + b53e0e2 commit e09556b
Show file tree
Hide file tree
Showing 101 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
logs/
reports/
dist/
tests/Doctrine/Tests/Common/Proxy/generated/
tests/Common/Proxy/generated/
composer.lock
vendor/
doctrine-common-*.tar
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
},
"autoload": {
"psr-4": {
"Doctrine\\Common\\": "lib/Doctrine/Common"
"Doctrine\\Common\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Doctrine\\Tests\\": "tests/Doctrine/Tests"
"Doctrine\\Tests\\": "tests"
}
},
"config": {
Expand Down
22 changes: 11 additions & 11 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
<!-- Ignore warnings and show progress of the run -->
<arg value="np"/>

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

<exclude-pattern>tests/Doctrine/Tests/Common/Proxy/*</exclude-pattern>
<exclude-pattern>tests/Doctrine/Tests/Common/ClassLoaderTest/*</exclude-pattern>
<exclude-pattern>tests/Doctrine/Tests/Common/Util/TestAsset/*</exclude-pattern>
<exclude-pattern>tests/Common/Proxy/*</exclude-pattern>
<exclude-pattern>tests/Common/ClassLoaderTest/*</exclude-pattern>
<exclude-pattern>tests/Common/Util/TestAsset/*</exclude-pattern>

<rule ref="Doctrine">
<exclude name="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"/>
Expand All @@ -37,7 +37,7 @@
</rule>

<rule ref="Squiz.Classes.ClassFileName.NoMatch">
<exclude-pattern>*/tests/Doctrine/Tests/Common/Util/ClassUtilsTest.php</exclude-pattern>
<exclude-pattern>*/tests/Common/Util/ClassUtilsTest.php</exclude-pattern>
</rule>

<!-- Disable the rules that will require PHP 7.4 -->
Expand All @@ -48,28 +48,28 @@
</rule>

<rule ref="Squiz.Classes.ClassFileName.NoMatch">
<exclude-pattern>*/tests/Doctrine/Tests/Common/Util/ClassUtilsTest.php</exclude-pattern>
<exclude-pattern>*/tests/Common/Util/ClassUtilsTest.php</exclude-pattern>
</rule>

<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>

<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<exclude-pattern>tests/Doctrine/Tests/Common/ClassLoaderTest/*.class.php</exclude-pattern>
<exclude-pattern>tests/Common/ClassLoaderTest/*.class.php</exclude-pattern>
</rule>
<rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
<exclude-pattern>tests/Doctrine/Tests/Common/Util/ClassUtilsTest.php</exclude-pattern>
<exclude-pattern>tests/Doctrine/Tests/Common/ClassLoaderTest/*.class.php</exclude-pattern>
<exclude-pattern>tests/Common/Util/ClassUtilsTest.php</exclude-pattern>
<exclude-pattern>tests/Common/ClassLoaderTest/*.class.php</exclude-pattern>
</rule>
<rule ref="PEAR.Functions.ValidDefaultValue.NotAtEnd">
<exclude-pattern>tests/Doctrine/Tests/Common/Proxy/*HintClass.php</exclude-pattern>
<exclude-pattern>tests/Common/Proxy/*HintClass.php</exclude-pattern>
</rule>

<rule ref="Squiz.Classes.ClassFileName.NoMatch">
<exclude-pattern>tests/*</exclude-pattern>
</rule>
<rule ref="Squiz.Commenting.FunctionComment.InvalidNoReturn">
<exclude-pattern>tests/Doctrine/Tests/Common/Proxy/InvalidReturnTypeClass.php</exclude-pattern>
<exclude-pattern>tests/Common/Proxy/InvalidReturnTypeClass.php</exclude-pattern>
</rule>
</ruleset>
52 changes: 26 additions & 26 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,57 @@ parameters:
phpVersion: 80100
level: 3
paths:
- lib
- src
- tests
excludePaths:
- tests/Doctrine/Tests/Common/Proxy/InvalidReturnTypeClass.php
- tests/Doctrine/Tests/Common/Proxy/InvalidTypeHintClass.php
- tests/Doctrine/Tests/Common/Proxy/LazyLoadableObjectWithTypedProperties.php
- tests/Doctrine/Tests/Common/Proxy/MagicIssetClassWithInteger.php
- tests/Doctrine/Tests/Common/Proxy/NullableNonOptionalHintClass.php
- tests/Doctrine/Tests/Common/Proxy/PHP81NeverType.php
- tests/Doctrine/Tests/Common/Proxy/PHP81IntersectionTypes.php
- tests/Doctrine/Tests/Common/Proxy/Php8UnionTypes.php
- tests/Doctrine/Tests/Common/Proxy/Php8StaticType.php
- tests/Doctrine/Tests/Common/Proxy/ProxyGeneratorTest.php
- tests/Doctrine/Tests/Common/Proxy/ProxyLogicTypedPropertiesTest.php
- tests/Doctrine/Tests/Common/Proxy/SerializedClass.php
- tests/Doctrine/Tests/Common/Proxy/VariadicTypeHintClass.php
- tests/Doctrine/Tests/Common/Proxy/Php71NullableDefaultedNonOptionalHintClass.php
- tests/Doctrine/Tests/Common/Proxy/generated
- tests/Common/Proxy/InvalidReturnTypeClass.php
- tests/Common/Proxy/InvalidTypeHintClass.php
- tests/Common/Proxy/LazyLoadableObjectWithTypedProperties.php
- tests/Common/Proxy/MagicIssetClassWithInteger.php
- tests/Common/Proxy/NullableNonOptionalHintClass.php
- tests/Common/Proxy/PHP81NeverType.php
- tests/Common/Proxy/PHP81IntersectionTypes.php
- tests/Common/Proxy/Php8UnionTypes.php
- tests/Common/Proxy/Php8StaticType.php
- tests/Common/Proxy/ProxyGeneratorTest.php
- tests/Common/Proxy/ProxyLogicTypedPropertiesTest.php
- tests/Common/Proxy/SerializedClass.php
- tests/Common/Proxy/VariadicTypeHintClass.php
- tests/Common/Proxy/Php71NullableDefaultedNonOptionalHintClass.php
- tests/Common/Proxy/generated
ignoreErrors:
- '#Access to an undefined property Doctrine\\Common\\Proxy\\Proxy::\$publicField#'
-
message: '#^Result of method Doctrine\\Tests\\Common\\Proxy\\LazyLoadableObjectWithVoid::(adding|incrementing)AndReturningVoid\(\) \(void\) is used\.$#'
path: 'tests/Doctrine/Tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php'
path: 'tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php'
-
message: '#^Property Doctrine\\Tests\\Common\\Proxy\\ProxyLogicTest::\$initializerCallbackMock \(callable\(\): mixed&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject&stdClass\.$#'
path: 'tests/Doctrine/Tests/Common/Proxy/ProxyLogicTest.php'
path: 'tests/Common/Proxy/ProxyLogicTest.php'
-
message: '#.*LazyLoadableObject.*#'
paths:
- 'tests/Doctrine/Tests/Common/Proxy/ProxyLogicTest.php'
- 'tests/Doctrine/Tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php'
- 'tests/Common/Proxy/ProxyLogicTest.php'
- 'tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php'
-
message: '#^Instantiated class Doctrine\\Tests\\Common\\ProxyProxy\\__CG__\\Doctrine\\Tests\\Common\\Proxy\\.* not found.$#'
path: 'tests/Doctrine/Tests/Common/Proxy/ProxyLogicTest.php'
path: 'tests/Common/Proxy/ProxyLogicTest.php'
-
message: '#^Instantiated class Doctrine\\Tests\\Common\\ProxyProxy\\__CG__\\Doctrine\\Tests\\Common\\Proxy\\.* not found.$#'
path: 'tests/Doctrine/Tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php'
path: 'tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php'
-
message: '#^Property Doctrine\\Tests\\Common\\Proxy\\ProxyLogicVoidReturnTypeTest::\$initializerCallbackMock \(callable\(\): mixed&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject&stdClass\.$#'
path: 'tests/Doctrine/Tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php'
path: 'tests/Common/Proxy/ProxyLogicVoidReturnTypeTest.php'
-
message: '#^Method Doctrine\\Tests\\Common\\Proxy\\MagicIssetClassWithInteger::__isset\(\) should return bool but returns int\.$#'
path: 'tests/Doctrine/Tests/Common/Proxy/MagicIssetClassWithInteger.php'
path: 'tests/Common/Proxy/MagicIssetClassWithInteger.php'
-
message: '#^Access to an undefined property Doctrine\\Tests\\Common\\Proxy\\MagicGetByRefClass\:\:\$nonExisting\.$#'
path: 'tests/Doctrine/Tests/Common/Proxy/ProxyMagicMethodsTest.php'
path: 'tests/Common/Proxy/ProxyMagicMethodsTest.php'

-
message: "#^Class Doctrine\\\\Tests\\\\Common\\\\Proxy\\\\MagicIssetClassWithInteger not found\\.$#"
count: 1
path: tests/Doctrine/Tests/Common/Proxy/ProxyMagicMethodsTest.php
path: tests/Common/Proxy/ProxyMagicMethodsTest.php
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
4 changes: 2 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
>
<testsuites>
<testsuite name="Doctrine Common Test Suite">
<directory>./tests/Doctrine/</directory>
<directory>./tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./lib/Doctrine/</directory>
<directory>./src</directory>
</whitelist>
</filter>
</phpunit>
4 changes: 2 additions & 2 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
phpVersion="8.1"
>
<projectFiles>
<directory name="lib/Doctrine/Common" />
<directory name="src" />
<ignoreFiles>
<file name="lib/Doctrine/Common/Proxy/ProxyGenerator.php" />
<file name="src/Proxy/ProxyGenerator.php" />
</ignoreFiles>
</projectFiles>
</psalm>
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.
6 changes: 3 additions & 3 deletions tests/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Doctrine/Tests/Proxies/
Doctrine/Tests/ORM/Proxy/generated/
Doctrine/Tests/ORM/Tools/Export/export
Proxies/
ORM/Proxy/generated/
ORM/Tools/Export/export
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.
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 e09556b

Please sign in to comment.