Skip to content

Commit c1b10bc

Browse files
authored
Merge 3.1.x into 3.2.x (#454)
2 parents 7ad6656 + 2359fbc commit c1b10bc

9 files changed

+62
-162
lines changed

.github/workflows/coding-standards.yml

+1-26
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,4 @@ on:
1212
jobs:
1313
coding-standards:
1414
name: "Coding Standards"
15-
runs-on: "ubuntu-20.04"
16-
17-
strategy:
18-
matrix:
19-
php-version:
20-
- "7.4"
21-
22-
steps:
23-
- name: "Checkout"
24-
uses: "actions/checkout@v2"
25-
26-
- name: "Install PHP"
27-
uses: "shivammathur/setup-php@v2"
28-
with:
29-
coverage: "none"
30-
php-version: "${{ matrix.php-version }}"
31-
tools: "cs2pr"
32-
33-
- name: "Install dependencies with Composer"
34-
uses: "ramsey/composer-install@v1"
35-
with:
36-
dependency-versions: "highest"
37-
38-
# https://github.com/doctrine/.github/issues/3
39-
- name: "Run PHP_CodeSniffer"
40-
run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr"
15+
uses: "doctrine/.github/.github/workflows/[email protected]"

.github/workflows/continuous-integration.yml

+3-67
Original file line numberDiff line numberDiff line change
@@ -9,73 +9,9 @@ on:
99
branches:
1010
- "*.x"
1111

12-
env:
13-
fail-fast: true
14-
1512
jobs:
1613
phpunit:
1714
name: "PHPUnit"
18-
runs-on: "ubuntu-20.04"
19-
20-
strategy:
21-
matrix:
22-
php-version:
23-
- "7.2"
24-
- "7.3"
25-
- "7.4"
26-
- "8.0"
27-
dependencies:
28-
- "highest"
29-
include:
30-
- dependencies: "lowest"
31-
php-version: "7.2"
32-
33-
steps:
34-
- name: "Checkout"
35-
uses: "actions/checkout@v2"
36-
with:
37-
fetch-depth: 2
38-
39-
- name: "Install PHP with PCOV"
40-
uses: "shivammathur/setup-php@v2"
41-
with:
42-
php-version: "${{ matrix.php-version }}"
43-
coverage: "pcov"
44-
ini-values: "zend.assertions=1"
45-
46-
- name: "Install dependencies with Composer"
47-
uses: "ramsey/composer-install@v1"
48-
with:
49-
dependency-versions: "${{ matrix.dependencies }}"
50-
composer-options: "--prefer-dist"
51-
52-
- name: "Run PHPUnit"
53-
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"
54-
55-
- name: "Upload coverage file"
56-
uses: "actions/upload-artifact@v2"
57-
with:
58-
name: "phpunit-${{ matrix.deps }}-${{ matrix.php-version }}.coverage"
59-
path: "coverage.xml"
60-
61-
upload_coverage:
62-
name: "Upload coverage to Codecov"
63-
runs-on: "ubuntu-20.04"
64-
needs:
65-
- "phpunit"
66-
67-
steps:
68-
- name: "Checkout"
69-
uses: "actions/checkout@v2"
70-
with:
71-
fetch-depth: 2
72-
73-
- name: "Download coverage files"
74-
uses: "actions/download-artifact@v2"
75-
with:
76-
path: "reports"
77-
78-
- name: "Upload to Codecov"
79-
uses: "codecov/codecov-action@v1"
80-
with:
81-
directory: reports
15+
uses: "doctrine/.github/.github/workflows/[email protected]"
16+
with:
17+
php-versions: '["7.2", "7.3", "7.4", "8.0"]'

.github/workflows/release-on-milestone-closed.yml

+7-35
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,10 @@ on:
88
jobs:
99
release:
1010
name: "Git tag, release & create merge-up PR"
11-
runs-on: "ubuntu-20.04"
12-
13-
steps:
14-
- name: "Checkout"
15-
uses: "actions/checkout@v2"
16-
17-
- name: "Release"
18-
uses: "laminas/automatic-releases@v1"
19-
with:
20-
command-name: "laminas:automatic-releases:release"
21-
env:
22-
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
23-
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
24-
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
25-
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
26-
27-
- name: "Create Merge-Up Pull Request"
28-
uses: "laminas/automatic-releases@v1"
29-
with:
30-
command-name: "laminas:automatic-releases:create-merge-up-pull-request"
31-
env:
32-
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
33-
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
34-
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
35-
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
36-
37-
- name: "Create new milestones"
38-
uses: "laminas/automatic-releases@v1"
39-
with:
40-
command-name: "laminas:automatic-releases:create-milestones"
41-
env:
42-
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
43-
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
44-
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
45-
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
11+
uses: "doctrine/.github/.github/workflows/[email protected]"
12+
secrets:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
15+
GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
16+
ORGANIZATION_ADMIN_TOKEN: ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
17+
SIGNING_SECRET_KEY: ${{ secrets.SIGNING_SECRET_KEY }}

.github/workflows/static-analysis.yml

+3-27
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,6 @@ on:
1010
- "*.x"
1111

1212
jobs:
13-
static-analysis-phpstan:
14-
name: "Static Analysis with PHPStan"
15-
runs-on: "ubuntu-20.04"
16-
17-
strategy:
18-
matrix:
19-
php-version:
20-
- "7.4"
21-
22-
steps:
23-
- name: "Checkout code"
24-
uses: "actions/checkout@v2"
25-
26-
- name: "Install PHP"
27-
uses: "shivammathur/setup-php@v2"
28-
with:
29-
coverage: "none"
30-
php-version: "${{ matrix.php-version }}"
31-
tools: "cs2pr"
32-
33-
- name: "Install dependencies with Composer"
34-
uses: "ramsey/composer-install@v1"
35-
with:
36-
dependency-versions: "highest"
37-
38-
- name: "Run a static analysis with phpstan/phpstan"
39-
run: "vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr"
13+
static-analysis:
14+
name: "Static Analysis"
15+
uses: "doctrine/.github/.github/workflows/[email protected]"

DependencyInjection/DoctrineMigrationsExtension.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class DoctrineMigrationsExtension extends Extension
3838
*
3939
* @param mixed[][] $configs
4040
*
41-
* @psalm-param array<string, array<string, array<string, string>|string>>> $configs
41+
* @psalm-param array<string, array<string, array<string, array<string, string>|string>|string>> $configs
4242
*/
4343
public function load(array $configs, ContainerBuilder $container): void
4444
{

DoctrineMigrationsBundle.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22

3-
43
namespace Doctrine\Bundle\MigrationsBundle;
54

65
use Doctrine\Bundle\MigrationsBundle\DependencyInjection\CompilerPass\ConfigureDependencyFactoryPass;
@@ -15,8 +14,8 @@
1514
*/
1615
class DoctrineMigrationsBundle extends Bundle
1716
{
18-
public function build(ContainerBuilder $builder)
17+
public function build(ContainerBuilder $container)
1918
{
20-
$builder->addCompilerPass(new ConfigureDependencyFactoryPass());
19+
$container->addCompilerPass(new ConfigureDependencyFactoryPass());
2120
}
2221
}

composer.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,21 @@
2121
],
2222
"require": {
2323
"php": "^7.2|^8.0",
24-
"symfony/framework-bundle": "~3.4|~4.0|~5.0",
24+
"symfony/framework-bundle": "~3.4|~4.0|~5.0|~6.0",
2525
"doctrine/doctrine-bundle": "~1.0|~2.0",
2626
"doctrine/migrations": "^3.2"
2727
},
28+
"minimum-stability": "beta",
2829
"require-dev": {
29-
"phpunit/phpunit": "^7.0|^8.0|^9.0",
30+
"phpunit/phpunit": "^8.0|^9.0",
3031
"doctrine/coding-standard": "^8.0",
3132
"phpstan/phpstan": "^0.12",
3233
"phpstan/phpstan-deprecation-rules": "^0.12",
3334
"phpstan/phpstan-phpunit": "^0.12",
3435
"phpstan/phpstan-strict-rules": "^0.12",
3536
"doctrine/orm": "^2.6",
36-
"doctrine/persistence": "^1.3||^2.0"
37+
"doctrine/persistence": "^1.3||^2.0",
38+
"vimeo/psalm": "^4.11"
3739
},
3840
"autoload": {
3941
"psr-4": { "Doctrine\\Bundle\\MigrationsBundle\\": "" },

psalm-baseline.xml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<files psalm-version="4.11.2@6fba5eb554f9507b72932f9c75533d8af593688d">
3+
<file src="DependencyInjection/Configuration.php">
4+
<UndefinedMethod occurrences="1">
5+
<code>root</code>
6+
</UndefinedMethod>
7+
</file>
8+
<file src="DependencyInjection/DoctrineMigrationsExtension.php">
9+
<MoreSpecificImplementedParamType occurrences="1">
10+
<code>$configs</code>
11+
</MoreSpecificImplementedParamType>
12+
</file>
13+
</files>

psalm.xml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0"?>
2+
<psalm
3+
errorLevel="4"
4+
resolveFromConfigFile="true"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6+
xmlns="https://getpsalm.org/schema/config"
7+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8+
errorBaseline="psalm-baseline.xml"
9+
>
10+
<projectFiles>
11+
<directory name="DependencyInjection" />
12+
<directory name="Tests" />
13+
<file name="DoctrineMigrationsBundle.php" />
14+
<ignoreFiles>
15+
<directory name="vendor" />
16+
</ignoreFiles>
17+
</projectFiles>
18+
19+
<issueHandlers>
20+
<!-- This check is confused by Symfony's "mixed" property types. -->
21+
<ReservedWord>
22+
<errorLevel type="suppress">
23+
<directory name="." />
24+
</errorLevel>
25+
</ReservedWord>
26+
</issueHandlers>
27+
</psalm>

0 commit comments

Comments
 (0)