diff options
Diffstat (limited to 'vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md')
-rw-r--r-- | vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md | 162 |
1 files changed, 162 insertions, 0 deletions
diff --git a/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md b/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md new file mode 100644 index 00000000..f0c616d0 --- /dev/null +++ b/vendor/symfony/routing/Symfony/Component/Routing/CHANGELOG.md | |||
@@ -0,0 +1,162 @@ | |||
1 | CHANGELOG | ||
2 | ========= | ||
3 | |||
4 | 2.3.0 | ||
5 | ----- | ||
6 | |||
7 | * added RequestContext::getQueryString() | ||
8 | |||
9 | 2.2.0 | ||
10 | ----- | ||
11 | |||
12 | * [DEPRECATION] Several route settings have been renamed (the old ones will be removed in 3.0): | ||
13 | |||
14 | * The `pattern` setting for a route has been deprecated in favor of `path` | ||
15 | * The `_scheme` and `_method` requirements have been moved to the `schemes` and `methods` settings | ||
16 | |||
17 | Before: | ||
18 | |||
19 | ``` | ||
20 | article_edit: | ||
21 | pattern: /article/{id} | ||
22 | requirements: { '_method': 'POST|PUT', '_scheme': 'https', 'id': '\d+' } | ||
23 | |||
24 | <route id="article_edit" pattern="/article/{id}"> | ||
25 | <requirement key="_method">POST|PUT</requirement> | ||
26 | <requirement key="_scheme">https</requirement> | ||
27 | <requirement key="id">\d+</requirement> | ||
28 | </route> | ||
29 | |||
30 | $route = new Route(); | ||
31 | $route->setPattern('/article/{id}'); | ||
32 | $route->setRequirement('_method', 'POST|PUT'); | ||
33 | $route->setRequirement('_scheme', 'https'); | ||
34 | ``` | ||
35 | |||
36 | After: | ||
37 | |||
38 | ``` | ||
39 | article_edit: | ||
40 | path: /article/{id} | ||
41 | methods: [POST, PUT] | ||
42 | schemes: https | ||
43 | requirements: { 'id': '\d+' } | ||
44 | |||
45 | <route id="article_edit" pattern="/article/{id}" methods="POST PUT" schemes="https"> | ||
46 | <requirement key="id">\d+</requirement> | ||
47 | </route> | ||
48 | |||
49 | $route = new Route(); | ||
50 | $route->setPath('/article/{id}'); | ||
51 | $route->setMethods(array('POST', 'PUT')); | ||
52 | $route->setSchemes('https'); | ||
53 | ``` | ||
54 | |||
55 | * [BC BREAK] RouteCollection does not behave like a tree structure anymore but as | ||
56 | a flat array of Routes. So when using PHP to build the RouteCollection, you must | ||
57 | make sure to add routes to the sub-collection before adding it to the parent | ||
58 | collection (this is not relevant when using YAML or XML for Route definitions). | ||
59 | |||
60 | Before: | ||
61 | |||
62 | ``` | ||
63 | $rootCollection = new RouteCollection(); | ||
64 | $subCollection = new RouteCollection(); | ||
65 | $rootCollection->addCollection($subCollection); | ||
66 | $subCollection->add('foo', new Route('/foo')); | ||
67 | ``` | ||
68 | |||
69 | After: | ||
70 | |||
71 | ``` | ||
72 | $rootCollection = new RouteCollection(); | ||
73 | $subCollection = new RouteCollection(); | ||
74 | $subCollection->add('foo', new Route('/foo')); | ||
75 | $rootCollection->addCollection($subCollection); | ||
76 | ``` | ||
77 | |||
78 | Also one must call `addCollection` from the bottom to the top hierarchy. | ||
79 | So the correct sequence is the following (and not the reverse): | ||
80 | |||
81 | ``` | ||
82 | $childCollection->->addCollection($grandchildCollection); | ||
83 | $rootCollection->addCollection($childCollection); | ||
84 | ``` | ||
85 | |||
86 | * [DEPRECATION] The methods `RouteCollection::getParent()` and `RouteCollection::getRoot()` | ||
87 | have been deprecated and will be removed in Symfony 2.3. | ||
88 | * [BC BREAK] Misusing the `RouteCollection::addPrefix` method to add defaults, requirements | ||
89 | or options without adding a prefix is not supported anymore. So if you called `addPrefix` | ||
90 | with an empty prefix or `/` only (both have no relevance), like | ||
91 | `addPrefix('', $defaultsArray, $requirementsArray, $optionsArray)` | ||
92 | you need to use the new dedicated methods `addDefaults($defaultsArray)`, | ||
93 | `addRequirements($requirementsArray)` or `addOptions($optionsArray)` instead. | ||
94 | * [DEPRECATION] The `$options` parameter to `RouteCollection::addPrefix()` has been deprecated | ||
95 | because adding options has nothing to do with adding a path prefix. If you want to add options | ||
96 | to all child routes of a RouteCollection, you can use `addOptions()`. | ||
97 | * [DEPRECATION] The method `RouteCollection::getPrefix()` has been deprecated | ||
98 | because it suggested that all routes in the collection would have this prefix, which is | ||
99 | not necessarily true. On top of that, since there is no tree structure anymore, this method | ||
100 | is also useless. Don't worry about performance, prefix optimization for matching is still done | ||
101 | in the dumper, which was also improved in 2.2.0 to find even more grouping possibilities. | ||
102 | * [DEPRECATION] `RouteCollection::addCollection(RouteCollection $collection)` should now only be | ||
103 | used with a single parameter. The other params `$prefix`, `$default`, `$requirements` and `$options` | ||
104 | will still work, but have been deprecated. The `addPrefix` method should be used for this | ||
105 | use-case instead. | ||
106 | Before: `$parentCollection->addCollection($collection, '/prefix', array(...), array(...))` | ||
107 | After: | ||
108 | ``` | ||
109 | $collection->addPrefix('/prefix', array(...), array(...)); | ||
110 | $parentCollection->addCollection($collection); | ||
111 | ``` | ||
112 | * added support for the method default argument values when defining a @Route | ||
113 | * Adjacent placeholders without separator work now, e.g. `/{x}{y}{z}.{_format}`. | ||
114 | * Characters that function as separator between placeholders are now whitelisted | ||
115 | to fix routes with normal text around a variable, e.g. `/prefix{var}suffix`. | ||
116 | * [BC BREAK] The default requirement of a variable has been changed slightly. | ||
117 | Previously it disallowed the previous and the next char around a variable. Now | ||
118 | it disallows the slash (`/`) and the next char. Using the previous char added | ||
119 | no value and was problematic because the route `/index.{_format}` would be | ||
120 | matched by `/index.ht/ml`. | ||
121 | * The default requirement now uses possessive quantifiers when possible which | ||
122 | improves matching performance by up to 20% because it prevents backtracking | ||
123 | when it's not needed. | ||
124 | * The ConfigurableRequirementsInterface can now also be used to disable the requirements | ||
125 | check on URL generation completely by calling `setStrictRequirements(null)`. It | ||
126 | improves performance in production environment as you should know that params always | ||
127 | pass the requirements (otherwise it would break your link anyway). | ||
128 | * There is no restriction on the route name anymore. So non-alphanumeric characters | ||
129 | are now also allowed. | ||
130 | * [BC BREAK] `RouteCompilerInterface::compile(Route $route)` was made static | ||
131 | (only relevant if you implemented your own RouteCompiler). | ||
132 | * Added possibility to generate relative paths and network paths in the UrlGenerator, e.g. | ||
133 | "../parent-file" and "//example.com/dir/file". The third parameter in | ||
134 | `UrlGeneratorInterface::generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH)` | ||
135 | now accepts more values and you should use the constants defined in `UrlGeneratorInterface` for | ||
136 | claritiy. The old method calls with a Boolean parameter will continue to work because they | ||
137 | equal the signature using the constants. | ||
138 | |||
139 | 2.1.0 | ||
140 | ----- | ||
141 | |||
142 | * added RequestMatcherInterface | ||
143 | * added RequestContext::fromRequest() | ||
144 | * the UrlMatcher does not throw a \LogicException anymore when the required | ||
145 | scheme is not the current one | ||
146 | * added TraceableUrlMatcher | ||
147 | * added the possibility to define options, default values and requirements | ||
148 | for placeholders in prefix, including imported routes | ||
149 | * added RouterInterface::getRouteCollection | ||
150 | * [BC BREAK] the UrlMatcher urldecodes the route parameters only once, they | ||
151 | were decoded twice before. Note that the `urldecode()` calls have been | ||
152 | changed for a single `rawurldecode()` in order to support `+` for input | ||
153 | paths. | ||
154 | * added RouteCollection::getRoot method to retrieve the root of a | ||
155 | RouteCollection tree | ||
156 | * [BC BREAK] made RouteCollection::setParent private which could not have | ||
157 | been used anyway without creating inconsistencies | ||
158 | * [BC BREAK] RouteCollection::remove also removes a route from parent | ||
159 | collections (not only from its children) | ||
160 | * added ConfigurableRequirementsInterface that allows to disable exceptions | ||
161 | (and generate empty URLs instead) when generating a route with an invalid | ||
162 | parameter value | ||