Skip to content

Commit dc4ad2a

Browse files
committed
Drop support for PHP 7.3
1 parent f3a70f3 commit dc4ad2a

File tree

156 files changed

+370
-673
lines changed

Some content is hidden

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

156 files changed

+370
-673
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@ jobs:
2222
strategy:
2323
matrix:
2424
php-version:
25-
- "7.3"
2625
- "7.4"
2726
- "8.0"
2827
dependencies:
2928
- "highest"
3029
include:
3130
- dependencies: "lowest"
32-
php-version: "7.3"
31+
php-version: "7.4"
3332

3433
steps:
3534
- name: "Checkout"
@@ -280,12 +279,12 @@ jobs:
280279
config-file-suffix:
281280
- ""
282281
include:
283-
- php-version: "7.3"
282+
- php-version: "7.4"
284283
mysql-version: "8.0"
285284
extension: "mysqli"
286285
custom-entrypoint: >-
287286
--entrypoint sh mysql:8 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
288-
- php-version: "7.3"
287+
- php-version: "7.4"
289288
mysql-version: "8.0"
290289
extension: "pdo_mysql"
291290
custom-entrypoint: >-
@@ -361,7 +360,6 @@ jobs:
361360
strategy:
362361
matrix:
363362
php-version:
364-
- "7.3"
365363
- "7.4"
366364
- "8.0"
367365
extension:
@@ -426,7 +424,6 @@ jobs:
426424
strategy:
427425
matrix:
428426
php-version:
429-
- "7.3"
430427
- "7.4"
431428

432429
services:

composer.json

Lines changed: 2 additions & 2 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": "^7.3 || ^8.0",
34+
"php": "^7.4 || ^8.0",
3535
"composer/package-versions-deprecated": "^1.11.99",
3636
"doctrine/deprecations": "^0.5.3",
3737
"doctrine/event-manager": "^1.0",
@@ -56,7 +56,7 @@
5656
"bin": ["bin/doctrine-dbal"],
5757
"config": {
5858
"platform": {
59-
"php": "7.3.0"
59+
"php": "7.4.0"
6060
},
6161
"sort-packages": true
6262
},

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="70300"/>
15+
<config name="php_version" value="70400"/>
1616

1717
<file>bin</file>
1818
<file>src</file>

