Skip to content

Commit 7973eb4

Browse files
committed
Merge branch '4.3.x' into 5.0.x
2 parents c4ae845 + 3cb172a commit 7973eb4

32 files changed

+851
-139
lines changed

.appveyor.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ environment:
2727
- db: mssql
2828
driver: sqlsrv
2929
db_version: sql2017
30-
php: 8.1
30+
php: 8.3
3131
- db: mssql
3232
driver: pdo_sqlsrv
3333
db_version: sql2017
34-
php: 8.1
34+
php: 8.3
3535

3636
init:
3737
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;C:\tools\composer;%PATH%
@@ -64,18 +64,19 @@ install:
6464
Add-Content php.ini "`n extension=php_sqlite3.dll"
6565
Add-Content php.ini "`n extension=php_curl.dll"
6666
67-
$DLLVersion = "5.10.0"
67+
$DLLVersion = "5.12.0"
68+
$VSVersion = "vs16"
6869
cd c:\tools\php\ext
69-
$source = "https://windows.php.net/downloads/pecl/releases/sqlsrv/$($DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php)-nts-vs16-x64.zip"
70-
$destination = "c:\tools\php\ext\php_sqlsrv-$($DLLVersion)-$($env:php)-nts-vs16-x64.zip"
70+
$source = "https://downloads.php.net/~windows/pecl/releases/sqlsrv/$($DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php)-nts-$($VSVersion)-x64.zip"
71+
$destination = "c:\tools\php\ext\php_sqlsrv-$($DLLVersion)-$($env:php)-nts-$($VSVersion)-x64.zip"
7172
Invoke-WebRequest $source -OutFile $destination
72-
7z x -y php_sqlsrv-$($DLLVersion)-$($env:php)-nts-vs16-x64.zip > $null
73-
$source = "https://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vs16-x64.zip"
74-
$destination = "c:\tools\php\ext\php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vs16-x64.zip"
73+
7z x -y php_sqlsrv-$($DLLVersion)-$($env:php)-nts-$($VSVersion)-x64.zip > $null
74+
$source = "https://downloads.php.net/~windows/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-$($VSVersion)-x64.zip"
75+
$destination = "c:\tools\php\ext\php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-$($VSVersion)-x64.zip"
7576
Invoke-WebRequest $source -OutFile $destination
76-
7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vs16-x64.zip > $null
77+
7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-$($VSVersion)-x64.zip > $null
7778
$DLLVersion = (Invoke-WebRequest "https://pecl.php.net/rest/r/pcov/stable.txt").Content
78-
Invoke-WebRequest https://downloads.php.net/~windows/pecl/releases/pcov/$($DLLVersion)/php_pcov-$($DLLVersion)-$($env:php)-nts-vs16-$($env:platform).zip -OutFile pcov.zip
79+
Invoke-WebRequest https://downloads.php.net/~windows/pecl/releases/pcov/$($DLLVersion)/php_pcov-$($DLLVersion)-$($env:php)-nts-$($VSVersion)-$($env:platform).zip -OutFile pcov.zip
7980
7z x -y pcov.zip > $null
8081
Remove-Item c:\tools\php\* -include .zip
8182
cd c:\tools\php

.github/workflows/continuous-integration.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- "pdo_sqlite"
4747
include:
4848
- os: "ubuntu-20.04"
49-
php-version: "8.1"
49+
php-version: "8.3"
5050
dependencies: "lowest"
5151
extension: "pdo_sqlite"
5252
- os: "ubuntu-22.04"
@@ -106,7 +106,7 @@ jobs:
106106
- "21"
107107
- "23"
108108
include:
109-
- php-version: "8.1"
109+
- php-version: "8.3"
110110
oracle-version: "23"
111111
- php-version: "8.5"
112112
oracle-version: "23"
@@ -166,7 +166,7 @@ jobs:
166166
- "21"
167167
- "23"
168168
include:
169-
- php-version: "8.1"
169+
- php-version: "8.3"
170170
oracle-version: "23"
171171
- php-version: "8.5"
172172
oracle-version: "23"
@@ -231,10 +231,10 @@ jobs:
231231
- "pgsql"
232232
- "pdo_pgsql"
233233
include:
234-
- php-version: "8.1"
234+
- php-version: "8.3"
235235
postgres-version: "17"
236236
extension: "pgsql"
237-
- php-version: "8.1"
237+
- php-version: "8.3"
238238
postgres-version: "17"
239239
extension: "pdo_pgsql"
240240
- php-version: "8.5"
@@ -308,10 +308,10 @@ jobs:
308308
- "mysqli"
309309
- "pdo_mysql"
310310
include:
311-
- php-version: "8.1"
311+
- php-version: "8.3"
312312
mariadb-version: "11.4"
313313
extension: "mysqli"
314-
- php-version: "8.1"
314+
- php-version: "8.3"
315315
mariadb-version: "11.4"
316316
extension: "pdo_mysql"
317317
- php-version: "8.5"
@@ -381,10 +381,10 @@ jobs:
381381
- ""
382382
include:
383383
- config-file-suffix: "-tls"
384-
php-version: "8.1"
384+
php-version: "8.3"
385385
mysql-version: "9.1"
386386
extension: "mysqli"
387-
- php-version: "8.1"
387+
- php-version: "8.3"
388388
mysql-version: "9.1"
389389
extension: "mysqli"
390390
- php-version: "8.5"
@@ -447,7 +447,7 @@ jobs:
447447
strategy:
448448
matrix:
449449
php-version:
450-
- "8.1"
450+
- "8.3"
451451
- "8.4"
452452
- "8.5"
453453
extension:
@@ -457,10 +457,10 @@ jobs:
457457
- "Latin1_General_100_CI_AS_SC_UTF8"
458458
include:
459459
- collation: "Latin1_General_100_CS_AS_SC_UTF8"
460-
php-version: "8.1"
460+
php-version: "8.3"
461461
extension: "sqlsrv"
462462
- collation: "Latin1_General_100_CS_AS_SC_UTF8"
463-
php-version: "8.1"
463+
php-version: "8.3"
464464
extension: "pdo_sqlsrv"
465465

