Skip to content

Commit

Permalink
Merge tag 'v2.8.0' into oracle122
Browse files Browse the repository at this point in the history
Release v2.8.0

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

This is a minor release of Doctrine DBAL that aggregates over 30 fixes and improvements developed over the last 3 months.

This release includes all changes of the 2.7.x series, as well as feature additions and improvements that couldn’t land in patch releases.

**Backwards Compatibility Breaks**

This doesn't contain any intentional Backwards Compatibility (BC) breaks.

**Dependency Changes**

* The dependency on [doctrine/common](https://github.com/doctrine/common) is removed. DBAL now depends on [doctrine/cache](https://github.com/doctrine/cache) and [doctrine/event-manager](https://github.com/doctrine/event-manager) instead.

Please see details in the [UPGRADE.md](UPGRADE.md) documentation.

**Deprecations**

* The usage of binary fields whose length exceeds the maximum field size on a given platform is deprecated. Please use binary fields of a size which fits all target platforms, or use blob explicitly instead.
* The usage of DB-generated UUIDs is deprecated. Their format is inconsistent across supported platforms and therefore the feature is not portable. Use a PHP library (e.g. [ramsey/uuid](https://packagist.org/packages/ramsey/uuid)) to generate UUIDs on the application side.

**New features**

* Initial support of MySQL 8.
* Initial support of PostgreSQL 11.
* Ability to evaluate arbitrary SQL expressions via `AbstractPlatform::getDummySelectSQL()`.

**Improvements and Fixes**

* Improved support of binary fields on Oracle and IBM DB2.
* Improved SQL Server configuration capabilities via both `sqlsrv` and `pdo_sqlsrv`.
* Improved handling of `AUTOINCREMENT`ed primary keys in SQLite.
* Integration tests are run against IBM DB2 on Travis CI.
* Code coverage is collected for the Oracle platform on continuousphp.

Total issues resolved: **33**

**Deprecations:**

- [3187: Deprecate usage of binary fields whose length exceeds maximum](doctrine#3187) thanks to @morozov
- [3188: Deprecated usage of binary fields whose length exceeds the platform maximum](doctrine#3188) thanks to @morozov
- [3192: Added more information to the deprecation notice](doctrine#3192) thanks to @morozov
- [3212: Deprecated usage of DB-generated UUIDs](doctrine#3212) thanks to @morozov

**New Features:**

**Bug Fixes:**

- [3149: Introduced binary binding type to support binary parameters on Oracle](doctrine#3149) thanks to @morozov
- [3178: Fix incorrect exception thrown from SQLAnywhere16Platform](doctrine#3178) thanks to @Majkl578
- [3044: Functional test for allowing dynamic intervals in date sub/add](doctrine#3044) thanks to @AshleyDawson
- [3049: Test failures caused by invalid database connection result in fatal error](doctrine#3049) thanks to @Majkl578

**Improvements:**

- [3033: Added support for available DSN parameters for the PDOSqlsrv driver](doctrine#3033) thanks to @aashmelev
- [3128: Add MySQL 8 reserved keywords](doctrine#3128) thanks to @mlocati
- [3143: initialize sql array into platform files](doctrine#3143) thanks to @AlessandroMinoccheri
- [3173: Fix composer branch aliases](doctrine#3173) thanks to @Majkl578
- [3157: When building a limit query, zero offset without a limit should be ignored](doctrine#3157) thanks to @morozov
- [3109: Allow to specify arbitrary SQL expression in AbstractPlatform::getDummySelectSQL()](doctrine#3109) thanks to @morozov
- [3141: allow creating PRIMARY KEY AUTOINCREMENT fields for sqlite (unit tests)](doctrine#3141) thanks to @TimoBakx
- [3180: Import simplified version of Common\Util\Debug for var dumping purposes](doctrine#3180) thanks to @Majkl578

**Documentation Improvements:**

- [3117: Added badges for the develop branch in README](doctrine#3117) thanks to @morozov
- [3125: Upgrading docs](doctrine#3125) thanks to @jwage
- [3144: added improvement type into pull request template](doctrine#3144) thanks to @AlessandroMinoccheri

**Code Quality Improvements:**

- [3025: Added PHPStan, apply changes for level 3](doctrine#3025) thanks to @Majkl578
- [3200: Php Inspections (EA Ultimate): minor code tweaks](doctrine#3200) thanks to @kalessil
- [3204: Fix typo in AbstractPlatform](doctrine#3204) thanks to @Majkl578
- [3205: Ignore OCI-* classes in static analysis (no stubs)](doctrine#3205) thanks to @Majkl578

**Continuous Integration Improvements:**

- [3102: Use newer PHPUnit to prevent crashes on failures](doctrine#3102) thanks to @Majkl578
- [3112: Removed hard-coded configuration filenames from the test runner](doctrine#3112) thanks to @morozov
- [3133: Travis DB2](doctrine#3133) thanks to @Majkl578, @morozov
- [3135: AppVeyor tweaks, retry coverage upload on failure](doctrine#3135) thanks to @Majkl578
- [3137: Workaround for the inability to use a post-PHPUnit script on ContinuousPHP](doctrine#3137) thanks to @morozov
- [3151: MSSQL DLL 5.2.0 has been released.](doctrine#3151) thanks to @photodude
- [3160: Test against Postgres 11](doctrine#3160) thanks to @Majkl578

**Dependencies**

- [3193: DBAL 2.8 needs Common 2.9](doctrine#3193) thanks to @Majkl578
- [3176: Eliminate dependency on doctrine/common](doctrine#3176) thanks to @Majkl578
- [3181: Remove dependency on doctrine/common](doctrine#3181) thanks to @Majkl578

# gpg: Signature made Fri Jul 13 06:02:10 2018
# gpg:                using RSA key 374EADAF543AE995
# gpg: Can't check signature: public key not found

# Conflicts:
#	.gitignore
#	README.md
#	lib/Doctrine/DBAL/Version.php
#	tests/appveyor/mssql.sql2008r2sp2.sqlsrv.appveyor.xml
#	tests/appveyor/mssql.sql2012sp1.sqlsrv.appveyor.xml
#	tests/appveyor/mssql.sql2017.pdo_sqlsrv.appveyor.xml
#	tests/appveyor/mssql.sql2017.sqlsrv.appveyor.xml
#	tests/travis/mariadb.mysqli.travis.xml
  • Loading branch information
rgrellmann committed Apr 22, 2020
2 parents e9f992a + 5140a64 commit 1b29f58
Show file tree
Hide file tree
Showing 161 changed files with 3,179 additions and 1,384 deletions.
68 changes: 54 additions & 14 deletions .appveyor.yml
Expand Up @@ -4,38 +4,43 @@ platform:
#matrix:
# fast_finish: true # kills the build at the first failure
clone_folder: C:\projects\dbal
clone_depth: 1
clone_depth: 2

cache:
- C:\ProgramData\chocolatey\bin -> .appveyor.yml
- C:\ProgramData\chocolatey\lib -> .appveyor.yml
- C:\tools\php -> .appveyor.yml
- composer.phar
- '%LOCALAPPDATA%\Composer\files'
#- vendor
- C:\tools\cacert -> .appveyor.yml
- C:\tools\composer -> .appveyor.yml
- C:\tools\ocular -> .appveyor.yml
- '%LOCALAPPDATA%\Composer\files -> composer.json'

## Build matrix for lowest and highest possible targets
environment:
matrix:
- db: mssql
driver: sqlsrv
db_version: sql2008r2sp2
coverage: yes
php: 7.2
- db: mssql
driver: sqlsrv
db_version: sql2012sp1
php: 7.2
coverage: yes
- db: mssql
driver: sqlsrv
db_version: sql2017
coverage: no
php: 7.2
- db: mssql
driver: pdo_sqlsrv
db_version: sql2017
php: 7.2
coverage: yes

init:
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH%
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;C:\tools\composer;C:\tools\ocular;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET ANSICON=121x90 (121x90)

Expand All @@ -54,14 +59,17 @@ install:
copy php.ini-production php.ini
Add-Content php.ini "`n date.timezone=UTC"
Add-Content php.ini "`n extension_dir=ext"
Add-Content php.ini "`n memory_limit=1G"
Add-Content php.ini "`n extension=php_openssl.dll"
Add-Content php.ini "`n extension=php_mbstring.dll"
Add-Content php.ini "`n extension=php_fileinfo.dll"
Add-Content php.ini "`n extension=php_pdo_sqlite.dll"
Add-Content php.ini "`n extension=php_sqlite3.dll"
Add-Content php.ini "`n extension=php_curl.dll"
Add-Content php.ini "`n curl.cainfo=C:\tools\cacert\bundle.pem"
# Get and install the MSSQL DLL's
$DLLVersion = "5.2.0rc1"
$DLLVersion = "5.2.0"
cd c:\tools\php\ext
$source = "https://windows.php.net/downloads/pecl/releases/sqlsrv/$($DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip"
$destination = "c:\tools\php\ext\php_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip"
Expand All @@ -71,22 +79,48 @@ install:
$destination = "c:\tools\php\ext\php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip"
Invoke-WebRequest $source -OutFile $destination
7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip > $null
$DLLVersion = "2.6.0"
$source = "https://xdebug.org/files/php_xdebug-$($DLLVersion)-$($env:php)-vc15-nts-x86_64.dll"
$destination = "c:\tools\php\ext\php_xdebug.dll"
Invoke-WebRequest $source -OutFile $destination
Remove-Item c:\tools\php\* -include .zip
cd c:\tools\php
Add-Content php.ini "`nextension=php_sqlsrv.dll"
Add-Content php.ini "`nextension=php_pdo_sqlsrv.dll"
Add-Content php.ini "`nzend_extension=php_xdebug.dll"
Add-Content php.ini "`n"
cd c:\projects\dbal
# download Composer
if (!(Test-Path C:\tools\composer)) {
New-Item -path c:\tools -name composer -itemtype directory
}
if (!(Test-Path c:\tools\composer\composer.phar)) {
appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar -Filename C:\tools\composer\composer.phar
Set-Content -path 'C:\tools\composer\composer.bat' -Value ('@php C:\tools\composer\composer.phar %*')
}
# download Scrutinizer's Ocular
if (!(Test-Path C:\tools\ocular)) {
New-Item -path c:\tools -name ocular -itemtype directory
}
if (!(Test-Path c:\tools\ocular\ocular.phar)) {
appveyor-retry appveyor DownloadFile https://github.com/scrutinizer-ci/ocular/releases/download/1.5.2/ocular.phar -Filename C:\tools\ocular\ocular.phar
Set-Content -path 'C:\tools\ocular\ocular.bat' -Value ('@php C:\tools\ocular\ocular.phar %*')
}
if (!(Test-Path c:\projects\dbal\composer.phar)) {
appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar
# download CA bundle
if (!(Test-Path C:\tools\cacert)) {
New-Item -path c:\tools\ -name cacert -itemtype directory
}
if (!(Test-Path c:\tools\cacert\bundle.pem)) {
appveyor-retry appveyor DownloadFile https://curl.haxx.se/ca/cacert.pem -Filename C:\tools\cacert\bundle.pem
}
}
# install composer dependencies
- cd C:\projects\dbal
- rm composer.lock
- appveyor-retry php composer.phar self-update
- appveyor-retry php composer.phar install --no-progress --profile
- appveyor-retry composer self-update
- appveyor-retry composer install --no-progress --prefer-dist

before_test:
# Selectively start the services
Expand All @@ -100,8 +134,14 @@ test_script:
- cd C:\projects\dbal
- ps: >-
if ($env:db_version) {
vendor\bin\phpunit -c tests\appveyor\%db%.%db_version%.%driver%.appveyor.xml
$env:phpunit_config = "tests\appveyor\$($env:db).$($env:db_version).$($env:driver).appveyor.xml"
} else {
$env:phpunit_config = "tests\appveyor\$($env:db).$($env:driver).appveyor.xml"
}
else {
vendor\bin\phpunit -c tests\appveyor\%db%.%driver%.appveyor.xml
- ps: >-
if ($env:coverage -eq "yes") {
vendor\bin\phpunit -c $($env:phpunit_config) --coverage-clover clover.xml
appveyor-retry ocular code-coverage:upload --format=php-clover clover.xml
} else {
vendor\bin\phpunit -c $($env:phpunit_config)
}
1 change: 0 additions & 1 deletion .gitattributes
Expand Up @@ -2,7 +2,6 @@
/docs export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.gitmodules export-ignore
.appveyor.yml export-ignore
.travis.yml export-ignore
build.properties export-ignore
Expand Down
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/BC_Break.md
@@ -0,0 +1,37 @@
---
name: 💥 BC Break
about: Have you encountered an issue during upgrade? 💣
---

<!--
Before reporting a BC break, please consult the upgrading document to make sure it's not an expected change: https://github.com/doctrine/dbal/blob/master/UPGRADE.md
-->

### BC Break Report

<!-- Fill in the relevant information below to help triage your issue. -->

| Q | A
|------------ | ------
| BC Break | yes
| Version | x.y.z

#### Summary

<!-- Provide a summary desciribing the problem you are experiencing. -->

#### Previous behavior

<!-- What was the previous (working) behavior? -->

#### Current behavior

<!-- What is the current (broken) behavior? -->

#### How to reproduce

<!--
Provide steps to reproduce the BC break.
If possible, also add a code snippet with relevant configuration, driver/platform information, SQL queries, etc.
Adding a failing Unit or Functional Test would help us a lot - you can submit it in a Pull Request separately, referencing this bug report.
-->
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug.md
@@ -0,0 +1,34 @@
---
name: 🐞 Bug Report
about: Something is broken? 🔨
---

### Bug Report

<!-- Fill in the relevant information below to help triage your issue. -->

| Q | A
|------------ | ------
| BC Break | yes/no
| Version | x.y.z

#### Summary

<!-- Provide a summary desciribing the problem you are experiencing. -->

#### Current behavior

<!-- What is the current (buggy) behavior? -->

#### How to reproduce

<!--
Provide steps to reproduce the bug.
If possible, also add a code snippet with relevant configuration, driver/platform information, SQL queries, etc.
Adding a failing Unit or Functional Test would help us a lot - you can submit one in a Pull Request separately, referencing this bug report.
-->

#### Expected behavior

<!-- What was the expected (correct) behavior? -->

18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_Request.md
@@ -0,0 +1,18 @@
---
name: 🎉 Feature Request
about: You have a neat idea that should be implemented? 🎩
---

### Feature Request

<!-- Fill in the relevant information below to help triage your issue. -->

| Q | A
|------------ | ------
| New Feature | yes
| RFC | yes/no
| BC Break | yes/no

#### Summary

<!-- Provide a summary of the feature you would like to see implemented. -->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/Support_Question.md
@@ -0,0 +1,20 @@
---
name: ❓ Support Question
about: Have a problem that you can't figure out? 🤔
---

<!-- Fill in the relevant information below to help triage your issue. -->

| Q | A
|------------ | -----
| Version | x.y.z

<!--
Before asking question here, please try asking on Gitter or Slack first.
Find out more about Doctrine support channels here: https://www.doctrine-project.org/community/
Keep in mind that GitHub is primarily an issue tracker.
-->

### Support Question

<!-- Describe the issue you are facing here. -->
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,11 @@
<!-- Fill in the relevant information below to help triage your pull request. -->

| Q | A
|------------- | -----------
| Type | bug/feature/improvement
| BC Break | yes/no
| Fixed issues | <!-- use #NUM format to reference an issue -->

#### Summary

<!-- Provide a summary your change. -->
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -7,5 +7,6 @@ vendor/
*.phpunit.xml
/phpunit.xml
/.phpcs-cache
/phpstan.neon
composer.lock
.idea/
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

1 change: 1 addition & 0 deletions .scrutinizer.yml
Expand Up @@ -21,6 +21,7 @@ before_commands:
tools:
external_code_coverage:
timeout: 3600
runs: 22 # 18x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes) + 1x ContinuousPHP

filter:
excluded_paths:
Expand Down

0 comments on commit 1b29f58

Please sign in to comment.