]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(db): Deprecate `getQueryPart()` and `resetQueryPart()` methods that will be remov...
authorJoas Schilling <coding@schilljs.com>
Thu, 18 Jul 2024 07:17:53 +0000 (09:17 +0200)
committerJoas Schilling <coding@schilljs.com>
Fri, 19 Jul 2024 09:21:10 +0000 (11:21 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/DB/QueryBuilder/QueryBuilder.php
lib/public/DB/QueryBuilder/IQueryBuilder.php

index 82127078d0618cf91dccc36d7943e7cd3d6aeab9..7cb08110a83931402674efb3eb5ba6a1d3f18675 100644 (file)
@@ -1104,8 +1104,11 @@ class QueryBuilder implements IQueryBuilder {
         * @param string $queryPartName
         *
         * @return mixed
+        * @deprecated 30.0.0 This function is going to be removed with the next Doctrine/DBAL update
+        *   and we can not fix this in our wrapper. Please track the details you need, outside the object.
         */
        public function getQueryPart($queryPartName) {
+               $this->logger->debug(IQueryBuilder::class . '::' . __FUNCTION__ . ' is deprecated and will be removed soon.', ['exception' => new \Exception('Deprecated call to ' . __METHOD__)]);
                return $this->queryBuilder->getQueryPart($queryPartName);
        }
 
@@ -1113,8 +1116,11 @@ class QueryBuilder implements IQueryBuilder {
         * Gets all query parts.
         *
         * @return array
+        * @deprecated 30.0.0 This function is going to be removed with the next Doctrine/DBAL update
+        *   and we can not fix this in our wrapper. Please track the details you need, outside the object.
         */
        public function getQueryParts() {
+               $this->logger->debug(IQueryBuilder::class . '::' . __FUNCTION__ . ' is deprecated and will be removed soon.', ['exception' => new \Exception('Deprecated call to ' . __METHOD__)]);
                return $this->queryBuilder->getQueryParts();
        }
 
@@ -1124,8 +1130,11 @@ class QueryBuilder implements IQueryBuilder {
         * @param array|null $queryPartNames
         *
         * @return $this This QueryBuilder instance.
+        * @deprecated 30.0.0 This function is going to be removed with the next Doctrine/DBAL update
+        *  and we can not fix this in our wrapper. Please create a new IQueryBuilder instead.
         */
        public function resetQueryParts($queryPartNames = null) {
+               $this->logger->debug(IQueryBuilder::class . '::' . __FUNCTION__ . ' is deprecated and will be removed soon.', ['exception' => new \Exception('Deprecated call to ' . __METHOD__)]);
                $this->queryBuilder->resetQueryParts($queryPartNames);
 
                return $this;
@@ -1137,8 +1146,11 @@ class QueryBuilder implements IQueryBuilder {
         * @param string $queryPartName
         *
         * @return $this This QueryBuilder instance.
+        * @deprecated 30.0.0 This function is going to be removed with the next Doctrine/DBAL update
+        *  and we can not fix this in our wrapper. Please create a new IQueryBuilder instead.
         */
        public function resetQueryPart($queryPartName) {
+               $this->logger->debug(IQueryBuilder::class . '::' . __FUNCTION__ . ' is deprecated and will be removed soon.', ['exception' => new \Exception('Deprecated call to ' . __METHOD__)]);
                $this->queryBuilder->resetQueryPart($queryPartName);
 
                return $this;
index c736d3094e55373188915220b54774e7eb4036bb..72808835188ca0600fb3471a2acf3eeb7b8350a9 100644 (file)
@@ -837,6 +837,8 @@ interface IQueryBuilder {
         *
         * @return mixed
         * @since 8.2.0
+        * @deprecated 30.0.0 This function is going to be removed with the next Doctrine/DBAL update
+        *  and we can not fix this in our wrapper. Please track the details you need, outside the object.
         */
        public function getQueryPart($queryPartName);
 
@@ -845,6 +847,8 @@ interface IQueryBuilder {
         *
         * @return array
         * @since 8.2.0
+        * @deprecated 30.0.0 This function is going to be removed with the next Doctrine/DBAL update
+        *  and we can not fix this in our wrapper. Please track the details you need, outside the object.
         */
        public function getQueryParts();
 
@@ -855,6 +859,8 @@ interface IQueryBuilder {
         *
         * @return $this This QueryBuilder instance.
         * @since 8.2.0
+        * @deprecated 30.0.0 This function is going to be removed with the next Doctrine/DBAL update
+        * and we can not fix this in our wrapper. Please create a new IQueryBuilder instead.
         */
        public function resetQueryParts($queryPartNames = null);
 
@@ -865,6 +871,8 @@ interface IQueryBuilder {
         *
         * @return $this This QueryBuilder instance.
         * @since 8.2.0
+        * @deprecated 30.0.0 This function is going to be removed with the next Doctrine/DBAL update
+        *  and we can not fix this in our wrapper. Please create a new IQueryBuilder instead.
         */
        public function resetQueryPart($queryPartName);