Commit Graph

35998 Commits

Author SHA1 Message Date
Nicolas Grekas
39dabcd5ba Merge branch '3.4' into 4.0
* 3.4:
  [Form][WCAG] Errors sign for people that do not see colors
  [Form][WCAG] Added role=\"presentation\" on tables & removed bootstrap4 table
2018-03-01 11:21:51 +01:00
Nicolas Grekas
c572e6c570 bug #26327 [Form][WCAG] Errors sign for people that do not see colors (Nyholm)
This PR was squashed before being merged into the 3.4 branch (closes #26327).

Discussion
----------

[Form][WCAG] Errors sign for people that do not see colors

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

According to my friend and WCAG2 expect [Sandra](https://twitter.com/sandrability):

> The form errors is correctly encoded and works great. But visually they may be hard to see for people that do not see colors very well. Try to improve errors with an icon to make it more visual clear that an error has occurred.

![screen shot 2018-02-26 at 17 42 01](https://user-images.githubusercontent.com/1275206/36802282-c81357c6-1cb4-11e8-843c-4592e3d597f9.png)

Commits
-------

3f8cd05 [Form][WCAG] Errors sign for people that do not see colors
2018-03-01 11:20:21 +01:00
Tobias Nyholm
3f8cd05c34 [Form][WCAG] Errors sign for people that do not see colors 2018-03-01 11:20:19 +01:00
Nicolas Grekas
dddef1bd55 minor #26349 Fix typo in test method name (keichinger)
This PR was merged into the 4.1-dev branch.

Discussion
----------

Fix typo in test method name

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

This fixes a small typo spotted in #23508 (see 8456f3b32c (r171488418))

Commits
-------

e5734aa Fix typo in test method name
2018-03-01 11:03:32 +01:00
Kai Eichinger
e5734aacc6
Fix typo in test method name
In regards to 8456f3b32c (r171488418)
2018-03-01 10:56:19 +01:00
Nicolas Grekas
bacae4d2d6 bug #26326 [Form][WCAG] Added role="presentation" on tables & removed bootstrap4 table (Nyholm)
This PR was squashed before being merged into the 3.4 branch (closes #26326).

Discussion
----------

[Form][WCAG] Added role="presentation" on tables & removed bootstrap4 table

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

According to my friend and WCAG2 expect [Sandra](https://twitter.com/sandrability):

> Tables works best for table data, it should not be used for doing layouts. If you really really want to use the label add `role="presentation"`. This will make screen readers to ignore the table structure which will make it easier to navigate. It will also prevent screen readers to read "row 1, column 1".
> But we should consider not using a table here.

Commits
-------

635220a [Form][WCAG] Added role=\"presentation\" on tables & removed bootstrap4 table
2018-03-01 09:50:24 +01:00
Tobias Nyholm
635220a657 [Form][WCAG] Added role=\"presentation\" on tables & removed bootstrap4 table 2018-03-01 09:50:19 +01:00
Fabien Potencier
1cb920ef3b
Merge pull request #26346 from fabpot/release-2.7.42
released v2.7.42
2018-02-28 14:57:23 -08:00
Fabien Potencier
751196e8f0 updated VERSION for 2.7.42 2018-02-28 14:53:23 -08:00
Fabien Potencier
621d440217 update CONTRIBUTORS for 2.7.42 2018-02-28 14:53:19 -08:00
Fabien Potencier
3000270452 updated CHANGELOG for 2.7.42 2018-02-28 14:53:13 -08:00
Fabien Potencier
97cee3a157 Merge branch '4.0'
* 4.0:
  [Form][WCAG] Add hidden labels on date and time fields
  Pass on previous exception in FatalThrowableError
  [Routing] remove dead code
  [Routing] fix typo
  [Form][WCAG] Fixed HTML errors
  fix merge
  [FrameworkBundle] [Console] add a warning when command is not found
  [WebProfilerBundle] limit ajax request to 100 and remove the last one
2018-02-28 13:50:15 -08:00
Fabien Potencier
96aac17c0d Merge branch '3.4' into 4.0
* 3.4:
  [Form][WCAG] Add hidden labels on date and time fields
  Pass on previous exception in FatalThrowableError
  [Routing] remove dead code
  [Routing] fix typo
  [Form][WCAG] Fixed HTML errors
  fix merge
  [FrameworkBundle] [Console] add a warning when command is not found
  [WebProfilerBundle] limit ajax request to 100 and remove the last one
2018-02-28 13:50:02 -08:00
Fabien Potencier
b7b6bd2605 Merge branch '2.8' into 3.4
* 2.8:
  Pass on previous exception in FatalThrowableError
  [Routing] remove dead code
  [Routing] fix typo
2018-02-28 13:49:22 -08:00
Fabien Potencier
3dd843ba7e Merge branch '2.7' into 2.8
* 2.7:
  Pass on previous exception in FatalThrowableError
  [Routing] remove dead code
  [Routing] fix typo
2018-02-28 13:47:46 -08:00
Fabien Potencier
18beaeedfd bug #26325 [Form][WCAG] Add hidden labels on date and time fields (Nyholm)
This PR was squashed before being merged into the 3.4 branch (closes #26325).

Discussion
----------

[Form][WCAG] Add hidden labels on date and time fields

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License       | MIT
| Doc PR        |

According to my friend and WCAG2 expect [Sandra](https://twitter.com/sandrability):

> "Guidance texts" (my translation) on DateType and DateTimeType etc are missing. It is great that they are grouped with a "fieldset" but it will be more clear if there was a label on each select. Especially since different countries have different time and date formats. The time form is read like "00 00" and you have no idea if it is seconds, minutes or hours. You may do "guidance texts" visually hidden if you do not want to change the looks of the form. But since "month" is shorten to "Jan" instead of "January" you may want to have clear and visual guidance texts.

Commits
-------

14978e905c [Form][WCAG] Add hidden labels on date and time fields
2018-02-28 13:47:15 -08:00
Tobias Nyholm
14978e905c [Form][WCAG] Add hidden labels on date and time fields 2018-02-28 13:47:10 -08:00
Fabien Potencier
1928fafb9f feature #26330 [FORM] Fix HTML errors. (Nyholm)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FORM] Fix HTML errors.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

As mentioned in #26328.
Range and color do not support "required" attribute

Commits
-------

f75d8c1985 Fix HTML errors.
2018-02-28 13:42:57 -08:00
Fabien Potencier
4c98001119 feature #26334 [SecurityBundle] Deprecate switch_user.stateless config node (chalasr)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[SecurityBundle] Deprecate switch_user.stateless config node

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/issues/8447

unused since 4.0.

Commits
-------

5781b8f1a1 [SecurityBundle] Deprecate switch_user.stateless config node
2018-02-28 13:40:40 -08:00
Fabien Potencier
40639589bf bug #26338 [Debug] Keep previous errors of Error instances (Philipp91)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #26338).

Discussion
----------

[Debug] Keep previous errors of Error instances

| Q             | A
| ------------- | ---
| Branch?       | 2.7 (I have tested against 4.0, but I guess it applies to all the older versions too)
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | ?
| Fixed tickets | --
| License       | MIT

Passing on the previous exception gives developers better debugging information. In particular, if you throw an uncaught `new \Error("Something", 0, new \Exception("Inner exception"))` or sth. like that today, you will not see the "Inner exception" text (which may be more helpful than the outer error) in the HTTP debug response. Converting exceptions into errors this way is a common pattern when an exception raised in a sub-routine cannot reasonably occur for a specific caller situation, so there it becomes an `AssertionError` instead.

Commits
-------

b1b6093f3d Pass on previous exception in FatalThrowableError
2018-02-28 13:02:44 -08:00
Philipp Keck
b1b6093f3d Pass on previous exception in FatalThrowableError 2018-02-28 13:02:44 -08:00
Nicolas Grekas
a5f58f22d7 [Process] fix interpolation of placeholders 2018-02-28 20:33:07 +01:00
Nicolas Grekas
4ae66dc18d [Routing] Handle "_canonical_route" 2018-02-28 12:40:48 +01:00
Frank de Jonge
e32c414b04 [Routing] Implement i18n routing 2018-02-28 12:40:22 +01:00
Nicolas Grekas
a1b241473d feature #26304 [Routing] support scheme requirement without redirectable dumped matcher (Tobion)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Routing] support scheme requirement without redirectable dumped matcher

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License       | MIT
| Doc PR        |

The scheme handling was just redirecting immediately without testing the other routes at all for potential matches. This can cause Problems when you try to have different routes/controllers for the same path but different schemes. See added test.

```
        $coll = new RouteCollection();
        $coll->add('https_route', new Route('/', array(), array(), array(), '', array('https')));
        $coll->add('http_route', new Route('/', array(), array(), array(), '', array('http')));
        $matcher = $this->getUrlMatcher($coll);
        $this->assertEquals(array('_route' => 'http_route'), $matcher->match('/'));
```

Instead of matching the right route, it would redirect immediatly as soon as it hits the first route.
This does not make sense and is not consistent with the other logic. Redirection should only happen when nothing matches. While fixing this I could also remove the limitation

> throw new \LogicException('The "schemes" requirement is only supported for URL matchers that implement RedirectableUrlMatcherInterface.');

If redirection is not possible, the wrong scheme will just not match the route. This is the same as already implemented by UrlMatcher (not RedirecableUrlMatcher). If redirection is supported, it will redirect to the first supported scheme if no other route matches. This makes the implementation similar to redirection for trailing slash and handling not allowed methods.

Also previously, the scheme redirection was done for non-safe verbs which shouldn't happen as well, ref. #25962

Commits
-------

f9b54c5 [Routing] support scheme requirement without redirectable dumped matcher
2018-02-28 12:38:29 +01:00
Tobias Schultze
f9b54c5ccd [Routing] support scheme requirement without redirectable dumped matcher 2018-02-28 12:35:06 +01:00
Nicolas Grekas
2f4b867b50 [Routing] remove dead code 2018-02-28 10:36:59 +01:00
Nicolas Grekas
c794fa821b [Routing] fix typo 2018-02-28 10:29:53 +01:00
Grégoire Pineau
8f16c2e39e [Security][Profiler] Display the original expression in 'Access decision log' 2018-02-28 09:32:47 +01:00
Nicolas Grekas
4a9e5c7099 minor #26270 [WebProfilerBundle] limit ajax request to 100 and remove the last one (Simperfit)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] limit ajax request to 100 and remove the last one

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | none fix merge
| License       | MIT

Merging back the bugfix to 3.4.

Commits
-------

33bace4 [WebProfilerBundle] limit ajax request to 100 and remove the last one
2018-02-27 19:18:46 +01:00
Roland Franssen
fe586acd92 [Config] Backport string|null api for node names 2018-02-27 17:11:57 +01:00
Robin Chalas
5781b8f1a1 [SecurityBundle] Deprecate switch_user.stateless config node 2018-02-27 15:11:07 +01:00
Tobias Nyholm
f75d8c1985
Fix HTML errors.
Range and color do not support "required" attribute
2018-02-27 10:04:56 +01:00
Fabien Potencier
b953e859b7 bug #26328 [Form][WCAG] Fixed HTML errors (Nyholm)
This PR was squashed before being merged into the 3.4 branch (closes #26328).

Discussion
----------

[Form][WCAG] Fixed HTML errors

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

According to my friend and WCAG2 expect [Sandra](https://twitter.com/sandrability):

> Fix your HTML errors.

Should I fix the same issues on other forms as well? Or could someone claim that is a BC break?

Commits
-------

fe668190c8 [Form][WCAG] Fixed HTML errors
2018-02-27 08:07:15 +01:00
Tobias Nyholm
fe668190c8 [Form][WCAG] Fixed HTML errors 2018-02-27 08:07:06 +01:00
Fabien Potencier
4261b19e75 bug #26290 [FrameworkBundle] [Console][DX] add a warning when command is not found (Simperfit)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] [Console][DX] add a warning when command is not found

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | none
| License       | MIT
| Doc PR        |

This PR add DX on the the console `find()` and `get()` methods when a command is not found because it has not been registered properly.

Commits
-------

efd8f7fa3a [FrameworkBundle] [Console] add a warning when command is not found
2018-02-27 08:02:49 +01:00
Nicolas Grekas
d419fd4cc8 fix merge 2018-02-26 19:35:35 +01:00
Nicolas Grekas
308e12cb59 Merge branch '4.0'
* 4.0:
  fix merge
2018-02-26 19:13:01 +01:00
Nicolas Grekas
6c32bcd77e fix merge 2018-02-26 19:12:53 +01:00
Nicolas Grekas
add5d84e8c Merge branch '4.0'
* 4.0:
  fix merge
2018-02-26 18:43:03 +01:00
Nicolas Grekas
05782adc3b Merge branch '3.4' into 4.0
* 3.4:
  fix merge
2018-02-26 18:39:40 +01:00
Nicolas Grekas
ea7a66d532 fix merge 2018-02-26 18:39:27 +01:00
Nicolas Grekas
f06fa04ff1 Merge branch '4.0'
* 4.0:
  Fix typos
  [Routing] remove useless failing mocks
  [appveyor] Workaround GitHub disabling of low versions of TLS
  Use long array syntax
  [Routing] Fix GC control of PHP-DSL
  [Routing] Don't throw 405 when scheme requirement doesn't match
  [Routing] Revert throwing 405 on missed slash/scheme redirections
  [WebProfilerBundle] fix test after ajax path updated
  Fix ArrayInput::toString() for InputArgument::IS_ARRAY args
  Update excluded_ajax_paths for sf4
  Add missing use for RoleInterface
  Add missing use of Role
  [Routing] fix CS
  add container.autowiring.strict_mode to 3.4 docs
  Set controller without __invoke method from invokable class
  [VarDumper] Fixed PHPDoc
2018-02-26 18:04:28 +01:00
Nicolas Grekas
8d9d7e7e65 Merge branch '3.4' into 4.0
* 3.4:
  Fix typos
2018-02-26 16:57:42 +01:00
Nicolas Grekas
80f993fdba Fix typos 2018-02-26 16:57:04 +01:00
Nicolas Grekas
b56674720c Merge branch '3.4' into 4.0
* 3.4:
  [Routing] remove useless failing mocks
  [appveyor] Workaround GitHub disabling of low versions of TLS
  Use long array syntax
  [Routing] Fix GC control of PHP-DSL
  [Routing] Don't throw 405 when scheme requirement doesn't match
  [Routing] Revert throwing 405 on missed slash/scheme redirections
  [WebProfilerBundle] fix test after ajax path updated
  Fix ArrayInput::toString() for InputArgument::IS_ARRAY args
  Update excluded_ajax_paths for sf4
  Add missing use for RoleInterface
  [Routing] fix CS
  add container.autowiring.strict_mode to 3.4 docs
  Set controller without __invoke method from invokable class
  [VarDumper] Fixed PHPDoc
2018-02-26 16:55:47 +01:00
Nicolas Grekas
119291883f bug #26318 [Routing] Fix GC control of PHP-DSL (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Routing] Fix GC control of PHP-DSL

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Adding fluently in a collection is broken currently.

Commits
-------

239f2e2 [Routing] Fix GC control of PHP-DSL
2018-02-26 16:49:59 +01:00
Nicolas Grekas
68ff3d3fa2 Merge branch '2.8' into 3.4
* 2.8:
  [Routing] remove useless failing mocks
2018-02-26 16:48:52 +01:00
Nicolas Grekas
64e538e730 Merge branch '2.7' into 2.8
* 2.7:
  [Routing] remove useless failing mocks
2018-02-26 16:48:27 +01:00
Nicolas Grekas
87bbe5ef5f [Routing] remove useless failing mocks 2018-02-26 16:48:14 +01:00