Skip to content

Commit 1b29f58

Browse files
committed
Merge tag 'v2.8.0' into oracle122
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
2 parents e9f992a + 5140a64 commit 1b29f58

File tree

161 files changed

+3179
-1384
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+3179
-1384
lines changed

.appveyor.yml

+54-14
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,43 @@ platform:
44
#matrix:
55
# fast_finish: true # kills the build at the first failure
66
clone_folder: C:\projects\dbal
7-
clone_depth: 1
7+
clone_depth: 2
88

99
cache:
1010
- C:\ProgramData\chocolatey\bin -> .appveyor.yml
1111
- C:\ProgramData\chocolatey\lib -> .appveyor.yml
1212
- C:\tools\php -> .appveyor.yml
13-
- composer.phar
14-
- '%LOCALAPPDATA%\Composer\files'
15-
#- vendor
13+
- C:\tools\cacert -> .appveyor.yml
14+
- C:\tools\composer -> .appveyor.yml
15+
- C:\tools\ocular -> .appveyor.yml
16+
- '%LOCALAPPDATA%\Composer\files -> composer.json'
1617

1718
## Build matrix for lowest and highest possible targets
1819
environment:
1920
matrix:
2021
- db: mssql
2122
driver: sqlsrv
2223
db_version: sql2008r2sp2
24+
coverage: yes
2325
php: 7.2
2426
- db: mssql
2527
driver: sqlsrv
2628
db_version: sql2012sp1
2729
php: 7.2
30+
coverage: yes
2831
- db: mssql
2932
driver: sqlsrv
3033
db_version: sql2017
34+
coverage: no
3135
php: 7.2
3236
- db: mssql
3337
driver: pdo_sqlsrv
3438
db_version: sql2017
3539
php: 7.2
40+
coverage: yes
3641

3742
init:
38-
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH%
43+
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;C:\tools\composer;C:\tools\ocular;%PATH%
3944
- SET COMPOSER_NO_INTERACTION=1
4045
- SET ANSICON=121x90 (121x90)
4146

@@ -54,14 +59,17 @@ install:
5459
copy php.ini-production php.ini
5560
Add-Content php.ini "`n date.timezone=UTC"
5661
Add-Content php.ini "`n extension_dir=ext"
62+
Add-Content php.ini "`n memory_limit=1G"
5763
Add-Content php.ini "`n extension=php_openssl.dll"
5864
Add-Content php.ini "`n extension=php_mbstring.dll"
5965
Add-Content php.ini "`n extension=php_fileinfo.dll"
6066
Add-Content php.ini "`n extension=php_pdo_sqlite.dll"
6167
Add-Content php.ini "`n extension=php_sqlite3.dll"
68+
Add-Content php.ini "`n extension=php_curl.dll"
69+
Add-Content php.ini "`n curl.cainfo=C:\tools\cacert\bundle.pem"
6270
6371
# Get and install the MSSQL DLL's
64-
$DLLVersion = "5.2.0rc1"
72+
$DLLVersion = "5.2.0"
6573
cd c:\tools\php\ext
6674
$source = "https://windows.php.net/downloads/pecl/releases/sqlsrv/$($DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip"
6775
$destination = "c:\tools\php\ext\php_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip"
@@ -71,22 +79,48 @@ install:
7179
$destination = "c:\tools\php\ext\php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip"
7280
Invoke-WebRequest $source -OutFile $destination
7381
7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip > $null
82+
$DLLVersion = "2.6.0"
83+
$source = "https://xdebug.org/files/php_xdebug-$($DLLVersion)-$($env:php)-vc15-nts-x86_64.dll"
84+
$destination = "c:\tools\php\ext\php_xdebug.dll"
85+
Invoke-WebRequest $source -OutFile $destination
7486
Remove-Item c:\tools\php\* -include .zip
7587
cd c:\tools\php
7688
Add-Content php.ini "`nextension=php_sqlsrv.dll"
7789
Add-Content php.ini "`nextension=php_pdo_sqlsrv.dll"
90+
Add-Content php.ini "`nzend_extension=php_xdebug.dll"
7891
Add-Content php.ini "`n"
7992
80-
cd c:\projects\dbal
93+
# download Composer
94+
if (!(Test-Path C:\tools\composer)) {
95+
New-Item -path c:\tools -name composer -itemtype directory
96+
}
97+
if (!(Test-Path c:\tools\composer\composer.phar)) {
98+
appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar -Filename C:\tools\composer\composer.phar
99+
Set-Content -path 'C:\tools\composer\composer.bat' -Value ('@php C:\tools\composer\composer.phar %*')
100+
}
101+
102+
# download Scrutinizer's Ocular
103+
if (!(Test-Path C:\tools\ocular)) {
104+
New-Item -path c:\tools -name ocular -itemtype directory
105+
}
106+
if (!(Test-Path c:\tools\ocular\ocular.phar)) {
107+
appveyor-retry appveyor DownloadFile https://github.com/scrutinizer-ci/ocular/releases/download/1.5.2/ocular.phar -Filename C:\tools\ocular\ocular.phar
108+
Set-Content -path 'C:\tools\ocular\ocular.bat' -Value ('@php C:\tools\ocular\ocular.phar %*')
109+
}
81110
82-
if (!(Test-Path c:\projects\dbal\composer.phar)) {
83-
appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar
111+
# download CA bundle
112+
if (!(Test-Path C:\tools\cacert)) {
113+
New-Item -path c:\tools\ -name cacert -itemtype directory
114+
}
115+
if (!(Test-Path c:\tools\cacert\bundle.pem)) {
116+
appveyor-retry appveyor DownloadFile https://curl.haxx.se/ca/cacert.pem -Filename C:\tools\cacert\bundle.pem
84117
}
85118
}
86119
# install composer dependencies
120+
- cd C:\projects\dbal
87121
- rm composer.lock
88-
- appveyor-retry php composer.phar self-update
89-
- appveyor-retry php composer.phar install --no-progress --profile
122+
- appveyor-retry composer self-update
123+
- appveyor-retry composer install --no-progress --prefer-dist
90124

