Commit Graph

21692 Commits

Author SHA1 Message Date
Fabien Potencier
5ec123fc60 bug #15243 Reload the session after regenerating its id (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

Reload the session after regenerating its id

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

This is a fix preventing [a PHP bug](https://bugs.php.net/bug.php?id=70013), which I'm not sure when or IF is going to be fixed.

Commits
-------

99b9c78 [HttpFoundation] Reload the session after regenerating its id
eda5cb1 [HttpFoundation] Add a test case to confirm a bug in session migration
2015-07-09 09:11:26 +02:00
Jakub Zalas
99b9c78b00 [HttpFoundation] Reload the session after regenerating its id 2015-07-08 20:32:24 +01:00
Jakub Zalas
eda5cb1c27 [HttpFoundation] Add a test case to confirm a bug in session migration 2015-07-08 20:31:33 +01:00
Fabien Potencier
b2fddecde9 bug #15176 [Serializer] Fix ClassMetadata::sleep() (dunglas)
This PR was squashed before being merged into the 2.7 branch (closes #15176).

Discussion
----------

[Serializer] Fix ClassMetadata::sleep()

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

Fix a bug with the `sleep()` method. It is blocking under when using the APC metadata cache.

Commits
-------

2f42801 [Serializer] Fix ClassMetadata::sleep()
2015-07-08 08:12:51 +02:00
Kévin Dunglas
2f4280110d [Serializer] Fix ClassMetadata::sleep() 2015-07-08 08:12:45 +02:00
Fabien Potencier
6f8a37cbae bug #15202 [Security] allow to use method in XML configs (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] allow to use `method` in XML configs

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

Before this change, you always had to use the `methods` key which is
inconsistent compared to other options like `roles` and `ips` for which
it was possible to use their singular versions.

Commits
-------

9b0dfd4 [Security] allow to use `method` in XML configs
2015-07-08 08:08:04 +02:00
Fabien Potencier
ecd8bd9add bug #15218 [Twig][Bridge] replaced extends with use in bootstrap_3_horizontal_layout.html.twig (MatTheCat)
This PR was merged into the 2.6 branch.

Discussion
----------

[Twig][Bridge] replaced `extends` with `use` in bootstrap_3_horizontal_layout.html.twig

| Q             | A
| ------------- | ---
| Fixed tickets |
| License       | MIT

The fact `bootstrap_3_horizontal_layout.html.twig` **extends** `bootstrap_3_layout.html.twig` prevent to `use` it while using `{% form_theme form _self %}`.

As form templates don't have any code outside blocks this PR shouldn't induce any BC break.

Commits
-------

15886b6 [Twig][Bridge] replaced `extends` with `use` in bootstrap_3_horizontal_layout.html.twig
2015-07-08 08:01:46 +02:00
Fabien Potencier
69fcfa6e6e minor #15226 [2.6] Static Code Analysis for Components and Bundles (kalessil)
This PR was squashed before being merged into the 2.6 branch (closes #15226).

Discussion
----------

[2.6] Static Code Analysis for Components and Bundles

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

Static Code Analysis with Php Inspections (EA Extended):
    - all rules accepted into 2.3

Commits
-------

1dac127 [2.6] Static Code Analysis for Components and Bundles
2015-07-08 07:59:50 +02:00
Vladimir Reznichenko
1dac1277a3 [2.6] Static Code Analysis for Components and Bundles 2015-07-08 07:59:48 +02:00
Fabien Potencier
63e02b87af bug #15223 [Finder] Command::addAtIndex() fails with Command instance argument (thunderer)
This PR was squashed before being merged into the 2.3 branch (closes #15223).

Discussion
----------

[Finder] Command::addAtIndex() fails with Command instance argument

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

Fixed reported bug #14384 and added test case for it. This is a second PR as previous #14385 went bad after I failed to rebase 2.3 branch properly.

Commits
-------

2aff566 [Finder] Command::addAtIndex() fails with Command instance argument
2015-07-08 07:54:33 +02:00
Tomasz Kowalczyk
2aff5660b2 [Finder] Command::addAtIndex() fails with Command instance argument 2015-07-08 07:54:32 +02:00
Fabien Potencier
e67249e4d5 bug #15220 [DependencyInjection] Freeze also FrozenParameterBag::remove (lyrixx)
This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] Freeze also FrozenParameterBag::remove

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

Commits
-------

4a72c44 [DependencyInjection] Freeze also FrozenParameterBag::remove
2015-07-07 20:27:32 +02:00
Grégoire Pineau
4a72c441d5 [DependencyInjection] Freeze also FrozenParameterBag::remove 2015-07-07 14:38:28 +02:00
MatTheCat
15886b618e [Twig][Bridge] replaced extends with use in bootstrap_3_horizontal_layout.html.twig 2015-07-07 14:03:46 +02:00
Fabien Potencier
4706a90e9d minor #15204 CS fixes for 2.3 (keradus)
This PR was merged into the 2.3 branch.

Discussion
----------

CS fixes for 2.3

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

To keep fabbot.io happy ;)

Commits
-------

464b67e fix CS
2015-07-07 09:31:08 +02:00
Dariusz Ruminski
464b67ed09 fix CS 2015-07-05 16:01:47 +02:00
Fabien Potencier
e3b225f4ba fixed CS 2015-07-05 15:20:07 +02:00
Fabien Potencier
9608bf508a bug #15110 Add a way to reset the singleton (dawehner)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15110).

Discussion
----------

Add a way to reset the singleton

## Problem
The mime type guesser is a singleton, which as we know, causes all kind of problems.
One problem Drupal ran into is the problem that for tests we continuesly registered more and more mimetype guessers,
once everytime we rebuild the container as part of your testing.

Once that we had that, with enough test functions + made one of the mimetype guessers as proxy, we ran into a memory leak
of storing the container as part of the mime type singleton.

See https://www.drupal.org/node/2408371

## Solution
Allow to reset the singleton.

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

Commits
-------

0096266 Add a way to reset the singleton
2015-07-05 15:17:51 +02:00
Daniel Wehner
0096266009 Add a way to reset the singleton 2015-07-05 15:17:51 +02:00
Christian Flothmann
9b0dfd4267 [Security] allow to use method in XML configs
Before this change, you always had to use the `methods` key which is
inconsistent compared to other options like `roles` and `ips` for which
it was possible to use their singular versions.
2015-07-05 10:40:49 +02:00
Fabien Potencier
5d2cc19fcc bug #15183 [TwigBridge] fix for legacy asset() with EmptyVersionStrategy (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] fix for legacy asset() with EmptyVersionStrategy

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

Commits
-------

cf86a03 fix for legacy asset() with EmptyVersionStrategy
2015-07-04 13:07:22 +02:00
Fabien Potencier
aea7f98107 minor #15193 [Serializer] Fix Groups tests. (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] Fix Groups tests.

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

2bd8fb8 [Serializer] Fix Groups tests.
2015-07-04 12:13:01 +02:00
Kévin Dunglas
2bd8fb8f97 [Serializer] Fix Groups tests. 2015-07-04 12:02:28 +02:00
Fabien Potencier
fa498a1339 minor #15194 Remove duplicate example in UPGRADE-3.0.md (Kevinrob)
This PR was submitted for the master branch but it was merged into the 2.6 branch instead (closes #15194).

Discussion
----------

Remove duplicate example in UPGRADE-3.0.md

| Q             | A
| ------------- | ---
| Fixed tickets | -
| License       | MIT

The example:
```php
echo $form->getErrors(true, false);
```
is duplicated in the file.

Commits
-------

e195fd7 Remove duplicate example
2015-07-04 11:13:36 +02:00
Kevin Robatel
e195fd7c1b Remove duplicate example 2015-07-04 11:13:35 +02:00
Fabien Potencier
5a4b813687 minor #15188 [Serializer] Fix Groups PHPDoc (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] Fix Groups PHPDoc

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

3233c2f [Serializer] Fix Groups PHPDoc
2015-07-04 11:11:08 +02:00
Tobias Schultze
8a8a929d5c minor #15198 [HttpFoundation] Remove unused var (Dave Hulbert)
This PR was submitted for the 2.6 branch but it was merged into the 2.3 branch instead (closes #15198).

Discussion
----------

[HttpFoundation] Remove unused var

Minor. Looks like the var `$content` got introduced in aa5e6165, then in 8982c324 the early return meant it wasn't needed.

| Q             | A
| ------------- | ---
| Fixed tickets | N/A
| License       | MIT

Commits
-------

da5218f Remove var not used due to returning early (introduced in 8982c32)
2015-07-04 00:45:57 +02:00
Dave Hulbert
da5218f2ae Remove var not used due to returning early (introduced in 8982c32) 2015-07-04 00:45:56 +02:00
Kévin Dunglas
3233c2fc14 [Serializer] Fix Groups PHPDoc 2015-07-03 14:45:08 +02:00
Fabien Potencier
9fcad381be minor #15187 Enhance hhvm test skip message (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

Enhance hhvm test skip message

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

Reading our blog about hhvm (http://symfony.com/blog/symfony-2-3-achieves-100-hhvm-compatibility)
I'd like to improve the only single test skip in our code base that exists for hhvm.

HHVM does not trigger strict notices. This is a missing feature of the HHVM parser (https://github.com/facebook/hhvm/issues/5583). But this does not affect in any way the behavior of any PHP app. Strict notices are only for the dev stage.

There is some FUD-friendliness in the article and in the comments (no offence @javiereguiluz ☮):
100% hhvm compat is 100% honest. We did not skip any single tests because of errors, issues nor bugs. And the single missing "feature" of hhvm is this one: strict notices. Kudos to hhvm for what they did: parity is close enough so that the delta can be handled in exactly the same way as we handle deltas between PHP versions.

Commits
-------

5f4015c Enhance hhvm test skip message
2015-07-03 08:43:12 +02:00
Nicolas Grekas
5f4015c3cd Enhance hhvm test skip message 2015-07-03 07:54:45 +02:00
Christian Flothmann
cf86a03b98 fix for legacy asset() with EmptyVersionStrategy 2015-07-02 23:04:32 +02:00
Fabien Potencier
2217c1faec minor #15174 [Form] Added upgrade notes for #15061 (webmozart)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Added upgrade notes for #15061

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

This PR contains the upgrade notes for #15061.

Commits
-------

6325b4c [Form] Added upgrade notes for #15061
2015-07-02 20:02:46 +02:00
Nicolas Grekas
86e77eb36b feature #15175 [VarDumper] Ingore PHPUnit and Prophecy object when they are nested (lyrixx)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Ingore PHPUnit and Prophecy object when they are nested

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

The purpose of this PR is to ignore nested PHPUnit/Prophecy object when `dump`ing.

Reproducer:

```php
$a = $this->getMock('Datetime');
$b = $this->prophesize('Datetime')->reveal();
$std = new \stdClass;
$std->my = 'property';
$std->a = $a;
$std->b = $b;

die(dump($a, $b, $std));
```

=>

```
{#86
  +"my": "property"
  +"a": Mock_Datetime_8ba7f351 {#22 …5}
  +"b": Double\DateTime\P1 {#90 …1}
}
```

Commits
-------

2bea373 [VarDumper] Ingore PHPUnit and Prophecy object when they are nested
2015-07-02 17:16:00 +02:00
Nicolas Grekas
60e1eed4e5 minor #15173 [2.8] Fix lowest deps (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8] Fix lowest deps

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

Looks like that by testing the lowest deps on 5.3, we missed some constraints in our test suite.

Commits
-------

a036a77 [2.8] Fix lowest deps
2015-07-02 17:15:24 +02:00
Grégoire Pineau
2bea3731f9 [VarDumper] Ingore PHPUnit and Prophecy object when they are nested 2015-07-02 16:25:26 +02:00
Bernhard Schussek
6325b4caf6 [Form] Added upgrade notes for #15061 2015-07-02 11:55:36 +02:00
Nicolas Grekas
a036a77299 [2.8] Fix lowest deps 2015-07-02 10:26:24 +02:00
Nicolas Grekas
564c8e1ebe Merge branch '2.7' into 2.8
* 2.7:
  [travis] start hhvm first
  [Validator] always evaluate binary format when changed
2015-07-02 08:17:21 +02:00
Nicolas Grekas
8c999b5c55 Merge branch '2.6' into 2.7
* 2.6:
  [travis] start hhvm first
  [Validator] always evaluate binary format when changed

Conflicts:
	.travis.yml
2015-07-02 08:17:05 +02:00
Nicolas Grekas
213cd6ac60 Merge branch '2.3' into 2.6
* 2.3:
  [travis] start hhvm first
2015-07-02 08:16:16 +02:00
Nicolas Grekas
7c36f0b9a0 [travis] start hhvm first 2015-07-02 08:16:05 +02:00
Fabien Potencier
fc6ed5bee3 feature #15141 [DX] [Security] Renamed Token#getKey() to getSecret() (WouterJ)
This PR was squashed before being merged into the 2.8 branch (closes #15141).

Discussion
----------

[DX] [Security] Renamed Token#getKey() to getSecret()

There are 2 very vague parameter names in the authentication process: `$providerKey` and `$key`. Some tokens/providers have the first one, some tokens/providers the second one and some both. An overview:

| Token | `providerKey` | `key`
| --- | --- | ---
| `AnonymousToken` | - | yes
| `PreAuth...Token` | yes | -
| `RememberMeToken` | yes | yes
| `UsernamePasswordToken` | yes | -

Both names are extremely general and their PHPdocs contains pure no-shit-sherlock-descriptions :squirrel: (like "The key."). This made me and @iltar think it's just an inconsistency and they have the same meaning.
...until we dived deeper into the code and came to the conclusion that `$key` has a Security task (while `$providerKey` doesn't really). If it takes people connected to Symfony internals 30+ minutes to find this out, it should be considered for an improvement imo.

So here is our suggestion: **Rename `$key` to `$secret`**. This explains much better what the value of the string has to be (for instance, it's important that the string is not easily guessable and cannot be found out, according to the Spring docs). It also explains the usage better (it's used as a replacement for credentials and to hash the RememberMeToken).

**Tl;dr**: `$key` and `$providerKey` are too general names, let's improve DX by renaming them. This PR tackles `$key` by renaming it to `$secret`.

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

*My excuse for the completely unrelated branch name*

Commits
-------

24e0eb6 [DX] [Security] Renamed Token#getKey() to getSecret()
2015-07-02 01:04:20 +02:00
WouterJ
24e0eb6453 [DX] [Security] Renamed Token#getKey() to getSecret() 2015-07-02 01:04:13 +02:00
Fabien Potencier
c6d9af374f bug #15115 [Validator] always evaluate binary format when changed (xabbuh)
This PR was merged into the 2.6 branch.

Discussion
----------

[Validator] always evaluate binary format when changed

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

Commits
-------

2ad7e67 [Validator] always evaluate binary format when changed
2015-07-01 21:58:06 +02:00
Christian Flothmann
2ad7e679cd [Validator] always evaluate binary format when changed 2015-07-01 20:29:17 +02:00
Nicolas Grekas
f59a0baa95 Merge branch '2.7' into 2.8
* 2.7:
  Update DateTimeToArrayTransformer.php
  Mock microtime() and time() in transient tests
  Azerbaijani language pluralization rule
  Move HHVM tests out of the allowed failures
2015-07-01 20:24:26 +02:00
Nicolas Grekas
734fdbe702 [VarDumper] Fix tests for HHVM 2015-07-01 20:24:23 +02:00
Nicolas Grekas
4b9446edf8 Merge branch '2.6' into 2.7
* 2.6:
  Update DateTimeToArrayTransformer.php
  Mock microtime() and time() in transient tests
  Azerbaijani language pluralization rule
  Move HHVM tests out of the allowed failures
2015-07-01 20:23:16 +02:00
Nicolas Grekas
d5cbc46cd9 Merge branch '2.3' into 2.6
* 2.3:
  Update DateTimeToArrayTransformer.php
  Mock microtime() and time() in transient tests
  Azerbaijani language pluralization rule
  Move HHVM tests out of the allowed failures
2015-07-01 20:23:01 +02:00