Commit Graph

27615 Commits

Author SHA1 Message Date
Kévin Dunglas
4a8306e7be [PropertyInfo] Minor cleanup and perf improvement 2018-04-25 14:21:47 +02:00
Nicolas Grekas
80e63e4146 Merge branch '2.7' into 2.8
* 2.7:
  [Serializer] optims and cleanup
  [Form] Add translations for Tagalog
2018-02-14 14:58:24 +01:00
Nicolas Grekas
2bccaaa9d1 minor #26141 [Serializer] optims and cleanup (dunglas)
This PR was squashed before being merged into the 2.7 branch (closes #26141).

Discussion
----------

[Serializer] optims and cleanup

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | n/a <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

Tiny optimizations and small code cleanup. The opcode triggering is especially useful in the hot path (normalizers and encoders) because it's a recursive process.

Commits
-------

8ee8387 [Serializer] optims and cleanup
2018-02-14 14:56:38 +01:00
Kévin Dunglas
8ee83879eb [Serializer] optims and cleanup 2018-02-14 14:56:36 +01:00
Nicolas Grekas
ee2892e847 bug #26173 [Security] fix accessing request values (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Security] fix accessing request values

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

Commits
-------

1fc5df6 fix accessing request values
2018-02-14 13:12:46 +01:00
Christian Flothmann
1fc5df683b fix accessing request values 2018-02-14 10:05:17 +01:00
Nicolas Grekas
ce13854177 bug #26159 created validator.tl.xlf for Form/Translations (ergiegonzaga)
This PR was merged into the 2.7 branch.

Discussion
----------

created validator.tl.xlf for Form/Translations

| Q             | A
| ------------- | ---
| Branch?       | master  / 2.7 up to 4.0 for bug fixes <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? |no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

6d4e5e0 [Form] Add translations for Tagalog
2018-02-13 10:04:03 +01:00
Ergie Gonzaga
6d4e5e0d0a [Form] Add translations for Tagalog 2018-02-13 10:02:42 +01:00
Nicolas Grekas
245dd72a4d Merge branch '2.7' into 2.8
* 2.7:
  [Routing] Throw 405 instead of 404 when redirect is not possible
  [Process] fix test case
  Add security.tl.xlf to legacy directory
  [Security][Validator] Add translations for Tagalog
  fixed typo
  Typo fix in security component lithuanian translation.
  [Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
2018-02-12 18:44:58 +01:00
Fabien Potencier
aa3a04ad28 bug #26100 [Routing] Throw 405 instead of 404 when redirect is not possible (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] Throw 405 instead of 404 when redirect is not possible

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

Finishes #25962.

Commits
-------

92842814f6 [Routing] Throw 405 instead of 404 when redirect is not possible
2018-02-12 18:42:00 +01:00
Nicolas Grekas
92842814f6 [Routing] Throw 405 instead of 404 when redirect is not possible 2018-02-12 17:45:29 +01:00
Nicolas Grekas
72183106cd minor #26150 [Process] fix test case (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Process] fix test case

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

Commits
-------

d317496 [Process] fix test case
2018-02-12 15:54:24 +01:00
Nicolas Grekas
d317496b6b [Process] fix test case 2018-02-12 15:35:15 +01:00
Nicolas Grekas
45d288a4ae Add security.tl.xlf to legacy directory 2018-02-12 15:12:46 +01:00
Fabien Potencier
5a70b153e1 minor #26130 [Security][Validator] Add translations for Tagalog (ergiegonzaga)
This PR was submitted for the master branch but it was squashed and merged into the 2.7 branch instead (closes #26130).

Discussion
----------

[Security][Validator] Add translations for Tagalog

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? |no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   |no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

60abecafb9 [Security][Validator] Add translations for Tagalog
2018-02-12 13:32:33 +01:00
ergiegonzaga
60abecafb9 [Security][Validator] Add translations for Tagalog 2018-02-12 13:32:32 +01:00
Fabien Potencier
2f7f9efbc6 fixed typo 2018-02-12 08:05:20 +01:00
Fabien Potencier
6856d8f60c minor #26144 Typo fix in security component translation. (FirstSailor)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #26144).

Discussion
----------

Typo fix in security component translation.

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

Lithuanian translation typo fix in security component

Commits
-------

a0d8b04f7f Typo fix in security component lithuanian translation.
2018-02-12 08:03:35 +01:00
Rokas Mikalkėnas
a0d8b04f7f Typo fix in security component lithuanian translation. 2018-02-12 08:03:35 +01:00
Fabien Potencier
0b08f37ed3 bug #26040 [Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder

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

Commits
-------

3a470c4ecf [Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
2018-02-12 07:54:20 +01:00
Nicolas Grekas
e490d663d6 Merge branch '2.7' into 2.8
* 2.7:
  [Bridge\PhpUnit] Exit as late as possible
  Update Repository Symlink Helper
  Document explicitly that dotfiles and vcs files are ignored by default
  do not mock the container builder in tests
2018-02-11 17:53:59 +01:00
Nicolas Grekas
ec9a109b5d bug #26012 Exit as late as possible (greg0ire)
This PR was merged into the 2.7 branch.

Discussion
----------

Exit as late as possible

People might want to register other shutdown functions that should be
able to control the exit code themselves, without the deprecation error
handler taking over. The php manual says:

> If you call exit() within one registered shutdown function, processing
> will stop completely and no other registered shutdown functions will be
> called.

See https://secure.php.net/manual/en/function.register-shutdown-function.php

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

<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

97370a3 [Bridge\PhpUnit] Exit as late as possible
2018-02-11 16:00:08 +01:00
Grégoire Paris
97370a3dd9 [Bridge\PhpUnit] Exit as late as possible
People might want to register other shutdown functions that should be
able to control the exit code themselves, without the deprecation error
handler taking over. The php manual says:

> If you call exit() within one registered shutdown function, processing
> will stop completely and no other registered shutdown functions will be
> called.

See https://secure.php.net/manual/en/function.register-shutdown-function.php
2018-02-11 15:57:09 +01:00
Nicolas Grekas
573e462b55 minor #26091 Update Repository Symlink Helper (zanbaldwin)
This PR was submitted for the 3.3 branch but it was merged into the 2.7 branch instead (closes #26091).

Discussion
----------

Update Repository Symlink Helper

The `link` script is super-useful (thanks @dunglas!) for development - but for some it's unusable in its current form due to the use of `GLOB_BRACE` which is [unavailable on certain platforms](https://github.com/zendframework/zend-stdlib/issues/58#issue-147689568) (such as Alpine) and is a platform-specific problem that will not be fixed in future versions of PHP.

I know the code is a little condensed and not the easiest to read, but I thought that wasn't really an issue considering this is just a development helper script and not part of the 'official' Symfony code base.

| Q             | A
| ------------- | ---
| Branch?       | `3.3`
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | No tests for `/link`
| Fixed tickets |
| License       | MIT
| Doc PR        | can't find documentation for `/link`

<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

a9568d7 Update Repository Symlink Helper
2018-02-11 12:15:02 +01:00
Zan Baldwin
a9568d7c60 Update Repository Symlink Helper
Add workaround for GLOB_BRACE, which is unavailable on certain platforms (such as Alpine).
2018-02-11 12:15:02 +01:00
Nicolas Grekas
65bab998e5 minor #26087 do not mock the container builder in tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

do not mock the container builder in tests

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

Commits
-------

dab4222 do not mock the container builder in tests
2018-02-11 11:53:40 +01:00
Nicolas Grekas
6b0109ff25 minor #26134 Document explicitly that dotfiles and vcs files are ignored by default (mnapoli)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #26134).

Discussion
----------

Document explicitly that dotfiles and vcs files are ignored by default

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

This change makes it clear whether or not each of those two options are enabled by default.

Without this documentation one has to look into the code.

---

For documentation PRs should I target master or the same branch as bugs?

Commits
-------

e88e1ff Document explicitly that dotfiles and vcs files are ignored by default
2018-02-11 11:02:34 +01:00
Matthieu Napoli
e88e1ff494 Document explicitly that dotfiles and vcs files are ignored by default
This change makes it clear whether or not each of those two options are enabled by default.

Without this documentation one has to look into the code.
2018-02-11 11:02:34 +01:00
Christian Flothmann
641a46bcb6 Merge branch '2.7' into 2.8
* 2.7:
  [SecurityBundle] Backport test
  Fix misspelling variable
  [DI] minor: use a strict comparision in setDecoratedService
  Follow-on to #25825: Fix edge case in getParameterOption.
  keep the context when validating forms
2018-02-09 14:57:28 +01:00
Robin Chalas
36e79f7c21 minor #26103 [PropertyInfo] backport regression test from 3.4 (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[PropertyInfo] backport regression test from 3.4

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

Commits
-------

a9ab167 backport regression test from 3.4
2018-02-09 14:09:13 +01:00
Robin Chalas
b22f1df8f4 minor #26113 [SecurityBundle] Backport test (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[SecurityBundle] Backport test

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

<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

d195a6f [SecurityBundle] Backport test
2018-02-09 13:56:29 +01:00
Robin Chalas
d195a6f060 [SecurityBundle] Backport test 2018-02-09 13:55:03 +01:00
Robin Chalas
e6245bad55 bug #26111 [Security] fix merge of 2.7 into 2.8 + add test case (dmaicher)
This PR was merged into the 2.8 branch.

Discussion
----------

[Security] fix merge of 2.7 into 2.8 + add test case

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

This fixes the merge mistake done in 899bf99879

that caused this fail with the added test case:

```
There was 1 failure:

1) Symfony\Component\Security\Tests\Http\Firewall\UsernamePasswordFormAuthenticationListenerTest::testHandleNonStringUsername with data set #1 (false)
Failed asserting that exception of type "TypeError" matches expected exception "\Symfony\Component\HttpKernel\Exception\BadRequestHttpException". Message was: "Argument 1 passed to Symfony\Component\Security\Http\ParameterBagUtils::getParameterBagValue() must be an instance of Symfony\Component\HttpFoundation\ParameterBag, instance of Symfony\Component\HttpFoundation\Request given, called in /var/www/symfony/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php on line 100" at
/var/www/symfony/src/Symfony/Component/Security/Http/ParameterBagUtils.php:39
/var/www/symfony/src/Symfony/Component/Security/Http/Firewall/UsernamePasswordFormAuthenticationListener.php:100
/var/www/symfony/src/Symfony/Component/Security/Http/Firewall/AbstractAuthenticationListener.php:140
/var/www/symfony/src/Symfony/Component/Security/Http/Tests/Firewall/UsernamePasswordFormAuthenticationListenerTest.php:102
```

Original fix in 2.7: https://github.com/symfony/symfony/pull/25657/files#diff-e07c3e5653e210d017545d47c1bd7e76R111

Commits
-------

51d9008 [Security] fix merge of 2.7 into 2.8 + add test case
2018-02-09 13:50:04 +01:00
David Maicher
51d9008d68 [Security] fix merge of 2.7 into 2.8 + add test case 2018-02-09 13:42:37 +01:00
Christian Flothmann
a9ab167abf backport regression test from 3.4 2018-02-09 09:09:30 +01:00
Christian Flothmann
dab422287f do not mock the container builder in tests 2018-02-08 09:15:30 +01:00
Fabien Potencier
f7d9701cdf bug #25893 [Console] Fix hasParameterOption / getParameterOption when used with multiple flags (greg-1-anderson)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix hasParameterOption / getParameterOption when used with multiple flags

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no (Fixes BC break in #24987)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #25825
| License       | MIT
| Doc PR        | n/a

Proposed resolution to #25825:
- Back out #24987
- Fix getParameterOption for short options with values, e.g. `-edev`

Commits
-------

35f98e2089 Follow-on to #25825: Fix edge case in getParameterOption.
2018-02-07 07:09:50 +01:00
Fabien Potencier
12447d972f bug #25940 [Form] keep the context when validating forms (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] keep the context when validating forms

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

Commits
-------

317da3bdf8 keep the context when validating forms
2018-02-07 06:08:29 +01:00
Nicolas Grekas
7ac5447f57 minor #26049 [DI] minor: use a strict comparison in setDecoratedService (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] minor: use a strict comparison in setDecoratedService

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

f167b50 [DI] minor: use a strict comparision in setDecoratedService
2018-02-06 11:19:30 +01:00
Nicolas Grekas
5cf79ccf92 minor #26063 Fix misspelling variable (carusogabriel)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix misspelling variable

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

899ead2 Fix misspelling variable
2018-02-06 10:50:57 +01:00
Gabriel Caruso
899ead2b66
Fix misspelling variable 2018-02-06 07:47:25 -02:00
Kévin Dunglas
f167b505c4
[DI] minor: use a strict comparision in setDecoratedService 2018-02-05 08:51:24 +01:00
Nicolas Grekas
c337bf6810 Merge branch '2.7' into 2.8
* 2.7:
  Use the PCRE_DOLLAR_ENDONLY modifier in route regexes
2018-02-04 17:41:06 +01:00
Nicolas Grekas
3a470c4ecf [Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder 2018-02-04 17:22:42 +01:00
Nicolas Grekas
478fbdc241 bug #25373 Use the PCRE_DOLLAR_ENDONLY modifier in route regexes (mpdude)
This PR was squashed before being merged into the 2.7 branch (closes #25373).

Discussion
----------

Use the PCRE_DOLLAR_ENDONLY modifier in route regexes

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

`UrlMatcher::match($pathinfo)` applies `rawurldecode()` to the `$pathinfo` before trying to match it against the routes.

If the URL contains a percent-encoded trailing newline (like in `/foo%0a`), the default PHP PCRE will still consider `#^/foo$#` a match, as the `$` metacharacter will also match *immediately before* the final character *if it is a newline*. This behavior can be changed by applying the [`PCRE_DOLLAR_ENDONLY` modifier](http://php.net/manual/en/reference.pcre.pattern.modifiers.php).

Without this change, URLs with trailing `%0a` lead to weird notices further down the road, for example when the `RedirectableUrlMatcher` or its equivalent in `PhpMatcherDumper` kick in, look at the last character (this time actually the newline), append a `/` and try to redirect to the resulting URL. Ultimately, PHP will complain with `Warning: Header may not contain more than a single header, new line detected` when sending the `Location` header.

Commits
-------

f713a3e Use the PCRE_DOLLAR_ENDONLY modifier in route regexes
2018-02-04 16:51:07 +01:00
Matthias Pigulla
f713a3e879 Use the PCRE_DOLLAR_ENDONLY modifier in route regexes 2018-02-04 16:50:24 +01:00
Nicolas Grekas
8ecf01b521 Merge branch '2.7' into 2.8
* 2.7:
  [travis] cache compiled php extensions
2018-02-04 13:53:46 +01:00
Nicolas Grekas
c219755f17 minor #26039 [travis] cache compiled php extensions (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[travis] cache compiled php extensions

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

Should save more that 80s per job on PHP 7 esp.

Commits
-------

b9def8a [travis] cache compiled php extensions
2018-02-04 13:53:07 +01:00
Nicolas Grekas
b9def8ab50 [travis] cache compiled php extensions 2018-02-04 10:47:47 +01:00
Nicolas Grekas
48db494b19 fix merge 2018-02-03 15:55:47 +01:00