Skip to content

Commit

Permalink
Purge annotations from the codebase and docs (doctrine#10177)
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Oct 26, 2022
1 parent 189883e commit 1f15e3b
Show file tree
Hide file tree
Showing 87 changed files with 60 additions and 2,453 deletions.
5 changes: 5 additions & 0 deletions UPGRADE.md
@@ -1,5 +1,10 @@
# Upgrade to 3.0

## BC Break: Removed AnnotationDriver

The annotation driver and anything related to annotation has been removed.
Please migrate to another mapping driver.

## BC BREAK: Removed `EntityManager::create()`

The constructor of `EntityManager` is now public and must be used instead of the `create()` method.
Expand Down
4 changes: 0 additions & 4 deletions composer.json
Expand Up @@ -36,7 +36,6 @@
"symfony/console": "^4.4 || ^5.4 || ^6.0"
},
"require-dev": {
"doctrine/annotations": "^1.13",
"doctrine/coding-standard": "^10.0",
"phpbench/phpbench": "^1.0",
"phpstan/phpstan": "1.8.8",
Expand All @@ -46,9 +45,6 @@
"symfony/cache": "^4.4 || ^5.4 || ^6.0",
"vimeo/psalm": "4.29.0"
},
"conflict": {
"doctrine/annotations": "<1.13 || >= 2.0"
},
"suggest": {
"ext-dom": "Provides support for XSD validation for XML mapping files",
"symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0"
Expand Down
1 change: 0 additions & 1 deletion docs/en/_exts/configurationblock.py
Expand Up @@ -41,7 +41,6 @@ class ConfigurationBlock(Directive):
'php+html': 'PHP',
'html+php': 'PHP',
'ini': 'INI',
'php-annotations': 'Annotations',
}

def run(self):
Expand Down
Expand Up @@ -55,7 +55,7 @@ listeners:
.. code-block:: php
<?php
// Mapping not shown, either in attributes, annotations or xml as usual
// Mapping not shown, either in attributes or xml as usual
class MyEntity extends DomainObject
{
private $data;
Expand Down
17 changes: 0 additions & 17 deletions docs/en/cookbook/validation-of-entities.rst
Expand Up @@ -67,23 +67,6 @@ First Attributes:
public function assertCustomerAllowedBuying() {}
}
As Annotations:

.. code-block:: php
<?php
/**
* @Entity
* @HasLifecycleCallbacks
*/
class Order
{
/**
* @PrePersist @PreUpdate
*/
public function assertCustomerAllowedBuying() {}
}
In XML Mappings:

.. code-block:: xml
Expand Down
1 change: 0 additions & 1 deletion docs/en/index.rst
Expand Up @@ -39,7 +39,6 @@ Mapping Objects onto a Database
:doc:`Inheritance <reference/inheritance-mapping>`

* **Drivers**:
:doc:`Docblock Annotations <reference/annotations-reference>` |
:doc:`Attributes <reference/attributes-reference>` |
:doc:`XML <reference/xml-mapping>` |
:doc:`PHP <reference/php-mapping>`
Expand Down
11 changes: 4 additions & 7 deletions docs/en/reference/advanced-configuration.rst
Expand Up @@ -117,15 +117,12 @@ There are currently 4 available implementations:
- ``Doctrine\ORM\Mapping\Driver\AttributeDriver``
- ``Doctrine\ORM\Mapping\Driver\XmlDriver``
- ``Doctrine\ORM\Mapping\Driver\DriverChain``
- ``Doctrine\ORM\Mapping\Driver\AnnotationDriver`` (deprecated and will
be removed in ``doctrine/orm`` 3.0)
- ``Doctrine\ORM\Mapping\Driver\YamlDriver`` (deprecated and will be
removed in ``doctrine/orm`` 3.0)

Throughout the most part of this manual the AttributeDriver is
used in the examples. For information on the usage of the
AnnotationDriver or XmlDriver please refer to the dedicated
chapters ``Annotation Reference`` and ``XML Mapping``.
XmlDriver please refer to the dedicated chapter ``XML Mapping``.

The attribute driver can be injected in the ``Doctrine\ORM\Configuration``:

Expand Down Expand Up @@ -155,9 +152,9 @@ Metadata Cache (***RECOMMENDED***)
Gets or sets the cache adapter to use for caching metadata
information, that is, all the information you supply via attributes,
annotations or xml, so that they do not need to be parsed and
loaded from scratch on every single request which is a waste of
resources. The cache implementation must implement the PSR-6
xml, so that they do not need to be parsed and loaded from scratch on
every single request which is a waste of resources. The cache
implementation must implement the PSR-6
``Psr\Cache\CacheItemPoolInterface`` interface.

Usage of a metadata cache is highly recommended.
Expand Down

0 comments on commit 1f15e3b

Please sign in to comment.