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

Merge release 2.2.0 into 3.0.x #178

Merged
merged 57 commits into from
May 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
f05ae75
Upgrade psalm to 4.3.1
franmomu Dec 19, 2020
b228e6a
Use the ramsey/composer-install action to install dependencies
franmomu Dec 19, 2020
0baa94b
Add psalm.xml to .gitattributes
franmomu Dec 19, 2020
80aacac
Remove composer.lock and add it to .gitignore
franmomu Dec 19, 2020
cb944a9
Merge pull request #151 from franmomu/ga_improvements
greg0ire Dec 30, 2020
b180613
Sync static analysis psalm job
franmomu Feb 12, 2021
5aa5403
Ignore psalm issue
franmomu Feb 12, 2021
1772b47
Merge pull request #156 from franmomu/fix_psalm
greg0ire Feb 13, 2021
50e078a
Merge pull request #157 from doctrine/2.1.x
greg0ire Feb 13, 2021
23869a2
Deprecate using doctrine/cache in favour of PSR-6
alcaeus Nov 27, 2020
9d16e4b
Optimise storing metadata in cache
alcaeus Nov 27, 2020
86f51b2
Remove unnecessary invocation count matchers
alcaeus Dec 12, 2020
3ee8ca7
Accept all major versions of psr/cache
alcaeus Feb 10, 2021
cdfca25
Merge pull request #144 from alcaeus/support-psr-6
greg0ire Feb 13, 2021
340f728
Analyse tests directory with psalm
franmomu Dec 19, 2020
d2f7858
Use proper fixtures for tests
franmomu Dec 19, 2020
7d98c19
Add missing return type declarations
franmomu Dec 19, 2020
ef5b70d
Move Psalm issue to Psalm config
franmomu Jan 2, 2021
a10be34
Merge pull request #153 from franmomu/add_psalm_tests
greg0ire Feb 14, 2021
a18b272
Merge remote-tracking branch 'origin/2.1.x' into 2.2.x
greg0ire Feb 14, 2021
12a05f8
Introduce proxy class name resolvers (#145)
alcaeus Feb 17, 2021
608c14e
Remove unnecessary github actions branch filters
greg0ire Mar 20, 2021
fdef2dd
Merge pull request #162 from greg0ire/address-master-rename
greg0ire Mar 20, 2021
1529f39
Add class-string typehint
VincentLanglet Apr 1, 2021
098b4b3
Describe $orderBy more accurately
greg0ire Apr 3, 2021
f6575c2
Add generics to Proxy
franmomu Apr 2, 2021
210e9f5
Merge pull request #164 from franmomu/proxy_generic
greg0ire Apr 5, 2021
9d18f25
Merge pull request #163 from VincentLanglet/patch-2
greg0ire Apr 5, 2021
d8de172
Merge pull request #165 from greg0ire/improve-order-by-phpdoc
greg0ire Apr 5, 2021
c0fbcd8
Make getCache method internal (#166)
alcaeus Apr 13, 2021
7ed67df
Upgrade to doctrine/coding-standard 9
greg0ire Apr 19, 2021
b2845c1
Follow removal instructions
greg0ire Apr 19, 2021
b066680
Make the class metadata factory generic
greg0ire Apr 19, 2021
b1219ac
Pin SA tools to a specific version
greg0ire Apr 20, 2021
6a73390
Merge pull request #167 from greg0ire/generics-for-cmf
greg0ire Apr 20, 2021
554f03f
Use class-string for parameters and vars
franmomu Apr 20, 2021
79512c6
Merge pull request #168 from franmomu/use_psalm_3
greg0ire Apr 21, 2021
aa78e4a
Fix possible falsy arguments
franmomu Apr 21, 2021
5bb4b3e
Fix className and alias issues
franmomu Apr 21, 2021
a29f2bf
Raise Psalm to level 3
franmomu Apr 21, 2021
2e87a31
Merge pull request #169 from franmomu/use_psalm_3
greg0ire Apr 22, 2021
254fc97
Add missing return type
franmomu Apr 22, 2021
95405e2
Make ClassMetada generic
franmomu Apr 22, 2021
e2d6be1
Use PSR-6 compatibility classes from doctrine/cache (#172)
alcaeus Apr 22, 2021
ffeaf9d
Merge pull request #171 from franmomu/classmetadata_generic
greg0ire Apr 24, 2021
388c19a
Fix @template-implements annotation
franmomu Apr 24, 2021
ce5afb3
Add more specific phpdoc
franmomu Apr 24, 2021
bf2097f
Apply generics to tests
franmomu Apr 24, 2021
c73f704
Make ClassMetadata use template-covariant
franmomu Apr 30, 2021
653d54d
Merge release 2.1.1 into 2.2.x (#177)
github-actions[bot] May 15, 2021
08d3e6e
Merge pull request #173 from franmomu/fix_template
greg0ire May 15, 2021
a38ed90
Merge origin/2.2.x into 3.0.x (using imerge)
greg0ire May 15, 2021
6e089d5
Drop unneeded %currentWorkingDirectory%
greg0ire May 16, 2021
afcdd92
Reach PHPStan level 7
greg0ire May 16, 2021
26aa7fb
Add contributing guide specific to this package
greg0ire May 16, 2021
93bb1cb
Merge pull request #180 from greg0ire/phpstan-lvl-7
greg0ire May 16, 2021
89319ee
Merge remote-tracking branch 'origin/2.2.x' into 2.2.x-merge-up-into-…
greg0ire May 16, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
32 changes: 6 additions & 26 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
- "7.4"
- "8.0"
deps:
- "normal"
- "highest"
include:
- deps: "low"
- deps: "lowest"
php-version: "7.2"

steps:
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 CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Circular dependency

This package has a development dependency on `doctrine/common`, which has a
regular dependency on this package (`^2.0` at the time of writing).

To be able to use Composer, one has to let it understand that this is version 2
(even when developing on 3.0.x), as follows:

```shell
COMPOSER_ROOT_VERSION=2.0 composer update -v
```
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