Skip to content

Commit a8b0114

Browse files
committed
Merge remote-tracking branch 'origin/2.2.x' into 3.0.x
2 parents e035c23 + cc35f21 commit a8b0114

File tree

12 files changed

+249
-5344
lines changed

12 files changed

+249
-5344
lines changed

.doctrine-project.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,28 @@
44
"slug": "doctrine-migrations-bundle",
55
"versions": [
66
{
7-
"name": "3.0",
7+
"name": "3.1",
88
"branchName": "master",
9-
"slug": "3.0",
9+
"slug": "3.1",
1010
"upcoming": true
1111
},
12+
{
13+
"name": "3.0",
14+
"branchName": "3.0.x",
15+
"slug": "3.0",
16+
"current": true
17+
},
1218
{
1319
"name": "2.2",
14-
"branchName": "2.2x",
20+
"branchName": "2.2.x",
1521
"slug": "2.2",
16-
"upcoming": true
22+
"maintained": true
1723
},
1824
{
1925
"name": "2.1",
2026
"branchName": "2.1.x",
2127
"slug": "2.1",
22-
"current": true
28+
"maintained": false
2329
},
2430
{
2531
"name": "2.0",

.gitattributes

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
/Tests export-ignore
44
.doctrine-project.json export-ignore
55
.gitattributes export-ignore
6+
/.github export-ignore
67
.gitignore export-ignore
7-
.scrutinizer.yml export-ignore
8-
.travis.yml export-ignore
9-
composer.lock export-ignore
108
phpcs.xml.dist export-ignore
119
phpstan.neon export-ignore
1210
phpunit.xml.dist export-ignore
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
name: "Coding Standards"
3+
4+
on: ["pull_request", "push"]
5+
6+
jobs:
7+
coding-standards:
8+
name: "Coding Standards"
9+
runs-on: "ubuntu-20.04"
10+
11+
strategy:
12+
matrix:
13+
php-version:
14+
- "7.4"
15+
16+
steps:
17+
- name: "Checkout"
18+
uses: "actions/checkout@v2"
19+
20+
- name: "Install PHP"
21+
uses: "shivammathur/setup-php@v2"
22+
with:
23+
coverage: "none"
24+
php-version: "${{ matrix.php-version }}"
25+
tools: "cs2pr"
26+
27+
- name: "Cache dependencies installed with Composer"
28+
uses: "actions/cache@v2"
29+
with:
30+
path: "~/.composer/cache"
31+
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
32+
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
33+
34+
- name: "Install dependencies with Composer"
35+
run: "composer install --no-interaction --no-progress --no-suggest"
36+
37+
# https://github.com/doctrine/.github/issues/3
38+
- name: "Run PHP_CodeSniffer"
39+
run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr"
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
2+
name: "Continuous Integration"
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- "*.x"
8+
- "master"
9+
push:
10+
branches:
11+
- "*.x"
12+
- "master"
13+
14+
env:
15+
fail-fast: true
16+
17+
jobs:
18+
phpunit:
19+
name: "PHPUnit"
20+
runs-on: "ubuntu-20.04"
21+
22+
strategy:
23+
matrix:
24+
php-version:
25+
- "7.2"
26+
- "7.3"
27+
- "7.4"
28+
deps:
29+
- "normal"
30+
include:
31+
- deps: "low"
32+
php-version: "7.2"
33+
34+
steps:
35+
- name: "Checkout"
36+
uses: "actions/checkout@v2"
37+
with:
38+
fetch-depth: 2
39+
40+
- name: "Install PHP with PCOV"
41+
uses: "shivammathur/setup-php@v2"
42+
with:
43+
php-version: "${{ matrix.php-version }}"
44+
coverage: "pcov"
45+
ini-values: "zend.assertions=1"
46+
47+
- name: "Cache dependencies installed with composer"
48+
uses: "actions/cache@v2"
49+
with:
50+
path: "~/.composer/cache"
51+
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
52+
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
53+
54+
# to be removed when doctrine/orm adds support for PHP 8
55+
- name: "Pretend this is PHP 7.4"
56+
run: "composer config platform.php 7.4.99"
57+
if: "${{ matrix.php-version == '8.0' }}"
58+
59+
- name: "Install dependencies with composer"
60+
run: "composer update --no-interaction --prefer-dist"
61+
if: "${{ matrix.deps == 'normal' }}"
62+
63+
- name: "Install lowest possible dependencies with composer"
64+
run: "composer update --no-interaction --prefer-dist --prefer-lowest"
65+
if: "${{ matrix.deps == 'low' }}"
66+
67+
- name: "Run PHPUnit"
68+
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"
69+
70+
- name: "Upload coverage file"
71+
uses: "actions/upload-artifact@v2"
72+
with:
73+
name: "phpunit-${{ matrix.deps }}-${{ matrix.php-version }}.coverage"
74+
path: "coverage.xml"
75+
76+
upload_coverage:
77+
name: "Upload coverage to Codecov"
78+
runs-on: "ubuntu-20.04"
79+
needs:
80+
- "phpunit"
81+
82+
steps:
83+
- name: "Checkout"
84+
uses: "actions/checkout@v2"
85+
with:
86+
fetch-depth: 2
87+
88+
- name: "Download coverage files"
89+
uses: "actions/download-artifact@v2"
90+
with:
91+
path: "reports"
92+
93+
- name: "Upload to Codecov"
94+
uses: "codecov/codecov-action@v1"
95+
with:
96+
directory: reports
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "Automatic Releases"
2+
3+
on:
4+
milestone:
5+
types:
6+
- "closed"
7+
8+
jobs:
9+
release:
10+
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 }}

