Commit Graph

28630 Commits

Author SHA1 Message Date
Nicolas Grekas
cffa7be92f Merge branch '3.4' into 4.0
* 3.4:
  [travis] fix php-ext/ location
  throw exception if docblock factory does not exist
2018-02-22 13:30:04 +01:00
Nicolas Grekas
c5f29423b0 bug #26265 [PropertyInfo] throw exception if docblock factory does not exist (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[PropertyInfo] throw exception if docblock factory does not exist

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

Commits
-------

5cfceed throw exception if docblock factory does not exist
2018-02-22 12:55:31 +01:00
Nicolas Grekas
0dc6acb123 Merge branch '3.4' into 4.0
* 3.4:
  [Translation] Process multiple segments within a single unit.
  Document the container.autowiring.strict_mode option
  fix custom radios/inputs for checkbox/radio type
  Another PR template tweak
  [FrameworkBundle] Add missing XML config for circular_reference_handler. Add tests.
  fix CS
  [PropertyInfo] ReflectionExtractor: give a chance to other extractors if no properties
  Clean calls to http_build_query()
  [WebProfilerBundle] limit ajax request to 100 and remove the last one
  Add support for URL-like DSNs for the PdoSessionHandler
  [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-22 11:50:29 +01:00
Nicolas Grekas
43344598dd Merge branch '2.8' into 3.4
* 2.8:
  Another PR template tweak
  [PropertyInfo] ReflectionExtractor: give a chance to other extractors if no properties
  Clean calls to http_build_query()
  [WebProfilerBundle] limit ajax request to 100 and remove the last one
  [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-22 11:48:49 +01:00
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
Christian Flothmann
5cfceed460 throw exception if docblock factory does not exist 2018-02-22 10:55:42 +01:00
Ryan Rogers
ac5d01f0b5 [Translation] Process multiple segments within a single unit. 2018-02-22 07:28:18 +01:00
mssimi
dd6d1dd119 fix custom radios/inputs for checkbox/radio type 2018-02-21 11:24:47 +01:00
Fabien Potencier
349f7049ec bug #26234 [FrameworkBundle] Add missing XML config for circular_reference_handler (dunglas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Add missing XML config for circular_reference_handler

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| 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

* Add missing XML config for circular_reference_handler (#22011)
* Add tests

Commits
-------

611ff59c3e [FrameworkBundle] Add missing XML config for circular_reference_handler. Add tests.
2018-02-19 21:29:03 +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
297ae74b75 bug #26227 Add support for URL-like DSNs for the PdoSessionHandler (stof)
This PR was merged into the 3.4 branch.

Discussion
----------

Add support for URL-like DSNs for the PdoSessionHandler

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

This allows migrating away from the deprecated DbalSessionHandler when DBAL was used for its ability to be configured through a URL (which is what is provided on Heroku and some other PaaS).

I know that this is technically a new feature (and so may target master instead), but we currently have no way to configure a database session storage on Heroku in 4.0 (and in 3.4, it requires using a deprecated class).

I decided to add support for the URL-like configuration directly rather than adding support for passing a DBAL connection, to minimize the code changes.
I also left out the support for OCI in this feature, as the PDO DSN for the Oracle driver is totally crazy (it has nothing in common with other drivers). If someone wants to use a Oracle DB, they should pass the PDO DSN directly instead of a URL.

Differences with the URL handling in Doctrine DBAL:

- schemeless URLs are not supported (DBAL allows configuring the driver separately in case you don't have it in the URL)
- the query string is ignored (DBAL allows to use the query string to configure any supported DBAL params, which are driver-specific. Just use a DSN directly if you need them. PaaS are unlikely to provide such params anyway and they are the main motivation for this PR)

Commits
-------

14c35ad13c Add support for URL-like DSNs for the PdoSessionHandler
2018-02-19 21:24:12 +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
Fabien Potencier
389efc0af3 minor #26229 removed version in @final @internal for version < 4.0 (fabpot)
This PR was merged into the 4.0 branch.

Discussion
----------

removed version in @final @internal for version < 4.0

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

On 4.0+, I think we can removed the "since version 3.x" from `@final` and `@internal` annotations. I've kept them for things that reference version 4.x.

Commits
-------

ed27b12d2c removed version in @final @internal for version < 4.0
2018-02-19 21:08:53 +01:00
Kévin Dunglas
611ff59c3e
[FrameworkBundle] Add missing XML config for circular_reference_handler. Add tests. 2018-02-19 19:14:07 +01:00
Nicolas Grekas
4be63f9f4a fix CS 2018-02-19 17:55:06 +01:00
Nicolas Grekas
2871a96fa7 Merge branch '3.4' into 4.0
* 3.4:
  [Bridge/Twig] fix composer.json
  bug #26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider
  [WebProfilerBundle] Fix anchor CSS
  [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation
  [WebProfilerBundle] Tweak default route name
  updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7fb6a
  Retro-fit proxy code to make it deterministic for older proxy manager implementations
  Yaml parser regression with comments and non-strings
  Fix undiscoverablility of SymfonyTestsListenerForV7
  Fixed broken tests
  [TwigBridge] Apply some changes to support Bootstrap4-stable
2018-02-19 17:50:22 +01:00
Nicolas Grekas
b9c071015b [Bridge/Twig] fix composer.json 2018-02-19 17:46:01 +01:00
Nicolas Grekas
0aedb03af6 bug #26088 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider (Laizerox)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider

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

The compilation pass of AddAnnotationsCachedReaderPass relies on already removed definition `annotations.cached_reader` due to an alias to `annotation_reader`.

Since the definition is being removed because of alias, configured annotation cache provider is not injected and will default back to ArrayCache.

This PR replaces the use of `annotations.cached_reader` to `annotation_reader` to complete the injection of configured cache provider.

Commits
-------

dfd93da bug #26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider
2018-02-19 17:40:19 +01:00
Dmitri Petmanson
dfd93da236 bug #26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider 2018-02-19 17:36:43 +01:00
Nicolas Grekas
b3c7ba715a bug #26157 [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation (rpkamp)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation

When we call `\Symfony\Component\HttpFoundation\Session\Session::invalidate` the session will be emptied and given a new ID, however, since it is empty this `AbstractTestSessionListener` will not send a new cookie to the user, so the user is not caught up to the latest session ID and will re-generate a session with the old session ID on a new visit.
Thus, we the sessionID has changed during a request we must always send a new cookie with the new sessionID, even though the session is empty.

This behaviour is also what is shown in production (non-test) mode.

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

Commits
-------

98f5d53 [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation
2018-02-19 17:33:13 +01:00
Nicolas Grekas
3ab3b44720 minor #26206 [Stopwatch] updated phpdoc due to the addition of optional float precision (lsmith77)
This PR was merged into the 3.4 branch.

Discussion
----------

[Stopwatch] updated phpdoc due to the addition of optional float precision

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

Commits
-------

8278a47 updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7fb6a
2018-02-19 17:28:57 +01:00
Roland Franssen
ee4599284f [WebProfilerBundle] Fix anchor CSS 2018-02-19 17:27:36 +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
Christophe Coevoet
14c35ad13c Add support for URL-like DSNs for the PdoSessionHandler
This allows migrating away from the deprecated DbalSessionHandler when
DBAL was used for its ability to be configured through a URL (which is
what is provided on Heroku and some other PaaS).
2018-02-19 14:20:33 +01:00
Fabien Potencier
ed27b12d2c removed version in @final @internal for version < 4.0 2018-02-19 13:18:43 +01:00
Nicolas Grekas
7490f0b060 [HttpFoundation] Fix missing "throw" in JsonResponse 2018-02-19 12:59:32 +01:00
Remon van de Kamp
98f5d5354e [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation 2018-02-19 11:31:59 +01:00
Matthieu Napoli
0e4d26a568 Improve the documentation of 2018-02-19 08:08:51 +01:00
Roland Franssen
5c4566ca73 [WebProfilerBundle] Tweak default route name 2018-02-18 16:35:26 +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
Nicolas Grekas
b97e9a903a bug #26176 Retro-fit proxy code to make it deterministic for older proxy manager implementations (lstrojny)
This PR was merged into the 3.4 branch.

Discussion
----------

Retro-fit proxy code to make it deterministic for older proxy manager implementations

Follow up on https://github.com/symfony/symfony/issues/25958#issuecomment-365543535

ProxyManager >= 7.2 already implements a deterministic identifier naming strategy which is critical for reproducible builds (https://github.com/symfony/symfony/issues/25958).  but versions below that don’t. This is what this PR fixes. Here is more context: https://github.com/Ocramius/ProxyManager/pull/411

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

Commits
-------

0f16056 Retro-fit proxy code to make it deterministic for older proxy manager implementations
2018-02-17 21:58:51 +01:00
Lukas Kahwe Smith
8278a47caa
updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7fb6a 2018-02-17 15:55:25 +01:00
Lars Strojny
0f1605663a Retro-fit proxy code to make it deterministic for older proxy manager implementations 2018-02-16 18:39:08 +00:00
Amrouche Hamza
bbcaaef547
[Serializer] remove unneeded php doc line 2018-02-16 11:10:07 +01:00
Christian Flothmann
7bcccefb60 bug #25787 Yaml parser regression with comments and non-strings (alexpott)
This PR was squashed before being merged into the 3.4 branch (closes #25787).

Discussion
----------

Yaml parser regression with comments and non-strings

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see below -->
| 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?   | no
| Fixed tickets | #25786
| 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
-------

a7e2a49 Yaml parser regression with comments and non-strings
2018-02-16 10:50:28 +01:00
Alex Pott
a7e2a49a78 Yaml parser regression with comments and non-strings 2018-02-16 10:50:20 +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
Nicolas Grekas
9041ec33e3 minor #26184 Fix undiscoverablility of SymfonyTestsListenerForV7 (keradus)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix undiscoverablility of SymfonyTestsListenerForV7

| Q             | A
| ------------- | ---
| Branch?       | `3.4@dev` (and `4@dev`)
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | n/a
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

As class is in wrong namespace, it's not discoverable by autoloader and during execution of aliasing we face following crash:
```
ker@dus:~/github/PHP-CS-Fixer λ vendor/bin/phpunit
Class 'Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerForV7' not found
```

-----------------

replaces #26180, which was wrongly sent (and merged) for `master` branch instead of `3.4`, sorry for mistake.

Commits
-------

538b257 Fix undiscoverablility of SymfonyTestsListenerForV7
2018-02-15 09:24:16 +01:00
changmin.keum
a5f05a0486 [DI] Add null check for removeChild 2018-02-15 08:59:01 +01:00
Nicolas Grekas
b375957c8b bug #26167 [TwigBridge] Apply some changes to support Bootstrap4-stable (mpiot, Nyholm)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] Apply some changes to support Bootstrap4-stable

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

Follow up of https://github.com/symfony/symfony/pull/25715, see discussion there.

This fixes the following errors:
- Delete form-control-label, don't used in Bootstrap 4
- Replace col-form-legend by col-form-label
- Separate the label and input (before the input was in the label)
- Use form-check-inline to put radio and/or checkboxes inline
- Add support of custom form for radio and checkboxes
- Fix input-group: MoneyType (Issue #25655), PercentType
- Remove form-control duplication (Issue #25635)
- Fix Errors in label (#24435)

Commits
-------

14e2282 Fixed broken tests
cf4e956 [TwigBridge] Apply some changes to support Bootstrap4-stable
2018-02-15 08:58:38 +01:00
Dariusz Ruminski
538b257041 Fix undiscoverablility of SymfonyTestsListenerForV7 2018-02-15 00:24:28 +01:00
Nicolas Grekas
8faf29f54e Merge branch '3.4' into 4.0
* 3.4:
  [Serializer] optims and cleanup
  do not mock the container builder in tests
  [PhpUnitBridge] Added support for PHPUnit 7 in Coverage Listener
  fix accessing request values
  Avoid running the remove command without any packages
  [Form] Add translations for Tagalog
2018-02-14 15:11:10 +01:00