Commit Graph

9196 Commits

Author SHA1 Message Date
Fabien Potencier
d5ff094258 Merge branch '3.3' into 3.4
* 3.3:
  [HttpFoundation] Use the correct syntax for session gc based on Pdo driver
  Removed assertDateTimeEquals() methods.
  Revert "bug #24987 [Console] Fix global console flag when used in chain (Simperfit)"
  Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"
  Disable CSP header on exception pages only in debug
  Fixed submitting disabled buttons
  Fixed Button::setParent() when already submitted
  Improve assertions
  Restore RoleInterface import
  Improve assertions
  SCA: get rid of repetitive calls
  allow null values for root nodes in YAML configs
  revert useless tests fixtures changes
  [VarDumper] Fix docblock
  Improve phpdoc to make it more explicit
2018-01-29 10:03:43 +01:00
Fabien Potencier
57e5075645 Merge branch '2.8' into 3.3
* 2.8:
  [HttpFoundation] Use the correct syntax for session gc based on Pdo driver
  Removed assertDateTimeEquals() methods.
  Revert "bug #24987 [Console] Fix global console flag when used in chain (Simperfit)"
  Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"
  Disable CSP header on exception pages only in debug
  Fixed submitting disabled buttons
  Fixed Button::setParent() when already submitted
  Improve assertions
  Improve assertions
  SCA: get rid of repetitive calls
  allow null values for root nodes in YAML configs
  [VarDumper] Fix docblock
  Improve phpdoc to make it more explicit
2018-01-29 10:02:23 +01:00
Fabien Potencier
b99ca76e4b minor #25908 Improve assertions (carusogabriel)
This PR was merged into the 2.8 branch.

Discussion
----------

Improve assertions

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

Following #25420 in `2.8` branch.

Commits
-------

4683f6d454 Improve assertions
2018-01-29 09:55:23 +01:00
Fabien Potencier
6f2a31b851 Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] Use the correct syntax for session gc based on Pdo driver
  Revert "bug #24987 [Console] Fix global console flag when used in chain (Simperfit)"
  Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"
  Disable CSP header on exception pages only in debug
  Fixed submitting disabled buttons
  Fixed Button::setParent() when already submitted
  Improve assertions
  SCA: get rid of repetitive calls
  allow null values for root nodes in YAML configs
  [VarDumper] Fix docblock
  Improve phpdoc to make it more explicit
2018-01-29 09:54:45 +01:00
Gabriel Ostrolucký
b77538c2fe Disable CSP header on exception pages only in debug
Same condition is used by default TwigBridge ExceptionController
to evaluate if styled exception page is supposed to be shown.
2018-01-26 02:39:48 +01:00
Gabriel Caruso
4683f6d454 Improve assertions 2018-01-23 18:17:18 -02:00
Fabien Potencier
1b92f0685d minor #25898 [minor] SCA: reduce repetitive method calls (sequential and in loop) (kalessil)
This PR was merged into the 2.7 branch.

Discussion
----------

[minor] SCA: reduce repetitive method calls (sequential and in loop)

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

Commits
-------

609372252f SCA: get rid of repetitive calls
2018-01-23 20:05:41 +01:00
Vladimir Reznichenko
609372252f SCA: get rid of repetitive calls 2018-01-23 12:06:14 +01:00
Christian Flothmann
fb1be51a5c revert useless tests fixtures changes
This will revert #25847. Basically, the changes done in #25847 were not
wrong per se. However, those changes were not necessary as the tests
were not failing because of the missing "assets" config, but due to an
issue introduced in the Config component. Furthermore, removing this
part of the config fixtures gives us the benefit that our before
normalization logic that enables assets support when the templating
integration is enabled is properly tested.
2018-01-22 21:13:54 +01:00
Robin Chalas
f5d2d67508 Merge branch '3.3' into 3.4
* 3.3:
  [FrameworkBundle] fix DI extension tests
2018-01-19 12:19:01 +01:00
Robin Chalas
38abc7bb8f minor #25847 [FrameworkBundle] fix DI extension tests (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle] fix DI extension tests

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

The failing tests relied on the assets integration being enabled. Since
we never did enable this explicitly, the assets related definitions are
removed now that #25789 was merged which fixed #25760.

Commits
-------

1cb8f69 [FrameworkBundle] fix DI extension tests
2018-01-19 12:17:11 +01:00
Christian Flothmann
1cb8f6918f [FrameworkBundle] fix DI extension tests
The failing tests relied on the assets integration being enabled. Since
we never did enable this explicitly, the assets related definitions are
removed now that #25789 was merged which fixed #25760.
2018-01-19 12:05:40 +01:00
Robin Chalas
39557e25c4 fix merge 2018-01-19 11:06:48 +01:00
Robin Chalas
1b1ed670a6 Merge branch '3.3' into 3.4
* 3.3:
  [SecurityBundle] Don't register in memory users as services
2018-01-19 11:03:45 +01:00
Robin Chalas
00621d4840 Merge branch '2.8' into 3.3
* 2.8:
  [SecurityBundle] Don't register in memory users as services
2018-01-19 10:28:48 +01:00
Robin Chalas
e64cb185cb Merge branch '2.7' into 2.8
* 2.7:
  [SecurityBundle] Don't register in memory users as services
2018-01-19 10:21:47 +01:00
Nicolas Grekas
5f75d43e42 Merge branch '3.3' into 3.4
* 3.3:
  [HttpKernel] DebugHandlersListener should always replace the existing exception handler
  fix the Composer API being used
  [Debug] Always decorate existing exception handlers to deal with fatal errors
  Enableable ArrayNodeDefinition is disabled for empty configuration
  Fixing a bug where the dump() function depended on bundle ordering
  [Cache] Fix handling of apcu_fetch() edgy behavior
  Add nn (Norwegian Nynorsk) translation files, and improve existing file
  Problem in phar see mergerequest #25579
  [Form] Disallow transform dates beyond the year 9999
  Copied NO language files to the new NB locale.
  [Serializer] DateTimeNormalizer handling of null and empty values (returning null or empty instead of new object)
  [Console] Improve phpdoc on StyleInterface::ask()
2018-01-18 23:16:57 +01:00
Robin Chalas
13fa0454e4 [SecurityBundle] Don't register in memory users as services 2018-01-18 15:57:23 +01:00
Christian Flothmann
753197f09e Merge branch '2.8' into 3.3
* 2.8:
  fix the Composer API being used
  [Debug] Always decorate existing exception handlers to deal with fatal errors
  Enableable ArrayNodeDefinition is disabled for empty configuration
  Fixing a bug where the dump() function depended on bundle ordering
  Add nn (Norwegian Nynorsk) translation files, and improve existing file
  Problem in phar see mergerequest #25579
  [Form] Disallow transform dates beyond the year 9999
  Copied NO language files to the new NB locale.
  [Console] Improve phpdoc on StyleInterface::ask()
