Skip to content

Commit 7e0e1e2

Browse files
committed
fix(db)!: Deprecate JSON fields due to problems with querying and selecting
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent 5187da3 commit 7e0e1e2

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

build/psalm-baseline.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2073,6 +2073,11 @@
20732073
<code><![CDATA[new View('/' . $user)]]></code>
20742074
</InternalMethod>
20752075
</file>
2076+
<file src="apps/files_versions/lib/Db/VersionEntity.php">
2077+
<DeprecatedConstant>
2078+
<code><![CDATA[Types::JSON]]></code>
2079+
</DeprecatedConstant>
2080+
</file>
20762081
<file src="apps/files_versions/lib/Listener/FileEventsListener.php">
20772082
<InternalClass>
20782083
<code><![CDATA[new View($user . '/files')]]></code>
@@ -2082,6 +2087,11 @@
20822087
<code><![CDATA[new View($user . '/files')]]></code>
20832088
</InternalMethod>
20842089
</file>
2090+
<file src="apps/files_versions/lib/Migration/Version1020Date20221114144058.php">
2091+
<DeprecatedConstant>
2092+
<code><![CDATA[Types::JSON]]></code>
2093+
</DeprecatedConstant>
2094+
</file>
20852095
<file src="apps/files_versions/lib/Sabre/RestoreFolder.php">
20862096
<InvalidNullableReturnType>
20872097
<code><![CDATA[getChild]]></code>
@@ -3280,6 +3290,17 @@
32803290
<code><![CDATA[$this->request->server]]></code>
32813291
</NoInterfaceProperties>
32823292
</file>
3293+
<file src="core/Migrations/Version25000Date20220515204012.php">
3294+
<DeprecatedConstant>
3295+
<code><![CDATA[Types::JSON]]></code>
3296+
</DeprecatedConstant>
3297+
</file>
3298+
<file src="core/Migrations/Version33000Date20251106131209.php">
3299+
<DeprecatedConstant>
3300+
<code><![CDATA[IQueryBuilder::PARAM_JSON]]></code>
3301+
<code><![CDATA[IQueryBuilder::PARAM_JSON]]></code>
3302+
</DeprecatedConstant>
3303+
</file>
32833304
<file src="core/Service/LoginFlowV2Service.php">
32843305
<DeprecatedClass>
32853306
<code><![CDATA[IToken::DO_NOT_REMEMBER]]></code>

lib/public/DB/QueryBuilder/IQueryBuilder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ interface IQueryBuilder {
9999

100100
/**
101101
* @since 24.0.0
102+
* @deprecated 33.0.0 JSON fields can not properly be used in WHERE statements of Oracle and MySQL.
103+
* It is recommended to use a simple STRING field and handle JSON within PHP
102104
*/
103105
public const PARAM_JSON = 'json';
104106

lib/public/DB/Types.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ final class Types {
174174
/**
175175
* @var string
176176
* @since 24.0.0
177+
* @deprecated 33.0.0 JSON fields can not properly be used in WHERE statements of Oracle and MySQL.
178+
* It is recommended to use a simple STRING field and handle JSON within PHP
177179
*/
178180
public const JSON = 'json';
179181
}

0 commit comments

Comments
 (0)