466466
services:
@@ -514,7 +514,7 @@ jobs:
514514
strategy:
515515
matrix:
516516
php-version:
517-
- "8.1"
517+
- "8.3"
518518
- "8.4"
519519
- "8.5"
520520

@@ -582,7 +582,7 @@ jobs:
582582
strategy:
583583
matrix:
584584
php-version:
585-
- "8.1"
585+
- "8.3"
586586

587587
steps:
588588
- name: "Checkout"

UPGRADE.md

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,34 @@ all drivers and middleware.
243243

244244
# Upgrade to 4.3
245245

246+
## Deprecated `Index` methods, properties and behavior
247+
248+
The following `Index` methods and properties have been deprecated:
249+
250+
- `Index::getColumns()`, `Index::getQuotedColumns()`, `Index::getUnquotedColumns()`,
251+
`Index::$_columns` – use `Index::getIndexedColumns()` instead.
252+
- `Index::isSimpleIndex()`, `Index::isUnique()`, `Index::$_isUnique` – use `Index::getType()` and compare with
253+
`IndexType::REGULAR` or `IndexType::UNIQUE` instead.
254+
- `Index::addFlag()`, `Index::removeFlag()`, `Index::getFlags()`, `Index::hasFlag()`, `Index::$_flags` – use
255+
`IndexEditor::setType()`, `Index::getType()`, `IndexEditor::setIsClustered()` and `Index::isClustered()` instead.
256+
- `Index::getOption()`, `Index::hasOption()` and `Index::getOptions()` – use `Index::getIndexedColumns()` and
257+
`Index::getPredicate()` instead.
258+
- `Index::overrules()`, `Index::hasColumnAtPosition()` – no replacement provided.
259+
- `AbstractPlatform::supportsColumnLengthIndexes()` – no replacement provided.
260+
261+
Additionally,
262+
1. Instantiation of an index without columns is deprecated.
263+
2. The `Index::spansColumns()` method has been marked as internal.
264+
3. Passing an empty string as partial index predicate has been deprecated.
265+
4. The `Index` constructor has been marked as internal. Use `Index::editor()` to instantiate an editor and
266+
`IndexEditor::create()` to create an index.
267+
268+
The following conflicting index configurations have been deprecated:
269+
1. Spatial index with column lengths specified.
270+
2. Clustered fulltext or spatial index.
271+
3. Partial fulltext or spatial index.
272+
4. Clustered partial index.
273+
246274
## Deprecated features related to primary key constraints
247275

248276
1. The `AbstractPlatform::getCreatePrimaryKeySQL()` method has been deprecated. Use the schema manager to create and
@@ -279,9 +307,12 @@ of the primary key constraint is deprecated. Instead, drop the auto-increment at
279307
Passing a non-empty `$modifiedIndexes` value to the `TableDiff` constructor is deprecated. Instead, pass dropped
280308
indexes via `$droppedIndexes` and added indexes via `$addedIndexes`.
281309

282-
The `TableDiff::getModifiedIndexes()` method has been deprecated. The old version of the index is included in the return
283-
value of `TableDiff::getDroppedIndexes()`, the new version is included in the return value of
284-
`TableDiff::getAddedIndexes()`.
310+
Detection of modified indexes is deprecated. Please disable it by configuring the comparator using
311+
`ComparatorConfig::withReportModifiedIndexes(false)`. With this configuration, the old version of the index will be
312+
included in the return value of `TableDiff::getDroppedIndexes()`, and the new version will be included in the return
313+
value of `TableDiff::getAddedIndexes()`.
314+
315+
The `TableDiff::getModifiedIndexes()` method has been deprecated.
285316

286317
## Deprecated handling of modified foreign keys in `TableDiff`
287318

@@ -364,7 +395,7 @@ the `Schema` class itself.
364395

365396
## Deprecated `ForeignKeyConstraint` methods, properties and behavior
366397

367-
The following `ForeignKeyConstraint` methods and property have been deprecated:
398+
The following `ForeignKeyConstraint` methods and properties have been deprecated:
368399

