8000 Merge branch '2.6' into 2.7 · symfony/symfony@69b07e9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 69b07e9

Browse files
committed
Merge branch '2.6' into 2.7
* 2.6: Update filesystem readme.md to include exists method Add machine readable events Fixed minor typo [FrameworkBundle] Fix server start in case the PHP binary is not found Update UPGRADE-2.6.md [HttpKernel][2.6] Adding support for invokable controllers in the RequestDataCollector fixed typo [Translations] Added missing Hebrew language trans-unit sources [DependencyInjection] inlined factory not referenced Fixed case for empty folder Fixed whitespace control for password form widget [Routing] correctly initialize condition as string
2 parents d94d837 + e7067cb commit 69b07e9

File tree

23 files changed

+521
-90
lines changed

23 files changed

+521
-90
lines changed

UPGRADE-2.6.md

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,20 @@ Validator
8181
Security
8282
--------
8383

84-
* The `SecurityContextInterface` is marked as deprecated in favor of the
85-
`Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface` and
84+
* The `SecurityContextInterface` is marked as deprecated in favor of the
85+
`Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface` and
8686
`Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface`.
8787
```
8888
isGranted => AuthorizationCheckerInterface
8989
getToken => TokenStorageInterface
9090
setToken => TokenStorageInterface
9191
```
92-
The Implementations have moved too, The `SecurityContext` is marked as
93-
deprecated and has been split to use the `AuthorizationCheckerInterface`
94-
and `TokenStorage`. This change is 100% Backwards Compatible as the SecurityContext
92+
The Implementations have moved too, The `SecurityContext` is marked as
93+
deprecated and has been split to use the `AuthorizationCheckerInterface`
94+
and `TokenStorage`. This change is 100% Backwards Compatible as the SecurityContext
9595
delegates the methods.
9696

