Skip to content

Releases: webfactory/object-routing

Adds expression language support

01 Jul 08:26
2e91b32
Compare
Choose a tag to compare

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

  • Run PHP-CS-Fixer automatically by @mpdude in #15
  • Add expression language support by @mpdude in #14

Full Changelog: 2.0.0...2.1.0

Drop annotations support

04 Apr 22:00
ec10976
Compare
Choose a tag to compare

What's Changed

  • [BC break] Drop annotations support by @mpdude in #10

Full Changelog: 1.7.1...2.0.0

Include AttributeDriver in the default driver chain (#11)

04 Apr 21:55
3fbe00a
Compare
Choose a tag to compare
1.7.1

Include AttributeDriver in the default driver chain (#11)

Add a dedicated AttributeDriver, deprecate annotations

04 Apr 20:56
98696c1
Compare
Choose a tag to compare

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)

29 Feb 10:36
1178380
Compare
Choose a tag to compare
1.6.0

Erlaube Symfony 7-Komponenten (Case 168718) (#8)

Adds return type hints to avoid Symfony deprecation notices (#6)

05 May 21:14
7dcd8cf
Compare
Choose a tag to compare
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)

25 Apr 12:04
7b61693
Compare
Choose a tag to compare

Attributes are a language-level feature for PHP 8 onwards.

Merge upstream changes to allow usage with Symfony 5.x components

21 Apr 13:23
160427f
Compare
Choose a tag to compare

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

29 Sep 11:10
721e81d
Compare
Choose a tag to compare

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

11 Oct 21:53
Compare
Choose a tag to compare
1.1.0

Fix SPDX License identifier