Releases: webfactory/object-routing
Adds expression language support
This feature relase adds support for the Symfony Expression Language. It can be used to add parameters to routes conditionally. See #14 for the full description.
What's Changed
Full Changelog: 2.0.0...2.1.0
Drop annotations support
Include AttributeDriver in the default driver chain (#11)
1.7.1 Include AttributeDriver in the default driver chain (#11)
Add a dedicated AttributeDriver, deprecate annotations
This release deprecates the use of the \JMS\ObjectRouting\Annotation\ObjectRoute
class, either as an annotation or as an attribute. Use the \JMS\ObjectRouting\Attribute\ObjectRoute
attribute class instead. Also, the \JMS\ObjectRouting\Metadata\Driver\AnnotationDriver
has been deprecated. (#9)
Annotations support will be removed in the next major release.
Erlaube Symfony 7-Komponenten (Case 168718)
1.6.0 Erlaube Symfony 7-Komponenten (Case 168718) (#8)
Adds return type hints to avoid Symfony deprecation notices (#6)
Add return type hints (#6) This adds a few return type hints to address deprecation notices and be forwards-compatible with future Symfony versions. These changes are compatible even with PHP 7.2.
Don't parse attributes for PHP <8 (#5)
Attributes are a language-level feature for PHP 8 onwards.
Merge upstream changes to allow usage with Symfony 5.x components
This release merges upstream changes and updates Composer constraints so it can be used with Symfony 5.x.
Diff of the changes from the previous release: 1.4.1...1.5.0
Load routes from subclasses
This release fixes that @ObjectRoute
annotations from class hierarchies would not be correctly merged.
For example, consider:
<?php
/** @ObjectRoute(type="view", "name" => "foo_route") */
class Foo{}
/** @ObjectRoute(type="view", "name" => "bar_route") */
class Bar extends Foo{}
This will now correctly use the bar_route
when using object_path('view', obj)
with obj
being an instance of Bar
.
In fact, the code to merge the relevant metadata from class hierarchies was already in place, it only forgot to merge the routes
property in a subclass (see #1).
This might be a breaking change for users who use @ObjectRoute
annotations on subclasses, but in fact ended up with the first (highest) class in the inheritance tree that uses the annotation. Since until now the annotation on the subclass never worked as one would expect (in fact, it had no effect), this should not be relevant "in the wild".
Compatibility with newer Twig and Symfony versions
1.1.0 Fix SPDX License identifier