Commit Graph

32730 Commits

Author SHA1 Message Date
Fabien Potencier 73ff764bd9 bug #25312 [DI] Fix deep-inlining of non-shared refs (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Fix deep-inlining of non-shared refs

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

Non-shared definitions should deep-clone their inlined non-shared definitions.

Commits
-------

eb2a15229a [DI] Fix deep-inlining of non-shared refs
2017-12-04 10:00:31 -08:00
Fabien Potencier c08602cb80 bug #25309 [Yaml] parse newlines in quoted multiline strings (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[Yaml] parse newlines in quoted multiline strings

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

Commits
-------

b23b957ae9 parse newlines in quoted multiline strings
2017-12-04 09:04:06 -08:00
Amrouche Hamza 890edf7c38
[FrameworkBundle] Fix a bug where a color tag will be shown when passing an antislash 2017-12-04 17:41:23 +01:00
Nicolas Grekas eb2a15229a [DI] Fix deep-inlining of non-shared refs 2017-12-04 16:44:12 +01:00
Christian Flothmann b23b957ae9 parse newlines in quoted multiline strings 2017-12-04 15:51:35 +01:00
Yonel Ceruto 888b48a89c Fix collision between view properties and form fields 2017-12-04 08:54:58 -05:00
Niels Keurentjes 6a2f518e74 Disallow viewing dot-files in Profiler
The file viewer in the profiler should not open files that were meant
to be hidden, like specifically .env files, but similarly files like
.htaccess that might expose server configuration knowledge.
2017-12-04 14:14:51 +01:00
Nicolas Grekas c9f72e2807 [SecurityBundle] Fix compat with HttpFoundation >=3.4 2017-12-04 13:50:51 +01:00
Nicolas Grekas 5b997f1f21 Merge branch '2.8' into 3.3
* 2.8:
  [FrameworkBundle] Fix visibility of a test helper
  [link] clear the cache after linking
  [link] Prevent warnings when running link with 2.7
  [Validator] ExpressionValidator should use OBJECT_TO_STRING to allow value in message
2017-12-04 13:17:10 +01:00
Nicolas Grekas 874d418a8f Merge branch '2.7' into 2.8
* 2.7:
  [FrameworkBundle] Fix visibility of a test helper
  [link] clear the cache after linking
  [link] Prevent warnings when running link with 2.7
  [Validator] ExpressionValidator should use OBJECT_TO_STRING to allow value in message
2017-12-04 13:15:49 +01:00
Kuba Werłos 369075a282 Fix for missing whitespace control modifier in form layout 2017-12-04 13:08:37 +01:00
Nicolas Grekas 5f5edf26f2 bug #25241 [Yaml] do not eagerly filter comment lines (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[Yaml] do not eagerly filter comment lines

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

Trying to be clever by filtering commented lines inside
`getNextEmbedBlock()` does not work as expected. The `#` may as well be
part of a multi-line quoted string where it must not be treated as the
beginning of a comment. Thus, we only must ensure that a comment-like
line does not skip the process of getting the next line of the embed
block.

Commits
-------

d594038 do not eagerly filter comment lines
2017-12-04 13:05:43 +01:00
Nicolas Grekas f056b4ef5b minor #25270 Fail as early and noisily as possible (greg0ire)
This PR was merged into the 3.3 branch.

Discussion
----------

Fail as early and noisily as possible

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

An alternative would be to use a custom error handler

Commits
-------

3bdeda0 Fail as early and noisily as possible
2017-12-04 11:36:39 +01:00
Grégoire Paris 3bdeda048b
Fail as early and noisily as possible
Today, I tried using SYMFONY_PHPUNIT_VERSION=6 because I don't really
care about the minor version. I got lots of warnings, followed by
hard-to-understand error messages. This will silence the first warning
and will throw an exception instead.
2017-12-03 00:45:47 +01:00
Fabien Potencier 6eedbb5660 minor #25271 [FrameworkBundle] Fix visibility of a test helper (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix visibility of a test helper

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

