Commit Graph

30225 Commits

Author SHA1 Message Date
Fabien Potencier
3495b35e4f feature #21038 [FrameworkBundle] deprecated cache:clear with warmup (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] deprecated cache:clear with warmup

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

The warmup part of `cache:clear` does not work well, and does not deliver the guarantee that the generated cache is exactly the same as the one that would have been generated via `cache:warmup`.

As one of the goal of Symfony 4 is to be able to generate all the cache for read-only filsystem, I propose to deprecate the warmup part of `cache:clear` in 3.3 to be able to remove it completely in 4.0. In 4.0, the `--no-warmup` option would be a noop (and can then be removed in 5.0).

Commits
-------

7ed3237645 [FrameworkBundle] deprecated cache:clear with warmup
2017-03-21 17:01:46 -07:00
Fabien Potencier
7ed3237645 [FrameworkBundle] deprecated cache:clear with warmup 2017-03-21 15:16:20 -07:00
Fabien Potencier
7f7b897ee2 feature #22098 [*Bundle] Add autowiring aliases for common services (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[*Bundle] Add autowiring aliases for common services

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

As spotted while working on #22060, we're missing many aliases to prevent any autowiring ambiguities.
I also removed the "Symfony\Component\EventDispatcher\EventDispatcher" and "Symfony\Component\DependencyInjection\Container" aliases: we'd better encourage using the corresponding interfaces instead.
On ControllerTrait, we need to type hint against SessionInterface, because otherwise, when session support is disabled, autowiring still auto-registers an "autowired.Session" service, which defeats the purpose of being able to enable/disable it.

Commits
-------

08c2ee32f1 [*Bundle] Add autowiring aliases for common services
2017-03-21 14:56:35 -07:00
Fabien Potencier
b0482963f1 Merge branch '3.2'
* 3.2:
  Fixes a typo in the form collector styles
  [WebProfilerBundle] Fix content-security-policy compatibility
  [WebProfilerBundle] Drop dead code
  [HttpKernel] Fixed bug with purging of HTTPS URLs
  fix some risky tests
  [DI] [YamlFileLoader] change error message of a non existing file
  [WebProfilerBundle] Handle Content-Security-Policy-Report-Only header correctly
  [Security] Added option to return true in the method isRememberMeRequested
2017-03-21 14:44:47 -07:00
Fabien Potencier
8cd835e658 Merge branch '2.8' into 3.2
* 2.8:
  Fixes a typo in the form collector styles
  [HttpKernel] Fixed bug with purging of HTTPS URLs
  fix some risky tests
  [DI] [YamlFileLoader] change error message of a non existing file
  [Security] Added option to return true in the method isRememberMeRequested
2017-03-21 14:44:32 -07:00
Fabien Potencier
295a8e0a82 Merge branch '2.7' into 2.8
* 2.7:
  [HttpKernel] Fixed bug with purging of HTTPS URLs
  fix some risky tests
  [DI] [YamlFileLoader] change error message of a non existing file
  [Security] Added option to return true in the method isRememberMeRequested
2017-03-21 14:39:01 -07:00
Fabien Potencier
65260bc346 minor #22066 fix some risky tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

fix some risky tests

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

PHPUnit 6 marks tests as risky when they have no assertions (and are not marked as skipped or incomplete). This PR will update our test suite accordingly.

Component that still need to be covered:

- [ ] Config
- [ ] Form
- [ ] HttpFoundation
- [ ] Security
- [ ] Workflow

Commits
-------

abf1787dcc fix some risky tests
2017-03-21 14:36:30 -07:00
Nicolas Grekas
08c2ee32f1 [*Bundle] Add autowiring aliases for common services 2017-03-21 22:34:27 +01:00
Fabien Potencier
4c0006a1dd feature #22095 [DI] Add logging and better failure recovery to AutowirePass (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Add logging and better failure recovery to AutowirePass

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

So useful to understand what autowiring is doing.

Commits
-------

