Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
76f03b5
Bump version to 2.7-dev
Majkl578 Dec 17, 2017
2fed820
Set copy-method as deprecated
SenseException Oct 30, 2017
fdbbf7e
Add deprecation of EntityManagerInterface::copy() to upgrade information
SenseException Nov 9, 2017
46c1b57
Update homepage
Majkl578 Aug 31, 2018
4fb1ebf
Create 2.7 upgrade headline for deprecation changes
SenseException Jan 4, 2018
cdb652a
CI: Test against PHP 7.4snapshot instead of nightly (8.0)
Majkl578 Feb 9, 2019
af0949a
Merge pull request #7382 from Majkl578/homepage-2.7
Majkl578 Sep 1, 2018
cfcca3a
Merge pull request #7600 from Majkl578/travis-php7.4-2.7
Ocramius Feb 11, 2019
90c1ee0
Allow Symfony 5.0
nicolas-grekas May 28, 2019
d9c30e3
Merge pull request #7723 from nicolas-grekas/sf5
jwage May 28, 2019
4d6b1f3
Fix compat of commands with Symfony 5
nicolas-grekas Oct 23, 2019
2d643e6
Merge pull request #7876 from nicolas-grekas/sf5-cmd
lcobucci Oct 23, 2019
3a32c00
Add a failing test for issue #7505
m-r-r Dec 6, 2018
570abb5
Fix PHP warnings in test suite
lcobucci Nov 15, 2019
2b8cb9d
Add basic tool to verify deprecation messages
lcobucci Nov 15, 2019
eb9f11b
Added deprecation warnings for 2.x
Majkl578 Dec 8, 2017
f9a4258
Upgrading notes for 2.7
Majkl578 Dec 17, 2017
f7c04ae
Merge pull request #7901 from lcobucci/add-deprecation-notices
Ocramius Nov 15, 2019
26806d0
Require more updated doctrine packages
lcobucci Nov 15, 2019
fc9314d
Merge remote-tracking branch 'origin/2.7' into 7900--2.6.x-merge-up-i…
greg0ire Nov 15, 2019
9162f35
Merge pull request #7900 from doctrine/2.6.x-merge-up-into-2.7
lcobucci Nov 15, 2019
6347190
Skip limit subquery if not required
Seb33300 Oct 10, 2019
8c47dcb
Merge pull request #7863 from Seb33300/skip-limit-subquery
lcobucci Nov 16, 2019
797bfc5
Fix deprecation messages version
lcobucci Nov 16, 2019
57496e3
Add minor BC-break notes on output walkers in paginator
lcobucci Nov 16, 2019
7bcbad0
Split and deprecate AbstractQuery#useResultCache()
someniatko May 6, 2018
e8f265d
Make ResultCacheTest tests slightly more logical
someniatko May 25, 2019
0c36f87
Prettify arrays in orm:mapping:describe command
rtek May 15, 2019
977985f
Merge pull request #7701 from someniatko/deprecate-use-result-cache
lcobucci Nov 16, 2019
1b2daac
Merge pull request #7710 from rtek/pretty-tool-describe
lcobucci Nov 16, 2019
33b8d02
Synchronize lock file and json manifest
greg0ire Nov 16, 2019
c79d2e0
Make sure composer files are valid
greg0ire Nov 16, 2019
f576e6c
Merge pull request #7904 from greg0ire/validate-composer-json
lcobucci Nov 16, 2019
8420d24
Merge remote-tracking branch 'upstream/2.6' into 2.7
lcobucci Nov 18, 2019
8332fa1
Merge remote-tracking branch 'upstream/2.6' into 2.7
lcobucci Nov 18, 2019
0264ba1
Fix creation of join table names with schemas in SQLite
mairo744 Nov 4, 2019
d959744
Merge pull request #7079 from mairo744/hotfix/sqlite-join-table-name
lcobucci Nov 18, 2019
9ccb883
Add deprecation message for EM#clear($entityName)
lcobucci Nov 19, 2019
50992ea
Deprecated the usage of number unaware underscore naming strategy
lcobucci Nov 19, 2019
ce93817
Merge pull request #7909 from lcobucci/add-deprecation-messages
lcobucci Nov 19, 2019
3314322
Be explicit about which Doctrine package in message
lcobucci Nov 19, 2019
398d74d
Merge pull request #7911 from lcobucci/be-more-explicit-on-deprecatio…
lcobucci Nov 19, 2019
4d763ca
Bump up version
lcobucci Nov 19, 2019
a416a9a
Bump up version
lcobucci Nov 19, 2019
2d833a5
Fix boolean properties default value when generating entities.
Nov 14, 2019
6fc9b3a
Fix to pass code quality check.
Nov 15, 2019
3db992e
Add test code.
Nov 15, 2019
2c956d5
Fix to pass code quality check.
Nov 20, 2019
253fd10
Modified test to use assertTrue.
Nov 20, 2019
2bf7916
Fix to pass code quality check.
Nov 20, 2019
cfd6fad
Revert "#7841 SchemaTool generates extra diff for platforms without F…
beberlei Dec 1, 2019
75d5adf
[GH-7864] Bugfix in PersistentCollection::removeElement for EXTRA_LAZY.
beberlei Dec 1, 2019
d6f6b2e
[GH-7864] Remove tests that checked invalid behavior.
beberlei Dec 1, 2019
419df77
[GH-7864] ExtraLazyCollectionTest is not cacahble and should not fail…
beberlei Dec 1, 2019
ae2b9b1
Housekeeping: phpcbf to fix issues.
beberlei Dec 1, 2019
1e62837
[GH-7864] Address review comments.
beberlei Dec 3, 2019
bfc68b3
Add warning about removeElement on extra lazy
beberlei Dec 3, 2019
041404e
[GH-7864] Revert removeElement EXTRA_LAZY support.
beberlei Dec 6, 2019
f37c128
Fix Trying to access array offset on value of type null
BenMorel Nov 29, 2019
c9e41d0
Merge pull request #7934 from BenMorel/php74
lcobucci Dec 9, 2019
5873242
Merge pull request #7937 from doctrine/GH-7930-SqliteForeignKeys
lcobucci Dec 16, 2019
85528f2
Fix CS errors
lcobucci Dec 16, 2019
e481d98
Ignore Doctrine\Common\Persistence\ObjectManagerDecorator deprecation
lcobucci Dec 16, 2019
4389b2c
Merge pull request #7956 from lcobucci/fix-test-suite
lcobucci Dec 16, 2019
5c2b687
Whitelist existing assets we know about from metadata in SchemaTool::…
nicolas-grekas Oct 21, 2019
9aa28b4
Test asset whitelisting on SchemaTool#getUpdateSchemasSql()
l-vo Oct 22, 2019
0ce1440
Add upgrade note about schema_filter change
alcaeus Nov 24, 2019
4a42262
Merge pull request #7875 from nicolas-grekas/schema-tool
lcobucci Dec 16, 2019
d629c4e
Remove build.xml and related files
lcobucci Dec 17, 2019
d67e3e8
Rely on ocramius/package-versions to render the version
lcobucci Dec 17, 2019
2785cde
Merge pull request #7957 from lcobucci/fix-version-information
lcobucci Dec 17, 2019
1edfcab
Merge pull request #7894 from TomckySan/convert-default-value-to-boolean
beberlei Jan 5, 2020
324aacf
Just a micro grammar update.
DocFX Jan 8, 2020
20c4603
[Docs] Prefer PhpFileCache for caching and remove APC/XCache.
shadowhand Jan 8, 2020
edce365
Adjust tests back for 2.x.
beberlei Jan 8, 2020
8b588ec
Merge pull request #7973 from DocFX/patch-1
lcobucci Jan 14, 2020
87e4914
Add @group
beberlei Jan 15, 2020
6e59ec8
[GH-7505] Fix cs
beberlei Jan 15, 2020
401db45
Merge pull request #7974 from beberlei/gh-7505
beberlei Jan 15, 2020
a2f01f7
Allow everything from ocramius/package-versions ^1.0.
beberlei Jan 15, 2020
3bc1096
[GH-7982] Default Query state to dirty to fix execution of empty query.
beberlei Jan 15, 2020
5d7d3e9
Downgrade ocramius/package-versions to lowest in composer.lock to sup…
beberlei Jan 16, 2020
dea3e5d
Try running phpstan on php 7.4
greg0ire Jan 16, 2020
fc94127
Make ocramius/package-versions 1.2 the lowest version for phpstan
beberlei Jan 16, 2020
fdad482
Merge pull request #7991 from greg0ire/7.4-sa
beberlei Jan 16, 2020
a64d254
[GH-7982] Bugfix: Passing string|null DQL to Lexer(string $input) lea…
beberlei Feb 12, 2020
8104c65
Merge pull request #7987 from beberlei/GH-7982-NoSqlExecutor
beberlei Feb 12, 2020
9a0fcb5
Merge pull request #7940 from doctrine/GH-7864-ExtraLazyRemoveElement
beberlei Feb 12, 2020
58677c2
Make Embeddable not transient
malarzm Jan 30, 2020
a692670
Merge pull request #8006 from doctrine/malarzm-patch-1
beberlei Feb 13, 2020
ab93285
Remove nightly builds from .travis.yml
beberlei Feb 15, 2020
445796a
Travis: Use 7.4 instead of 7.4snapshot
beberlei Feb 15, 2020
9bb2bf0
Put into cache using root entity name
peterkeatingie Feb 15, 2020
ca57222
Merge pull request #8023 from peterkeatingie/query-cache-fix
beberlei Feb 16, 2020
d157a6c
Mention that lifecycle callbacks do not support Embeddables
holtkamp May 18, 2018
e04a795
Merge pull request #7230 from holtkamp/patch-2
greg0ire Feb 17, 2020
9273057
Annotations override naming strategy (#8041)
RosemaryOrchard Mar 1, 2020
eb70040
Fix: Use neutral pronouns (#8059)
localheinz Mar 6, 2020
cd905ff
Fix documentation of default generated value behavior (#8068)
jorrit Mar 13, 2020
a9b6b72
Fix inherited embeddables and nesting after AnnotationDriver change #…
malarzm Mar 15, 2020
a705f52
[GH-7633] disallow cache partial objects (#8050)
beberlei Mar 15, 2020
58b8130
Fix regression in 2.7.1 when `mysqli` is used with discriminator colu…
mpdude Mar 16, 2020
dafe298
Fix phpdoc (#8074)
VincentLanglet Mar 19, 2020
6138afd
[Docs] Make clear that calling remove() detaches the object (#8081)
arneee Mar 27, 2020
a418cf6
Remove TODO (#8078)
VincentLanglet Mar 30, 2020
8d67eec
Fix JoinColumn documentation (#7966)
MatTheCat Mar 30, 2020
73ec483
Convert PHP to SQL for new object expression (#8062)
jeroenvdheuvel Apr 16, 2020
70fb1ec
Warn users about performance issues with DateTime objects in setParam…
maks-rafalko Apr 25, 2020
527fff5
removed repository class from metadata (#8125)
binarygondola May 3, 2020
8a9954e
Address deprecations from persistence (#7953)
greg0ire May 7, 2020
21a9823
Static analysis with Psalm (#8116)
greg0ire May 11, 2020
4d172e2
Revert changes to embeddable mapping in 2.7 (#8138)
beberlei May 12, 2020
6780a96
Migrate git-phpcs to Github actions (#8146)
greg0ire May 16, 2020
de2e2a1
Add psalm types (#7989)
orklah May 18, 2020
825ceb6
Fix inline code example (#8153)
robertbasic May 22, 2020
d95e03b
Allow doctrine/common 3 and doctrine/persistence 2 (#8158)
greg0ire May 26, 2020
93867f8
TASK: Replace "Blacklist" example with "Banlist" (#8174)
albe Jun 8, 2020
5ced62b
Run benchmark on PHP 7.4 (#8186)
greg0ire Jun 17, 2020
765521d
Use CodeCov instead of Scrutinizer (#8187)
greg0ire Jun 17, 2020
6a670d7
Allow using on PHP 7.1 with Composer 2 (#8184)
nicolas-grekas Jun 18, 2020
a438e90
add dev files to .gitattribute (#8190)
vv12131415 Jun 19, 2020
2a2a0b2
Remove unwanted period (#8198)
takman1 Jul 2, 2020
64c3f68
Prohibits class typo in the discriminator map (#8122)
gquemener Jul 5, 2020
775d91c
[GH-8122] Move test from AbstractMappingDriverTest to ClassMetadataFa…
beberlei Jul 5, 2020
6c73a6b
Infer return type information with Psalter (#8150)
greg0ire Jul 5, 2020
75fe18e
Add alert to "avoid persisting detached entities" (#8109)
Pictor13 Jul 5, 2020
3689b76
Fix QueryBuilder::getParameter() on parameter names with colons (#8107)
tom93 Jul 5, 2020
181114f
[GH-8106] Move test into existing QueryTest testcase to reduce surface.
beberlei Jul 5, 2020
190218b
Change list() syntax to array destructuring (short list syntax) (#8204)
orklah Jul 7, 2020
aab589b
add/fix more types (checked by psalm) (#8199)
orklah Jul 10, 2020
271f348
Fix: Typo (#8213)
localheinz Jul 15, 2020
efd2548
Update aggregate-fields.rst (#8215)
njutn95 Jul 20, 2020
7e5fe79
Change preferred cache driver for metadata and query caches (#8223)
bcremer Aug 3, 2020
7cffba8
Fix annotation in Expr
Aug 6, 2020
8230afc
Fetch deeper
greg0ire Aug 6, 2020
424241f
Use more accurate terminology (#8236)
greg0ire Aug 9, 2020
1e2ed07
Use consistent formatting in command line (#8238)
simPod Aug 12, 2020
da18985
Stop using the DBAL extension of PHPBench (#8252)
greg0ire Aug 29, 2020
ccae8f7
Fix for bug #8229 (id column from parent class renamed in child class…
cziegenberg Aug 29, 2020
717ef91
Update events.rst (#8257)
ThomasLandauer Sep 3, 2020
ab2b498
Improve formatting (#8028)
Yohann76 Sep 8, 2020
7066702
Fix OrderByItem parser to proceed with SimpleArithmetic expression be…
ipernet Sep 20, 2020
107ba93
Convert CRLF to LF in test file (#8276)
mvorisek Sep 21, 2020
d810ea4
Use inline literals over escaping (#8279)
greg0ire Sep 22, 2020
f4524a8
Fix psalm errors and upgrade strictness (#8209)
orklah Sep 25, 2020
79cdcde
rename parameters to match parents (#8284)
orklah Sep 26, 2020
e0eb82a
psalm fixes (#8286)
orklah Sep 30, 2020
bb64fc9
Move website config to default branch (#8287)
SenseException Oct 2, 2020
7d84a49
Setup automated release workflow (#8301)
greg0ire Oct 10, 2020
8fcc70c
Change LOG_LEVEL to debug should expose more info from laminas/automa…
beberlei Oct 10, 2020
59fd9b5
Change LOG_LEVEL to debug should expose more info from laminas/automa…
beberlei Oct 10, 2020
8d250f5
Use SHELL_VERBOSITY=3 instead of LOG_LEVEL=DEBUG
beberlei Oct 11, 2020
4d2908a
Change <phpunit verbose="true" /> to false for better readability of …
beberlei Oct 11, 2020
18d96fc
Update working-with-indexed-associations.rst (#8298)
ThomasLandauer Oct 12, 2020
5fde580
Fix many typos (#8299)
l-vo Oct 13, 2020
ca27cc3
Fix EOL of text files (#8310)
mvorisek Oct 17, 2020
b13b2e8
Upgrade doctrine/coding-standard (#8321)
greg0ire Oct 28, 2020
2f0eb95
Patch 1 (#8325)
michaelKaefer Oct 31, 2020
c270eba
Start moving travis phpunit runs to Github actions. (#8317)
beberlei Nov 7, 2020
fa6fe09
Ignore composer.lock
beberlei Nov 7, 2020
385b5a2
Phpunit 8 (#8330)
greg0ire Nov 7, 2020
f4ebded
Fix SQL alias generation regression for simple inheritance (#8329)
rogregoire Nov 10, 2020
b1ac293
Add missing backtick in rst markup (#8335)
RomaVan Nov 10, 2020
011d3c2
Update functionality of code examples (#8336)
SenseException Nov 24, 2020
80a7df4
Fix CommitOrderCalculator::visit()
tomaszgaw Mar 27, 2019
7e79973
Fix CommitOrderCalculator::addDependency()
tomaszgaw Oct 24, 2020
fee199e
Merge remote-tracking branch 'doctrine/2.7' into fix-commit-order
tomaszgaw Nov 25, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
49 changes: 49 additions & 0 deletions .doctrine-project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"active": true,
"name": "Object Relational Mapper",
"shortName": "ORM",
"slug": "orm",
"docsSlug": "doctrine-orm",
"versions": [
{
"name": "3.0",
"branchName": "master",
"slug": "latest",
"upcoming": true
},
{
"name": "2.8",
"branchName": "2.8.x",
"slug": "2.8",
"upcoming": true
},
{
"name": "2.7",
"branchName": "2.7",
"slug": "2.7",
"current": true,
"aliases": [
"current",
"stable"
]
},
{
"name": "2.6",
"branchName": "2.6",
"slug": "2.6",
"maintained": false
},
{
"name": "2.5",
"branchName": "2.5",
"slug": "2.5",
"maintained": false
},
{
"name": "2.4",
"branchName": "2.4",
"slug": "2.4",
"maintained": false
}
]
}
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/tests export-ignore
/tools export-ignore
/.github export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.gitmodules export-ignore
Expand All @@ -11,3 +12,6 @@ CONTRIBUTING.md export-ignore
phpunit.xml.dist export-ignore
run-all.sh export-ignore
phpcs.xml.dist export-ignore
phpbench.json export-ignore
phpstan.neon export-ignore
psalm.xml export-ignore
46 changes: 46 additions & 0 deletions .github/workflows/coding-standard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Static Analysis

on:
pull_request:

jobs:
coding-standards:
name: "Coding Standards"
runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "7.4"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 10

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

- name: "Cache dependencies installed with composer"
uses: "actions/cache@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 update --no-interaction --no-progress --no-suggest"

- name: "Install git-phpcs"
run: "wget https://github.com/diff-sniffer/git/releases/download/0.3.2/git-phpcs.phar"

- name: "Fetch head branch"
run: "git remote set-branches --add origin $GITHUB_BASE_REF && git fetch origin $GITHUB_BASE_REF"

- name: "Run git-phpcs"
run: "php git-phpcs.phar origin/$GITHUB_BASE_REF...$GITHUB_SHA --report=checkstyle | cs2pr"
284 changes: 284 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,284 @@
name: "Continuous Integration"

on:
pull_request:
push:

env:
fail-fast: true

jobs:
phpunit-smoke-check:
name: "PHPUnit with SQLite"
runs-on: "ubuntu-20.04"

strategy:
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
deps:
- "normal"
include:
- deps: "low"
php-version: "7.3"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 2

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: "pdo, pdo_sqlite"
coverage: "pcov"
ini-values: "zend.assertions=1"

- 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 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: "Run PHPUnit"
run: "vendor/bin/phpunit -c ci/github/phpunit/sqlite.xml --coverage-clover=coverage-no-cache.xml"
env:
ENABLE_SECOND_LEVEL_CACHE: 0

- name: "Run PHPUnit with Second Level Cache"
run: "vendor/bin/phpunit -c ci/github/phpunit/sqlite.xml --exclude-group performance,non-cacheable,locking_functional --coverage-clover=coverage-cache.xml"
env:
ENABLE_SECOND_LEVEL_CACHE: 1

- name: "Upload coverage file"
uses: "actions/upload-artifact@v2"
with:
name: "phpunit-sqlite-${{ matrix.deps }}-${{ matrix.php-version }}-coverage"
path: "coverage*.xml"


phpunit-postgres:
name: "PHPUnit with PostgreSQL"
runs-on: "ubuntu-20.04"
needs: "phpunit-smoke-check"

strategy:
matrix:
php-version:
- "7.4"
postgres-version:
- "9.6"
- "13"

services:
postgres:
image: "postgres:${{ matrix.postgres-version }}"
env:
POSTGRES_PASSWORD: "postgres"

options: >-
--health-cmd "pg_isready"

ports:
- "5432:5432"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 2

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
coverage: "pcov"
ini-values: "zend.assertions=1"

- 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 update --no-interaction --no-progress --no-suggest"

- name: "Run PHPUnit"
run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_pgsql.xml --coverage-clover=coverage.xml"

- name: "Upload coverage file"
uses: "actions/upload-artifact@v2"
with:
name: "${{ github.job }}-${{ matrix.postgres-version }}-${{ matrix.php-version }}-coverage"
path: "coverage.xml"


phpunit-mariadb:
name: "PHPUnit with MariaDB"
runs-on: "ubuntu-20.04"
needs: "phpunit-smoke-check"

strategy:
matrix:
php-version:
- "7.4"
mariadb-version:
- "10.5"
extension:
- "mysqli"
- "pdo_mysql"

services:
mariadb:
image: "mariadb:${{ matrix.mariadb-version }}"
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: "doctrine_tests"

options: >-
--health-cmd "mysqladmin ping --silent"

ports:
- "3306:3306"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 2

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
coverage: "pcov"
ini-values: "zend.assertions=1"
extensions: "${{ matrix.extension }}"

- 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 update --no-interaction --no-progress --no-suggest"

- name: "Run PHPUnit"
run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml"

- name: "Upload coverage file"
uses: "actions/upload-artifact@v2"
with:
name: "${{ github.job }}-${{ matrix.mariadb-version }}-${{ matrix.extension }}-${{ matrix.php-version }}-coverage"
path: "coverage.xml"


phpunit-mysql:
name: "PHPUnit with MySQL"
runs-on: "ubuntu-20.04"
needs: "phpunit-smoke-check"

strategy:
matrix:
php-version:
- "7.4"
mysql-version:
- "5.7"
- "8.0"
extension:
- "mysqli"
- "pdo_mysql"

services:
mysql:
image: "mysql:${{ matrix.mysql-version }}"

options: >-
--health-cmd "mysqladmin ping --silent"
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes
-e MYSQL_DATABASE=doctrine_tests

ports:
- "3306:3306"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 2

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
coverage: "pcov"
ini-values: "zend.assertions=1"
extensions: "${{ matrix.extension }}"

- 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 update --no-interaction --no-progress --no-suggest"

- name: "Run PHPUnit"
run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage-no-cache.xml"
env:
ENABLE_SECOND_LEVEL_CACHE: 0

- name: "Run PHPUnit with Second Level Cache"
run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --exclude-group performance,non-cacheable,locking_functional --coverage-clover=coverage-no-cache.xml"
env:
ENABLE_SECOND_LEVEL_CACHE: 1

- name: "Upload coverage files"
uses: "actions/upload-artifact@v2"
with:
name: "${{ github.job }}-${{ matrix.mysql-version }}-${{ matrix.extension }}-${{ matrix.php-version }}-coverage"
path: "coverage*.xml"

upload_coverage:
name: "Upload coverage to Codecov"
runs-on: "ubuntu-20.04"
needs:
- "phpunit-smoke-check"
- "phpunit-postgres"
- "phpunit-mariadb"
- "phpunit-mysql"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 2

- name: "Download coverage files"
uses: "actions/download-artifact@v2"
with:
path: "reports"

- name: "Upload to Codecov"
uses: "codecov/codecov-action@v1"
with:
directory: reports
Loading