Commit Graph

32630 Commits

Author SHA1 Message Date
Amrouche Hamza
d84b47fe9d
[HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice 2017-11-29 10:42:06 +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
Samuel ROZE
6e87382bfa
Do not cache cache attributes if attributes is in the context 2017-11-28 12:04:06 +00: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
ca5b15a53b bug #25146 [DI] Dont resolve envs in service ids (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Dont resolve envs in service ids

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

Env placeholders should not be forbidden in **private** service identifiers. Instead, they should just be *not* resolved. This is effectively used in many bundle extensions fr good reasons (see eg. SecurityBundle and linked issue).

Commits
-------

7921255faf [DI] Dont resolve envs in service ids
2017-11-24 05:54:00 -08:00
Fabien Potencier
5c954c79c0 minor #25138 [TwigBundle] Exception page: prefer overflow-wrap to word-break (julienfalque)
This PR was merged into the 3.3 branch.

Discussion
----------

[TwigBundle] Exception page: prefer overflow-wrap to word-break

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

This prevents arbitrary text wrapping, breaks are always made on whitespace when possible:

**Before**
![long-before](https://user-images.githubusercontent.com/1736542/33190369-4c23fb88-d0ac-11e7-8c4d-60e60fc06b83.png)

**After**
![long-after](https://user-images.githubusercontent.com/1736542/33190370-4e449a4e-d0ac-11e7-90bd-6dacca10e9fd.png)

Random breaks inside words can still be made for very long words:

**Before**
![very-long-before](https://user-images.githubusercontent.com/1736542/33190387-83a3572a-d0ac-11e7-8d6b-c19b3812c339.png)

**After**
![very-long-after](https://user-images.githubusercontent.com/1736542/33190388-84cf6724-d0ac-11e7-9756-bb34a0a64bb8.png)

Tested on Chrome 62 (Linux) and Firefox 47 (Linux).

Commits
-------

c7333b1c68 Prefer overflow-wrap to word-break
2017-11-24 05:42:52 -08:00
Nicolas Grekas
7921255faf [DI] Dont resolve envs in service ids 2017-11-24 13:44:22 +01:00
Nicolas Grekas
db979e88e8 bug #25113 [Routing] Fix "config-file-relative" annotation loader resources (nicolas-grekas, sroze)
This PR was merged into the 3.3 branch.

Discussion
----------

[Routing] Fix "config-file-relative" annotation loader resources

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

By using the locator in its `supports()` method, the `AnnotationDirectoryLoader` breaks config-relative annotation resources. The workaround is to fallback on `kernel.root_dir`-relative paths, as done in https://github.com/symfony/recipes/blob/master/doctrine/annotations/1.0/config/routes/annotations.yaml
But as you can see, this is rather WTF: extra knowledge is required to know what to type there. All the other loader look relatively to the config file first.

This is a bug, but since this is a slight behavior change, I think it's best to merge it on 3.4.

Commits
-------

f4999d8 Add tests proving it can load annotated files
5998e9d [Routing] Fix "config-file-relative" annotation loader resources
2017-11-24 12:32:34 +01:00
Samuel ROZE
f4999d8af0
Add tests proving it can load annotated files 2017-11-24 10:33:04 +00:00
Javier Eguiluz
d141541ebd minor #25140 [WebProfilerBundle] Reset letter-spacing in toolbar (ro0NL)
This PR was merged into the 3.3 branch.

Discussion
----------

[WebProfilerBundle] Reset letter-spacing in toolbar

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Somewhere in our project we have

```scss
*,
*:before,
*:after {
	letter-spacing: 1px;
	box-sizing: border-box;
}
```

affecting the toolbar

<details>
 <summary>before</summary>

 ![image](https://user-images.githubusercontent.com/1047696/33201973-fa451bea-d0fa-11e7-8af4-230399f16223.png)

</details>

<details>
 <summary>after</summary>

![image](https://user-images.githubusercontent.com/1047696/33201946-e779b570-d0fa-11e7-86b6-db586c4c321e.png)

</details>

Commits
-------

bef2618779 [WebProfilerBundle] Reset letter-spacing in toolbar
2017-11-24 10:13:27 +01:00
Roland Franssen
bef2618779 [WebProfilerBundle] Reset letter-spacing in toolbar 2017-11-24 10:11:48 +01:00
Julien Falque
c7333b1c68
Prefer overflow-wrap to word-break 2017-11-24 00:09:47 +01:00
Fabien Potencier
a824d34555 bug #25109 Make debug:container search command case-insensitive (jzawadzki)
This PR was merged into the 3.3 branch.

Discussion
----------

Make debug:container search command case-insensitive

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Fixed tickets | #25107
| License       | MIT
| Doc PR        |

This bug fixes the #25107 - starts from 3.2 services may be written with uppercase (e.g. FQCN) and search fails to match those services.

Commits
-------

c429c3346a Make search in debug:container command case-insensitive
2017-11-23 07:30:24 -08:00
Nicolas Grekas
5998e9d7b5 [Routing] Fix "config-file-relative" annotation loader resources 2017-11-23 14:58:49 +01:00
Jerzy Zawadzki
c429c3346a Make search in debug:container command case-insensitive 2017-11-23 13:39:16 +01:00
Nicolas Grekas
4eaf1e5ce2 minor #25132 [DI] Fix typo in PhpDoc for resolveEnvPlaceholders (sroze)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Fix typo in PhpDoc for `resolveEnvPlaceholders`

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

`resolveEnvPlaceholders` will return a mixed value.

Commits
-------

b34d5b7 `resolveEnvPlaceholders` will return a mixed value
2017-11-23 13:20:44 +01:00
Samuel ROZE
b34d5b77a4
resolveEnvPlaceholders will return a mixed value 2017-11-23 12:10:51 +00:00
Nicolas Grekas
ae62e56d8a Merge branch '2.8' into 3.3
* 2.8:
  [Form] Fixed ContextErrorException in FileType
  [DI] Fix handling of inlined definitions by ContainerBuilder
2017-11-23 12:01:29 +01:00
Nicolas Grekas
10ec39e850 Merge branch '2.7' into 2.8
* 2.7:
  [Form] Fixed ContextErrorException in FileType
  [DI] Fix handling of inlined definitions by ContainerBuilder
2017-11-23 11:48:23 +01:00
Nicolas Grekas
a809ab27f6 bug #25102 [Form] Fixed ContextErrorException in FileType (chihiro-adachi)
This PR was squashed before being merged into the 2.7 branch (closes #25102).

Discussion
----------

[Form] Fixed ContextErrorException in FileType

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

Fixed an issue that ContextErrorException occurs when multiple is enabled.

Commits
-------

1b408e6 [Form] Fixed ContextErrorException in FileType
2017-11-23 11:40:42 +01:00
chihiro-adachi
1b408e692d [Form] Fixed ContextErrorException in FileType 2017-11-23 11:39:21 +01:00
Nicolas Grekas
e2add8b7a3 bug #25130 [DI] Fix handling of inlined definitions by ContainerBuilder (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Fix handling of inlined definitions by ContainerBuilder

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

Team work with @dunglas, debugging behat tests on Symfony 4:
now that everything is private, inlining happens quite often on Symfony 4.
This made us discover an old bug: inlining makes it possible to share the same definition instance to define a locally shared service (local to one service). This is handled properly in PhpDumper, but ContainerDumper is broken. Here is the fix.

Commits
-------

c9c18ac [DI] Fix handling of inlined definitions by ContainerBuilder
2017-11-23 11:29:16 +01:00
Nicolas Grekas
c9c18ac7f3 [DI] Fix handling of inlined definitions by ContainerBuilder 2017-11-23 11:22:49 +01:00
Nicolas Grekas
f0270a891e bug #25094 [FrameworkBundle][DX] Display a nice error message if an enabled component is missing (derrabus)
This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle][DX] Display a nice error message if an enabled component is missing

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

Commits
-------

2b45805 Display a nice error message if the form/serializer component is missing.
2017-11-22 12:40:02 +01:00
Alexander M. Turek
2b45805e03 Display a nice error message if the form/serializer component is missing. 2017-11-22 12:31:00 +01:00
Nicolas Grekas
20dd47b014 Merge branch '2.8' into 3.3
* 2.8:
  Force phpunit-bridge update (bis)
2017-11-22 10:35:33 +01:00
Nicolas Grekas
caad854849 Merge branch '2.7' into 2.8
* 2.7:
  Force phpunit-bridge update (bis)
2017-11-22 10:35:19 +01:00
Nicolas Grekas
9d68751431 Force phpunit-bridge update (bis) 2017-11-22 10:25:38 +01:00
Nicolas Grekas
fe328345d7 [Bridge/PhpUnit] Fix disabling global state preservation 2017-11-22 10:24:01 +01:00
Nicolas Grekas
e64b8d341c Merge branch '2.8' into 3.3
* 2.8:
  Force phpunit-bridge update
  Update github PR template
2017-11-22 09:55:52 +01:00
Nicolas Grekas
4efb4db705 [Bridge/PhpUnit] Fix blacklist 2017-11-22 09:55:42 +01:00
Nicolas Grekas
14f7d06f2d Merge branch '2.7' into 2.8
* 2.7:
  Force phpunit-bridge update
  Update github PR template
2017-11-22 09:55:14 +01:00
Nicolas Grekas
6bd1011534 Force phpunit-bridge update 2017-11-22 09:54:48 +01:00
Nicolas Grekas
d6b288a4ca minor #25085 Update github PR template (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Update github PR template

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

Now that branch 4.0 is out, and 3.4/4.0 are in bug fix only mode, let's update our template.

Commits
-------

4f63b3a Update github PR template
2017-11-22 09:37:09 +01:00
Nicolas Grekas
4f63b3ac28 Update github PR template 2017-11-22 09:34:48 +01:00
Nicolas Grekas
f27bdcec17 bug #25097 [Bridge\PhpUnit] Turn "preserveGlobalState" to false by default, revert "Blacklist" removal (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[Bridge\PhpUnit] Turn "preserveGlobalState" to false by default, revert "Blacklist" removal

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

This reverts commit 0577d20ade.
And replaces it by a change of the default configuration of the "preserveGlobalState" option of PHPUnit.
This option is a thing from the past (pre-Composer ages) that is usually useless, and breaks otherwise.

Note that to get the changed default, you must either enable the bridge's listener, or use `simple-phpunit`. Using the original `phpunit` directly will not fix the bad default, and your *isolated tests* will likely break with the new dumped container, now split in several files.

Commits
-------

e233ba3 [Bridge\PhpUnit] Turn "preserveGlobalState" to false by default, revert "Blacklist" removal
2017-11-22 09:29:31 +01:00
Nicolas Grekas
e233ba3a3f [Bridge\PhpUnit] Turn "preserveGlobalState" to false by default, revert "Blacklist" removal
This reverts commit 0577d20ade.
2017-11-22 08:56:40 +01:00
Nicolas Grekas
1a1079d7c4 Merge branch '2.8' into 3.3
* 2.8:
  [HttpFoundation] Fix bad merge in NativeSessionStorage
  Bump phpunit-bridge requirement to 3.4|4.0
  [Bridge/PhpUnit] Remove trailing "\n" from ClockMock::microtime(false)
  [Form] Rename `FormConfigBuilder::$nativeRequestProcessor` private variable to `::$nativeRequestHandler`
  Add a "link" script to ease debugging Flex apps
  [Form] Add phpdoc to `RequestHandlerInterface::isFileUpload()` method
2017-11-21 10:58:54 +01:00
Nicolas Grekas
8603bf1081 Merge branch '2.7' into 2.8
* 2.7:
  Bump phpunit-bridge requirement to 3.4|4.0
  [Form] Rename `FormConfigBuilder::$nativeRequestProcessor` private variable to `::$nativeRequestHandler`
  Add a "link" script to ease debugging Flex apps
  [Form] Add phpdoc to `RequestHandlerInterface::isFileUpload()` method
2017-11-21 10:57:39 +01:00
Nicolas Grekas
efd9a5ae08 minor #25041 [Form] Rename FormConfigBuilder::$nativeRequestProcessor private variable to ::$nativeRequestHandler (issei-m)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Rename `FormConfigBuilder::$nativeRequestProcessor` private variable to `::$nativeRequestHandler`

| 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?   | Not confirmed, but the changes are completely minor
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

I guess the term "processor" had been used until [this PR comes](https://github.com/symfony/symfony/pull/7732), but hadn't been renamed properly at the time.
And I think "handler" sounds more relevant to me anyway.

Commits
-------

a35d4f8 [Form] Rename `FormConfigBuilder::$nativeRequestProcessor` private variable to `::$nativeRequestHandler`
2017-11-21 10:54:12 +01:00
Nicolas Grekas
57a9e5ed72 minor #25058 Bump phpunit-bridge requirement to 3.4|4.0 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Bump phpunit-bridge requirement to 3.4|4.0

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

The bridge 4.0 is already used because of the way simple-phpunit works.
This just make it more explicit and will be required when #25056 will be merged.

Commits
-------

1c1a540 Bump phpunit-bridge requirement to 3.4|4.0
2017-11-21 10:47:16 +01:00
Nicolas Grekas
58d12e88b4 [HttpFoundation] Fix bad merge in NativeSessionStorage 2017-11-21 10:41:52 +01:00
Nicolas Grekas
1c1a540d2f Bump phpunit-bridge requirement to 3.4|4.0 2017-11-21 10:30:35 +01:00
Nicolas Grekas
7be944a787 bug #25072 [Bridge/PhpUnit] Remove trailing "\n" from ClockMock::microtime(false) (joky)
This PR was merged into the 2.8 branch.

Discussion
----------

[Bridge/PhpUnit] Remove trailing "\n" from ClockMock::microtime(false)

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

Commits
-------

5ddb121 [Bridge/PhpUnit] Remove trailing "\n" from ClockMock::microtime(false)
2017-11-21 10:22:33 +01:00
Guillaume Aveline
5ddb121723 [Bridge/PhpUnit] Remove trailing "\n" from ClockMock::microtime(false) 2017-11-21 10:19:30 +01:00
Issei.M
a35d4f88b3 [Form] Rename FormConfigBuilder::$nativeRequestProcessor private variable to ::$nativeRequestHandler 2017-11-21 10:08:49 +09:00
Nicolas Grekas
abe3c96253 minor #24746 Add a link script to ease debugging Flex apps (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

Add a link script to ease debugging Flex apps

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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 | #24708
| License       | MIT
| Doc PR        | n/a

(Reopened because of mishandling in the previous PR)

It's painful to debug and patch Flex apps because `symfony/symfony` isn't installed by default (only components are) but PRs must be opened against the monolithic repository.

This tiny tool, inspired by `npm link`, scan the `vendor/` directory of the project, and replace `symfony/` dependencies by symlinks to the local clone of the `symfony/symfony` repositories.

Usage:

```
git clone git@github.com:symfony/symfony.git
cd symfony
./link /path/to/the/project
```

Commits
-------

381f5d1 Add a "link" script to ease debugging Flex apps
2017-11-20 22:26:00 +01:00