Commit Graph

33471 Commits

Author SHA1 Message Date
Fabien Potencier
f334fb5d83 Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] add Early Hints in Reponse to fix test
2017-10-31 08:19:21 -07:00
Fabien Potencier
151e5e87af bug #24764 [HttpFoundation] add Early Hints to Reponse to fix test (Simperfit)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] add Early Hints to Reponse to fix test

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

This line seems to be needed in order to fix the tests, maybe it has been forgot in merge ?

Commits
-------

71ad77aed3 [HttpFoundation] add Early Hints in Reponse to fix test
2017-10-31 08:14:03 -07:00
Fabien Potencier
30f3b91cad removed extra whitespace 2017-10-31 08:12:41 -07:00
Fabien Potencier
cb6c394d7f bug #24759 Removes \n or space when $context/$extra are empty (kirkmadera)
This PR was squashed before being merged into the 3.3 branch (closes #24759).

Discussion
----------

Removes \n or space when $context/$extra are empty

Simple log messages cause extra spaces or newlines when using the default format and $context or $extra are empty, resulting in output like this:

```
23:24:41 DEBUG     [test] debug

23:24:41 INFO      [test] info

23:24:41 NOTICE    [test] notice

23:24:41 WARNING   [test] warning

23:24:41 ERROR     [test] error

```

This makes reviewing command history difficult.

In the instance where $context or $extra is empty, it should not get appended with a space or newline.

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

Commits
-------

0d8edaec79 Removes \n or space when / are empty
2017-10-31 08:11:30 -07:00
Kirk Madera
0d8edaec79 Removes \n or space when / are empty 2017-10-31 08:11:27 -07:00
Amrouche Hamza
71ad77aed3
[HttpFoundation] add Early Hints in Reponse to fix test 2017-10-31 14:48:52 +01:00
Fabien Potencier
996f6ef3cb bumped Symfony version to 3.4.0 2017-10-30 15:52:56 -07:00
Fabien Potencier
837878f169
Merge pull request #24761 from fabpot/release-3.4.0-BETA2
released v3.4.0-BETA2
2017-10-30 15:31:30 -07:00
Fabien Potencier
33e9a13cac updated VERSION for 3.4.0-BETA2 2017-10-30 15:31:12 -07:00
Fabien Potencier
8d72fd9159 updated CHANGELOG for 3.4.0-BETA2 2017-10-30 15:30:58 -07:00
Fabien Potencier
81a236bad2 minor #24760 Fix tests (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix tests

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | fingers crossed
| 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 3.4,
  legacy code removals go to the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

2280f844bf fixed tests
2017-10-30 14:28:43 -07:00
Fabien Potencier
2280f844bf fixed tests 2017-10-30 14:07:44 -07:00
Fabien Potencier
dbf544487f fixed CS 2017-10-30 12:08:07 -07:00
Fabien Potencier
4ae046fd3c bug #24728 [Bridge\Twig] fix bootstrap checkbox_row to render properly & remove spaceless (arkste)
This PR was squashed before being merged into the 3.4 branch (closes #24728).

Discussion
----------

[Bridge\Twig] fix bootstrap checkbox_row to render properly & remove spaceless

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

As discussed in #24711 i reverted the change i did in `bootstrap_3_layout.html.twig` (which caused an unnecessary empty div-container in the vertical-layout), added the `checkbox_row` block to the `bootstrap_3_horizontal_layout.html.twig` and removed `spaceless` (as proposed in #24727).

since i added `{#--#}` in bootstrap 3, i did the same for the same horizontal blocks in bootstrap 4 as well.

I moved the `form_label_class` & `form_group_class` blocks to the top of `bootstrap_3_horizontal_layout.html.twig` & `bootstrap_4_horizontal_layout.html.twig`, this should improve DX as they were spreaded across the file.

#24702 affected the bootstrap 4 horizontal layout as well, so i added the `checkbox_row` block to bootstrap 4 too.

ping @fabpot @nicolas-grekas

Commits
-------

f84749f745 [Bridge\Twig] fix bootstrap checkbox_row to render properly & remove spaceless
2017-10-30 12:07:29 -07:00
Arkadius Stefanski
f84749f745 [Bridge\Twig] fix bootstrap checkbox_row to render properly & remove spaceless 2017-10-30 12:07:24 -07:00
Fabien Potencier
ca10f8ee2c bug #24758 Throwing exception if redis and predis unavailable (aequasi)
This PR was squashed before being merged into the 3.3 branch (closes #24758).

Discussion
----------

Throwing exception if redis and predis unavailable

If the redis extension and predis are unavailable, line 137 throws an exception stating that \Predis\Client is not a class.

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

If the redis extension and predis are unavailable, the new line 137 throws an exception stating that \Predis\Client is not a class.

Commits
-------

e664c81f12 Throwing exception if redis and predis unavailable
2017-10-30 11:07:17 -07:00
Aaron Scherer
e664c81f12 Throwing exception if redis and predis unavailable 2017-10-30 11:07:15 -07:00
Fabien Potencier
039250acb3 bug #24709 [HttpKernel] Move services reset to Kernel::handle()+boot() (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Move services reset to Kernel::handle()+boot()

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

This is an alternative to #24697 (which uses middlewares).
This PR adds a new `services_resetter` service that the Kernel calls on 2nd root requests to reset services.
Instead of #24697 which plans for optional enabling of the services reset, this approach moves the responsibility of calling the services resetter to the core Kernel class, so that no configuration/middleware/etc. is required at all, and no overhead exists at all for regular requests.

Commits
-------

4501a3688b [HttpKernel] Move services reset to Kernel
2017-10-30 11:03:10 -07:00
Nicolas Grekas
4501a3688b [HttpKernel] Move services reset to Kernel 2017-10-30 19:01:22 +01:00
Fabien Potencier
344e4b03e0 minor #24752 [VarDumper] Fix DST bug (maidmaid)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] Fix DST bug

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

Commits
-------

e375e9ae81 Fix DST
2017-10-30 07:14:32 -07:00
Dany Maillard
e375e9ae81 Fix DST 2017-10-30 17:32:34 +10:00
Fabien Potencier
b327a7c100 Merge branch '3.3' into 3.4
* 3.3:
  Fixing a bug where non-existent classes would cause issues
  [SecurityBundle] hotfix: update phpdocs on logout url
  [FrameworkBundle] Do not load property_access.xml if the component isn't installed
  Fixed a few spelling mistakes in Luxembourgish translation
2017-10-29 14:08:13 -07:00
Fabien Potencier
7031b61187 Merge branch '2.8' into 3.3
* 2.8:
  [SecurityBundle] hotfix: update phpdocs on logout url
  [FrameworkBundle] Do not load property_access.xml if the component isn't installed
  Fixed a few spelling mistakes in Luxembourgish translation
2017-10-29 14:07:11 -07:00
Fabien Potencier
4a4f4d2ca2 Merge branch '2.7' into 2.8
* 2.7:
  [FrameworkBundle] Do not load property_access.xml if the component isn't installed
  Fixed a few spelling mistakes in Luxembourgish translation
2017-10-29 14:04:14 -07:00
Fabien Potencier
856f21abba bug #24703 [TwigBridge] Bootstrap 4 form theme fixes (vudaltsov)
This PR was squashed before being merged into the 3.4 branch (closes #24703).

Discussion
----------

[TwigBridge] Bootstrap 4 form theme fixes

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

Some fixes for compound forms and their labels.

1. Do not add `.form-control-label` and `.col-form-legend` at the same time. It's enough to have only one of them.
1. Use legends instead of labels for compound fields. I think it makes more sense to have nested `fieldsets` than `labels` without `for` in a compound form. An example of nested fieldsets is given at the bottom of [this page](https://dev.w3.org/html5/spec-preview/the-fieldset-element.html).

Commits
-------

e55c67ad17 [TwigBridge] Bootstrap 4 form theme fixes
2017-10-29 14:03:05 -07:00
Valentin Udaltsov
e55c67ad17 [TwigBridge] Bootstrap 4 form theme fixes 2017-10-29 14:03:02 -07:00
Fabien Potencier
e839df9e75 minor #24723 [HttpFoundation] Mark new methods on Response as final (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpFoundation] Mark new methods on Response as final

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

Commits
-------

a913f70583 [HttpFoundation] Mark new methods on Response as final
2017-10-29 14:00:00 -07:00
Fabien Potencier
1da0ba565d bug #24744 debug:container --types: Fix bug with non-existent classes (weaverryan)
This PR was merged into the 3.3 branch.

Discussion
----------

debug:container --types: Fix bug with non-existent classes

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

I've just tested manually that this *does* fix the issue I described in #24639.

Oddly enough, in a "stock" Flex project, after this patch, there is one *additional* "type" that's reported:

> Symfony\Component\PropertyAccess\PropertyAccessorInterface   alias for "property_accessor"

That is a valid type... for some reason `interface_exists()` return false for this (??? maybe a quirk of my machine). Anyways, this is also "fixed" with this new approach.

Commits
-------

4bb9d8207f Fixing a bug where non-existent classes would cause issues
2017-10-29 13:58:31 -07:00
Fabien Potencier
47b9e9afd4 bug #24747 [VarDumper] HtmlDumper: fix collapsing nodes with depth < maxDepth (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] HtmlDumper: fix collapsing nodes with depth < maxDepth

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

This error happens since #23967:

> (index):3 Uncaught TypeError: Cannot read property 'substr' of null

98dae3edb1/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php (L325)

when trying to collapse the root node (or more precisely, the nodes with a depth <= maxDepth) because it misses one of the `sf-dump-expanded`/`sf-dump-compact` classes which are necessary for the toggling to work.

Commits
-------

a1863c3b7c [VarDumper] HtmlDumper: fix collapsing nodes with depth <= maxDepth
2017-10-29 13:55:39 -07:00
Fabien Potencier
ffc98842eb bug #24743 [FrameworkBundle] Do not activate the cache if Doctrine's cache is not present (sroze)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Do not activate the cache if Doctrine's cache is not present

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

Annotations are automatically enabled when the `doctrine/annotations` package is around. These annotations are enabled with the `php_array` cache by default, which require `doctrine/cache`.

This PR allow this scenario to happen by disabling the annotation cache when `doctrine/cache` is not present.

Commits
-------

c5c7a2304d Do not activate the cache if Doctrine's cache is not present
2017-10-29 13:52:54 -07:00
Maxime Steinhausser
a1863c3b7c [VarDumper] HtmlDumper: fix collapsing nodes with depth <= maxDepth 2017-10-29 21:21:57 +01:00
Ryan Weaver
4bb9d8207f Fixing a bug where non-existent classes would cause issues 2017-10-29 13:47:23 -04:00
Samuel ROZE
c5c7a2304d
Do not activate the cache if Doctrine's cache is not present 2017-10-29 16:04:35 +00:00
Nicolas Grekas
2443511324 Remove useless docblocks 2017-10-29 10:49:53 +01:00
Maxime Steinhausser
dc9492eb6f [FrameworkBundle][Routing] Remove unused logger argument 2017-10-29 09:47:50 +01:00
Maxime Steinhausser
eedd43430a minor #24736 [SecurityBundle] hotfix: update phpdocs on logout url (Simperfit)
This PR was merged into the 2.8 branch.

Discussion
----------

[SecurityBundle] hotfix: update phpdocs on logout url

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

Just fixing a little phpdocs while doing another feature.

Commits
-------

8df6787e7a [SecurityBundle] hotfix: update phpdocs on logout url
2017-10-29 09:26:07 +01:00
Amrouche Hamza
8df6787e7a
[SecurityBundle] hotfix: update phpdocs on logout url 2017-10-29 08:37:35 +01:00
Fabien Potencier
d7e859e3c8 bug #24605 [FrameworkBundle] Do not load property_access.xml if the component isn't installed (ogizanagi)
This PR was squashed before being merged into the 2.7 branch (closes #24605).

Discussion
----------

[FrameworkBundle] Do not load property_access.xml if the component isn't installed

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- see comment 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/24563#issuecomment-337549147 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

This PR actually aims to fix https://github.com/symfony/symfony/pull/24563#issuecomment-337549147 as the exception introduced in the PR can't be reached anyway when using the FrameworkBundle without the property access component as you'll get:

> Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "PropertyAccessor" from namespace "Symfony\Component\PropertyAccess".

With this fix, you properly get:

> The ObjectNormalizer class requires the "PropertyAccess" component. Install "symfony/property-access" to use it.

Not sure this change really belongs to a patch release, but the original PR was accepted in the 2.7 branch.

Also, I'd rather remove the ObjectNormalizer definition if the component isn't available, as suggested by @xabbuh (https://github.com/symfony/symfony/pull/24563#issuecomment-336795644). But in 2.7, this is the only normalizer registered by default and the [`SerializerPass` throws an exception if no normalizer is registered.](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/SerializerPass.php#L46)

To sum up, either:

1. we completly prevent using the FrameworkBundle and the serializer without the property access component, even if you don't really care about the ObjectNormalizer because you only use your owns specific ones. (and you'll get the exception hinting to install the property access component)
2. we allow using the FrameworkBundle and the serializer without the property access component, so we remove the ObjectNormalizer definition, but the user'll get a `You must tag at least one service as "serializer.normalizer" to use the Serializer service` exception until he configures a normalizer (and we don't get the hint about installing the property access component to enable the ObjectNormalizer. We already have a suggest entry in the composer.json file, though).

To me option 2 looks better. WDYT?

Commits
-------

d297e27600 [FrameworkBundle] Do not load property_access.xml if the component isn't installed
2017-10-28 15:12:30 -07:00
Maxime Steinhausser
d297e27600 [FrameworkBundle] Do not load property_access.xml if the component isn't installed 2017-10-28 15:12:29 -07:00
Fabien Potencier
98dae3edb1 bug #24710 [TwigBridge] Fix template paths in profiler (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBridge] Fix template paths in profiler

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | #24540
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Fixes the profiler being unavailable with non filesystem templates.

![image](https://user-images.githubusercontent.com/1047696/32117680-87866354-bb4f-11e7-9cb9-428ad6751a1e.png)

Commits
-------

c9174dff7c [TwigBridge] Fix template paths in profiler
2017-10-28 15:07:58 -07:00
Nicolas Grekas
3ebf6ac45b [FrameworkBundle] Fix docblocks 2017-10-28 20:54:29 +02:00
Nicolas Grekas
b58c31f2aa [PropertyInfo] Remove useless docblocks 2017-10-28 20:53:30 +02:00
Nicolas Grekas
a913f70583 [HttpFoundation] Mark new methods on Response as final 2017-10-28 20:22:29 +02:00
Nicolas Grekas
711bdc950d minor #24719 Fixed a few spelling mistakes in Luxembourgish translation (mweimerskirch)
This PR was submitted for the 3.3 branch but it was merged into the 2.7 branch instead (closes #24719).

Discussion
----------

Fixed a few spelling mistakes in Luxembourgish translation

Fixed a few spelling mistakes in Luxembourgish translation and also adjusted trans-unit "51" to commit #21335

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

Commits
-------

7a81576 Fixed a few spelling mistakes in Luxembourgish translation
2017-10-28 19:02:43 +02:00
Michel Weimerskirch
7a81576b97 Fixed a few spelling mistakes in Luxembourgish translation
Also adjusted trans-unit "51" to commit #21335
2017-10-28 19:02:43 +02:00
Nicolas Grekas
1e7d4877b7 Minor fix in UPGRADE files 2017-10-28 18:56:07 +02:00
Nicolas Grekas
c7e59b3a5b Merge branch '3.3' into 3.4
* 3.3:
  Ensure DeprecationErrorHandler::collectDeprecations() is triggered
  [FrameworkBundle] Allow to disable assets via framework:assets xml configuration
  fixed $_ENV/$_SERVER precedence in test framework
  [HttpFoundation] Fix FileBag issue with associative arrays
  [DI] Throw when a service name or an alias contains dynamic values (prevent an infinite loop)
  fix the phpdoc that is not really inherited from response
  Minor docblock cleanup
  Remove redundant sprintf arguments.
2017-10-28 18:49:05 +02:00
Nicolas Grekas
e7b555e2c9 Merge branch '2.8' into 3.3
* 2.8:
  [HttpFoundation] Fix FileBag issue with associative arrays
  fix the phpdoc that is not really inherited from response
  Minor docblock cleanup
  Remove redundant sprintf arguments.
2017-10-28 18:47:30 +02:00
Nicolas Grekas
865622e630 Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] Fix FileBag issue with associative arrays
  fix the phpdoc that is not really inherited from response
  Minor docblock cleanup
  Remove redundant sprintf arguments.
2017-10-28 18:44:51 +02:00
Nicolas Grekas
e80cf9cade bug #24706 [DependencyInjection] Add the possibility to disable assets via xml (renatomefi)
This PR was merged into the 3.3 branch.

Discussion
----------

[DependencyInjection] Add the possibility to disable assets via xml

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

- When trying to disable the assets using xml configuration I realized it wasn't possible, this patch fixes and tests it
- Also added extra tests since the assets being disabled was being tested on both php and yaml Extension tests

Commits
-------

8579e24 [FrameworkBundle] Allow to disable assets via framework:assets xml configuration
2017-10-28 18:26:49 +02:00