Commit Graph

40802 Commits

Author SHA1 Message Date
Robin Chalas
d25f650005 [Serializer] Fix tests 2019-04-27 23:20:35 +02:00
Grégoire Paris
9c11b98d0a
Use the apply tag instead of the filter tag
The filter has been deprecated in favor of the apply tag since Twig 2.9,
see https://twig.symfony.com/doc/2.x/tags/filter.html (apply does not
seem to have its own documentation page yet).
2019-04-27 20:55:44 +02:00
Fabien Potencier
e10dd789b2 minor #31053 Updated some translation files (cluster28)
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #31053).

Discussion
----------

Updated some translation files

Basque translations

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

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

1d5aaf63f5 Updated some translation files
2019-04-27 17:49:38 +01:00
Jordi Rejas
1d5aaf63f5 Updated some translation files 2019-04-27 17:49:24 +01:00
Fabien Potencier
148dca6931 bug #31275 [Translator] Preserve default domain when extracting strings from php files (Stadly)
This PR was squashed before being merged into the 3.4 branch (closes #31275).

Discussion
----------

[Translator] Preserve default domain when extracting strings from php files

| 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        |

Use default domain when extracting translation strings with `null` as domain.

Commits
-------

ca77d9a33e [Translator] Preserve default domain when extracting strings from php files
2019-04-27 17:22:08 +01:00
Stadly
ca77d9a33e [Translator] Preserve default domain when extracting strings from php files 2019-04-27 17:21:58 +01:00
Robin Chalas
7947b269ec Merge branch '3.4' into 4.2
* 3.4:
  [Form] Fix author tag + exception messages
  [TwigBridge] Fix deprecation on twig 2.9
  [Validator] Fixed imprecise translations
  [Validator] Add Dutch translations
  Intercept redirections only for HTML format
  Fix name and phpdoc of ContainerBuilder::removeBindings
  [Intl] Update the ICU data to 64.2
2019-04-27 13:48:17 +02:00
Nicolas Grekas
ada9aa0a07 bug #31240 Fix url matcher edge cases with trailing slash (arjenm)
This PR was squashed before being merged into the 4.2 branch (closes #31240).

Discussion
----------

Fix url matcher edge cases with trailing slash

| Q             | A
| ------------- | ---
| Branch?       | master / 4.2 (not sure whether this should've been against 4.2)
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no  (I think... if so, in obscure route configurations like the ones that broke in 4.2.7 ;) )
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30721
| License       | MIT

As stated in #30721 the "redirecting" (compiled) UrlMatcher ignored host-requirements when doing a 'matched url except for trailing slash difference'-redirect.

With routes like this, you'd get 404's rather than 200's on the second routes.

```yaml
host1.withTrail:
  path: /foo/ # host2/foo would become host2/foo/ due to this partial path-match
  host: host1

host2.withoutTrail: # A request for host2/foo should match this route
  path: /foo # host2/foo/ does not match this path
  host: host2
```

This was caused by too eagerly testing whether a route could've worked with an additional trailing slash.

If it could be, that would result in an attempt to redirect _before_ testing the host.

The original url would get the additional slash and prior to actually redirecting, it'd be retested against the available routes. _That new url_ would actually match no routes, since now the host check for the first routes would actually be executed and fail the match for those routes. The adjusted path in the route does not match the second sets of routes...

This PR moves the trailing-slash check to after the host checks. I've added several tests with variants on these edge cases.

*Note:* This is a bug in 4.2 (and 4.3).
I fixed it against master. It appears 4.2's PhpMatcherTrait was renamed to CompiledUrlMatcherTrait in 4.3. But that made it loose its history.
So I'm not sure how to proceed from here. I can rebase it on 4.2 and do the change in PhpMatcherTrait, but that would probably fail to merge in master? I'm not nearly proficient enough in Symfony PR's to know how to solve all this ;)

@nicolas-grekas also asked for these or similar tests to be added to 3.4 as 'proof' those routes worked in that version as well. I have not (yet) done so.

The tests did work on the non-redirecting UrlMatcher without change (i.e. just running UrlMatcherTest), which implies - to me at least - the routes where properly defined and should not result in 404's simply because a RedirectableUrlMatcherInterface _can_ do redirects.

Actually, since I needed to change UrlMatcher as well, I'm not convinced these bugs where totally absent in 3.4. They didn't occur with the compiled version, since the host check was the very first if-statement in that humongous if-tree it generated.

PS, the branch name is a bit dramatic ;)

Commits
-------

4fcfa9d85c Fix url matcher edge cases with trailing slash
2019-04-27 11:38:08 +02:00
Arjen van der Meijden
4fcfa9d85c Fix url matcher edge cases with trailing slash 2019-04-27 11:38:00 +02:00
Nicolas Grekas
a975d2ba84 minor #31281 [TwigBridge] Fix deprecation on twig 2.9 (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] Fix deprecation on twig 2.9

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

should make travis green

Commits
-------

ac8256ba9c [TwigBridge] Fix deprecation on twig 2.9
2019-04-27 10:50:03 +02:00
Nicolas Grekas
eaba717956 minor #31173 Fix name and phpdoc of ContainerBuilder::removeBindings (teohhanhui)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix name and phpdoc of ContainerBuilder::removeBindings

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/29944#discussion_r276718323
| License       | MIT
| Doc PR        | N/A

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

c93194d1db Fix name and phpdoc of ContainerBuilder::removeBindings
2019-04-27 10:44:00 +02:00
Christian Flothmann
f033ea4ab8 minor #31278 [Form] Fix author tag + exception messages (ro0NL)
This PR was squashed before being merged into the 3.4 branch (closes #31278).

Discussion
----------

[Form] Fix author tag + exception messages

| 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 | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

spotted in #31195 😅

Commits
-------

796f2fff9b [Form] Fix author tag + exception messages
2019-04-27 09:59:21 +02:00
Roland Franssen
796f2fff9b [Form] Fix author tag + exception messages 2019-04-27 09:59:15 +02:00
Robin Chalas
ac8256ba9c [TwigBridge] Fix deprecation on twig 2.9 2019-04-27 00:25:38 +02:00
Nicolas Grekas
5d8f5fc5bc minor #31243 [Security] Cleanup "Digest nonce has expired." translation (ro0NL)
This PR was merged into the 4.2 branch.

Discussion
----------

[Security] Cleanup "Digest nonce has expired." translation

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| 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 | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Running `php src/Symfony/Component/Translation/Resources/bin/translation-status.php` i see:

```
| Locale: nn      | Translated: 16/15
| Locale: tl      | Translated: 16/15
```

Here's the cleanup.

(ref #24336)

Commits
-------

e95445d830 [Security] Cleanup "Digest nonce has expired." translation
2019-04-26 09:45:25 +02:00
Nicolas Grekas
701ff3fa24 minor #31252 Fix left-associative ternary deprecation warnings for PHP 7.4 (thib92)
This PR was submitted for the master branch but it was merged into the 4.2 branch instead (closes #31252).

Discussion
----------

Fix left-associative ternary deprecation warnings for PHP 7.4

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

All the context is explained in issue #31246. Only two files (three occurrences in total) used a chained ternary operator in the Symfony codebase, which will be deprecated in PHP 7.4 (removed in PHP 8), following [this RFC](https://wiki.php.net/rfc/ternary_associativity).

Commits
-------

3022a3675b Fix left-associative ternary deprecation warnings for PHP 7.4
2019-04-26 09:24:18 +02:00
thib92
3022a3675b Fix left-associative ternary deprecation warnings for PHP 7.4 2019-04-26 09:24:05 +02:00
Nicolas Grekas
2774705c39 minor #31247 [Validator] Fixed imprecise translations (toniperic)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #31247).

Discussion
----------

[Validator] Fixed imprecise translations

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

Commits
-------

6b50b43fdc [Validator] Fixed imprecise translations
2019-04-26 09:14:49 +02:00
Toni Peric
6b50b43fdc [Validator] Fixed imprecise translations 2019-04-26 09:14:41 +02:00
Fabien Potencier
7efaa17eb8 minor #31244 [Validator] Add Dutch translations (ro0NL)
This PR was squashed before being merged into the 3.4 branch (closes #31244).

Discussion
----------

[Validator] Add Dutch translations

| 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 | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

```
| Locale: nl      | Translated: 90/90
```

Commits
-------

76a3373248 [Validator] Add Dutch translations
2019-04-25 15:34:36 +02:00
Roland Franssen
76a3373248 [Validator] Add Dutch translations 2019-04-25 15:34:30 +02:00
Roland Franssen
e95445d830 [Security] Cleanup "Digest nonce has expired." translation 2019-04-25 13:21:20 +02:00
Fabien Potencier
571647f7bf bug #31201 [Form] resolve class name parameters (xabbuh)
This PR was merged into the 4.2 branch.

Discussion
----------

[Form] resolve class name parameters

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

Commits
-------

5235be4aa3 resolve class name parameters
2019-04-24 09:23:24 +02:00
Fabien Potencier
d98f7833f7 bug #31213 [WebProfilerBundle] Intercept redirections only for HTML format (javiereguiluz)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] Intercept redirections only for HTML format

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| 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 and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31168
| License       | MIT
| Doc PR        | -

This applies the solution proposed by @bpolaszek in #31168.

Commits
-------

418678823b Intercept redirections only for HTML format
2019-04-24 09:02:22 +02:00
Fabien Potencier
0773baf1bc bug #31210 [PhpUnitBridge] fix reading phpunit.xml on bootstrap (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[PhpUnitBridge] fix reading phpunit.xml on bootstrap

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

Matches https://github.com/symfony/recipes/pull/561

Commits
-------

1d55f800e4 [PhpUnitBridge] fix reading phpunit.xml on bootstrap
2019-04-24 08:59:04 +02:00
Javier Eguiluz
418678823b Intercept redirections only for HTML format 2019-04-23 17:04:28 +02:00
Nicolas Grekas
1d55f800e4 [PhpUnitBridge] fix reading phpunit.xml on bootstrap 2019-04-23 16:37:24 +02:00
Christian Flothmann
5235be4aa3 resolve class name parameters 2019-04-23 07:54:40 +02:00
Fabien Potencier
e479b6902e fixed constraint 2019-04-22 12:59:06 +02:00
Fabien Potencier
f50ffa9350 bug #31023 [Routing] Fix route URL generation in CLI context (X-Coder264)
This PR was squashed before being merged into the 4.2 branch (closes #31023).

Discussion
----------

[Routing] Fix route URL generation in CLI context

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

This fixes #30996 and makes URL generation in the CLI context behave the same as it does in the web context where the `LocaleListener` sets the default locale (to the router context).

The Travis CI failure is related to the fact that the constraint for `symfony/routing` should be bumped to `^4.2.6` in the composer.json of the FrameworkBundle (when it gets tagged).

Commits
-------

4a1ad4a5d6 [Routing] Fix route URL generation in CLI context
2019-04-22 11:10:19 +02:00
Antonio Pauletich
4a1ad4a5d6 [Routing] Fix route URL generation in CLI context 2019-04-22 11:10:12 +02:00
Fabien Potencier
287da8d4c0 minor #31162 [Intl] Update the ICU data to 64.2 (jakzal)
This PR was merged into the 3.4 branch.

Discussion
----------

[Intl] Update the ICU data to 64.2

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

It didn't take long for the ICU team to release a new version.

From their [changelog](http://site.icu-project.org/download/64#TOC-ICU4C-Download), 64.2 provides bug fixes and:

* Draft Unicode 12.1 data integration
* Updated locale data imported from CLDR 35.1
* Support for the new Japanese era "Reiwa" (令和).

Commits
-------

9aa2349ac6 [Intl] Update the ICU data to 64.2
2019-04-21 18:20:00 +02:00
Fabien Potencier
097c229d92 bug #31117 [FrameworkBundle] fix math depth handler configuration (Raulnet)
This PR was merged into the 4.2 branch.

Discussion
----------

[FrameworkBundle] fix math depth handler configuration

| Q             | A
| ------------- | ---
| Branch?       |  4.2 f
| Bug fix?      | no "fix deprecated"
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/30998
| License       | MIT
| Doc PR        |

fix  serializer configuration max_deep_handler

Commits
-------

fb9fc804d3 fix math depth handler
2019-04-21 18:12:22 +02:00
Teoh Han Hui
c93194d1db
Fix name and phpdoc of ContainerBuilder::removeBindings 2019-04-20 17:32:49 +02:00
Nicolas Grekas
bff2db71e9 bug #31182 [Routing] fix trailing slash matching with empty-matching trailing vars (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[Routing] fix trailing slash matching with empty-matching trailing vars

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

Reported by @bmack in https://github.com/symfony/symfony/pull/31107#issuecomment-484681404

This highlights a small inconsistency that exists for a long time (checked on 2.7 at least):
`new Route('/en-en/{b}', ['b' => 'bbb'], ['b' => '.*'])` matches `/en-en/`
`new Route('/en-en/{b}', ['b' => 'bbb'], ['b' => '.+'])` doesn't match it
(while both match `/en-en` and `/en-en/foo`)

This PR ensures the former behavior is preserved, while #31167 redirects the later to `/en-en`.

Commits
-------

d6da21ac19 [Routing] fix trailing slash matching with empty-matching trailing vars
2019-04-19 16:27:49 +02:00
Nicolas Grekas
3b05c07029 Merge branch '3.4' into 4.2
* 3.4:
  [HttpFoundation] fix tests
  bumped Symfony version to 3.4.27
  updated VERSION for 3.4.26
  updated CHANGELOG for 3.4.26
2019-04-19 16:26:30 +02:00
Nicolas Grekas
4cef1da7fd minor #31184 [HttpFoundation] fix tests (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] fix tests

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

Commits
-------

8e93ef3d01 [HttpFoundation] fix tests
2019-04-19 15:52:17 +02:00
Nicolas Grekas
8e93ef3d01 [HttpFoundation] fix tests 2019-04-19 15:43:39 +02:00
Nicolas Grekas
d6da21ac19 [Routing] fix trailing slash matching with empty-matching trailing vars 2019-04-19 11:57:30 +02:00
Nicolas Grekas
243b257ca7 bug #31167 [Routing] fix matching trailing vars with defaults (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[Routing] fix matching trailing vars with defaults

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

Commits
-------

177dfbc170 [Routing] fix matching trailing vars with defaults
2019-04-18 15:30:56 +02:00
Nicolas Grekas
5379e7317f bug #31164 [Validator] fix LegacyTranslatorProxy (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[Validator] fix LegacyTranslatorProxy

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

Commits
-------

b1f3284669 [Validator] fix LegacyTranslatorProxy
2019-04-18 15:30:30 +02:00
Nicolas Grekas
177dfbc170 [Routing] fix matching trailing vars with defaults 2019-04-18 15:09:11 +02:00
Nicolas Grekas
b1f3284669 [Validator] fix LegacyTranslatorProxy 2019-04-18 14:28:43 +02:00
Jakub Zalas
9aa2349ac6
[Intl] Update the ICU data to 64.2 2019-04-18 10:57:10 +01:00
Raulnet
fb9fc804d3 fix math depth handler 2019-04-18 11:12:13 +02:00
Nicolas Grekas
cc497a57c5 bug #31156 [FrameworkBundle] call method with Translator component only (xabbuh)
This PR was merged into the 4.2 branch.

Discussion
----------

[FrameworkBundle] call method with Translator component only

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

Commits
-------

f49881d24a call method with Translator component only
2019-04-18 08:42:30 +02:00
Christian Flothmann
f49881d24a call method with Translator component only 2019-04-18 08:38:02 +02:00
Fabien Potencier
87aef6984c bumped Symfony version to 4.2.8 2019-04-17 18:20:51 +02:00
Fabien Potencier
6122c791d6
Merge pull request #31148 from fabpot/release-4.2.7
released v4.2.7
2019-04-17 18:17:33 +02:00
Fabien Potencier
44075f13e8 updated VERSION for 4.2.7 2019-04-17 18:17:13 +02:00