3e297ba3e4 [DI] Add logging and better failure recovery to AutowirePass
2017-03-21 14:28:17 -07:00
Romain Pierre
b3f341fd90 Fixes a typo in the form collector styles 2017-03-21 14:21:32 -07:00
Fabien Potencier
819de0aa9b minor #22102 Fixes a typo in the form collector styles (romain-pierre)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Fixes a typo in the form collector styles

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

Ping @javiereguiluz

Commits
-------

6e13a58e16 Fixes a typo in the form collector styles
2017-03-21 14:20:49 -07:00
Romain Pierre
6e13a58e16 Fixes a typo in the form collector styles 2017-03-21 22:03:13 +01:00
Nicolas Grekas
3e297ba3e4 [DI] Add logging and better failure recovery to AutowirePass 2017-03-21 19:30:57 +01:00
Fabien Potencier
a96a99723a feature #21889 Deprecate the special SYMFONY__ environment variables (javiereguiluz)
This PR was squashed before being merged into the 3.3-dev branch (closes #21889).

Discussion
----------

Deprecate the special SYMFONY__ environment variables

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

Commits
-------

e3362e854c Deprecate the special SYMFONY__ environment variables
2017-03-21 08:27:08 -07:00
Javier Eguiluz
e3362e854c Deprecate the special SYMFONY__ environment variables 2017-03-21 08:27:06 -07:00
Fabien Potencier
7f89ad41d7 minor #22094 [FrameworkBundle] Document removal of server:* commands (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Document removal of server:* commands

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

To ease upgrading.

We could also add something like that in the framework application:
```php
public function findNamespace($namespace)
{
    try {
        return parent::findNamespace($namespace);
    } catch (CommandNotFoundException $e) {
        if ('server' === $namespace) {
            throw new CommandNotFoundException('The "server:start", "server:stop", "server:status" and "server:run" commands have been moved...');
        }
    }
}
```
But AFAIK we never did so in the past, tell me if we should.

Commits
-------

c99641a540 Document removal of server:* commands from the framework
2017-03-21 07:59:18 -07:00
Robin Chalas
c99641a540 Document removal of server:* commands from the framework 2017-03-21 15:47:31 +01:00
Fabien Potencier
8ba279bc22 minor #22015 [Security] Added option to return true in the method isRememberMeRequested (WhiteEagle88)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Added option to return true in the method isRememberMeRequested

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

Replaces #21989

Commits
-------

522ec3ef0c [Security] Added option to return true in the method isRememberMeRequested
2017-03-21 07:31:45 -07:00
Fabien Potencier
c797fc4462 minor #22087 Fix some invalid phpdoc in the Dotenv class (stof)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Fix some invalid phpdoc in the Dotenv class

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

Commits
-------

14525b73b8 Fix some invalid phpdoc in the Dotenv class
2017-03-21 07:24:05 -07:00
Fabien Potencier
749451ed59 minor #22086 Release memory for the parsed data after parsing (stof)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Release memory for the parsed data after parsing

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

If the Dotenv instance outlives the parsing of the file (which is the case easily in the usage described in the documentation as it is used in the global scope and so the variable does not go out of scope until the end of the process), there is no reason to keep the parsed data in memory after the end of the parsing.

I have not reset the integer properties, as this would not save any memory anyway (integers are inline inside the ZVAL anyway)

Commits
-------

518f618d33 Release memory for the parsed data after parsing
2017-03-21 07:21:25 -07:00
Fabien Potencier
e75d4be74d minor #22088 Remove unused private method in Dotenv (stof)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Remove unused private method in Dotenv

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

Commits
-------

f4a7418e3a Remove unused private method in Dotenv
2017-03-21 07:19:31 -07:00
Fabien Potencier
74a1cc34eb bug #22090 [WebProfilerBundle] Fix Content-Security-Policy compatibility in case of a style-src 'self' policy (romainneutron)
This PR was merged into the 3.2 branch.

Discussion
----------

[WebProfilerBundle] Fix Content-Security-Policy compatibility in case of a `style-src 'self'` policy

| Q             | A
| ------------- | ---
| Branch?       | 3.2 <!-- see comment below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #22053 #20963
| License       | MIT

This fixes the compatibility of the bundle in case of a `style-src 'self'` policy.
This PR must be rebased once #22089 is merged

Commits
-------

4acec8973f [WebProfilerBundle] Fix content-security-policy compatibility
2017-03-21 07:14:48 -07:00
Romain Neutron
4acec8973f
[WebProfilerBundle] Fix content-security-policy compatibility
This fixes the compatibility of the bundle in case of a `style-src 'self'` policy.
2017-03-21 11:36:15 +01:00
Nicolas Grekas
48e90e3124 Merge branch '2.8' into 3.2
* 2.8:
  [WebProfilerBundle] Drop dead code
2017-03-21 11:32:01 +01:00
Nicolas Grekas
3d8959f4b4 minor #22089 [2.8][WebProfilerBundle] Drop dead code (romainneutron)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8][WebProfilerBundle] Drop dead code

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

As you can read in https://github.com/symfony/symfony/blob/2.8/src/Symfony/Bundle/WebProfilerBundle/DependencyInjection/Configuration.php#L40-L46 the `position` can only be `top` or `bottom`. I don't see any reference anywhere to a `normal` position.
The removed tests are always true.

Commits
-------

2de494f [WebProfilerBundle] Drop dead code
2017-03-21 11:29:56 +01:00
Romain Neutron
2de494f60b
[WebProfilerBundle] Drop dead code 2017-03-21 11:01:33 +01:00
Christophe Coevoet
f4a7418e3a Remove unused private method in Dotenv 2017-03-21 10:50:23 +01:00
Christophe Coevoet
14525b73b8 Fix some invalid phpdoc in the Dotenv class 2017-03-21 10:34:30 +01:00
Christophe Coevoet
518f618d33 Release memory for the parsed data after parsing 2017-03-21 10:32:25 +01:00
Nicolas Grekas
6643fe2fa8 bug #22084 [DI] Restore skipping logic when autowiring getters (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Restore skipping logic when autowiring getters

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

Partial revert for #22030: the skipping logic is part of the getter injection experience, which provides laziness, thus shouldn't bother you until you actually call the getter, if you do.

Commits
-------

b3f494f [DI] Restore skipping logic when autowiring getters
2017-03-21 09:19:37 +01:00
Nicolas Grekas
b3f494f5da [DI] Restore skipping logic when autowiring getters 2017-03-21 09:09:26 +01:00
Fabien Potencier
35e66ae0a9 bug #22079 [HttpKernel] Fixed bug with purging of HTTPS URLs (ausi)
This PR was squashed before being merged into the 2.7 branch (closes #22079).

Discussion
----------

[HttpKernel] Fixed bug with purging of HTTPS URLs

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

I found two bugs in `HttpCache\Store::purge()` with HTTPS URLs:

1. `->purge('https://example.com/')` only purges the `http` version not the `https` one.
2. If a cache entry exists for both `http` and `https`, only the `http` version gets purged, the `https` version stays in the cache.

I think this issues were introduced with #21582.

This pull request fixes both issues and adds tests for them.

Commits
-------

f50915066f [HttpKernel] Fixed bug with purging of HTTPS URLs
2017-03-20 17:24:39 -07:00
Martin Auswöger
f50915066f [HttpKernel] Fixed bug with purging of HTTPS URLs 2017-03-20 17:24:37 -07:00
Fabien Potencier
a001c2e7ef minor #22080 [FrameworkBundle] Exclude container.service_locator from UnusedTagsPass (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Exclude container.service_locator from UnusedTagsPass

| Q             | A
| ------------- | ---
| Branch?       | master
| Tests pass?   | yes

Commits
-------

ad501e5eeb Whitelist container.service_locator tag
2017-03-20 14:46:32 -07:00
Robin Chalas
ad501e5eeb Whitelist container.service_locator tag 2017-03-20 22:29:41 +01:00
Fabien Potencier
93ff304bce minor #22076 [SecurityBundle] Remove dead code in fixtures (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[SecurityBundle] Remove dead code in fixtures

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

Commits
-------

afa5ef603c [SecurityBundle] Remove dead code in fixtures
2017-03-20 13:33:03 -07:00
Nicolas Grekas
afa5ef603c [SecurityBundle] Remove dead code in fixtures 2017-03-20 19:08:03 +01:00
Christian Flothmann
abf1787dcc fix some risky tests 2017-03-20 16:03:41 +01:00
Fabien Potencier
2ba564d984 minor #22012 [DI] [YamlFileLoader] change error message of a non existing file (jordscream)
This PR was squashed before being merged into the 2.7 branch (closes #22012).

Discussion
----------

[DI] [YamlFileLoader] change error message of a non existing file

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

This PR replaces the error message when non existing Yaml file is loaded. It gives more sense for the user.

Commits
-------

1c2ea97585 [DI] [YamlFileLoader] change error message of a non existing file
2017-03-20 07:02:55 -07:00
Jordan Samouh
1c2ea97585 [DI] [YamlFileLoader] change error message of a non existing file 2017-03-20 07:02:54 -07:00
Fabien Potencier
88914a9b1b feature #22059 [Yaml] deprecate "? " starting unquoted strings (xabbuh)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Yaml] deprecate "? " starting unquoted strings

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

Commits
-------

731a74e79c [Yaml] deprecate "? " starting unquoted strings
2017-03-20 06:59:57 -07:00
Fabien Potencier
ece42c50f8 bug #22045 [WebProfilerBundle] Handle Content-Security-Policy-Report-Only header correctly (romainneutron)
This PR was merged into the 3.2 branch.

Discussion
----------

[WebProfilerBundle] Handle Content-Security-Policy-Report-Only header correctly

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

This header should have been handled from the beginning.
Content-Security-Policy recommendation specify this header, it needs to be correctly handled

Commits
-------

b0ba698111 [WebProfilerBundle] Handle Content-Security-Policy-Report-Only header correctly
2017-03-20 06:59:21 -07:00
Nicolas Grekas
4d48b58d19 Merge branch '3.2'
* 3.2:
  [Yaml] CS
  [DI] Fix PhpDumper generated doc block
  #20411 fix Yaml parsing for very long quoted strings
  [Workflow] add Phpdoc for better IDE support
  fix package name in conflict rule
  improve message when workflows are missing
  [Doctrine Bridge] fix priority for doctrine event listeners
  Use PHP functions as array_map callbacks when possible
  [Validator] revert wrong Phpdoc change
  Use proper line endings
2017-03-20 11:06:58 +01:00
Nicolas Grekas
ab08fd69b4 Merge branch '2.8' into 3.2
* 2.8:
  [Yaml] CS
2017-03-20 10:45:15 +01:00
Nicolas Grekas
c80a0ae90f Merge branch '2.7' into 2.8
* 2.7:
  [Yaml] CS
2017-03-20 10:41:44 +01:00
Nicolas Grekas
3185dc9c8f [Yaml] CS 2017-03-20 10:41:03 +01:00
Nicolas Grekas
d7e74b964f Merge branch '2.8' into 3.2
* 2.8:
  [DI] Fix PhpDumper generated doc block
  #20411 fix Yaml parsing for very long quoted strings
  [Doctrine Bridge] fix priority for doctrine event listeners
  Use PHP functions as array_map callbacks when possible
  [Validator] revert wrong Phpdoc change
  Use proper line endings
2017-03-20 10:32:19 +01:00
Christian Flothmann
731a74e79c [Yaml] deprecate "? " starting unquoted strings 2017-03-20 10:21:06 +01:00
Nicolas Grekas
5dd83adb1b minor #22065 [DI] Fix PhpDumper generated doc block (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] Fix PhpDumper generated doc block

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

Commits
-------

58b3ee7 [DI] Fix PhpDumper generated doc block
2017-03-20 09:47:13 +01:00
Nicolas Grekas
5d06acadd3 Merge branch '2.7' into 2.8
* 2.7:
  #20411 fix Yaml parsing for very long quoted strings
  [Doctrine Bridge] fix priority for doctrine event listeners
  Use PHP functions as array_map callbacks when possible
  [Validator] revert wrong Phpdoc change
  Use proper line endings
2017-03-20 09:46:40 +01:00