Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatten directory tree #1391

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/bc-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
- "*.x"
paths:
- .github/workflows/bc-check.yml
- lib/**
- src/**
push:
branches:
- "*.x"
paths:
- .github/workflows/bc-check.yml
- lib/**
- src/**

jobs:
roave_bc_check:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- .github/workflows/continuous-integration.yml
- composer.*
- download-box.sh
- lib/**
- src/**
- phpunit.xml.dist
- tests/**
push:
Expand All @@ -18,7 +18,7 @@ on:
- .github/workflows/continuous-integration.yml
- composer.*
- download-box.sh
- lib/**
- src/**
- phpunit.xml.dist
- tests/**

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
paths:
- .github/workflows/static-analysis.yml
- composer.*
- lib/**
- src/**
- phpstan*
- tests/**
push:
Expand All @@ -17,7 +17,7 @@ on:
paths:
- .github/workflows/static-analysis.yml
- composer.*
- lib/**
- src/**
- phpstan*
- tests/**

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@
},
"autoload": {
"psr-4": {
"Doctrine\\Migrations\\": "lib/Doctrine/Migrations"
"Doctrine\\Migrations\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Doctrine\\Migrations\\Tests\\": "tests/Doctrine/Migrations/Tests"
"Doctrine\\Migrations\\Tests\\": "tests"
}
},
"bin": [
Expand Down
18 changes: 9 additions & 9 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
<arg value="nps"/>

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

<rule ref="Doctrine"/>

<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint">
<exclude-pattern>*/lib/*</exclude-pattern>
<exclude-pattern>*/src/*</exclude-pattern>
</rule>

<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
Expand All @@ -30,25 +30,25 @@
</rule>

<rule ref="Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase">
<exclude-pattern>lib/Doctrine/Migrations/Events.php</exclude-pattern>
<exclude-pattern>src/Events.php</exclude-pattern>
</rule>

<rule ref="Generic.Strings.UnnecessaryStringConcat.Found">
<exclude-pattern>lib/Doctrine/Migrations/MigrationsVersion.php</exclude-pattern>
<exclude-pattern>src/MigrationsVersion.php</exclude-pattern>
</rule>

<rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar">
<exclude-pattern>tests/Doctrine/Migrations/Tests/TestLogger.php</exclude-pattern>
<exclude-pattern>lib/Doctrine/Migrations/Tools/Console/ConsoleLogger.php</exclude-pattern>
<exclude-pattern>tests/TestLogger.php</exclude-pattern>
<exclude-pattern>src/Tools/Console/ConsoleLogger.php</exclude-pattern>
</rule>

<rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming">
<exclude-pattern>lib/Doctrine/Migrations/AbstractMigration.php</exclude-pattern>
<exclude-pattern>lib/Doctrine/Migrations/Configuration/Loader/AbstractFileLoader.php</exclude-pattern>
<exclude-pattern>src/AbstractMigration.php</exclude-pattern>
<exclude-pattern>src/Configuration/Loader/AbstractFileLoader.php</exclude-pattern>
</rule>

<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint">
<exclude-pattern>tests/Doctrine/Migrations/Tests/Stub/DoctrineRegistry.php</exclude-pattern>
<exclude-pattern>tests/Stub/DoctrineRegistry.php</exclude-pattern>
</rule>

</ruleset>
26 changes: 13 additions & 13 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
parameters:
level: 7
paths:
- lib
- src
- tests
excludePaths:
- tests/Doctrine/Migrations/Tests/Configuration/ConfigurationTestSource/Migrations/Version123.php
- tests/Configuration/ConfigurationTestSource/Migrations/Version123.php
ignoreErrors:
- '~Variable method call on Doctrine\\Migrations\\AbstractMigration~'
-
message: '~^Call to function in_array\(\) requires parameter #3 to be true\.$~'
path: lib/Doctrine/Migrations/Version/SortedMigrationPlanCalculator.php
path: src/Version/SortedMigrationPlanCalculator.php
-
message: '~^Variable property access on SimpleXMLElement\.$~'
path: lib/Doctrine/Migrations/Configuration/Migration/XmlFile.php
path: src/Configuration/Migration/XmlFile.php
-
message: '~^Call to function is_bool\(\) with bool will always evaluate to true\.$~'
path: lib/Doctrine/Migrations/InlineParameterFormatter.php
path: src/InlineParameterFormatter.php
-
message: '~^Call to an undefined method Symfony\\Component\\Console\\Output\\OutputInterface\:\:getErrorOutput\(\)\.$~'
path: lib/Doctrine/Migrations/Tools/Console/ConsoleLogger.php
path: src/Tools/Console/ConsoleLogger.php
-
message: '~^Method Doctrine\\Migrations\\Tests\\Stub\\DoctrineRegistry::getService\(\) should return Doctrine\\Persistence\\ObjectManager but returns Doctrine\\DBAL\\Connection\|Doctrine\\ORM\\EntityManager~'
path: tests/Doctrine/Migrations/Tests/Stub/DoctrineRegistry.php
path: tests/Stub/DoctrineRegistry.php

# https://github.com/phpstan/phpstan/issues/5982
-
message: '~^Cannot call method getWrappedConnection\(\) on class-string\|object\.~'
path: lib/Doctrine/Migrations/Tools/TransactionHelper.php
path: src/Tools/TransactionHelper.php

# TODO: Be more precise about class-strings
-
message: '~^Method Doctrine\\Migrations\\Version\\DbalMigrationFactory::createVersion\(\) should return Doctrine\\Migrations\\AbstractMigration but returns object\.$~'
paths:
- lib/Doctrine/Migrations/Version/DbalMigrationFactory.php
- src/Version/DbalMigrationFactory.php

# We're testing legacy functionality here.
-
Expand All @@ -41,20 +41,20 @@ parameters:
This class will be removed in ORM 3\\.0 without replacement\\.$#
"""
count: 1
path: tests/Doctrine/Migrations/Tests/Tools/Console/legacy-config-orm/cli-config.php
path: tests/Tools/Console/legacy-config-orm/cli-config.php
-
message: """
#^Fetching class constant class of deprecated class Doctrine\\\\ORM\\\\Tools\\\\Console\\\\Helper\\\\EntityManagerHelper\\:
This class will be removed in ORM 3\\.0 without replacement\\.$#
"""
count: 1
path: tests/Doctrine/Migrations/Tests/Tools/Console/ConsoleRunnerTest.php
path: tests/Tools/Console/ConsoleRunnerTest.php

# TODO: deprecate using the connection event manager and expose
# our own event manager instead.
-
message: '~^Call to deprecated method getEventManager\(\) of class Doctrine\\DBAL\\Connection\.$~'
path: lib/Doctrine/Migrations/DependencyFactory.php
path: src/DependencyFactory.php

# DBAL 4 forward compatibility
- '~^Call to function method_exists\(\) with ''Doctrine\\\\DBAL\\\\Connection'' and ''getEventManager'' will always evaluate to true\.$~'
Expand All @@ -63,7 +63,7 @@ parameters:
- '~^Access to constant class on an unknown class Doctrine\\DBAL\\Platforms\\SQLitePlatform\.$~'
- '~expects Doctrine\\DBAL\\Platforms\\AbstractPlatform, Doctrine\\DBAL\\Platforms\\SQLitePlatform given\.$~'
symfony:
console_application_loader: tests/Doctrine/Migrations/Tests/doctrine-migrations-phpstan-app.php
console_application_loader: tests/doctrine-migrations-phpstan-app.php
includes:
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
- 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 @@ -11,13 +11,13 @@

<testsuites>
<testsuite name="Doctrine2 Database Migrations Test Suite">
<directory>./tests/Doctrine/</directory>
<directory>tests</directory>
</testsuite>
</testsuites>

<source>
<include>
<directory>./lib/</directory>
<directory>src</directory>
</include>
</source>
</phpunit>
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.