91125
before_test:
92126
# Selectively start the services
@@ -100,8 +134,14 @@ test_script:
100134
- cd C:\projects\dbal
101135
- ps: >-
102136
if ($env:db_version) {
103-
vendor\bin\phpunit -c tests\appveyor\%db%.%db_version%.%driver%.appveyor.xml
137+
$env:phpunit_config = "tests\appveyor\$($env:db).$($env:db_version).$($env:driver).appveyor.xml"
138+
} else {
139+
$env:phpunit_config = "tests\appveyor\$($env:db).$($env:driver).appveyor.xml"
104140
}
105-
else {
106-
vendor\bin\phpunit -c tests\appveyor\%db%.%driver%.appveyor.xml
141+
- ps: >-
142+
if ($env:coverage -eq "yes") {
143+
vendor\bin\phpunit -c $($env:phpunit_config) --coverage-clover clover.xml
144+
appveyor-retry ocular code-coverage:upload --format=php-clover clover.xml
145+
} else {
146+
vendor\bin\phpunit -c $($env:phpunit_config)
107147
}

.gitattributes

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/docs export-ignore
33
.gitattributes export-ignore
44
.gitignore export-ignore
5-
.gitmodules export-ignore
65
.appveyor.yml export-ignore
76
.travis.yml export-ignore
87
build.properties export-ignore

.github/ISSUE_TEMPLATE/BC_Break.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: 💥 BC Break
3+
about: Have you encountered an issue during upgrade? 💣
4+
---
5+
6+
<!--
7+
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
8+
-->
9+
10+
### BC Break Report
11+
12+
<!-- Fill in the relevant information below to help triage your issue. -->
13+
14+
| Q | A
15+
|------------ | ------
16+
| BC Break | yes
17+
| Version | x.y.z
18+
19+
#### Summary
20+
21+
<!-- Provide a summary desciribing the problem you are experiencing. -->
22+
23+
#### Previous behavior
24+
25+
<!-- What was the previous (working) behavior? -->
26+
27+
#### Current behavior
28+
29+
<!-- What is the current (broken) behavior? -->
30+
31+
#### How to reproduce
32+
33+
<!--
34+
Provide steps to reproduce the BC break.
35+
If possible, also add a code snippet with relevant configuration, driver/platform information, SQL queries, etc.
36+
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.
37+
-->

.github/ISSUE_TEMPLATE/Bug.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: 🐞 Bug Report
3+
about: Something is broken? 🔨
4+
---
5+
6+
### Bug Report
7+
8+
<!-- Fill in the relevant information below to help triage your issue. -->
9+
10+
| Q | A
11+
|------------ | ------
12+
| BC Break | yes/no
13+
| Version | x.y.z
14+
15+
#### Summary
16+
17+
<!-- Provide a summary desciribing the problem you are experiencing. -->
18+
19+
#### Current behavior
20+
21+
<!-- What is the current (buggy) behavior? -->
22+
23+
#### How to reproduce
24+
25+
<!--
26+
Provide steps to reproduce the bug.
27+
If possible, also add a code snippet with relevant configuration, driver/platform information, SQL queries, etc.
28+
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.
29+
-->
30+
31+
#### Expected behavior
32+
33+
<!-- What was the expected (correct) behavior? -->
34+
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: 🎉 Feature Request
3+
about: You have a neat idea that should be implemented? 🎩
4+
---
5+
6+
### Feature Request
7+
8+
<!-- Fill in the relevant information below to help triage your issue. -->
9+
10+
| Q | A
11+
|------------ | ------
12+
| New Feature | yes
13+
| RFC | yes/no
14+
| BC Break | yes/no
15+
16+
#### Summary
17+
18+
<!-- Provide a summary of the feature you would like to see implemented. -->
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: ❓ Support Question
3+
about: Have a problem that you can't figure out? 🤔
4+
---
5+
6+
<!-- Fill in the relevant information below to help triage your issue. -->
7+
8+
| Q | A
9+
|------------ | -----
10+
| Version | x.y.z
11+
12+
<!--
13+
Before asking question here, please try asking on Gitter or Slack first.
14+
Find out more about Doctrine support channels here: https://www.doctrine-project.org/community/
15+
Keep in mind that GitHub is primarily an issue tracker.
16+
-->
17+
18+
### Support Question
19+
20+
<!-- Describe the issue you are facing here. -->

.github/PULL_REQUEST_TEMPLATE.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Fill in the relevant information below to help triage your pull request. -->
2+
3+
| Q | A
4+
|------------- | -----------
5+
| Type | bug/feature/improvement
6+
| BC Break | yes/no
7+
| Fixed issues | <!-- use #NUM format to reference an issue -->
8+
9+
#### Summary
10+
11+
<!-- Provide a summary your change. -->

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ vendor/
77
*.phpunit.xml
88
/phpunit.xml
99
/.phpcs-cache
10+
/phpstan.neon
1011
composer.lock
1112
.idea/

.gitmodules

-3
This file was deleted.

.scrutinizer.yml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ before_commands:
2121
tools:
2222
external_code_coverage:
2323
timeout: 3600
24+
runs: 22 # 18x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes) + 1x ContinuousPHP
2425

2526
filter:
2627
excluded_paths:

0 commit comments

Comments
 (0)