Skip to content

Commit

Permalink
[BC break] Drop annotations support (#10)
Browse files Browse the repository at this point in the history
This drops support for configuration through annotations.
  • Loading branch information
mpdude authored Apr 4, 2024
1 parent 3fbe00a commit ec10976
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 148 deletions.
5 changes: 5 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Upgrading Notes for webfactory/object-routing

# Version 2.0.0

* The `\JMS\ObjectRouting\Metadata\Driver\AnnotationDriver` and `\JMS\ObjectRouting\Annotation\ObjectRoute` classes have been removed.
* The `\JMS\ObjectRouting\Attribute\ObjectRoute` class is now `final`.

# Version 1.7.0

* Using the `\JMS\ObjectRouting\Annotation\ObjectRoute` class to configure object routes either through annotations or as an attribute has been deprecated. Use the `\JMS\ObjectRouting\Attribute\ObjectRoute` attribute instead. Also, the `\JMS\ObjectRouting\Metadata\Driver\AnnotationDriver` has been deprecated.
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@

"require": {
"php": ">= 8.1",
"doctrine/annotations": "^1.12",
"jms/metadata": "^2.6.1",
"symfony/property-access": "^3.4|^4.0|^5.0|^6.0|^7.0",
"symfony/deprecation-contracts": "^3.4"
"symfony/property-access": "^3.4|^4.0|^5.0|^6.0|^7.0"
},

"require-dev": {
Expand Down
34 changes: 0 additions & 34 deletions src/JMS/ObjectRouting/Annotation/ObjectRoute.php

This file was deleted.

3 changes: 1 addition & 2 deletions src/JMS/ObjectRouting/Attribute/ObjectRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@

namespace JMS\ObjectRouting\Attribute;

/** @final */
#[\Attribute(\Attribute::IS_REPEATABLE | \Attribute::TARGET_CLASS)]
class ObjectRoute
final class ObjectRoute
{
/** @var string @Required */
public $type;
Expand Down
70 changes: 0 additions & 70 deletions src/JMS/ObjectRouting/Metadata/Driver/AnnotationDriver.php

This file was deleted.

3 changes: 0 additions & 3 deletions src/JMS/ObjectRouting/ObjectRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

namespace JMS\ObjectRouting;

use Doctrine\Common\Annotations\AnnotationReader;
use JMS\ObjectRouting\Metadata\ClassMetadata;
use JMS\ObjectRouting\Metadata\Driver\AnnotationDriver;
use JMS\ObjectRouting\Metadata\Driver\AttributeDriver;
use Metadata\Driver\DriverChain;
use Metadata\MetadataFactory;
Expand All @@ -39,7 +37,6 @@ public static function create(RouterInterface $router)
$router,
new MetadataFactory(new DriverChain([
new AttributeDriver(),
new AnnotationDriver(new AnnotationReader()),
]))
);
}
Expand Down

This file was deleted.

0 comments on commit ec10976

Please sign in to comment.