2018-01-18 15:19:00 +01:00
Christian Flothmann
48872f3aed Merge branch '2.7' into 2.8
* 2.7:
  fix the Composer API being used
  [Debug] Always decorate existing exception handlers to deal with fatal errors
  Enableable ArrayNodeDefinition is disabled for empty configuration
  Fixing a bug where the dump() function depended on bundle ordering
  Add nn (Norwegian Nynorsk) translation files, and improve existing file
  Problem in phar see mergerequest #25579
  [Form] Disallow transform dates beyond the year 9999
  Copied NO language files to the new NB locale.
  [Console] Improve phpdoc on StyleInterface::ask()
2018-01-18 14:56:23 +01:00
Ryan Weaver
717663aac1
Fixing a bug where the dump() function depended on bundle ordering 2018-01-17 09:58:59 -08:00
Nicolas Grekas
f3ac9f51ef bug #25508 [FrameworkBundle] Auto-enable CSRF if the component *+ session* are loaded (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Auto-enable CSRF if the component *+ session* are loaded

| 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/recipes/issues/262
| License       | MIT
| Doc PR        | -

By binding CSRF and session default state, we provide better DX, but we also provide a way for bundles to enable session on its own: they just need to require "symfony/security-csrf".
Yes, that's a side effect, but I think that's a nice one for 3.4/4.0.
Of course, we might do better in 4.1, but for bug fix only releases, LGTM.

Commits
-------

9e8231f [FrameworkBundle] Automatically enable the CSRF if component *+ session* are loaded
2018-01-16 15:44:24 +01:00
Nicolas Grekas
3316e42797 Merge branch '3.3' into 3.4
* 3.3:
  fix merge
  fixed wrong description in a phpdoc
  19 digits VISA card numbers are valid
  Add missing @ in phpdoc return statement
  Don't right trim the deprecation message
  [HttpKernel] Fixed test name
  [Debug] prevent infinite loop with faulty exception handlers
  Add the missing `enabled` session attribute
  [HttpKernel] Turn bad hosts into 400 instead of 500
2018-01-13 15:04:53 +01:00
Nicolas Grekas
07b5304268 Merge branch '2.8' into 3.3
* 2.8:
  fixed wrong description in a phpdoc
  19 digits VISA card numbers are valid
  [HttpKernel] Fixed test name
  [Debug] prevent infinite loop with faulty exception handlers
  Add the missing `enabled` session attribute
  [HttpKernel] Turn bad hosts into 400 instead of 500
2018-01-13 15:02:56 +01:00
Nicolas Grekas
4a211d8332 Merge branch '2.7' into 2.8
* 2.7:
  fixed wrong description in a phpdoc
  19 digits VISA card numbers are valid
  [HttpKernel] Fixed test name
  [Debug] prevent infinite loop with faulty exception handlers
  Add the missing `enabled` session attribute
  [HttpKernel] Turn bad hosts into 400 instead of 500
