Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
CHANGELOG
2
=========
3
 
4
6.2
5
---
6
 
7
 * Add `Requirement::POSITIVE_INT` for common ids and pagination
8
 
9
6.1
10
---
11
 
12
 * Add `getMissingParameters` and `getRouteName` methods on `MissingMandatoryParametersException`
13
 * Allow using UTF-8 parameter names
14
 * Support the `attribute` type (alias of `annotation`) in annotation loaders
15
 * Already encoded slashes are not decoded nor double-encoded anymore when generating URLs (query parameters)
16
 * Add `EnumRequirement` to help generate route requirements from a `\BackedEnum`
17
 * Add `Requirement`, a collection of universal regular-expression constants to use as route parameter requirements
18
 * Add `params` variable to condition expression
19
 * Deprecate not passing route parameters as the fourth argument to `UrlMatcher::handleRouteRequirements()`
20
 
21
5.3
22
---
23
 
24
 * Already encoded slashes are not decoded nor double-encoded anymore when generating URLs
25
 * Add support for per-env configuration in XML and Yaml loaders
26
 * Deprecate creating instances of the `Route` annotation class by passing an array of parameters
27
 * Add `RoutingConfigurator::env()` to get the current environment
28
 
29
5.2.0
30
-----
31
 
32
 * Added support for inline definition of requirements and defaults for host
33
 * Added support for `\A` and `\z` as regex start and end for route requirement
34
 * Added support for `#[Route]` attributes
35
 
36
5.1.0
37
-----
38
 
39
 * added the protected method `PhpFileLoader::callConfigurator()` as extension point to ease custom routing configuration
40
 * deprecated `RouteCollectionBuilder` in favor of `RoutingConfigurator`.
41
 * added "priority" option to annotated routes
42
 * added argument `$priority` to `RouteCollection::add()`
43
 * deprecated the `RouteCompiler::REGEX_DELIMITER` constant
44
 * added `ExpressionLanguageProvider` to expose extra functions to route conditions
45
 * added support for a `stateless` keyword for configuring route stateless in PHP, YAML and XML configurations.
46
 * added the "hosts" option to be able to configure the host per locale.
47
 * added `RequestContext::fromUri()` to ease building the default context
48
 
49
5.0.0
50
-----
51
 
52
 * removed `PhpGeneratorDumper` and `PhpMatcherDumper`
53
 * removed `generator_base_class`, `generator_cache_class`, `matcher_base_class` and `matcher_cache_class` router options
54
 * `Serializable` implementing methods for `Route` and `CompiledRoute` are final
55
 * removed referencing service route loaders with a single colon
56
 * Removed `ServiceRouterLoader` and `ObjectRouteLoader`.
57
 
58
4.4.0
59
-----
60
 
61
 * Deprecated `ServiceRouterLoader` in favor of `ContainerLoader`.
62
 * Deprecated `ObjectRouteLoader` in favor of `ObjectLoader`.
63
 * Added a way to exclude patterns of resources from being imported by the `import()` method
64
 
65
4.3.0
66
-----
67
 
68
 * added `CompiledUrlMatcher` and `CompiledUrlMatcherDumper`
69
 * added `CompiledUrlGenerator` and `CompiledUrlGeneratorDumper`
70
 * deprecated `PhpGeneratorDumper` and `PhpMatcherDumper`
71
 * deprecated `generator_base_class`, `generator_cache_class`, `matcher_base_class` and `matcher_cache_class` router options
72
 * `Serializable` implementing methods for `Route` and `CompiledRoute` are marked as `@internal` and `@final`.
73
   Instead of overwriting them, use `__serialize` and `__unserialize` as extension points which are forward compatible
74
   with the new serialization methods in PHP 7.4.
75
 * exposed `utf8` Route option, defaults "locale" and "format" in configuration loaders and configurators
76
 * added support for invokable service route loaders
77
 
78
4.2.0
79
-----
80
 
81
 * added fallback to cultureless locale for internationalized routes
82
 
83
4.0.0
84
-----
85
 
86
 * dropped support for using UTF-8 route patterns without using the `utf8` option
87
 * dropped support for using UTF-8 route requirements without using the `utf8` option
88
 
89
3.4.0
90
-----
91
 
92
 * Added `NoConfigurationException`.
93
 * Added the possibility to define a prefix for all routes of a controller via @Route(name="prefix_")
94
 * Added support for prioritized routing loaders.
95
 * Add matched and default parameters to redirect responses
96
 * Added support for a `controller` keyword for configuring route controllers in YAML and XML configurations.
97
 
98
3.3.0
99
-----
100
 
101
 * [DEPRECATION] Class parameters have been deprecated and will be removed in 4.0.
102
   * router.options.generator_class