369400
- `ForeignKeyConstraint::getForeignTableName()`, `ForeignKeyConstraint::getQuotedForeignTableName()`,
370401
`ForeignKeyConstraint::getUnqualifiedForeignTableName()`, `ForeignKeyConstraint::$_foreignTableName` – use

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
{"name": "Jonathan Wage", "email": "[email protected]"}
3232
],
3333
"require": {
34-
"php": "^8.1",
34+
"php": "^8.3",
3535
"doctrine/deprecations": "^0.5.3|^1",
3636
"psr/cache": "^1|^2|^3",
3737
"psr/log": "^1|^2|^3"
@@ -41,9 +41,9 @@
4141
"fig/log-test": "^1",
4242
"jetbrains/phpstorm-stubs": "2023.2",
4343
"phpstan/phpstan": "2.1.1",
44-
"phpstan/phpstan-phpunit": "2.0.3",
44+
"phpstan/phpstan-phpunit": "2.0.6",
4545
"phpstan/phpstan-strict-rules": "^2",
46-
"phpunit/phpunit": "10.5.39",
46+
"phpunit/phpunit": "11.5.15",
4747
"slevomat/coding-standard": "8.13.1",
4848
"squizlabs/php_codesniffer": "3.10.2",
4949
"symfony/cache": "^6.3.8|^7.0",

phpcs.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<!-- Show progress of the run and show sniff names -->
1313
<arg value="ps"/>
1414

15-
<config name="php_version" value="80100"/>
15+
<config name="php_version" value="80300"/>
1616

1717
<file>src</file>
1818
<file>tests</file>

src/Configuration.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,12 @@ public function setSchemaManagerFactory(SchemaManagerFactory $schemaManagerFacto
134134
return $this;
135135
}
136136

137-
/** @return true */
138137
public function getDisableTypeComments(): bool
139138
{
140139
return true;
141140
}
142141

143-
/**
144-
* @param true $disableTypeComments
145-
*
146-
* @return $this
147-
*/
142+
/** @return $this */
148143
public function setDisableTypeComments(bool $disableTypeComments): self
149144
{
150145
if (! $disableTypeComments) {

src/Driver/PgSQL/Exception/UnexpectedValue.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ public static function new(string $value, string $type): self
2020
));
2121
}
2222

23-
/** @return null */
24-
public function getSQLState(): string|null
23+
public function getSQLState(): null
2524
{
2625
return null;
2726
}

src/Platforms/AbstractMySQLPlatform.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Doctrine\DBAL\Schema\TableDiff;
1717
use Doctrine\DBAL\TransactionIsolationLevel;
1818
use Doctrine\DBAL\Types\Types;
19+
use Doctrine\Deprecations\Deprecation;
1920

2021
use function array_map;
2122
use function array_merge;
@@ -663,8 +664,16 @@ public function getDefaultTransactionIsolationLevel(): TransactionIsolationLevel
663664
return TransactionIsolationLevel::REPEATABLE_READ;
664665
}
665666

667+
/** @deprecated */
666668
public function supportsColumnLengthIndexes(): bool
667669
{
670+
Deprecation::triggerIfCalledFromOutside(
671+
'doctrine/dbal',
672+
'https://github.com/doctrine/dbal/pull/6886',
673+
'%s is deprecated.',
674+
__METHOD__,
675+
);
676+
668677
return true;
669678
}
670679

src/Platforms/AbstractPlatform.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
use Doctrine\DBAL\Types\Exception\TypeNotFound;
4545
use Doctrine\DBAL\Types\Exception\TypesException;
4646
use Doctrine\DBAL\Types\Type;
47+
use Doctrine\Deprecations\Deprecation;
4748

4849
use function addcslashes;
4950
use function array_map;
@@ -1850,9 +1851,18 @@ protected function supportsPartialIndexes(): bool
18501851

18511852
/**
18521853
* Whether the platform supports indexes with column length definitions.
1854+
*
1855+
* @deprecated
18531856
*/
18541857
public function supportsColumnLengthIndexes(): bool
18551858
{
1859+
Deprecation::triggerIfCalledFromOutside(
1860+
'doctrine/dbal',
1861+
'https://github.com/doctrine/dbal/pull/6886',
1862+
'%s is deprecated.',
1863+
__METHOD__,
1864+
);
1865+
18561866
return false;
18571867
}
18581868

src/Platforms/SQLitePlatform.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
use function strpos;
4040
use function strtolower;
4141
use function substr;
42-
use function trim;
4342

4443
/**
4544
* The SQLitePlatform class describes the specifics and dialects of the SQLite
@@ -292,9 +291,7 @@ protected function _getCreateTableSQL(OptionallyQualifiedName $tableName, array
292291

293292
$tableComment = '';
294293
if (isset($parameters['comment'])) {
295-
$comment = trim($parameters['comment'], " '");
296-
297-
$tableComment = $this->getInlineTableCommentSQL($comment);
294+
$tableComment = $this->getInlineTableCommentSQL($parameters['comment']);
298295
}
299296

300297
$query = [

0 commit comments

Comments
 (0)