Skip to content

Commit

Permalink
Merge origin/2.2.x into 3.0.x (using imerge)
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed May 16, 2021
2 parents 289e7ab + 08d3e6e commit a38ed90
Show file tree
Hide file tree
Showing 47 changed files with 791 additions and 4,949 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
/phpunit.xml.dist export-ignore
/phpcs.xml.dist export-ignore
/phpstan.neon export-ignore
/psalm.xml export-ignore
/composer.lock export-ignore
13 changes: 3 additions & 10 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ on:
pull_request:
branches:
- "*.x"
- "master"
push:
branches:
- "*.x"
- "master"

env:
COMPOSER_ROOT_VERSION: "2.1"
Expand All @@ -35,15 +33,10 @@ jobs:
php-version: "${{ matrix.php-version }}"
tools: "cs2pr"

- name: "Cache dependencies installed with Composer"
uses: "actions/cache@v2"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"

- name: "Install dependencies with Composer"
run: "composer install --no-interaction --no-progress --no-suggest"
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "${{ matrix.deps }}"

# https://github.com/doctrine/.github/issues/3
- name: "Run PHP_CodeSniffer"
Expand Down
30 changes: 5 additions & 25 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- "7.4"
- "8.0"
deps:
- "normal"
- "highest"
include:
- deps: "low"
php-version: "7.2"
Expand All @@ -37,31 +37,11 @@ jobs:
php-version: "${{ matrix.php-version }}"
coverage: "pcov"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"

# Remove this block when
# https://github.com/felixfbecker/php-language-server-protocol/pull/15 is
# merged and released
- name: "Remove dependency on vimeo/psalm for PHP8"
run: "composer remove --dev --no-update vimeo/psalm"
if: "${{ matrix.php-version == '8.0' }}"

- name: "Downgrade Composer"
run: "composer self-update --1"
if: "${{ matrix.php-version == '7.1' }}"

- name: "Update dependencies with composer"
run: "composer update --no-interaction --no-progress --no-suggest"
if: "${{ matrix.deps == 'normal' }}"

- name: "Install lowest possible dependencies with composer"
run: "composer update --no-interaction --no-progress --no-suggest --prefer-dist --prefer-lowest"
if: "${{ matrix.deps == 'low' }}"
- name: "Update dependencies with Composer"
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "${{ matrix.deps }}"

- name: "Run PHPUnit"
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"
Expand Down
32 changes: 17 additions & 15 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ on:
pull_request:
branches:
- "*.x"
- "master"
push:
branches:
- "*.x"
- "master"
env:
COMPOSER_ROOT_VERSION: "2.1"

Expand All @@ -34,15 +32,10 @@ jobs:
php-version: "${{ matrix.php-version }}"
tools: "cs2pr"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"

- name: "Install dependencies with composer"
run: "composer install --no-interaction --no-progress --no-suggest"
dependency-versions: "${{ matrix.deps }}"

- name: "Run a static analysis with phpstan/phpstan"
run: "vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr"
Expand All @@ -57,10 +50,19 @@ jobs:
- "7.4"

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: "Checkout code"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"

- name: Psalm
uses: docker://vimeo/psalm-github-actions
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
with:
composer_require_dev: true
dependency-versions: "highest"

- name: "Run a static analysis with vimeo/psalm"
run: "vendor/bin/psalm --show-info=false --stats --output-format=github --threads=$(nproc)"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/phpcs.xml
/.phpcs-cache
/.phpunit.result.cache
/composer.lock
11 changes: 11 additions & 0 deletions UPGRADE-2.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
UPGRADE FROM 2.1 to 2.2
=======================

* Deprecated using doctrine/cache for metadata caching. The `setCacheDriver` and
`getCacheDriver` methods in `Doctrine\Persistence\Mapping\AbstractMetadata`
have been deprecated. Please use `getCache` and `setCache` with a PSR-6
implementation instead. Note that even after switching to PSR-6,
`getCacheDriver` will return a cache instance that wraps the PSR-6 cache.
Note that if you use a custom implementation of doctrine/cache, the library
may not be able to provide a forward compatibility layer. The cache
implementation MUST extend the `Doctrine\Common\Cache\CacheProvider` class.
12 changes: 7 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,21 @@
"require": {
"php": "^7.2 || ^8.0",
"doctrine/annotations": "^1.7.0",
"doctrine/cache": "^1.0",
"doctrine/cache": "^1.11 || ^2.0",
"doctrine/collections": "^1.0",
"doctrine/event-manager": "^1.0"
"doctrine/event-manager": "^1.0",
"psr/cache": "^1.0|^2.0|^3.0"
},
"require-dev": {
"composer/package-versions-deprecated": "^1.11",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan": "0.12.84",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"doctrine/coding-standard": "^6.0 || ^8.0",
"doctrine/coding-standard": "^6.0 || ^9.0",
"doctrine/common": "^3.0",
"phpunit/phpunit": "^8.0 || ^9.0",
"vimeo/psalm": "^3.11"
"symfony/cache": "^4.4|^5.0",
"vimeo/psalm": "4.7.0"
},
"conflict": {
"doctrine/common": "<2.10@dev"
Expand Down
Loading

0 comments on commit a38ed90

Please sign in to comment.