103
   * router.options.generator_base_class
104
   * router.options.generator_dumper_class
105
   * router.options.matcher_class
106
   * router.options.matcher_base_class
107
   * router.options.matcher_dumper_class
108
   * router.options.matcher.cache_class
109
   * router.options.generator.cache_class
110
 
111
3.2.0
112
-----
113
 
114
 * Added support for `bool`, `int`, `float`, `string`, `list` and `map` defaults in XML configurations.
115
 * Added support for UTF-8 requirements
116
 
117
2.8.0
118
-----
119
 
120
 * allowed specifying a directory to recursively load all routing configuration files it contains
121
 * Added ObjectRouteLoader and ServiceRouteLoader that allow routes to be loaded
122
   by calling a method on an object/service.
123
 * [DEPRECATION] Deprecated the hardcoded value for the `$referenceType` argument of the `UrlGeneratorInterface::generate` method.
124
   Use the constants defined in the `UrlGeneratorInterface` instead.
125
 
126
   Before:
127
 
128
   ```php
129
   $router->generate('blog_show', ['slug' => 'my-blog-post'], true);
130
   ```
131
 
132
   After:
133
 
134
   ```php
135
   use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
136
 
137
   $router->generate('blog_show', ['slug' => 'my-blog-post'], UrlGeneratorInterface::ABSOLUTE_URL);
138
   ```
139
 
140
2.5.0
141
-----
142
 
143
 * [DEPRECATION] The `ApacheMatcherDumper` and `ApacheUrlMatcher` were deprecated and
144
   will be removed in Symfony 3.0, since the performance gains were minimal and
145
   it's hard to replicate the behavior of PHP implementation.
146
 
147
2.3.0
148
-----
149
 
150
 * added RequestContext::getQueryString()
151
 
152
2.2.0
153
-----
154
 
155
 * [DEPRECATION] Several route settings have been renamed (the old ones will be removed in 3.0):
156
 
157
    * The `pattern` setting for a route has been deprecated in favor of `path`
158
    * The `_scheme` and `_method` requirements have been moved to the `schemes` and `methods` settings
159
 
160
   Before:
161
 
162
   ```yaml
163
   article_edit:
164
       pattern: /article/{id}
165
       requirements: { '_method': 'POST|PUT', '_scheme': 'https', 'id': '\d+' }
166
   ```
167
 
168
   ```xml
169
   <route id="article_edit" pattern="/article/{id}">
170
       <requirement key="_method">POST|PUT</requirement>
171
       <requirement key="_scheme">https</requirement>
172
       <requirement key="id">\d+</requirement>
173
   </route>
174
   ```
175
 
176
   ```php
177
   $route = new Route();
178
   $route->setPattern('/article/{id}');
179
   $route->setRequirement('_method', 'POST|PUT');
180
   $route->setRequirement('_scheme', 'https');
181
   ```
182
 
183
   After:
184
 
185
   ```yaml
186
   article_edit:
187
       path: /article/{id}
188
       methods: [POST, PUT]
189
       schemes: https
190
       requirements: { 'id': '\d+' }
191
   ```
192
 
193
   ```xml
194
   <route id="article_edit" pattern="/article/{id}" methods="POST PUT" schemes="https">
195
       <requirement key="id">\d+</requirement>
196
   </route>
197
   ```
198
 
199
   ```php
200
   $route = new Route();
201
   $route->setPath('/article/{id}');
202
   $route->setMethods(['POST', 'PUT']);
203
   $route->setSchemes('https');
204
   ```
205
 
206
 * [BC BREAK] RouteCollection does not behave like a tree structure anymore but as
207
   a flat array of Routes. So when using PHP to build the RouteCollection, you must
208
   make sure to add routes to the sub-collection before adding it to the parent
209
   collection (this is not relevant when using YAML or XML for Route definitions).
210
 
211
   Before:
212
 
213
   ```php
214
   $rootCollection = new RouteCollection();
215
   $subCollection = new RouteCollection();
216
   $rootCollection->addCollection($subCollection);
217
   $subCollection->add('foo', new Route('/foo'));
218
   ```
219
 
220
   After:
221
 
222
   ```php
223
   $rootCollection = new RouteCollection();
224
   $subCollection = new RouteCollection();
225
   $subCollection->add('foo', new Route('/foo'));
226
   $rootCollection->addCollection($subCollection);
227
   ```
228
 
229
   Also one must call `addCollection` from the bottom to the top hierarchy.
230
   So the correct sequence is the following (and not the reverse):
231
 
232
   ```php
233
   $childCollection->addCollection($grandchildCollection);
234
   $rootCollection->addCollection($childCollection);
235
   ```
236
 