23b5758198 [FrameworkBundle] Fix visibility of a test helper
2017-12-02 08:24:41 -08:00
Kévin Dunglas 23b5758198
[FrameworkBundle] Fix visibility of a test helper 2017-12-02 16:57:48 +01:00
Fabien Potencier de3a25a474 minor #25257 [link] clear the cache after linking (dunglas)
This PR was squashed before being merged into the 2.7 branch (closes #25257).

Discussion
----------

[link] clear the cache after linking

| 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 | n/a
| License       | MIT
| Doc PR        | n/a

Clearing the cache after linking prevents fatal errors when a container already exists.

Commits
-------

05c3c81a20 [link] clear the cache after linking
2017-12-01 17:33:23 -08:00
Kévin Dunglas 05c3c81a20 [link] clear the cache after linking 2017-12-01 17:33:21 -08:00
Fabien Potencier 7f5aeb7475 bug #25258 [link] Prevent warnings when running link with 2.7 (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[link] Prevent warnings when running link with 2.7

| 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 | n/a
| License       | MIT
| Doc PR        | n/a

Prevent warnings when linking from 2.7 because some directories (like the Bridge/Propel1) don't contain `composer.json` files.

Commits
-------

3e7780cb90 [link] Prevent warnings when running link with 2.7
2017-12-01 17:32:35 -08:00
Kévin Dunglas 3e7780cb90
[link] Prevent warnings when running link with 2.7 2017-12-01 20:16:54 +01:00
Fabien Potencier 5a6e2d7993 bug #24750 [Validator] ExpressionValidator should use OBJECT_TO_STRING (Simperfit)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] ExpressionValidator should use OBJECT_TO_STRING

…value in message

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

Commits
-------

7dac528a86 [Validator] ExpressionValidator should use OBJECT_TO_STRING to allow value in message
2017-12-01 09:38:10 -08:00
Amrouche Hamza 7dac528a86
[Validator] ExpressionValidator should use OBJECT_TO_STRING to allow value in message 2017-12-01 18:16:29 +01:00
Christian Flothmann d594038ad9 do not eagerly filter comment lines
Trying to be clever by filtering commented lines inside
`getNextEmbedBlock()` does not work as expected. The `#` may as well be
part of a multi-line quoted string where it must not be treated as the
beginning of a comment. Thus, we only must ensure that a comment-like
line does not skip the process of getting the next line of the embed
block.
2017-12-01 11:59:50 +01:00
Nicolas Grekas 61e1f5705e bug #25232 [WebProfilerBundle] [TwigBundle] Fix Profiler breaking XHTML pages (tistre)
This PR was submitted for the master branch but it was merged into the 3.3 branch instead (closes #25232).

Discussion
----------

[WebProfilerBundle] [TwigBundle] Fix Profiler breaking XHTML pages

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

Just a tiny fix: Stop the Profiler from breaking XHTML pages (served with "Content-Type: application/xhtml+xml") - with the added quotes around the nonce attribute value, the page remains well-formed XML.

Commits
-------

b1ab7d0 [WebProfilerBundle], [TwigBundle] Fix Profiler breaking XHTML pages (Content-Type: application/xhtml+xml)
2017-12-01 11:26:11 +01:00
Tim Strehle b1ab7d0050 [WebProfilerBundle], [TwigBundle] Fix Profiler breaking XHTML pages (Content-Type: application/xhtml+xml) 2017-12-01 11:26:11 +01:00
Yonel Ceruto 8505894988 Fix collision between view properties and form fields 2017-11-30 23:33:59 -05:00
Nicolas Grekas 336600857b bug #25209 [VarDumper] Dont use empty(), it chokes on eg GMP objects (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[VarDumper] Dont use empty(), it chokes on eg GMP objects

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

Commits
-------

1b14173 [VarDumper] Dont use empty(), it chokes on eg GMP objects
2017-11-30 15:48:11 +01:00
Nicolas Grekas 26fb4c7055 bug #25200 [HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice (Simperfit)
This PR was merged into the 3.3 branch.

Discussion
----------

[HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| 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 | #25191
| License       | MIT
| Doc PR        | none

Coding in the train to Paris !

![img_2832](https://user-images.githubusercontent.com/3451634/33361971-8aa17a70-d4da-11e7-90a0-b2f08a60d0e6.JPG)

Commits
-------

d84b47f [HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice
2017-11-30 15:42:59 +01:00
Nicolas Grekas 8950aada3b minor #25054 [HttpKernel] add a test for FilterControllerEvents (Simperfit)
This PR was merged into the 3.3 branch.

Discussion
----------

[HttpKernel] add a test for FilterControllerEvents

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| 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?   | no
| Fixed tickets | no <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | no

Commits
-------

b746e8a [HttpKernel] add a test for FilterControllerEvents
2017-11-30 10:33:45 +01:00
Nicolas Grekas 1b141732db [VarDumper] Dont use empty(), it chokes on eg GMP objects 2017-11-30 10:28:49 +01:00
Nicolas Grekas 8c5eeada31 bug #25217 [Dotenv] Changed preg_match flags from null to 0 (deekthesqueak)
This PR was merged into the 3.3 branch.

Discussion
----------

[Dotenv] Changed preg_match flags from null to 0

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

I came across this bug while using HHVM in PHP7 mode. The flag should be changed to match type in function signature and bring it in line with other uses of [preg_match](https://secure.php.net/manual/en/function.preg-match.php) (https://github.com/symfony/dotenv/blob/3.3/Dotenv.php#L149)

Applicable to 3.3, 3.4, 4.0

Commits
-------

b0d297b [Dotenv] Changed preg_match flags from null to 0
2017-11-30 09:30:54 +01:00
Derek Bonner b0d297b962 [Dotenv] Changed preg_match flags from null to 0 2017-11-29 20:22:22 -08:00
Fabien Potencier 0d433cda7c minor #25207 [HttpKernel] remove upgrade instructions for kernel.root_dir (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[HttpKernel] remove upgrade instructions for kernel.root_dir

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

Commits
-------

9897da4c02 remove upgrade instructions for kernel.root_dir
2017-11-29 05:24:40 -08:00
Christian Flothmann 9897da4c02 remove upgrade instructions for kernel.root_dir 2017-11-29 14:05:31 +01:00
Christian Flothmann b4afeb2e81 Merge branch '2.8' into 3.3
* 2.8:
  Test that it do not remove the new flashes when displaying the existing ones
  [HttpFoundation] AutExpireFlashBag should not clear new flashes
  [Form] Don't rely on  if http-foundation isn't in FileType
  Fix merge
  substitute aliases in inline mappings
  added ability for substitute aliases when mapping in YAML is on single line
  [Console] Fix global console flag when used in chain
2017-11-29 13:25:49 +01:00
Amrouche Hamza d84b47fe9d
[HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice 2017-11-29 10:42:06 +01:00
Nicolas Grekas 1941a78922 Merge branch '2.7' into 2.8
* 2.7:
  Test that it do not remove the new flashes when displaying the existing ones
  [HttpFoundation] AutExpireFlashBag should not clear new flashes
  [Form] Don't rely on  if http-foundation isn't in FileType
  substitute aliases in inline mappings
  added ability for substitute aliases when mapping in YAML is on single line
  [Console] Fix global console flag when used in chain
2017-11-29 10:33:18 +01:00
Nicolas Grekas 85223d373b bug #25203 [DI] Fix infinite loop in InlineServiceDefinitionsPass (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Fix infinite loop in InlineServiceDefinitionsPass

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

When a non-shared is involved in a setter-circular loop, the pass enters an infinite loop right now.

Commits
-------

b988aa7 [DI] Fix infinite loop in InlineServiceDefinitionsPass
2017-11-29 10:21:33 +01:00
Nicolas Grekas b988aa7c59 [DI] Fix infinite loop in InlineServiceDefinitionsPass 2017-11-29 09:04:31 +01:00
Fabien Potencier 020d78a65b bug #25185 [Serializer] Do not cache attributes if `attributes` in context (sroze)
This PR was merged into the 3.3 branch.

Discussion
----------

[Serializer] Do not cache attributes if `attributes` in context

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

Caching attributes based on the class works only when these attributes are not overwritten. This disables the cache when they are.

To me, this `extractAttributes` method should actually be a `AttributeResolver` dependency that can be decorated using different caching strategies I'd say but... that's a much bigger refactoring that needs more reflection with @dunglas.

Commits
-------

6e87382bfa Do not cache cache attributes if `attributes` is in the context
2017-11-28 18:30:17 -08:00
Fabien Potencier e2c608ae6b bug #25182 [HttpFoundation] AutExpireFlashBag should not clear new flashes (Simperfit, sroze)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] AutExpireFlashBag should not clear new flashes

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

I feel like very happy ! :)
But don't worry I'm.

![img_2826](https://user-images.githubusercontent.com/3451634/33304006-99d44f38-d406-11e7-93f2-4dbc19891299.jpg)

Commits
-------

706201efe4 Test that it do not remove the new flashes when displaying the existing ones
7fe3fe8245 [HttpFoundation] AutExpireFlashBag should not clear new flashes
2017-11-28 17:55:34 -08:00
Samuel ROZE 6e87382bfa
Do not cache cache attributes if `attributes` is in the context 2017-11-28 12:04:06 +00:00
Samuel ROZE 706201efe4
Test that it do not remove the new flashes when displaying the existing ones 2017-11-28 08:49:55 +00:00
Amrouche Hamza 7fe3fe8245
[HttpFoundation] AutExpireFlashBag should not clear new flashes 2017-11-28 06:31:17 +01:00
Fabien Potencier b568e16d8f bug #25179 [FrameworkBundle][Serializer] Remove YamlEncoder definition if Yaml component isn't installed (ogizanagi)
This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle][Serializer] Remove YamlEncoder definition if Yaml component isn't installed

| 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?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/24634#discussion_r153192689 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Do we need a `"symfony/yaml": "<3.2"` conflict here (the version used in `require-dev`)? Otherwise I'll re-introduce the `!defined('Symfony\Component\Yaml\Yaml::DUMP_OBJECT')` check instead.

Commits
-------

a44f8a5b1a [FrameworkBundle][Serializer] Remove YamlEncoder definition if Yaml component isn't installed
2017-11-27 14:13:48 -08:00
Maxime Steinhausser a44f8a5b1a [FrameworkBundle][Serializer] Remove YamlEncoder definition if Yaml component isn't installed 2017-11-27 18:35:30 +01:00
Nicolas Grekas 8555c0b550 bug #25163 [DI] Fix tracking of env vars in exceptions (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Fix tracking of env vars in exceptions

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

Fixes the bad exception message reported in the linked issue (regression introduced in v3.3.7).

Best reviewed [ignoring whitespaces](https://github.com/symfony/symfony/pull/25163/files?w=1).

Commits
-------

73f1ac5 [DI] Fix tracking of env vars in exceptions
2017-11-27 10:48:57 +01:00
Nicolas Grekas 73f1ac5ea2 [DI] Fix tracking of env vars in exceptions 2017-11-26 20:37:03 +01:00
Fabien Potencier e3e239ffb4 bug #25152 [Form] Don't rely on `Symfony\Component\HttpFoundation\File\File` if http-foundation isn't in FileType (issei-m)
This PR was squashed before being merged into the 2.7 branch (closes #25152).

Discussion
----------

[Form] Don't rely on `Symfony\Component\HttpFoundation\File\File` if http-foundation isn't in FileType

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

Currently `FileType` may depend on `Symfony\Component\HttpFoundation\File\File` regardless `http-foundation` has been installed or not.
It leads to occur the class-not-found error.
(Attached the screen capture, please see below and I provided the representation [here](https://github.com/issei-m/form-bug-representation/issues/1) for your information)

So I ensure `Symfony\Component\HttpFoundation\File\File` does exist, and if not, we don't specify any classes for this type.
While setting no specified class to `data_class` means making [property path behavior changed](7234bfd56a/src/Symfony/Component/Form/Form.php (L229-L231)),
[NativeRequestHandler](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/NativeRequestHandler.php) which is usually expected to be used in non-full-stack env handles a pure array like `$_FILES` holds, fully intended behavior AFAIK.

![image](https://user-images.githubusercontent.com/1135118/33216654-14706a56-d178-11e7-8e4b-c38c14ec7532.png)

Commits
-------

a264238e8a [Form] Don't rely on  if http-foundation isn't in FileType
2017-11-26 07:51:04 -08:00
Issei.M a264238e8a [Form] Don't rely on if http-foundation isn't in FileType 2017-11-26 07:51:00 -08:00