2018-01-13 14:56:42 +01:00
Christian Flothmann
6088dd328d [FrameworkBundle] fix tests
Add a public alias so that we can retrieve the private aliased
annotation_reader service in an after removing compiler pass.
2018-01-10 20:10:52 +01:00
Samuel ROZE
a3149310ac
Add the missing enabled session attribute 2018-01-10 17:16:33 +00:00
Christian Flothmann
7625c771c6 Merge branch '3.3' into 3.4
* 3.3:
  [Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
  Tweaked some styles in the profiler tables
  Add type string to docblock for Process::setInput()
  [Security] Fail gracefully if the security token cannot be unserialized from the session
  [Form] AbstractLayoutTest - fix DOMDocument casing
  Run simple-phpunit with --no-suggest option
  [FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes
  bumped Symfony version to 3.3.16
  updated VERSION for 3.3.15
  updated CHANGELOG for 3.3.15
  bumped Symfony version to 2.8.34
  updated VERSION for 2.8.33
  updated CHANGELOG for 2.8.33
  bumped Symfony version to 2.7.41
  updated VERSION for 2.7.40
  update CONTRIBUTORS for 2.7.40
  updated CHANGELOG for 2.7.40
2018-01-10 12:30:01 +01:00
Christian Flothmann
fc9236dfb1 Merge branch '2.8' into 3.3
* 2.8:
  [Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
  Tweaked some styles in the profiler tables
  [Security] Fail gracefully if the security token cannot be unserialized from the session
  [Form] AbstractLayoutTest - fix DOMDocument casing
  bumped Symfony version to 2.8.34
  updated VERSION for 2.8.33
  updated CHANGELOG for 2.8.33
  bumped Symfony version to 2.7.41
  updated VERSION for 2.7.40
  update CONTRIBUTORS for 2.7.40
  updated CHANGELOG for 2.7.40
2018-01-10 12:21:25 +01:00
Nicolas Grekas
9e8231ff0b [FrameworkBundle] Automatically enable the CSRF if component *+ session* are loaded 2018-01-09 14:58:36 +01:00
Javier Eguiluz
bc80258a1e Tweaked some styles in the profiler tables 2018-01-07 18:01:19 +01:00
Nicolas Grekas
f66f9a7b37 [FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes 2018-01-05 13:12:39 +01:00
Fabien Potencier
730841527a bug #25671 Remove randomness from dumped containers (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove randomness from dumped containers

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

With this PR, the generated container is immutable by cache clearing: it doesn't contain any random string anymore (well, third party bundles can add random things back, but at least core doesn't).

Since the class+file name of the container is based on a hash of its content, it means that they are now stable also. This should help fix some edge cases/race conditions during cache clears/rebuilds.

(fabbot failure is false positive)

Commits
-------

14dd5d1dbd Remove randomness from dumped containers
2018-01-04 16:42:01 +01:00
Nicolas Grekas
14dd5d1dbd Remove randomness from dumped containers 2018-01-04 16:07:28 +01:00
Fabien Potencier
e8bc099641 fixed messages to be explicit about the package needed to be installed 2018-01-04 14:13:45 +01:00
Tomas Kmieliauskas
f6d38b3770 [FrameworkBundle] Fix recommended composer command (add vendor)
Since running composer commands is time heavy, having a wrong one recommended to you just burns your time.
2018-01-04 14:08:31 +01:00
Javier Eguiluz
85240f2247 bug #25678 [WebProfilerBundle] set the var in the right scope (Jochen Mandl)
This PR was squashed before being merged into the 3.4 branch (closes #25678).

Discussion
----------

[WebProfilerBundle] set the var in the right scope

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

![2018-01-04 um 09 29 54](https://user-images.githubusercontent.com/1322118/34555989-de6fd11c-f134-11e7-81f7-9b840a946073.png)

This PR fixes the bug when displaying the toolbar. The variable "has_time_events" was not created in the scope of the toolbar.

Commits
-------

3e9780df59 [WebProfilerBundle] set the var in the right scope
2018-01-04 12:52:27 +01:00
Jochen Mandl
3e9780df59 [WebProfilerBundle] set the var in the right scope 2018-01-04 12:52:24 +01:00
Nicolas Grekas
837ec4df44 [TwigBundle] fix lowest dep 2018-01-04 11:29:03 +01:00
Fabien Potencier
abfa3eeca5 minor #25636 Backport Flex-specific error messages in controller shortcuts to 3.4 (weaverryan)
This PR was merged into the 3.4 branch.

Discussion
----------

Backport Flex-specific error messages in controller shortcuts to 3.4

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/25133#issuecomment-354551079
| License       | MIT
| Doc PR        | n/a

Commits
-------

419e93465f Proposing Flex-specific error messages in the controller shortcuts
2018-01-03 18:28:45 +01:00
Nicolas Grekas
682bf5b2ae Merge branch '3.3' into 3.4
* 3.3:
  PHP CS Fixer: clean up repo and adjust config
  use interface_exists instead of class_exists
  Dumper shouldn't use html format for phpdbg
  [Validator] Fix access to root object when using composite constraint
2018-01-03 18:14:19 +01:00
Nicolas Grekas
00e8908375 Merge branch '2.8' into 3.3
* 2.8:
  PHP CS Fixer: clean up repo and adjust config
  Dumper shouldn't use html format for phpdbg
  [Validator] Fix access to root object when using composite constraint
2018-01-03 18:13:53 +01:00
Nicolas Grekas
5150086d08 Merge branch '2.7' into 2.8
* 2.7:
  PHP CS Fixer: clean up repo and adjust config
  Dumper shouldn't use html format for phpdbg
  [Validator] Fix access to root object when using composite constraint
2018-01-03 18:12:09 +01:00
Nicolas Grekas
0f884e0ae4 minor #25653 PHP CS Fixer: clean up repo and adjust config (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #25653).

Discussion
----------

PHP CS Fixer: clean up repo and adjust config

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

Reason for this PR is that one want to have `php-cs-fixer fix -v` command executed without changes that shall not be applied for this repo. To achieve that, we need to groom config to exclude files that violate CS willingly, fix files that are violating CS unwillingly, and deliver missing case handling at PHP CS Fixer itself (https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3359) (already merged!).

Commits
-------

b14cbc1 PHP CS Fixer: clean up repo and adjust config
2018-01-03 18:10:39 +01:00
Dariusz
b14cbc1845 PHP CS Fixer: clean up repo and adjust config 2018-01-03 18:10:15 +01:00
Kevin Bond
dc3a94e83a
use interface_exists instead of class_exists 2018-01-03 11:18:08 -05:00
Ryan Weaver
419e93465f Proposing Flex-specific error messages in the controller shortcuts 2018-01-03 15:34:56 +01:00
Fabien Potencier
a483d37eaf Merge branch '3.3' into 3.4
* 3.3:
  fixed years in copyright
2018-01-03 08:37:34 +01:00
Fabien Potencier
9918a66309 Merge branch '2.8' into 3.3
* 2.8:
  fixed years in copyright
2018-01-03 08:37:11 +01:00
Fabien Potencier
967066569a Merge branch '2.7' into 2.8
* 2.7:
  fixed years in copyright
2018-01-03 08:36:31 +01:00
Fabien Potencier
07a7f560cd fixed years in copyright 2018-01-03 08:23:28 +01:00
Nicolas Grekas
dd66512734 Merge branch '3.3' into 3.4
* 3.3:
  Clean up
  Update return type in docblock.
  PHP CS Fixer: no need to exclude xml and yml files
  PHP CS Fixer: no need to exclude json file
  Update LICENSE year... forever
2018-01-02 16:47:46 +01:00
Nicolas Grekas
096cbbd3cd Merge branch '2.8' into 3.3
* 2.8:
  Clean up
  Update return type in docblock.
  PHP CS Fixer: no need to exclude xml and yml files
  Update LICENSE year... forever
2018-01-02 16:47:19 +01:00
Nicolas Grekas
ae985d851a Merge branch '2.7' into 2.8
* 2.7:
  Clean up
  Update return type in docblock.
  PHP CS Fixer: no need to exclude xml and yml files
  Update LICENSE year... forever
2018-01-02 16:45:49 +01:00
Nicolas Grekas
28478374f7 minor #25646 Update LICENSE year... forever (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

Update LICENSE year... forever

| 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 | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

By using the same trick than Facebook: https://github.com/facebook/react/blob/master/LICENSE

Commits
-------

8ce8bd5 Update LICENSE year... forever
2018-01-02 16:40:42 +01:00
Gabriel Caruso
acd0d7c93f Clean up 2018-01-02 16:37:23 +01:00
Kévin Dunglas
8ce8bd5901
Update LICENSE year... forever 2017-12-31 13:13:41 +01:00
Fabien Potencier
3a5c8a424e fixed some deprecation messages 2017-12-31 07:59:27 +01:00
Fabien Potencier
22c0e81d79 Merge branch '3.3' into 3.4
* 3.3:
  fixed some deprecation messages
  fixed some deprecation messages
  fixed some deprecation messages
  fixed some deprecation messages
  [2.7][DX] Use constant message contextualisation for deprecations
2017-12-31 07:07:31 +01:00
Fabien Potencier
8ce9569d8a minor #25476 [FrameworkBundle] Remove redundant translation path (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Remove redundant translation path

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

This is only dead code, nothing change because all files are loaded from the `translations/` directory recursively and they override the ones from the bundle.

> http://symfony.com/doc/3.4/bundles/override.html#translations
> Translations are not related to bundles, but to domains. That means that you can override the translations from any translation file, as long as it is in the correct domain.

Commits
-------

16af89045a Remove redundant translation path
2017-12-31 06:54:09 +01:00
Fabien Potencier
74383b6e59 fixed some deprecation messages 2017-12-31 06:50:45 +01:00
Fabien Potencier
315180cd3b bug #25117 [FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup (hkdobrev)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup

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

Here's what happens before/after this PR on `cache:clear` and `cache:clear --no-warmup`.

### Before PR

**`cache:clear`**

1. `rm var/cache_old`
1. Clearing cache in `var/cache`    &nbsp;<i>&lt;--- This is not in line and not atomic</i>
1. `rm var/cache_warmup`
1. Warming up cache in `var/cache_warmup`
1. `mv var/cache var/cache_old`
1. `mv var/cache_warmup var/cache`
1. `rm var/cache_old`

**`cache:clear --no-warmup`**

1. `rm var/cache_old`
1. Clearing cache in `var/cache`    &nbsp;<i>&lt;--- This is not in line and not atomic</i>
1. `mv var/cache var/cache_old`    <i>&lt;--- The old cache dir is completely obsolete in this workflow</i>
1. `rm var/cache_old`

---

### After PR

**`cache:clear`**

1. `rm var/cache_old`
1. `rm var/cache_new`
1. Clearing cache in `var/cache_new`
1. Warming up cache in `var/cache_new`
1. `mv var/cache var/cache_old`
1. `mv var/cache_new var/cache`
1. `rm var/cache_old`

**`cache:clear --no-warmup`**

1. `rm var/cache_old`
1. `rm var/cache_new`
1. Clearing cache in `var/cache_new`
1. `mv var/cache var/cache_old`
1. `mv var/cache_new var/cache`
1. `rm var/cache_old`

---

The main differences:
- Unify the flows and have each distinct operation only once in the code
- Clear the cache in the new cache directory and then switch to it atomically instead of clearing in the current one.
- Always have the cache directory present in the end. It was missing after `cache:clear --no-warmup` before.

I think this brings more consistency and is aligned with the present goals of the command as well.

However, I'm not really familiar with the Symfony framework and I might have wrong assumptions.

Commits
-------

8b88d9fc36 [FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup
2017-12-31 06:48:57 +01:00
Fabien Potencier
351b234f07 fixed some deprecation messages 2017-12-31 06:12:25 +01:00
Fabien Potencier
2dd70c8a65 Merge branch '2.7' into 2.8
* 2.7:
  fixed some deprecation messages
2017-12-31 06:04:01 +01:00
Fabien Potencier
b316e11836 fixed some deprecation messages 2017-12-31 05:55:05 +01:00
Fabien Potencier
e78ca822c4 Merge branch '2.7' into 2.8
* 2.7:
  fixed some deprecation messages
2017-12-31 05:47:31 +01:00
Fabien Potencier
dc554562c8 fixed some deprecation messages 2017-12-31 05:27:30 +01:00
Fabien Potencier
be411de4d0 Merge branch '2.7' into 2.8
* 2.7:
  [2.7][DX] Use constant message contextualisation for deprecations
2017-12-31 05:16:51 +01:00
Fabien Potencier
f0b1dc2f7e bug #25583 [HttpKernel] Call Response->setPrivate() instead of sending raw header() when session is started (Toflar)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Call Response->setPrivate() instead of sending raw header() when session is started

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

As described in #24988 I think the current handling of the `Cache-Control` header set by the `NativeSessionStorage` causes inconsistent behaviour.

In #24988 @nicolas-grekas states that if you start a session a response should be considered to be private. I do agree with this but up until now, nobody takes care of this on `kernel.response`.

I think we must always suppress the `NativeSessionStorage` from generating any headers by default. Otherwise the `Cache-Control` header never makes it to the `Response` instance and is thus missed by `kernel.response` listeners and for example the Symfony HttpCache. So depending on whether you use Symfony's HttpCache  or Varnish as a reverse proxy, caching would be handled differently.  Varnish would consider the response to be private if you set the php.ini setting `session.cache_limiter` to `nocache` (which is default) because it will receive the header. HttpCache would not because the `Cache-Control` header is not present on the `Response`.  That's inconsistent and may cause confusion or problems when switching proxies.

Commits
-------

dbc1c1c4b6 [HttpKernel] Call Response->setPrivate() instead of sending raw header() when session is started
2017-12-31 04:28:37 +01:00
Fabien Potencier
bbe23a79d4 bug #25601 [TwigBundle/Brige] catch missing requirements to throw meaningful exceptions (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBundle/Brige] catch missing requirements to throw meaningful exceptions

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

It is possible to register a handler for undefined twig functions/filters.
IMHO, this is the hook point we should leverage to throw meaningful exception messages.

This works well on its own. We now just need to list the functions/filters with appropriate messages.

There is one case we could enhance: at warmup time, Twig exceptions are swallowed, thus not visible.
Shouldn't we make these visible instead?

ping @weaverryan since this is related to two issues of yours.

Commits
-------

ac891ac881 [TwigBundle/Brige] catch missing requirements to throw meaningful exceptions
2017-12-30 12:42:46 +01:00
Nicolas Grekas
ac891ac881 [TwigBundle/Brige] catch missing requirements to throw meaningful exceptions 2017-12-30 11:01:46 +01:00
Nicolas Grekas
cc027a261f Merge branch '3.3' into 3.4
* 3.3:
  Add application/ld+json format associated to json
  [HttpFoundation] Fix false-positive ConflictingHeadersException
  [WebServerBundle] Fix escaping of php binary with arguments
  Error handlers' $context should be optional as it's deprecated
  [Serializer] Correct typing mistake in DocBlock
  [Config] Fix closure CS
  PHP CS Fixer: use PHPUnit Migration ruleset
  Update MemcachedTrait.php
  [Bridge/PhpUnit] thank phpunit/phpunit
  [Process] Fix setting empty env vars
  [Process] Dont use getenv(), it returns arrays and can introduce subtle breaks accros PHP versions
  [WebServerBundle] fix a bug where require would not require the good file because of env
  [Console] Commands with an alias should not be recognized as ambiguous
2017-12-29 21:55:26 +01:00
Robin Chalas
61fc5f7671 remove flex-specific suggestion on 3.4 2017-12-29 16:39:13 +01:00
Frederic G. MARAND
a013c019a7 Add check for SecurityBundle in createAccessDeniedException 2017-12-29 14:30:56 +01:00
Nicolas Grekas
6629ae535d [WebServerBundle] Fix escaping of php binary with arguments 2017-12-29 12:04:53 +01:00
Yanick Witschi
dbc1c1c4b6 [HttpKernel] Call Response->setPrivate() instead of sending raw header() when session is started 2017-12-29 11:28:36 +01:00
Javier Eguiluz
ae6f66821f bug #25526 [WebProfilerBundle] Fix panel break when stopwatch component is not installed. (umulmrum, javiereguiluz)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] Fix panel break when stopwatch component is not installed.

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

Fixes a crash in the time profiler panel when the stopwatch is not installed. This avoids a hard dependency like the ticket author requested, as the rest of the component can already deal with that case.

I think this is an issue in 3.4+, but I only tested against 4.0.2 locally (code in the affected file only differs in whitespace between 3.4 and 4.0).

Commits
-------

e9577cb207 Display n/a for sub-requests time when Stopwatch component is not installed
410b597393 Fix panel break when stopwatch component is not installed.
2017-12-28 12:09:31 +01:00
Javier Eguiluz
e9577cb207
Display n/a for sub-requests time when Stopwatch component is not installed 2017-12-28 12:08:28 +01:00
Haralan Dobrev
8b88d9fc36 [FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup 2017-12-27 10:35:49 +01:00
Nicolas Grekas
cd6690dacd bug #25571 [SecurityBundle] allow auto_wire for SessionAuthenticationStrategy class (xavren)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] allow auto_wire for SessionAuthenticationStrategy class

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

Commits
-------

b36154e allow auto_wire for SessionAuthenticationStrategy class
2017-12-22 23:39:48 +01:00
xavren
b36154eb6c allow auto_wire for SessionAuthenticationStrategy class 2017-12-21 09:56:34 +01:00
Ion Bazan
680f85478c
Fixed 'RouterInteface' typo 2017-12-20 16:01:44 +01:00
Romain Neutron
c2338cbd7a
[2.7][DX] Use constant message contextualisation for deprecations 2017-12-20 15:36:51 +01:00
Nicolas Grekas
743be09e3d bug #25523 [WebServerBundle] fix a bug where require would not require the good file because of env (Simperfit)
This PR was merged into the 3.3 branch.

Discussion
----------

[WebServerBundle] fix a bug where require would not require the good file because of env

| 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
| Fixed tickets | #25515
| License       | MIT
| Doc PR        |

This fixes a bug with putenv that could be not working on certain version of php. (>=7.0.0).

Commits
-------

bfeee1f [WebServerBundle] fix a bug where require would not require the good file because of env
2017-12-20 15:28:41 +01:00
Nicolas Grekas
a8755cc7d7 Merge branch '3.3' into 3.4
* 3.3:
  [2.7] Fix issues found by PHPStan
  Add php_unit_dedicate_assert to PHPCS
  [WebProfilerBundle] Let fetch() cast URL to string
  improve FormType::getType exception message details
  [Intl] Update ICU data to 60.2
  [Console] fix a bug when you are passing a default value and passing -n would ouput the index
2017-12-20 12:08:06 +01:00
Nicolas Grekas
d731a2748f Merge branch '2.8' into 3.3
* 2.8:
  [2.7] Fix issues found by PHPStan
  Add php_unit_dedicate_assert to PHPCS
  improve FormType::getType exception message details
  [Intl] Update ICU data to 60.2
  [Console] fix a bug when you are passing a default value and passing -n would ouput the index
2017-12-20 12:04:02 +01:00
Nicolas Grekas
44db4d1170 Merge branch '2.7' into 2.8
* 2.7:
  [2.7] Fix issues found by PHPStan
  Add php_unit_dedicate_assert to PHPCS
  [Intl] Update ICU data to 60.2
  [Console] fix a bug when you are passing a default value and passing -n would ouput the index
2017-12-20 11:59:01 +01:00
Dalibor Karlović
afa1f149a3 [2.7] Fix issues found by PHPStan 2017-12-20 10:28:52 +01:00
Amrouche Hamza
bfeee1f011
[WebServerBundle] fix a bug where require would not require the good file because of env 2017-12-19 14:09:34 +01:00
Roland Franssen
1a75e8568f [WebProfilerBundle] Let fetch() cast URL to string 2017-12-19 13:12:38 +01:00
Stefan
410b597393 Fix panel break when stopwatch component is not installed. 2017-12-17 16:53:26 +01:00
David Maicher
76e16ff4ef [FrameworkBundle] fix merge of 3.3 into 3.4 2017-12-15 10:06:19 +01:00
Fabien Potencier
903f120816 Revert "bug #25151 [FrameworkBundle] Automatically enable the CSRF protection if CSRF manager exists (sroze)"
This reverts commit d5f04284f9, reversing
changes made to e52825e253.
2017-12-14 17:44:04 -08:00
Fabien Potencier
8013b4b2d3 Revert "bug #25502 Fixing wrong class_exists on interface (weaverryan)"
This reverts commit 5fd5f19eaf, reversing
changes made to 826d545ba0.
2017-12-14 17:44:00 -08:00
Nicolas Grekas
1e1b85c99c Merge branch '3.3' into 3.4
* 3.3:
  [SecurityBundle] fix test by always disabling CSRF
  [FrameworkBundle] remove esi/ssi renderers if inactive
2017-12-14 23:31:23 +01:00
Nicolas Grekas
e273d8107e [SecurityBundle] fix test by always disabling CSRF 2017-12-14 23:23:34 +01:00
Nicolas Grekas
e5d178e55a Merge branch '2.8' into 3.3
* 2.8:
  [FrameworkBundle] remove esi/ssi renderers if inactive
2017-12-14 21:27:16 +01:00
Nicolas Grekas
39bcfd4702 Merge branch '2.7' into 2.8
* 2.7:
  [FrameworkBundle] remove esi/ssi renderers if inactive
2017-12-14 21:21:22 +01:00
Fabien Potencier
76b7cacdd3 bug #25489 [FrameworkBundle] remove esi/ssi renderers if inactive (dmaicher)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] remove esi/ssi renderers if inactive

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

As found out within #25246 the esi/ssi fragment renderer services were registered for < 3.4 even when the framework config for it was disabled.

On 3.4+ this has been fixed already and the service definitions are removed.

With this fix the usual exception message appears when `framework.esi` or `framework.ssi` are disabled and using `render_esi(...)` or `render_ssi(...)`:

```
An exception has been thrown during the rendering of a template ("The "esi" renderer does not exist.").
```

**Note: Some people may see this exception when updating to this patch but this just means they are using esi/ssi without enabling it.**

Commits
-------

e1c36525fd [FrameworkBundle] remove esi/ssi renderers if inactive
2017-12-14 11:54:21 -08:00
Fabien Potencier
032de3abf4 Merge branch '3.3' into 3.4
* 3.3:
  Tweak message to be Flex friendly
2017-12-14 11:45:05 -08:00
Fabien Potencier
5fd5f19eaf bug #25502 Fixing wrong class_exists on interface (weaverryan)
This PR was merged into the 3.4 branch.

Discussion
----------

Fixing wrong class_exists on interface

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | symfony/symfony-docs#8873 already does not mention changing anything in the config

This was a bug introduced in #25151 on the 3.4 branch. It's... pretty self-explanatory I hope :).

Cheers!

Commits
-------

be75bd994b Fixing wrong class_exists on interface
2017-12-14 11:42:48 -08:00
Fabien Potencier
826d545ba0 fixed wrong merge 2017-12-14 11:41:37 -08:00
Fabien Potencier
e7cccb0575 fixed tests 2017-12-14 11:40:10 -08:00
Ryan Weaver
eaf5642b95
Tweak message to be Flex friendly 2017-12-14 11:37:45 -08:00
Fabien Potencier
13f58b403c Merge branch '2.8' into 3.3
* 2.8:
  Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
  [Console] Fix a bug when passing a letter that could be an alias
  add missing validation options to XSD file
2017-12-14 11:31:56 -08:00
Ryan Weaver
be75bd994b
Fixing wrong class_exists on interface 2017-12-14 11:30:58 -08:00
Fabien Potencier
bdbdf73bdd Merge branch '2.7' into 2.8
* 2.7:
  Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
  [Console] Fix a bug when passing a letter that could be an alias
  add missing validation options to XSD file
2017-12-14 11:27:36 -08:00
Fabien Potencier
9ff3776b78 bug #25480 [FrameworkBundle] add missing validation options to XSD file (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] add missing validation options to XSD file

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

e7d8e1783b add missing validation options to XSD file
2017-12-14 10:38:41 -08:00
David Maicher
e1c36525fd [FrameworkBundle] remove esi/ssi renderers if inactive 2017-12-13 20:39:50 +01:00
Christian Flothmann
e7d8e1783b add missing validation options to XSD file 2017-12-13 08:51:34 +01:00
Yonel Ceruto
16af89045a Remove redundant translation path 2017-12-12 23:37:05 -05:00
Jonathan Johnson
97c3f429eb
Take advantage of AnnotationRegistry::registerUniqueLoader
This method will only add 'class_exists' as an autoloader if it has not
already been added. This helps alleviate a performance issue when the
same loader is added many times in tests.
2017-12-12 15:38:57 -08:00
Christian Flothmann
fde1f48874 add missing logout_on_user_change options 2017-12-12 12:26:50 +01:00
Nicolas Grekas
05ab1cd00d Merge branch '2.8' into 3.3
* 2.8:
  Refactoring tests.
2017-12-12 12:20:26 +01:00
Nicolas Grekas
263eda3dd6 Merge branch '2.7' into 2.8
* 2.7:
  Refactoring tests.
2017-12-12 12:12:43 +01:00
Nicolas Grekas
6aa18bf6a8 Merge branch '3.3' into 3.4
* 3.3:
  fix merge
  [Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files
  Fixed exit code with non-integer throwable code
  Add suggestions
  Added instructions to upgrade Symfony applications to 4.x
2017-12-12 09:27:14 +01:00
Nicolas Grekas
6e29f187b7 minor #25026 [MonologBridge][WebServerBundle] Add suggestions for using the log server (maidmaid)
This PR was merged into the 3.3 branch.

Discussion
----------

[MonologBridge][WebServerBundle] Add suggestions for using the log server

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

If you want launch `server:log`, you need the monolog bridge and the VarDumper. Optionally, you need EL if you want use `server:log --filter`.

Commits
-------

aca0ddd Add suggestions
2017-12-12 09:03:31 +01:00
Gabriel Caruso
567e0ab7e6 Refactoring tests. 2017-12-12 05:05:30 -02:00
Fabien Potencier
9ddf500a7a Merge branch '3.3' into 3.4
* 3.3:
  [HttpFoundation] Support 0 bit netmask in IPv6 ()
  [DI] Impossible to set an environment variable and then an array as container parameter
  [LDAP] added missing dots at the end of some exception messages.
  Set `width: auto` on WebProfiler toolbar's reset.
  [Process] Dont rely on putenv(), it fails on ZTS PHP
  [HttpKernel] detect deprecations thrown by container initialization during tests
  [HttpKernel] Fix logging of post-terminate errors/exceptions
  [Debug] Fix catching fatal errors in case of nested error handlers
  [VarDumper] Fixed file links leave blank pages when ide is configured
  Fix hidden currency element with Bootstrap 3 theme
2017-12-11 14:06:16 -08:00
Fabien Potencier
0a95168cd8 Merge branch '2.8' into 3.3
* 2.8:
  [HttpFoundation] Support 0 bit netmask in IPv6 ()
  Set `width: auto` on WebProfiler toolbar's reset.
  [HttpKernel] Fix logging of post-terminate errors/exceptions
  [Debug] Fix catching fatal errors in case of nested error handlers
  Fix hidden currency element with Bootstrap 3 theme
2017-12-11 14:02:38 -08:00
Fabien Potencier
eddd273351 Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] Support 0 bit netmask in IPv6 ()
  Set `width: auto` on WebProfiler toolbar's reset.
  [HttpKernel] Fix logging of post-terminate errors/exceptions
  [Debug] Fix catching fatal errors in case of nested error handlers
  Fix hidden currency element with Bootstrap 3 theme
2017-12-11 14:01:48 -08:00
Bob den Otter
62f5eaef11
Set width: auto on WebProfiler toolbar's reset. 2017-12-11 12:11:10 +01:00
Titouan Galopin
ec92d9b12e Remove some unused variables and properties 2017-12-08 16:14:47 +01:00
Nicolas Grekas
af81bb5e24 Merge branch '2.7' into 2.8
* 2.7:
  Remove some unused variables, properties and methods
  [ExpressionLanguage] Fix parse error on 5.3
  [HttpKernel] remove noisy frame in controller stack traces
  [ExpressionLanguage] throw an SyntaxError instead of letting a undefined index notice
  Fix php doc in Table class
  bumped Symfony version to 2.7.40
  updated VERSION for 2.7.39
  update CONTRIBUTORS for 2.7.39
  updated CHANGELOG for 2.7.39
2017-12-08 13:32:59 +01:00
Titouan Galopin
30e227392a Remove some unused variables, properties and methods 2017-12-08 13:09:58 +01:00
Christian Flothmann
093eb3d40d register system cache clearer only if it's used 2017-12-07 17:10:25 +01:00
Robin Chalas
0152527af3 bug #25272 [SecurityBundle] fix setLogoutOnUserChange calls for context listeners (dmaicher)
This PR was squashed before being merged into the 3.4 branch (closes #25272).

Discussion
----------

[SecurityBundle] fix setLogoutOnUserChange calls for context listeners

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

As pointed out in https://github.com/symfony/symfony/issues/25267 the `setLogoutOnUserChange` method calls were added to the parent definition `security.context_listener` instead of the concrete child definitions `security.context_listener.*`.

ping @iltar @chalasr

Commits
-------

4eff146 [SecurityBundle] fix setLogoutOnUserChange calls for context listeners
2017-12-04 21:03:56 +01:00
David Maicher
4eff1466d6 [SecurityBundle] fix setLogoutOnUserChange calls for context listeners 2017-12-04 21:03:35 +01:00
Fabien Potencier
24be059ff4 Merge branch '3.3' into 3.4
* 3.3:
  fixed typo
  [FrameworkBundle] Fix a bug where a color tag will be shown when passing an antislash
2017-12-04 11:02:15 -08:00
Ryan Weaver
844c402171 [Security] Adding a GuardAuthenticatorHandler alias 2017-12-04 10:49:12 -08:00
Fabien Potencier
b646de885c bug #25308 [FrameworkBundle] Fix a bug where a color tag will be shown when passing an antislash (Simperfit)
This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle] Fix a bug where a color tag will be shown when passing an antislash

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

You can see in the [reproducer](e6509ffcb4) when running `bin/console debug:container` that there an error in the ouput (like in the issue) when using a class with `\` in the service name.

This PR fix this wrong output. (even if that feels more developer thingy when there are xml everywhere ;)

Commits
-------

890edf7c38 [FrameworkBundle] Fix a bug where a color tag will be shown when passing an antislash
2017-12-04 10:48:04 -08:00
Fabien Potencier
46a848cff4 Merge branch '3.3' into 3.4
* 3.3:
  fixed tests
  Disallow viewing dot-files in Profiler
2017-12-04 10:37:00 -08:00
Fabien Potencier
8a4bb79203 minor #25296 [WebProfiler] Disallow viewing dot-files in Profiler (curry684)
This PR was merged into the 3.3 branch.

Discussion
----------

[WebProfiler] Disallow viewing dot-files in Profiler

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

The file viewer in the profiler should not open files that were specifically intended to be hidden, like specifically .env files, but similarly files like .htaccess that might expose server configuration knowledge.

Added tests validating both the new and old behavior.

Commits
-------

6a2f518e74 Disallow viewing dot-files in Profiler
2017-12-04 10:24:30 -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
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
abd76ba4c9 Merge branch '3.3' into 3.4
* 3.3:
  Fail as early and noisily as possible
  [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
  do not eagerly filter comment lines
  [WebProfilerBundle], [TwigBundle] Fix Profiler breaking XHTML pages (Content-Type: application/xhtml+xml)
2017-12-04 13:17:59 +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
Nicolas Grekas
9fb6a88580 Remove rc/beta suffix from composer.json files 2017-12-03 22:15:09 +01:00
Kévin Dunglas
23b5758198
[FrameworkBundle] Fix visibility of a test helper 2017-12-02 16:57:48 +01:00
Fabien Potencier
9401afd031 bug #25244 [DI] Add missing deprecation when fetching private services from ContainerBuilder (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Add missing deprecation when fetching private services from ContainerBuilder

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

Commits
-------

93c0b3801c [DI] Add missing deprecation when fetching private services from ContainerBuilder
2017-12-01 09:40:17 -08:00
Nicolas Grekas
93c0b3801c [DI] Add missing deprecation when fetching private services from ContainerBuilder 2017-12-01 16:10:27 +01:00
Roland Franssen
de137d286e
[FrameworkBundle] Rename getDotEnvVars to getDotenvVars 2017-12-01 15:32:30 +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
Nicolas Grekas
56846ac6c1 [HttpFoundation] Add Session::isEmpty(), fix MockFileSessionStorage to behave like the native one 2017-11-30 15:56:21 +01:00
Christian Flothmann
f74ecedd0b Merge branch '3.3' into 3.4
* 3.3:
  [DI] Fix infinite loop in InlineServiceDefinitionsPass
  Do not cache cache attributes if `attributes` is in the context
  Test that it do not remove the new flashes when displaying the existing ones
  [HttpFoundation] AutExpireFlashBag should not clear new flashes
  [FrameworkBundle][Serializer] Remove YamlEncoder definition if Yaml component isn't installed
  [DI] Fix tracking of env vars in exceptions
  [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 14:28:14 +01: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
01edbf7802 [FrameworkBundle] Make MicroKernelTraitTest green 2017-11-27 10:12:25 +01:00
Samuel ROZE
fd4340693c
Automatically enable the CSRF protection if CSRF manager exists 2017-11-24 15:22:02 +00:00
Nicolas Grekas
f897542cb2 Merge branch '3.3' into 3.4
* 3.3:
  [DI] Dont resolve envs in service ids
  Add tests proving it can load annotated files
  [WebProfilerBundle] Reset letter-spacing in toolbar
  Prefer overflow-wrap to word-break
  [Routing] Fix "config-file-relative" annotation loader resources
  Make search in debug:container command case-insensitive
  `resolveEnvPlaceholders` will return a mixed value
2017-11-24 15:13:49 +01: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
6cb270702f minor #25115 [*Bundle] Replace some kernel.root_dir by kernel.project_dir (nicolas-grekas, xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[*Bundle] Replace some kernel.root_dir by kernel.project_dir

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

92fc2f7 remove more kernel.root_dir parameter refs
4add28b [*Bundle] Replace some kernel.root_dir by kernel.project_dir
2017-11-24 12:33:45 +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
Christian Flothmann
92fc2f724b remove more kernel.root_dir parameter refs 2017-11-23 19:10:15 +01:00
Nicolas Grekas
4add28b518 [*Bundle] Replace some kernel.root_dir by kernel.project_dir 2017-11-23 19:10:14 +01:00
Fabien Potencier
ceba239662 removed some phpdocs 2017-11-23 07:49:31 -08:00
Fabien Potencier
ec379e1541 bug #25065 [FrameworkBundle] Update translation commands to work with default paths (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Update translation commands to work with default paths

| 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/25062
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/8634

This should make translation commands (debug & update) work with `translator.default_path` and `twig.default_path` directories (introduced here in 3.4) and their overridden paths if available.

Would be great to include also the custom paths mapping by the user, either `translator.paths` as `twig.paths`, but I'm not sure about the right way and probably it should be implemented on another branch.

TODO
- [x]  Add some tests.

Commits
-------

dc7286625b Update translation commands to work with default paths
2017-11-23 07:48:15 -08:00
Jerzy Zawadzki
c429c3346a Make search in debug:container command case-insensitive 2017-11-23 13:39:16 +01:00
Yonel Ceruto
dc7286625b Update translation commands to work with default paths 2017-11-22 13:43:08 -05:00
Nicolas Grekas
a84efa7058 [FrameworkBundle] Fix AssetsInstallCommand 2017-11-22 18:25:34 +01:00
Nicolas Grekas
259ac66c25 minor #25104 [Lock][Process][FrameworkBundle] fix tests (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Lock][Process][FrameworkBundle] fix tests

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

When running tests locally, I have several failures. This fixes them.

Commits
-------

878b08c [Lock][Process][FrameworkBundle] fix tests
2017-11-22 13:26:32 +01:00
Nicolas Grekas
878b08cd46 [Lock][Process][FrameworkBundle] fix tests 2017-11-22 13:18:49 +01:00
Nicolas Grekas
4b38150de9 Merge branch '3.3' into 3.4
* 3.3:
  Display a nice error message if the form/serializer component is missing.
  Force phpunit-bridge update (bis)
  [Bridge/PhpUnit] Fix disabling global state preservation
2017-11-22 12:41:29 +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
Dmitrii
74dad79bc4 [SecurityBundle] providerIds is undefined error when firewall provider is not specified 2017-11-22 11:43:36 +01:00
Fabien Potencier
a76489bcec minor #25078 [FrameworkBundle] Ignore failures when removing the old cache dir (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Ignore failures when removing the old cache dir

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

ping @phoenixgao can you please check if this improves the situation?

Commits
-------

3c4d168ca9 [FrameworkBundle] Ignore failures when removing the old cache dir
2017-11-21 18:03:41 +01:00
Yonel Ceruto
ba3476c887 Update default translations path 2017-11-21 09:08:09 -05:00
Nicolas Grekas
3c4d168ca9 [FrameworkBundle] Ignore failures when removing the old cache dir 2017-11-21 11:54:42 +01:00
Nicolas Grekas
21eb340324 [Security] remove remaining FQCN service ids 2017-11-20 22:16:05 +01:00
Nicolas Grekas
9ccefdef0d minor #25011 [TwigBundle][FrameworkBundle] Remove the internals from debug autowiring (Simperfit)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBundle][FrameworkBundle] Remove the internals from debug autowiring

| 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 | #24986
| License       | MIT
| Doc PR        |

#SymfonyConHackday2017
@nicolas-grekas @weaverryan @fabpot @stof It should be OK to review and to merge.

Commits
-------

491839b [TwigBundle][FrameworkBundle] Remove the internals from debug autowiring
2017-11-20 19:14:44 +01:00
Nicolas Grekas
e3efa2fec7 bug #25045 [SecurityBundle] Don't trigger auto-picking notice if provider is set per listener (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] Don't trigger auto-picking notice if provider is set per listener

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

Commits
-------

19e891a [SecurityBundle] Don't trigger auto-picking notice if provider is set per listener
2017-11-20 19:04:24 +01:00
Dany Maillard
aca0ddd9d6 Add suggestions 2017-11-20 22:55:12 +10:00
Robin Chalas
19e891a9e5 [SecurityBundle] Don't trigger auto-picking notice if provider is set per listener 2017-11-20 12:33:01 +01:00
Amrouche Hamza
491839b7c2
[TwigBundle][FrameworkBundle] Remove the internals from debug autowiring 2017-11-20 10:25:08 +01:00
Fabien Potencier
1b6597d19c bug #25033 [FrameworkBundle] Dont create empty bundles directory by default (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Dont create empty bundles directory by default

| Q             | A
| ------------- | ---
| Branch?       | 3.4 / 4.1?
| 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-->

we still run `assets:install` by default, which in bundle-less apps gives this annoying empty public/bundles dir and some useless cli output, all the time. This fixes it.

Commits
-------

f8e7478583 [FrameworkBundle] Dont create empty bundles directory
2017-11-20 08:23:16 +01:00
Nicolas Grekas
8d7b9593fe [WebServerBundle] fix test 2017-11-19 22:22:53 +01:00
Nicolas Grekas
4baf9688a9 Merge branch '3.3' into 3.4
* 3.3:
  [Bridge/PhpUnit] Fix compat with phpunit 4.8 & bridge <=3.3.13
  Remove function_exists(__phpunit_run_isolated_test) checks
2017-11-19 22:09:36 +02:00
Nicolas Grekas
f2fc7bfccc Merge branch '2.8' into 3.3
* 2.8:
  Remove function_exists(__phpunit_run_isolated_test) checks
2017-11-19 21:07:30 +02:00
Nicolas Grekas
eb92d7ca07 bug #25014 Move deprecation under use statements (greg0ire)
This PR was squashed before being merged into the 3.4 branch (closes #25014).

Discussion
----------

Move deprecation under use statements

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

Commits
-------

0a5b016 Move deprecation under use statements
2017-11-19 20:59:05 +02:00
Grégoire Paris
0a5b016427 Move deprecation under use statements 2017-11-19 20:59:03 +02:00
Nicolas Grekas
e40905a343 Merge branch '3.3' into 3.4
* 3.3:
  [Bridge\PhpUnit] Disable broken auto-require mechanism of phpunit
  [SecurityBundle] Fix syntax error in test
  [Console] Remove remaining dead code
  bumped Symfony version to 3.3.14
  bumped Symfony version to 2.8.32
  bumped Symfony version to 2.7.39
  updated VERSION for 3.3.13
  updated CHANGELOG for 3.3.13
  updated VERSION for 2.8.31
  updated CHANGELOG for 2.8.31
  updated VERSION for 2.7.38
  updated CHANGELOG for 2.7.38
  Replace array|\Traversable by iterable
  Fix ambiguous pattern
2017-11-19 20:41:20 +02:00
Nicolas Grekas
a3d398e825 Merge branch '2.8' into 3.3
* 2.8:
  [SecurityBundle] Fix syntax error in test
  [Console] Remove remaining dead code
  bumped Symfony version to 2.8.32
  bumped Symfony version to 2.7.39
  updated VERSION for 2.8.31
  updated CHANGELOG for 2.8.31
  updated VERSION for 2.7.38
  updated CHANGELOG for 2.7.38
  Replace array|\Traversable by iterable
  Fix ambiguous pattern
2017-11-19 20:40:28 +02:00
Nicolas Grekas
7215acb66f Merge branch '2.7' into 2.8
* 2.7:
  [SecurityBundle] Fix syntax error in test
  [Console] Remove remaining dead code
  bumped Symfony version to 2.7.39
  updated VERSION for 2.7.38
  updated CHANGELOG for 2.7.38
  Replace array|\Traversable by iterable
  Fix ambiguous pattern
2017-11-19 20:39:05 +02:00
Roland Franssen
f8e7478583 [FrameworkBundle] Dont create empty bundles directory 2017-11-19 16:46:18 +01:00
Samuel ROZE
b505ac7aec
Remove the server:log command if monolog is not loaded 2017-11-19 12:03:38 +02:00
Robin Chalas
20f9b75857 [SecurityBundle] Fix syntax error in test 2017-11-17 15:26:00 +01:00
Nicolas Grekas
3398c4b881 bug #24971 [FrameworkBundle] Empty event dispatcher earlier in CacheClearCommand (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Empty event dispatcher earlier in CacheClearCommand

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

Once the cache folder is emptied, the event dispatcher cannot be used because service factories are gone. This currently fails very badly when an error is dispatched, but the error listeners are themselves failing to be loaded for this reason.

Commits
-------

a961392 [FrameworkBundle] Empty event dispatcher earlier in CacheClearCommand
2017-11-16 23:39:45 +02:00
Nicolas Grekas
e70c1f8d1a Merge branch '3.3' into 3.4
* 3.3:
  fix merge
2017-11-16 18:56:55 +02:00
Nicolas Grekas
64225778e6 fix merge 2017-11-16 18:56:40 +02:00
Nicolas Grekas
45a0cd93fc fix deps=low (bis) 2017-11-16 18:31:29 +02:00
Nicolas Grekas
c5595a1f11 Merge branch '3.3' into 3.4
* 3.3:
  fix deps=low
2017-11-16 18:19:19 +02:00
Nicolas Grekas
e4f00cc6be Merge branch '2.8' into 3.3
* 2.8:
  fix deps=low
2017-11-16 18:14:18 +02:00
Nicolas Grekas
1c026e0a5b Merge branch '2.7' into 2.8
* 2.7:
  fix deps=low
2017-11-16 18:08:43 +02:00
Nicolas Grekas
7993ce57a4 fix deps=low 2017-11-16 17:51:27 +02:00
Nicolas Grekas
caa10ae038 Merge branch '3.3' into 3.4
* 3.3:
  fixed CS
  fixed CS
  [Security] Namespace generated CSRF tokens depending of the current scheme
  ensure that submitted data are uploaded files
  [Console] remove dead code
  bumped Symfony version to 3.3.13
  updated VERSION for 3.3.12
  updated CHANGELOG for 3.3.12
  bumped Symfony version to 2.8.31
  updated VERSION for 2.8.30
  updated CHANGELOG for 2.8.30
  bumped Symfony version to 2.7.38
  updated VERSION for 2.7.37
  updated CHANGELOG for 2.7.37
  [Security] Validate redirect targets using the session cookie domain
  prevent bundle readers from breaking out of paths
2017-11-16 17:25:26 +02:00
Nicolas Grekas
ea2447f0b8 Merge branch '2.8' into 3.3
* 2.8:
  fixed CS
  fixed CS
  [Security] Namespace generated CSRF tokens depending of the current scheme
  ensure that submitted data are uploaded files
  [Console] remove dead code
  bumped Symfony version to 2.8.31
  updated VERSION for 2.8.30
  updated CHANGELOG for 2.8.30
  bumped Symfony version to 2.7.38
  updated VERSION for 2.7.37
  updated CHANGELOG for 2.7.37
  [Security] Validate redirect targets using the session cookie domain
  prevent bundle readers from breaking out of paths
2017-11-16 17:24:32 +02:00
Nicolas Grekas
44c5d7f405 Merge branch '2.7' into 2.8
* 2.7:
  fixed CS
  fixed CS
  [Security] Namespace generated CSRF tokens depending of the current scheme
  ensure that submitted data are uploaded files
  [Console] remove dead code
  bumped Symfony version to 2.7.38
  updated VERSION for 2.7.37
  updated CHANGELOG for 2.7.37
  [Security] Validate redirect targets using the session cookie domain
  prevent bundle readers from breaking out of paths
2017-11-16 17:20:19 +02:00
Fabien Potencier
b67b807164 fixed CS 2017-11-16 17:17:32 +02:00