237
 * [DEPRECATION] The methods `RouteCollection::getParent()` and `RouteCollection::getRoot()`
238
   have been deprecated and will be removed in Symfony 2.3.
239
 * [BC BREAK] Misusing the `RouteCollection::addPrefix` method to add defaults, requirements
240
   or options without adding a prefix is not supported anymore. So if you called `addPrefix`
241
   with an empty prefix or `/` only (both have no relevance), like
242
   `addPrefix('', $defaultsArray, $requirementsArray, $optionsArray)`
243
   you need to use the new dedicated methods `addDefaults($defaultsArray)`,
244
   `addRequirements($requirementsArray)` or `addOptions($optionsArray)` instead.
245
 * [DEPRECATION] The `$options` parameter to `RouteCollection::addPrefix()` has been deprecated
246
   because adding options has nothing to do with adding a path prefix. If you want to add options
247
   to all child routes of a RouteCollection, you can use `addOptions()`.
248
 * [DEPRECATION] The method `RouteCollection::getPrefix()` has been deprecated
249
   because it suggested that all routes in the collection would have this prefix, which is
250
   not necessarily true. On top of that, since there is no tree structure anymore, this method
251
   is also useless. Don't worry about performance, prefix optimization for matching is still done
252
   in the dumper, which was also improved in 2.2.0 to find even more grouping possibilities.
253
 * [DEPRECATION] `RouteCollection::addCollection(RouteCollection $collection)` should now only be
254
   used with a single parameter. The other params `$prefix`, `$default`, `$requirements` and `$options`
255
   will still work, but have been deprecated. The `addPrefix` method should be used for this
256
   use-case instead.
257
   Before: `$parentCollection->addCollection($collection, '/prefix', [...], [...])`
258
   After:
259
   ```php
260
   $collection->addPrefix('/prefix', [...], [...]);
261
   $parentCollection->addCollection($collection);
262
   ```
263
 * added support for the method default argument values when defining a @Route
264
 * Adjacent placeholders without separator work now, e.g. `/{x}{y}{z}.{_format}`.
265
 * Characters that function as separator between placeholders are now whitelisted
266
   to fix routes with normal text around a variable, e.g. `/prefix{var}suffix`.
267
 * [BC BREAK] The default requirement of a variable has been changed slightly.
268
   Previously it disallowed the previous and the next char around a variable. Now
269
   it disallows the slash (`/`) and the next char. Using the previous char added
270
   no value and was problematic because the route `/index.{_format}` would be
271
   matched by `/index.ht/ml`.
272
 * The default requirement now uses possessive quantifiers when possible which
273
   improves matching performance by up to 20% because it prevents backtracking
274
   when it's not needed.
275
 * The ConfigurableRequirementsInterface can now also be used to disable the requirements
276
   check on URL generation completely by calling `setStrictRequirements(null)`. It
277
   improves performance in production environment as you should know that params always
278
   pass the requirements (otherwise it would break your link anyway).
279
 * There is no restriction on the route name anymore. So non-alphanumeric characters
280
   are now also allowed.
281
 * [BC BREAK] `RouteCompilerInterface::compile(Route $route)` was made static
282
   (only relevant if you implemented your own RouteCompiler).
283
 * Added possibility to generate relative paths and network paths in the UrlGenerator, e.g.
284
   "../parent-file" and "//example.com/dir/file". The third parameter in
285
   `UrlGeneratorInterface::generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH)`
286
   now accepts more values and you should use the constants defined in `UrlGeneratorInterface` for
287
   claritiy. The old method calls with a Boolean parameter will continue to work because they
288
   equal the signature using the constants.
289
 
290
2.1.0
291
-----
292
 
293
 * added RequestMatcherInterface
294
 * added RequestContext::fromRequest()
295
 * the UrlMatcher does not throw a \LogicException anymore when the required
296
   scheme is not the current one
297
 * added TraceableUrlMatcher
298
 * added the possibility to define options, default values and requirements
299
   for placeholders in prefix, including imported routes
300
 * added RouterInterface::getRouteCollection
301
 * [BC BREAK] the UrlMatcher urldecodes the route parameters only once, they
302
   were decoded twice before. Note that the `urldecode()` calls have been
303
   changed for a single `rawurldecode()` in order to support `+` for input
304
   paths.
305
 * added RouteCollection::getRoot method to retrieve the root of a
306
   RouteCollection tree
307
 * [BC BREAK] made RouteCollection::setParent private which could not have
308
   been used anyway without creating inconsistencies
309
 * [BC BREAK] RouteCollection::remove also removes a route from parent
310
   collections (not only from its children)
311
 * added ConfigurableRequirementsInterface that allows to disable exceptions
312
   (and generate empty URLs instead) when generating a route with an invalid
313
   parameter value