.github/workflows/static-analysis.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
name: "Static Analysis"
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- "*.x"
8+
- "master"
9+
push:
10+
branches:
11+
- "*.x"
12+
- "master"
13+
14+
jobs:
15+
static-analysis-phpstan:
16+
name: "Static Analysis with PHPStan"
17+
runs-on: "ubuntu-20.04"
18+
19+
strategy:
20+
matrix:
21+
php-version:
22+
- "7.4"
23+
24+
steps:
25+
- name: "Checkout code"
26+
uses: "actions/checkout@v2"
27+
28+
- name: "Install PHP"
29+
uses: "shivammathur/setup-php@v2"
30+
with:
31+
coverage: "none"
32+
php-version: "${{ matrix.php-version }}"
33+
tools: "cs2pr"
34+
35+
- name: "Cache dependencies installed with composer"
36+
uses: "actions/cache@v2"
37+
with:
38+
path: "~/.composer/cache"
39+
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
40+
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
41+
42+
- name: "Install dependencies with composer"
43+
run: "composer install --no-interaction --no-progress --no-suggest"
44+
45+
- name: "Run a static analysis with phpstan/phpstan"
46+
run: "vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
/vendor/
2+
/composer.lock
23
/.phpcs-cache
4+
/.phpunit.result.cache
35

.travis.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

DependencyInjection/DoctrineMigrationsExtension.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ class DoctrineMigrationsExtension extends Extension
3131
/**
3232
* Responds to the migrations configuration parameter.
3333
*
34-
* @param string[][]|array<string, array<string, array<string, string>|string>> $configs
34+
* @param mixed[][] $configs
35+
*
36+
* @psalm-param array<string, array<string, array<string, string>|string>>> $configs
3537
*/
3638
public function load(array $configs, ContainerBuilder $container): void
3739
{

Tests/DependencyInjection/DoctrineCommandsTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Doctrine\Bundle\MigrationsBundle\DependencyInjection\DoctrineMigrationsExtension;
99
use Doctrine\Migrations\Tools\Console\Command\CurrentCommand;
1010
use Doctrine\Migrations\Tools\Console\Command\DiffCommand;
11+
use Doctrine\Migrations\Tools\Console\Command\DoctrineCommand;
1112
use Doctrine\Migrations\Tools\Console\Command\DumpSchemaCommand;
1213
use Doctrine\Migrations\Tools\Console\Command\ExecuteCommand;
1314
use Doctrine\Migrations\Tools\Console\Command\GenerateCommand;
@@ -33,6 +34,8 @@
3334
class DoctrineCommandsTest extends TestCase
3435
{
3536
/**
37+
* @param class-string<DoctrineCommand> $instance
38+
*
3639
* @dataProvider getCommands
3740
*/
3841
public function testCommandRegistered(string $name, string $instance): void
@@ -44,6 +47,8 @@ public function testCommandRegistered(string $name, string $instance): void
4447

4548
/**
4649
* @return string[][]
50+
*
51+
* @psalm-return list<array{string, class-string<DoctrineCommand>}>
4752
*/
4853
public function getCommands(): array
4954
{

0 commit comments

Comments
 (0)