Skip to content

Commit

Permalink
Merge pull request #11056 from derrabus/deprecate/named-queries
Browse files Browse the repository at this point in the history
Deprecate annotation classes for named queries
  • Loading branch information
greg0ire authored Nov 11, 2023
2 parents 0e95838 + 6a48b07 commit b41de2a
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Upgrade to 2.17

## Deprecate annotations classes for named queries

The following classes have been deprecated:

* `Doctrine\ORM\Mapping\NamedNativeQueries`
* `Doctrine\ORM\Mapping\NamedNativeQuery`
* `Doctrine\ORM\Mapping\NamedQueries`
* `Doctrine\ORM\Mapping\NamedQuery`

## Deprecate `Doctrine\ORM\Query\Exec\AbstractSqlExecutor::_sqlStatements`

Use `Doctrine\ORM\Query\Exec\AbstractSqlExecutor::sqlStatements` instead.
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/ORM/Mapping/NamedNativeQueries.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Is used to specify an array of native SQL named queries.
* The NamedNativeQueries annotation can be applied to an entity or mapped superclass.
*
* @deprecated Named queries won't be supported in ORM 3.
*
* @Annotation
* @Target("CLASS")
*/
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/ORM/Mapping/NamedNativeQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Is used to specify a native SQL named query.
* The NamedNativeQuery annotation can be applied to an entity or mapped superclass.
*
* @deprecated Named queries won't be supported in ORM 3.
*
* @Annotation
* @Target("ANNOTATION")
*/
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/ORM/Mapping/NamedQueries.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
namespace Doctrine\ORM\Mapping;

/**
* @deprecated Named queries won't be supported in ORM 3.
*
* @Annotation
* @Target("CLASS")
*/
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/ORM/Mapping/NamedQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
namespace Doctrine\ORM\Mapping;

/**
* @deprecated Named queries won't be supported in ORM 3.
*
* @Annotation
* @Target("ANNOTATION")
*/
Expand Down
4 changes: 4 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
<referencedClass name="Doctrine\ORM\Exception\UnknownEntityNamespace"/>
<referencedClass name="Doctrine\ORM\Mapping\Driver\AnnotationDriver"/>
<referencedClass name="Doctrine\ORM\Mapping\Driver\YamlDriver"/>
<referencedClass name="Doctrine\ORM\Mapping\NamedNativeQueries"/>
<referencedClass name="Doctrine\ORM\Mapping\NamedNativeQuery"/>
<referencedClass name="Doctrine\ORM\Mapping\NamedQueries"/>
<referencedClass name="Doctrine\ORM\Mapping\NamedQuery"/>
<referencedClass name="Doctrine\ORM\Query\AST\InExpression"/>
<referencedClass name="Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand"/>
<referencedClass name="Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand"/>
Expand Down

0 comments on commit b41de2a

Please sign in to comment.