Skip to content

Commit

Permalink
Merge tag 'v2.7.0' of git://github.com/doctrine/orm into doctrine-ori…
Browse files Browse the repository at this point in the history
…gin-master

v2.7.0

[![Build Status](https://travis-ci.org/doctrine/orm.svg?branch=v2.7.0)](https://travis-ci.org/doctrine/orm)

This release solves Symfony 5.0 compatibility issues, some small improvements, and adds
various deprecation notices.

Please read carefully the [upgrade to 2.7
notes](https://github.com/doctrine/orm/blob/2.7/UPGRADE.md#upgrade-to-27) to know more
about the reasons and how to fix the deprecation messages.

---

- Total issues resolved: **1**
- Total pull requests resolved: **15**
- Total contributors: **10**

Deprecation
-----------

 - [7911: Be explicit about which Doctrine package in message](doctrine#7911) thanks to @lcobucci
 - [7909: Add deprecation messages](doctrine#7909) thanks to @lcobucci
 - [7901: Add deprecation warnings for 2.7.x](doctrine#7901) thanks to @lcobucci
 - [7701: Split and deprecate AbstractQuery#useResultCache()](doctrine#7701) thanks to @someniatko

CI
--

 - [7904: Make sure composer files are valid](doctrine#7904) thanks to @greg0ire
 - [7600: &doctrine#91;2.7&doctrine#93; CI: Test against PHP 7.4snapshot instead of nightly (8.0)](doctrine#7600) thanks to @Majkl578

Improvement
-----------

 - [7876: Fix compat of commands with Symfony 5](doctrine#7876) thanks to @nicolas-grekas
 - [7829: Skip Paginator LIMIT subquery and WHERE IN if query do not have LIMIT](doctrine#7829) thanks to @Seb33300
 - [7723: Allow Symfony 5.0](doctrine#7723) thanks to @nicolas-grekas
 - [7710: Prettified arrays in tool command orm:mapping:describe](doctrine#7710) thanks to @rtek
 - [7340: Fix config template for PHPUnit >= 7.2](doctrine#7340) thanks to @guilliamxavier

BC Break,Improvement
--------------------

 - [7863: Paginator: Skip limit subquery if not required](doctrine#7863) thanks to @Seb33300

Documentation
-------------

 - [7382: Update homepage](doctrine#7382) thanks to @Majkl578

Bug
---

 - [7326: Cherry-pick doctrine#7307 to fix remaining usages of deprecated ClassLoader and Inflector from doctrine/common](doctrine#7326) thanks to @nicolas-grekas
 - [7079: Fix getJoinTableName for sqlite with schema attribute](doctrine#7079) thanks to @mairo744

BC Break,Deprecation,Improvement
--------------------------------

 - [6803: Deprecation of EntityManager copy method](doctrine#6803) thanks to @SenseException
  • Loading branch information
vilartoni committed Jan 14, 2020
2 parents 33b41e4 + 4d763ca commit 7a3ae57
Show file tree
Hide file tree
Showing 971 changed files with 31,098 additions and 16,346 deletions.
4 changes: 0 additions & 4 deletions .coveralls.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
Expand Up @@ -10,3 +10,4 @@ build.xml export-ignore
CONTRIBUTING.md export-ignore
phpunit.xml.dist export-ignore
run-all.sh export-ignore
phpcs.xml.dist export-ignore
4 changes: 3 additions & 1 deletion .gitignore
Expand Up @@ -10,5 +10,7 @@ lib/Doctrine/DBAL
.buildpath
.project
.idea
*.iml
vendor/
composer.lock
/tests/Doctrine/Performance/history.db
/.phpcs-cache
56 changes: 28 additions & 28 deletions .scrutinizer.yml
@@ -1,34 +1,34 @@
build:
nodes:
analysis:
environment:
php:
version: 7.1
cache:
disabled: false
directories:
- ~/.composer/cache

project_setup:
override: true
tests:
override:
- php-scrutinizer-run

before_commands:
- "composer install --no-dev --prefer-source"

tools:
external_code_coverage:
timeout: 3600
php_code_coverage:
enabled: true
php_code_sniffer:
enabled: false
php_cpd:
enabled: true
excluded_dirs: ["bin", "docs", "tests", "tools", "vendor"]
php_cs_fixer:
enabled: false
php_loc:
enabled: true
excluded_dirs: ["bin", "docs", "tests", "tools", "vendor"]
php_mess_detector:
enabled: true
filter:
paths: ["lib/*"]
php_pdepend:
enabled: true
excluded_dirs: ["docs", "examples", "tests", "vendor"]
php_analyzer:
enabled: true
filter:
paths: ["lib/*", "tests/*"]
php_hhvm:
enabled: true
filter:
paths: ["lib/*", "tests/*"]
sensiolabs_security_checker: true

filter:
excluded_paths:
- docs
- tools

build_failure_conditions:
- 'elements.rating(<= C).new.exists' # No new classes/methods with a rating of C or worse allowed
- 'issues.severity(>= MAJOR).new.exists' # New issues of major or higher severity
- 'project.metric_change("scrutinizer.test_coverage", < 0)' # Code Coverage decreased from previous inspection
- 'patches.label("Unused Use Statements").new.exists' # No new unused imports patches allowed
149 changes: 108 additions & 41 deletions .travis.yml
@@ -1,64 +1,131 @@
dist: trusty
sudo: false
language: php

php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4snapshot
- nightly
- hhvm

env:
- DB=sqlite
- DB=mysql
- DB=pgsql
- DB=sqlite

before_script:
- if [[ $TRAVIS_PHP_VERSION = '7.0' && $DB = 'sqlite' ]]; then PHPUNIT_FLAGS="--coverage-clover ./build/logs/clover.xml"; else PHPUNIT_FLAGS=""; fi
- if [[ $TRAVIS_PHP_VERSION != '7.0' && $TRAVIS_PHP_VERSION != 'hhvm' ]]; then phpenv config-rm xdebug.ini; fi
before_install:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- composer self-update
- composer install --prefer-source

install: travis_retry composer validate --strict && composer update --prefer-dist

script:
- ENABLE_SECOND_LEVEL_CACHE=0 ./vendor/bin/phpunit -v -c tests/travis/$DB.travis.xml $PHPUNIT_FLAGS
- if [[ "$DB" == "mysql" || "$DB" == "mariadb" ]]; then mysql -e "CREATE SCHEMA doctrine_tests; GRANT ALL PRIVILEGES ON doctrine_tests.* to travis@'%'"; fi
- ENABLE_SECOND_LEVEL_CACHE=0 ./vendor/bin/phpunit -v -c tests/travis/$DB.travis.xml
- ENABLE_SECOND_LEVEL_CACHE=1 ./vendor/bin/phpunit -v -c tests/travis/$DB.travis.xml --exclude-group performance,non-cacheable,locking_functional

after_script:
- if [[ $TRAVIS_PHP_VERSION = '7.0' && $DB = 'sqlite' ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ $TRAVIS_PHP_VERSION = '7.0' && $DB = 'sqlite' ]]; then php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi

matrix:
jobs:
include:
- php: 5.6
env: DB=mariadb
addons:
mariadb: 5.5
- php: 7.0
env: DB=mariadb
addons:
mariadb: 5.5
- php: hhvm
env: DB=mariadb
addons:
mariadb: 5.5

- php: 5.6
- stage: Test
env: DB=mariadb
addons:
mariadb: 10.1
- php: 7.0
env: DB=mariadb
addons:
mariadb: 10.1
- php: hhvm
env: DB=mariadb
addons:
mariadb: 10.1
exclude:
- php: hhvm
env: DB=pgsql # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency

- stage: Test
dist: xenial
env: DB=mysql MYSQL_VERSION=5.7
php: 7.1
services:
- mysql
before_script:
- ./tests/travis/install-mysql-$MYSQL_VERSION.sh
sudo: required

- stage: Test
dist: xenial
env: DB=mysql MYSQL_VERSION=5.7
php: 7.2
services:
- mysql
before_script:
- ./tests/travis/install-mysql-$MYSQL_VERSION.sh
sudo: required

- stage: Test
dist: xenial
env: DB=mysql MYSQL_VERSION=5.7
php: 7.4snapshot
services:
- mysql
before_script:
- ./tests/travis/install-mysql-$MYSQL_VERSION.sh
sudo: required

- stage: Test
env: DB=sqlite DEPENDENCIES=low
install: travis_retry composer update --prefer-dist --prefer-lowest

- stage: Test
if: type = cron
php: 7.3
env: DB=sqlite DEV_DEPENDENCIES
install:
- composer config minimum-stability dev
- travis_retry composer update --prefer-dist

- stage: Test
env: DB=sqlite COVERAGE
before_script:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,}
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi
script:
- ENABLE_SECOND_LEVEL_CACHE=0 ./vendor/bin/phpunit -v -c tests/travis/$DB.travis.xml --coverage-clover ./build/logs/clover.xml
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml

- stage: Code Quality
env: DB=none STATIC_ANALYSIS
install: travis_retry composer install --prefer-dist
before_script:
- echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "extension=redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- travis_retry composer require --dev --prefer-dist --prefer-stable phpstan/phpstan:^0.9
script: vendor/bin/phpstan analyse -l 1 -c phpstan.neon lib

- stage: Code Quality
env: DB=none BENCHMARK
before_script: wget https://phpbench.github.io/phpbench/phpbench.phar https://phpbench.github.io/phpbench/phpbench.phar.pubkey
script: php phpbench.phar run -l dots --report=default

- stage: Code Quality
if: NOT type = pull_request
env: DB=none CODING_STANDARDS
php: 7.4snapshot
install: travis_retry composer install --prefer-dist
script:
- ./vendor/bin/phpcs

- stage: Code Quality
if: type = pull_request
env: DB=none PULL_REQUEST_CODING_STANDARDS
php: 7.1
install: travis_retry composer install --prefer-dist
script:
- |
if [ $TRAVIS_BRANCH != "master" ]; then
git remote set-branches --add origin $TRAVIS_BRANCH;
git fetch origin $TRAVIS_BRANCH;
fi
- git merge-base origin/$TRAVIS_BRANCH $TRAVIS_PULL_REQUEST_SHA || git fetch origin +refs/pull/$TRAVIS_PULL_REQUEST/merge --unshallow
- wget https://github.com/diff-sniffer/git/releases/download/0.2.0/git-phpcs.phar
- php git-phpcs.phar origin/$TRAVIS_BRANCH...$TRAVIS_PULL_REQUEST_SHA

allow_failures:
- php: nightly

sudo: false
- stage: Code Quality
env: DB=none CODING_STANDARDS

cache:
directories:
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Expand Up @@ -44,12 +44,12 @@ Please try to add a test for your pull-request.
You can run the unit-tests by calling ``vendor/bin/phpunit`` from the root of the project.
It will run all the tests with an in memory SQLite database.

In order to do that, you will need a fresh copy of doctrine2, and you
In order to do that, you will need a fresh copy of the ORM, and you
will have to run a composer installation in the project:

```sh
git clone git@github.com:doctrine/doctrine2.git
cd doctrine2
git clone git@github.com:doctrine/orm.git
cd orm
curl -sS https://getcomposer.org/installer | php --
./composer.phar install
```
Expand All @@ -66,7 +66,7 @@ sqlite database.
Tips for creating unit tests:

1. If you put a test into the `Ticket` namespace as described above, put the testcase and all entities into the same class.
See `https://github.com/doctrine/doctrine2/tree/master/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2306Test.php` for an
See `https://github.com/doctrine/orm/tree/master/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2306Test.php` for an
example.

## Travis
Expand Down
18 changes: 9 additions & 9 deletions README.md
Expand Up @@ -3,7 +3,7 @@
| [![Build status][Master image]][Master] | [![Build status][2.5 image]][2.5] |
| [![Coverage Status][Master coverage image]][Master coverage] | [![Coverage Status][2.5 coverage image]][2.5 coverage] |

Doctrine 2 is an object-relational mapper (ORM) for PHP 5.4+ that provides transparent persistence
Doctrine 2 is an object-relational mapper (ORM) for PHP 7.1+ that provides transparent persistence
for PHP objects. It sits on top of a powerful database abstraction layer (DBAL). One of its key features
is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL),
inspired by Hibernate's HQL. This provides developers with a powerful alternative to SQL that maintains flexibility
Expand All @@ -16,11 +16,11 @@ without requiring unnecessary code duplication.
* [Documentation](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/index.html)


[Master image]: https://img.shields.io/travis/doctrine/doctrine2/master.svg?style=flat-square
[Master]: https://travis-ci.org/doctrine/doctrine2
[Master coverage image]: https://img.shields.io/coveralls/doctrine/doctrine2/master.svg?style=flat-square
[Master coverage]: https://coveralls.io/r/doctrine/doctrine2?branch=master
[2.5 image]: https://img.shields.io/travis/doctrine/doctrine2/2.5.svg?style=flat-square
[2.5]: https://github.com/doctrine/doctrine2/tree/2.5
[2.5 coverage image]: https://img.shields.io/coveralls/doctrine/doctrine2/2.5.svg?style=flat-square
[2.5 coverage]: https://coveralls.io/r/doctrine/doctrine2?branch=2.5
[Master image]: https://img.shields.io/travis/doctrine/orm/master.svg?style=flat-square
[Master]: https://travis-ci.org/doctrine/orm
[Master coverage image]: https://img.shields.io/scrutinizer/coverage/g/doctrine/orm/master.svg?style=flat-square
[Master coverage]: https://scrutinizer-ci.com/g/doctrine/orm/?branch=master
[2.5 image]: https://img.shields.io/travis/doctrine/orm/2.5.svg?style=flat-square
[2.5]: https://github.com/doctrine/orm/tree/2.5
[2.5 coverage image]: https://img.shields.io/scrutinizer/coverage/g/doctrine/orm/2.5.svg?style=flat-square
[2.5 coverage]: https://scrutinizer-ci.com/g/doctrine/orm/?branch=2.5
2 changes: 1 addition & 1 deletion SECURITY.md
Expand Up @@ -11,7 +11,7 @@ Please read the documentation chapter on Security in Doctrine DBAL and ORM to
understand the assumptions we make.

- [DBAL Security Page](https://github.com/doctrine/dbal/blob/master/docs/en/reference/security.rst)
- [ORM Security Page](https://github.com/doctrine/doctrine2/blob/master/docs/en/reference/security.rst)
- [ORM Security Page](https://github.com/doctrine/orm/blob/master/docs/en/reference/security.rst)

If you find a Security bug in Doctrine, please report it on Jira and change the
Security Level to "Security Issues". It will be visible to Doctrine Core
Expand Down

0 comments on commit 7a3ae57

Please sign in to comment.