97-
* The service `security.context` is deprecated along with the above change. Recommended
97+
* The service `security.context` is deprecated along with the above change. Recommended
9898
to use instead:
9999
```
100100
@security.authorization_checker => isGranted()
@@ -133,189 +133,189 @@ OptionsResolver
133133
---------------
134134

135135
* The "array" type hint was removed from the `OptionsResolverInterface` methods
136-
`setRequired()`, `setAllowedValues()`, `addAllowedValues()`,
136+
`setRequired()`, `setAllowedValues()`, `addAllowedValues()`,
137137
`setAllowedTypes()` and `addAllowedTypes()`. You must remove the type hint
138138
from your implementations.
139-
139+
140140
* The interface `OptionsResolverInterface` was deprecated, since
141141
`OptionsResolver` instances are not supposed to be shared between classes.
142142
You should type hint against `OptionsResolver` instead.
143-
143+
144144
Before:
145-
145+
146146
```php
147147
protected function configureOptions(OptionsResolverInterface $resolver)
148148
{
149149
// ...
150150
}
151151
```
152-
152+
153153
After:
154-
154+
155155
```php
156156
protected function configureOptions(OptionsResolver $resolver)
157157
{
158158
// ...
159159
}
160160
```
161-
161+
162162
* `OptionsResolver::isRequired()` now returns `true` if a required option has
163163
a default value set. The new method `isMissing()` exhibits the old
164164
functionality of `isRequired()`.
165-
165+
166166
Before:
167-
167+
168168
```php
169169
$resolver->setRequired(array('port'));
170-
170+
171171
$resolver->isRequired('port');
172172
// => true
173-
173+
174174
$resolver->setDefaults(array('port' => 25));
175-
175+
176176
$resolver->isRequired('port');
177177
// => false
178178
```
179-
179+
180180
After:
181-
181+
182182
```php
183183
$resolver->setRequired(array('port'));
184-
184+
185185
$resolver->isRequired('port');
186186
// => true
187187
$resolver->isMissing('port');
188188
// => true
189-
189+
190190
$resolver->setDefaults(array('port' => 25));
191-
191+
192192
$resolver->isRequired('port');
193193
// => true
194194
$resolver->isMissing('port');
195195
// => false
196196
```
197-
197+
198198
* `OptionsResolver::replaceDefaults()` was deprecated. Use `clear()` and
199199
`setDefaults()` instead.
200-
200+
201201
Before:
202-
202+
203203
```php
204204
$resolver->replaceDefaults(array(
205205
'port' => 25,
206206
));
207207
```
208-
208+
209209
After:
210-
210+
211211
```php
212212
$resolver->clear();
213213
$resolver->setDefaults(array(
214214
'port' => 25,
215215
));
216216
```
217-
217+
218218
* `OptionsResolver::setOptional()` was deprecated. Use `setDefined()` instead.
219-
219+
220220
Before:
221-
221+
222222
```php
223223
$resolver->setOptional(array('port'));
224224
```
225-
225+
226226
After:
227-
227+
228228
```php
229229
$resolver->setDefined('port');
230230
```
231-
231+
232232
* `OptionsResolver::isKnown()` was deprecated. Use `isDefined()` instead.
233-
233+
234234
Before:
235-
235+
236236
```php
237237
if ($resolver->isKnown('port')) {
238238
// ...
239239
}
240240
```
241-
241+
242242
After:
243-
243+
244244
```php
245245
if ($resolver->isDefined('port')) {
246246
// ...
247247
}
248248
```
249-
249+
250250
* The methods `setAllowedValues()`, `addAllowedValues()`, `setAllowedTypes()`
251251
and `addAllowedTypes()` were changed to modify one option at a time instead
252252
of batch processing options. The old API exists for backwards compatibility,
253253
but will be removed in Symfony 3.0.
254-
254+
255255
Before:
256-
256+
257257
```php
258258
$resolver->setAllowedValues(array(
259259
'method' => array('POST', 'GET'),
260260
));
261261
```
262-
262+
263263
After:
264-
264+
265265
```php
266266
$resolver->setAllowedValues('method', array('POST', 'GET'));
267267
```
268-
268+
269269
* The class `Options` was merged into `OptionsResolver`. If you instantiated
270270
this class manually, you should instantiate `OptionsResolver` now.
271271
`Options` is now a marker interface implemented by `OptionsResolver`.
272-
272+
273273
Before:
274-
274+
275275
```php
276276
$options = new Options();
277277
```
278-
278+
279279
After:
280-
280+
281281
```php
282282
$resolver = new OptionsResolver();
283283
```
284-
285-
* Normalizers for defined but unset options are not executed anymore. If you
284+
285+
* Normalizers for defined but unset options are not executed anymore. If you
286286
want to have them executed, you should define a default value.
287-
287+
288288
Before:
289-
289+
290290
```php
291291
$resolver->setOptional(array('port'));
292292
$resolver->setNormalizers(array(
293293
'port' => function ($options, $value) {
294294
// return normalized value
295295
}
296296
));
297-
297+
298298
$options = $resolver->resolve($options);
299299
```
300-
300+
301301
After:
302-
302+
303303
```php
304304
$resolver->setDefault('port', null);
305305
$resolver->setNormalizer('port', function ($options, $value) {
306306
// return normalized value
307307
});
308-
308+
309309
$options = $resolver->resolve($options);
310310
```
311-
311+
312312
* When undefined options are passed, `resolve()` now throws an
313313
`UndefinedOptionsException` instead of an `InvalidOptionsException`.
314314
`InvalidOptionsException` is only thrown when option values fail their
315315
validation constraints.
316-
316+
317317
Before:
318-
318+
319319
```php
320320
$resolver->setDefaults(array(
321321
'transport' => 'smtp',
@@ -324,16 +324,16 @@ OptionsResolver
324324
$resolver->setAllowedTypes(array(
325325
'port' => 'integer',
326326
));
327-
327+
328328
// throws InvalidOptionsException
329329
$resolver->resolve(array('foo' => 'bar'));
330-
330+
331331
// throws InvalidOptionsException
332332
$resolver->resolve(array('port' => '25'));
333333
```
334-
334+
335335
After:
336-
336+
337337
```php
338338
$resolver->setDefaults(array(
339339
'transport' => 'smtp',
@@ -342,10 +342,10 @@ OptionsResolver
342342
$resolver->setAllowedTypes(array(
343343
'port' => 'integer',
344344
));
345-
345+
346346
// throws UndefinedOptionsException
347347
$resolver->resolve(array('foo' => 'bar'));
348-
348+
349349
// throws InvalidOptionsException
350350
$resolver->resolve(array('port' => '25'));
351351
```
@@ -357,9 +357,9 @@ The component and the bundle are new to Symfony 2.6. We encourage you
357357
to enable the bundle in your `app/AppKernel.php` for the *dev* or *test*
358358
environments. Just add this line before loading the `WebProfilerBundle`:
359359

360-
```php
361-
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
362-
```
360+
```php
361+
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
362+
```
363363

364364
Then enjoy dumping variables by calling `dump($var)` anywhere in your PHP
365365
and `{% dump var %}` or `{{ dump(var) }}` in Twig. Dumps are displayed

UPGRADE-3.0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ UPGRADE FROM 2.x to 3.0
88

99
* `registerNamespaces()` -> `addPrefixes()`
1010
* `registerPrefixes()` -> `addPrefixes()`
11-
* `registerNamespaces()` -> `addPrefix()`
12-
* `registerPrefixes()` -> `addPrefix()`
11+
* `registerNamespace()` -> `addPrefix()`
12+
* `registerPrefix()` -> `addPrefix()`
1313
* `getNamespaces()` -> `getPrefixes()`
1414
* `getNamespaceFallbacks()` -> `getFallbackDirs()`
1515
* `getPrefixFallbacks()` -> `getFallbackDirs()`

src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162

163163
{% block password_widget -%}
164164
{% set type = type|default('password') %}
165-
{{ block('form_widget_simple') }}
165+
{{- block('form_widget_simple') -}}
166166
{%- endblock password_widget %}
167167

168168
{% block hidden_widget -%}

0 commit comments

Comments
 (0)
0