@@ -1916,6 +1916,22 @@ The following classes and constants have been deprecated:
19161916
19171917Use JSON for storing unstructured data.
19181918
1919+ You can keep the old type behavior by copying (and adapting) the old type
1920+ classes
1921+ ([ Array] ( https://github.com/doctrine/dbal/blob/2.13.9/lib/Doctrine/DBAL/Types/ArrayType.php )
1922+ and
1923+ [ Object] ( https://github.com/doctrine/dbal/blob/2.13.9/lib/Doctrine/DBAL/Types/ObjectType.php ) )
1924+ into your own code- base and re-register them in the TypeRegistry:
1925+
1926+ ``` php
1927+ use Doctrine\DBAL\Types\TypeFactory;
1928+ use MyApp\Doctrine\Types\ArrayType;
1929+ use MyApp\Doctrine\Types\ObjectType;
1930+
1931+ TypeRegistry::register('array', new ArrayType());
1932+ TypeRegistry::register('object', new ObjectType());
1933+ ```
1934+
19191935## Deprecated ` Driver::getSchemaManager() ` .
19201936
19211937The ` Driver::getSchemaManager() ` method has been deprecated. Use ` AbstractPlatform::createSchemaManager() ` instead.
@@ -2122,9 +2138,9 @@ following methods are deprecated:
21222138The protected property ` AbstractPlatform::$doctrineTypeComments ` is deprecated
21232139as well.
21242140
2125- ## Deprecated support for IBM DB2 10.5 and older
2141+ ## Deprecated support for Db2 10.5 and older
21262142
2127- IBM DB2 10.5 and older won't be supported in DBAL 4. Consider upgrading to IBM DB2 11.1 or later.
2143+ Db2 10.5 and older won't be supported in DBAL 4. Consider upgrading to Db2 11.1 or later.
21282144
21292145## Deprecated support for Oracle 12c (12.2.0.1) and older
21302146
@@ -2672,9 +2688,49 @@ Please generate UUIDs on the application side (e.g. using [ramsey/uuid](https://
26722688
26732689The ` Doctrine\DBAL\Driver::getName() ` has been removed.
26742690
2691+ ## BC Break: ` json_array ` type removed
2692+
2693+ Removed ` json_array ` type and all associated hacks.
2694+
2695+ It is recommened to migrate to the ` json ` type while still being on the ORM 2
2696+ branch. You then need to migrate the database (using migrations or SchemaTool)
2697+ to update both the type and especially remove the ` (Dc2Type:json_array) ` column
2698+ comment, before you ugprade to DBAL 3.
2699+
2700+ If you cannot migrate the database or rely on this type, especially its
2701+ behavior with regard to NULL and empty values, you can copy (adapt) the
2702+ [ JsonArrayType
2703+ class] ( https://github.com/doctrine/dbal/blob/2.13.9/lib/Doctrine/DBAL/Types/JsonArrayType.php )
2704+ into your own codebase and re-regsiter under the name:
2705+
2706+ ``` php
2707+ use Doctrine\DBAL\Types\TypeFactory;
2708+ use MyApp\Doctrine\Types\JsonArrayType;
2709+
2710+ TypeRegistry::register('json_array', new JsonArrayType());
2711+ ```
2712+
2713+ Or if you want to opt into the newer type instead, with its slightly changed null behavior, you can
2714+ register that with:
2715+
2716+ ``` php
2717+ use Doctrine\DBAL\Types\TypeFactory;
2718+ use Doctrine\DBAL\Types\JsonType;
2719+
2720+ TypeRegistry::register('json_array', new JsonType());
2721+ ```
2722+
2723+ In Symfony you can register this type with:
2724+
2725+ ``` yml
2726+ doctrine :
2727+ dbal :
2728+ types :
2729+ json_array : " Doctrine\\ DBAL\\ Types\\ JsonType"
2730+ ` ` `
2731+
26752732## BC BREAK Removed previously deprecated features
26762733
2677- * Removed ` json_array ` type and all associated hacks.
26782734 * Removed ` Connection::TRANSACTION_*` constants.
26792735 * Removed `AbstractPlatform::DATE_INTERVAL_UNIT_*` and `AbstractPlatform::TRIM_*` constants.
26802736 * Removed `AbstractPlatform::getSQLResultCasing()`, `::prefersSequences()` and `::supportsForeignKeyOnUpdate()` methods.
@@ -2790,9 +2846,9 @@ All implementations of the `VersionAwarePlatformDriver` interface have to implem
27902846The `Doctrine\DBAL\Platforms\MsSQLKeywords` class has been removed.
27912847Please use `Doctrine\DBAL\Platforms\SQLServerPlatform` instead.
27922848
2793- ## BC BREAK: Removed PDO DB2 driver
2849+ # # BC BREAK: Removed PDO Db2 driver
27942850
2795- This PDO-based IBM DB2 driver (built on top of ` pdo_ibm ` extension) has already been unsupported as of 2.5, it has been now removed.
2851+ This PDO-based Db2 driver (built on top of `pdo_ibm` extension) has already been unsupported as of 2.5, it has been now removed.
27962852
27972853The following class has been removed :
27982854
0 commit comments