src/Cache/ArrayResult.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@
1717
final class ArrayResult implements Result
1818
{
1919
/** @var mixed[] */
20-
private $data;
20+
private array $data;
2121

22-
/** @var int */
23-
private $columnCount = 0;
22+
private int $columnCount = 0;
2423

25-
/** @var int */
26-
private $num = 0;
24+
private int $num = 0;
2725

2826
/**
2927
* @param mixed[] $data

src/Cache/CachingResult.php

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,18 @@
2828
*/
2929
final class CachingResult implements DriverResult
3030
{
31-
/** @var CacheItemPoolInterface */
32-
private $cache;
31+
private CacheItemPoolInterface $cache;
3332

34-
/** @var string */
35-
private $cacheKey;
33+
private string $cacheKey;
3634

37-
/** @var string */
38-
private $realKey;
35+
private string $realKey;
3936

40-
/** @var int */
41-
private $lifetime;
37+
private int $lifetime;
4238

43-
/** @var Result */
44-
private $result;
39+
private Result $result;
4540

4641
/** @var array<int,array<string,mixed>>|null */
47-
private $data;
42+
private ?array $data = null;
4843

4944
public function __construct(
5045
Result $result,

src/Cache/QueryCacheProfile.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,11 @@
1919
*/
2020
class QueryCacheProfile
2121
{
22-
/** @var CacheItemPoolInterface|null */
23-
private $resultCache;
22+
private ?CacheItemPoolInterface $resultCache = null;
2423

25-
/** @var int */
26-
private $lifetime = 0;
24+
private int $lifetime = 0;
2725

28-
/** @var string|null */
29-
private $cacheKey;
26+
private ?string $cacheKey = null;
3027

3128
public function __construct(
3229
int $lifetime = 0,

src/Configuration.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,17 @@
1515
class Configuration
1616
{
1717
/** @var Middleware[] */
18-
private $middlewares = [];
18+
private array $middlewares = [];
1919

2020
/**
2121
* The SQL logger in use. If null, SQL logging is disabled.
22-
*
23-
* @var SQLLogger|null
2422
*/
25-
protected $sqlLogger;
23+
protected ?SQLLogger $sqlLogger = null;
2624

2725
/**
2826
* The cache driver implementation that is used for query result caching.
29-
*
30-
* @var CacheItemPoolInterface|null
3127
*/
32-
private $resultCache;
28+
private ?CacheItemPoolInterface $resultCache = null;
3329

3430
/**
3531
* The callable to use to filter schema assets.
@@ -40,10 +36,8 @@ class Configuration
4036

4137
/**
4238
* The default auto-commit mode for connections.
43-
*
44-
* @var bool
4539
*/
46-
protected $autoCommit = true;
40+
protected bool $autoCommit = true;
4741

4842
/**
4943
* Sets the SQL logger to use.

src/Connection.php

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -68,44 +68,32 @@ class Connection
6868

6969
/**
7070
* The wrapped driver connection.
71-
*
72-
* @var \Doctrine\DBAL\Driver\Connection|null
7371
*/
74-
protected $_conn;
72+
protected ?DriverConnection $_conn = null;
7573

76-
/** @var Configuration */
77-
protected $_config;
74+
protected Configuration $_config;
7875

79-
/** @var EventManager */
80-
protected $_eventManager;
76+
protected EventManager $_eventManager;
8177

8278
/**
8379
* The current auto-commit mode of this connection.
84-
*
85-
* @var bool
8680
*/
87-
private $autoCommit = true;
81+
private bool $autoCommit = true;
8882

8983
/**
9084
* The transaction nesting level.
91-
*
92-
* @var int
9385
*/
94-
private $transactionNestingLevel = 0;
86+
private int $transactionNestingLevel = 0;
9587

9688
/**
9789
* The currently active transaction isolation level or NULL before it has been determined.
98-
*
99-
* @var int|null
10090
*/
101-
private $transactionIsolationLevel;
91+
private ?int $transactionIsolationLevel = null;
10292

10393
/**
10494
* If nested transactions should use savepoints.
105-
*
106-
* @var bool
10795
*/
108-
private $nestTransactionsWithSavepoints = false;
96+
private bool $nestTransactionsWithSavepoints = false;
10997

11098
/**
11199
* The parameters used during creation of the Connection instance.
@@ -114,34 +102,26 @@ class Connection
114102
* @phpstan-var array<string,mixed>
115103
* @psalm-var Params
116104
*/
117-
private $params;
105+
private array $params;
118106

119107
/**
120108
* The database platform object used by the connection or NULL before it's initialized.
121-
*
122-
* @var AbstractPlatform|null
123109
*/
124-
private $platform;
110+
private ?AbstractPlatform $platform = null;
125111

126-
/** @var ExceptionConverter|null */
127-
private $exceptionConverter;
112+
private ?ExceptionConverter $exceptionConverter = null;
128113

129-
/** @var Parser|null */
130-
private $parser;
114+
private ?Parser $parser = null;
131115

132116
/**
133117
* The used DBAL driver.
134-
*
135-
* @var Driver
136118
*/
137-
protected $_driver;
119+
protected Driver $_driver;
138120

139121
/**
140122
* Flag that indicates whether the current transaction is marked for rollback only.
141-
*
142-
* @var bool
143123
*/
144-
private $isRollbackOnly = false;
124+
private bool $isRollbackOnly = false;
145125

146126
/**
147127
* Initializes a new instance of the Connection class.

src/Connections/PrimaryReadReplicaConnection.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,13 @@ class PrimaryReadReplicaConnection extends Connection
8282
*
8383
* @var array<string, DriverConnection|null>
8484
*/
85-
protected $connections = ['primary' => null, 'replica' => null];
85+
protected array $connections = ['primary' => null, 'replica' => null];
8686

8787
/**
8888
* You can keep the replica connection and then switch back to it
8989
* during the request if you know what you are doing.
90-
*
91-
* @var bool
9290
*/
93-
protected $keepReplica = false;
91+
protected bool $keepReplica = false;
9492

9593
/**
9694
* Creates Primary Replica Connection.

src/Driver/AbstractException.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ abstract class AbstractException extends BaseException implements Exception
1616
{
1717
/**
1818
* The SQLSTATE of the driver.
19-
*
20-
* @var string|null
2119
*/
22-
private $sqlState;
20+
private ?string $sqlState = null;
2321

2422
/**
2523
* @param string $message The driver error message.

src/Driver/AbstractOracleDriver/EasyConnectString.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
*/
1616
final class EasyConnectString
1717
{
18-
/** @var string */
19-
private $string;
18+
private string $string;
2019

2120
private function __construct(string $string)
2221
{

src/Driver/IBMDB2/DataSourceName.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
*/
1414
final class DataSourceName
1515
{
16-
/** @var string */
17-
private $string;
16+
private string $string;
1817

1918
private function __construct(string $string)
2019
{

src/Driver/IBMDB2/Statement.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ final class Statement implements StatementInterface
3838
private $stmt;
3939

4040
/** @var mixed[] */
41-
private $bindParam = [];
41+
private array $bindParam = [];
4242

4343
/**
4444
* Map of LOB parameter positions to the tuples containing reference to the variable bound to the driver statement
4545
* and the temporary file handle bound to the underlying statement
4646
*
4747
* @var mixed[][]
4848
*/
49-
private $lobs = [];
49+
private array $lobs = [];
5050

5151
/**
5252
* @internal The statement can be only instantiated by its driver connection.

src/Driver/Mysqli/Connection.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ final class Connection implements ServerInfoAwareConnection
2727
*/
2828
public const OPTION_FLAGS = 'flags';
2929

30-
/** @var mysqli */
31-
private $conn;
30+
private mysqli $conn;
3231

3332
/**
3433
* @internal The connection can be only instantiated by its driver.

src/Driver/Mysqli/Initializer/Charset.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
final class Charset implements Initializer
1212
{
13-
/** @var string */
14-
private $charset;
13+
private string $charset;
1514

1615
public function __construct(string $charset)
1716
{

src/Driver/Mysqli/Initializer/Options.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
final class Options implements Initializer
1414
{
1515
/** @var array<int,mixed> */
16-
private $options;
16+
private array $options;
1717

1818
/**
1919
* @param array<int,mixed> $options

src/Driver/Mysqli/Initializer/Secure.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,15 @@
99

1010
final class Secure implements Initializer
1111
{
12-
/** @var string */
13-
private $key;
12+
private string $key;
1413

15-
/** @var string */
16-
private $cert;
14+
private string $cert;
1715

18-
/** @var string */
19-
private $ca;
16+
private string $ca;
2017

21-
/** @var string */
22-
private $capath;
18+
private string $capath;
2319

24-
/** @var string */
25-
private $cipher;
20+
private string $cipher;
2621

2722
public function __construct(string $key, string $cert, string $ca, string $capath, string $cipher)
2823
{

0 commit comments

Comments
 (0)