Commit Graph

22296 Commits

Author SHA1 Message Date
Nicolas Grekas
124d338446 Merge branch '2.7' into 2.8
* 2.7:
  Another PR template tweak
  [WebProfilerBundle] limit ajax request to 100 and remove the last one
2018-02-22 11:35:54 +01:00
Fabien Potencier
ddc32e37b8 bug #26236 [PropertyInfo] ReflectionExtractor: give a chance to other extractors if no properties (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[PropertyInfo] ReflectionExtractor: give a chance to other extractors if no properties

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| 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 | #25803 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

For instance when using `__call()`, see #25803.
<!--
- 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
-------

270147b04f [PropertyInfo] ReflectionExtractor: give a chance to other extractors if no properties
2018-02-19 21:28:07 +01:00
Fabien Potencier
cb53f4ccd5 bug #25557 [WebProfilerBundle] add a way to limit ajax request (Simperfit)
This PR was merged into the 2.7 branch.

Discussion
----------

[WebProfilerBundle] add a way to limit ajax request

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| 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?   | yes
| Fixed tickets | #22688
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

I need to add the doc entry and the reproducer to test that everything is ok.

Commits
-------

9ff86d6181 [WebProfilerBundle] limit ajax request to 100 and remove the last one
2018-02-19 21:11:32 +01:00
Nicolas Grekas
9cbb2569b9 Merge branch '2.7' into 2.8
* 2.7:
  Clean calls to http_build_query()
  [HttpFoundation] Fix missing "throw" in JsonResponse
  Improve the documentation of
  Suppress warning from sapi_windows_vt100_support on stream other than STDIO
  removed extra-verbose comments
  Fixes #26136: Avoid emitting warning in hasParameterOption()
  Added a README entry to the PR template
  [HttpFoundation] Add x-zip-compressed to MimeTypeExtensionGuesser.
  [DI] Add null check for removeChild
2018-02-19 17:23:47 +01:00
Nicolas Grekas
862e347623 minor #26233 Clean calls to http_build_query() (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Clean calls to http_build_query()

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

Commits
-------

4055224 Clean calls to http_build_query()
2018-02-19 17:21:10 +01:00
Kévin Dunglas
270147b04f
[PropertyInfo] ReflectionExtractor: give a chance to other extractors if no properties 2018-02-19 17:05:09 +01:00
Nicolas Grekas
4055224373 Clean calls to http_build_query() 2018-02-19 15:59:04 +01:00
Amrouche Hamza
9ff86d6181
[WebProfilerBundle] limit ajax request to 100 and remove the last one 2018-02-19 15:17:52 +01:00
Nicolas Grekas
7490f0b060 [HttpFoundation] Fix missing "throw" in JsonResponse 2018-02-19 12:59:32 +01:00
Matthieu Napoli
0e4d26a568 Improve the documentation of 2018-02-19 08:08:51 +01:00
Adam Klvač
43f942159d Suppress warning from sapi_windows_vt100_support on stream other than STDIO 2018-02-18 14:02:56 +01:00
Fabien Potencier
233774c929 minor #26191 [HttpFoundation] Add x-zip-compressed to MimeTypeExtensionGuesser. (jenkoian)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Add x-zip-compressed to MimeTypeExtensionGuesser.

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

Zip files uploaded on Windows often have a mime type of `x-zip-compressed`. This patch adds support for this mime type to `MimeTypeExtensionGuesser`.

The mime type seems to be a valid mime type for zip files according to http://filext.com/file-extension/ZIP

Commits
-------

ba3e19ae21 [HttpFoundation] Add x-zip-compressed to MimeTypeExtensionGuesser.
2018-02-16 06:45:53 +01:00
Fabien Potencier
800cadfb82 removed extra-verbose comments 2018-02-16 06:42:51 +01:00
Fabien Potencier
9d3d237f18 bug #26156 Fixes #26136: Avoid emitting warning in hasParameterOption() (greg-1-anderson)
This PR was squashed before being merged into the 2.7 branch (closes #26156).

Discussion
----------

Fixes #26136: Avoid emitting warning in hasParameterOption()

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

When hasParameterOption / getParameterOption is passed invalid parameters, a warning may be emitted. While the root cause of the warning is an invalid parameter supplied by the caller, earlier versions of Symfony accepted these parameters, which were effectively ignored.

In the context of these methods, what I mean by "invalid parameter" is an empty string, which is the correct datatype, but is not ever a useful thing to provide to these methods. Since empty strings here did not cause a problem in previous versions, and since Symfony is used by all sorts of projects for all sorts of purposes, it seems best to continue to be flexible about the parameters accepted by Symfony APIs.

Commits
-------

b32fdf1ca3 Fixes #26136: Avoid emitting warning in hasParameterOption()
2018-02-16 06:38:36 +01:00
Greg Anderson
b32fdf1ca3 Fixes #26136: Avoid emitting warning in hasParameterOption() 2018-02-16 06:38:34 +01:00
Ian Jenkins
ba3e19ae21 [HttpFoundation] Add x-zip-compressed to MimeTypeExtensionGuesser.
Zip files uploaded on Windows often have a mime type of `x-zip-compressed`. This patch adds support for this mime type to `MimeTypeExtensionGuesser`.

The mime type seems to be a valid mime type for zip files according to http://filext.com/file-extension/ZIP
2018-02-15 15:32:51 +00:00
changmin.keum
a5f05a0486 [DI] Add null check for removeChild 2018-02-15 08:59:01 +01: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
Christian Flothmann
1fc5df683b fix accessing request values 2018-02-14 10:05:17 +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
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
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
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
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
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
d195a6f060 [SecurityBundle] Backport test 2018-02-09 13:55:03 +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
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