Commit Graph

18866 Commits

Author SHA1 Message Date
Fabien Potencier
58ed0762e9 Merge branch '2.7' into 2.8
* 2.7:
  Detect Mintty for color support on Windows
  Detect Mintty for color support on Windows
  Add a group for tests of the finder against the FTP server
  Fix license headers
  Forbid serializing a Crawler
  Fix phpdoc block of NativeSessionStorage class
  Added exception when setAutoInitialize is called when locked
  [FrameworkBundle] Advanced search templates of bundles
  [Security] Allow user providers to be defined in many files
  Use random_bytes function if it is available for random number generation
2015-09-27 12:09:46 +02:00
Christophe Coevoet
ea2bd2a0a2 Detect Mintty for color support on Windows
Mintty is now the default terminal in GitBash, and it supports ANSI
colors without the need of ANSICON (it even supports 256 colors rather
than the 16 colors supported by ANSICON).
2015-09-27 12:08:51 +02:00
Fabien Potencier
3ba54c1c31 Merge branch '2.3' into 2.7
* 2.3:
  Detect Mintty for color support on Windows
  Add a group for tests of the finder against the FTP server
  Fix license headers
  Forbid serializing a Crawler
  Fix phpdoc block of NativeSessionStorage class
  Added exception when setAutoInitialize is called when locked
  [FrameworkBundle] Advanced search templates of bundles
  [Security] Allow user providers to be defined in many files
  Use random_bytes function if it is available for random number generation
2015-09-27 12:08:38 +02:00
Christophe Coevoet
12743d1035 Detect Mintty for color support on Windows
Mintty is now the default terminal in GitBash, and it supports ANSI
colors without the need of ANSICON (it even supports 256 colors rather
than the 16 colors supported by ANSICON).
2015-09-27 11:58:50 +02:00
Fabien Potencier
06c14a2653 bug #15925 Updating behavior to not continue after an authenticator has set the response (weaverryan)
This PR was merged into the 2.8 branch.

Discussion
----------

Updating behavior to not continue after an authenticator has set the response

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

This mirrors the behavior in core: *if* a listener sets a response (on success or failure),
then the other listeners are not called. But if a response is *not* set
(which is sometimes the case for success, like in BasicAuthenticationListener),
then the other listeners are called, and can even fail.

It's all a bit of an edge-case, as only one authenticator (like authentication listener) would normally be doing any work on a request, but I think matching the other listeners (since I'm not aware of anyone having issues with its behavior) is best.

Commits
-------

5fa2684 Making all "debug" messages use the debug router
f403444 Updating behavior to not continue after an authenticator has set the response
2015-09-27 11:53:56 +02:00
Fabien Potencier
8df5d94158 minor #15924 Add a group for tests of the finder against the FTP server (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Add a group for tests of the finder against the FTP server

This allows to skip them easily when running the testsuite, as they represent a significant part of the testsuite time. These 2 tests together represent 42% of the execution time of the testsuite (all the time being spent connecting to the FTP server).

I also remove the usage of the data provider as a data provider with a single dataset (and used only partially) only makes tests harder to read. and does not save any duplication.

Commits
-------

51147e3 Add a group for tests of the finder against the FTP server
2015-09-27 11:50:37 +02:00
Fabien Potencier
5dcdc486ad bug #15928 [2.8][WebProfilerBundle] Fix search button click listener (xelaris)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8][WebProfilerBundle] Fix search button click listener

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

This fixes an issue when clicking the sidebar "Search" button **text** instead of the **button**. Then the click event target/srcElement is the *span* child-element, instead of the listening *a* element, which causes errors in the listener, since it expects the listening element. In consequence of that the search form isn't shown.

To fix this, the same technique is used, as for the navigation tabs. Traversing the DOM up to the expected *a* element.

Commits
-------

f9ddddb [WebProfilerBundle] Fix search button click listener
2015-09-27 11:22:34 +02:00
Fabien Potencier
1e65f7189f bug #15921 Abstract voter tweaks (weaverryan)
This PR was merged into the 2.8 branch.

Discussion
----------

Abstract voter tweaks

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

Based on suggestions from stof in #15870, this simplifies the BC and deprecation throwing code. This also adds a BadMethodCallException in case the user doesn't override `isGranted` *or* `voteOnAttribute`, because that's just plain wrong (as is calling `isGranted()` on the parent class directly, since that was formerly abstract).

Commits
-------

c03f5c2 Massively simplifying the BC and deprecated-throwing code thanks to suggestions by stof in #15870
2015-09-27 11:19:34 +02:00
Fabien Potencier
709cc13887 bug #15927 Making GuardTokenInterface extend TokenInterface (weaverryan)
This PR was merged into the 2.8 branch.

Discussion
----------

Making GuardTokenInterface extend TokenInterface

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

See #15884

Commits
-------

7f04fbb Making GuardTokenInterface extend TokenInterface
2015-09-27 11:18:08 +02:00
Fabien Potencier
9ec98c2a2c minor #15901 [Validator] Add Hungarian translation for the BIC constraint (1ed)
This PR was merged into the 2.8 branch.

Discussion
----------

[Validator] Add Hungarian translation for the BIC constraint

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

Commits
-------

f26425b [Validator] Add Hungarian translation for the BIC constraint
2015-09-27 11:10:04 +02:00
Fabien Potencier
30fc4eea13 feature #15905 [3.0][Config] Removed isFresh() related functionality (WouterJ)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[3.0][Config] Removed isFresh() related functionality

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

Commits
-------

4cdae98 Removed Resource#isFresh() related functionality
2015-09-27 11:06:17 +02:00
Fabien Potencier
9cf4ab74d3 minor #15920 Guard minor tweaks (weaverryan)
This PR was merged into the 2.8 branch.

Discussion
----------

Guard minor tweaks

| 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

Various completely minor things, most from suggestions on #14673

Commits
-------

869d5a7 tweaking message related to configuration edge case that we want to be helpful with
da4758a Minor tweaks - lowering the required security-http requirement and nulling out a test field
2015-09-27 10:55:21 +02:00
Fabien Potencier
92a9e22b48 bug #15906 Forbid serializing a Crawler (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Forbid serializing a Crawler

| 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

Unserializing a Crawler instance creates DOM elements in an invalid state, making the Crawler unusable.
While working on #15849, I figured out that DomCrawler actually inherits ``Serializable`` from its ``SplObjectStorage`` parent, and so I tried to serialize and unserialize one. The answer is that it does not work. This is what happens when trying to call ``parents`` on it for instance:

```
Symfony\Component\DomCrawler\Crawler::parents(): Invalid State Error
```

Commits
-------

12733cb Forbid serializing a Crawler
2015-09-27 10:54:00 +02:00
Fabien Potencier
936e1b3ac2 minor #15912 Allow serializer 3.0 in the PropertyInfo component (stof)
This PR was merged into the 2.8 branch.

Discussion
----------

Allow serializer 3.0 in the PropertyInfo component

| 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

This makes the component consistent with other components.

Commits
-------

0d72411 Allow serializer 3.0 in the PropertyInfo component
2015-09-27 10:49:22 +02:00
Fabien Potencier
15326ad1af minor #15910 Add the replace rules for the security-guard component (stof)
This PR was merged into the 2.8 branch.

Discussion
----------

Add the replace rules for the security-guard component

| 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

The update of composer replacements was forgotten in #14673

Commits
-------

5ef8abc Add the replace rules for the security-guard component
2015-09-27 10:47:35 +02:00
Alexander Schwenn
f9ddddb6c2 [WebProfilerBundle] Fix search button click listener 2015-09-27 09:53:17 +02:00
Tobias Schultze
c23444985b [Console] remove deprecated shell 2015-09-27 02:08:47 +02:00
Tobias Schultze
3909460c04 feature #15301 [Form][Type Date/Time] added choice_translation_domain option. (aitboudad)
This PR was squashed before being merged into the 2.8 branch (closes #15301).

Discussion
----------

[Form][Type Date/Time] added choice_translation_domain option.

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

- [x] add test

Commits
-------

1f3af26 [Form][Type Date/Time] added choice_translation_domain option.
2015-09-27 01:13:22 +02:00
Abdellatif Ait boudad
1f3af26e5c [Form][Type Date/Time] added choice_translation_domain option. 2015-09-27 01:13:15 +02:00
Ryan Weaver
c03f5c2ad4 Massively simplifying the BC and deprecated-throwing code thanks to suggestions by stof in #15870 2015-09-26 17:07:41 -04:00
Christophe Coevoet
e610b416c9 Merge branch '2.7' into 2.8
* 2.7:
  Fix license headers
  Ensure the ClockMock is loaded before using it in the testsuite
  Fix with_minutes option in time widget
  Fixed properties not explicitily declared
2015-09-26 21:48:07 +02:00
Christophe Coevoet
05fc646142 minor #15913 Ensure the ClockMock is loaded before using it in the testsuite (stof)
This PR was merged into the 2.7 branch.

Discussion
----------

Ensure the ClockMock is loaded before using it in the testsuite

| 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

The ``ProgressBarTest`` is passing in 2.7 and 2.8 on Travis only because the ``LegacyProgressHelperTest`` is running first, and so the clock mock is loaded. It would not pass when running it standalone. And the testsuite is currently broken in the master branch because LegacyProgressHelperTest is gone there, and so the clock mock was not loaded before the test.

Commits
-------

0e5aa0e Ensure the ClockMock is loaded before using it in the testsuite
2015-09-26 21:30:33 +02:00
Christophe Coevoet
a31dfa6f4b minor #15923 Fix legacy security tests (stof)
This PR was merged into the 2.8 branch.

Discussion
----------

Fix legacy security 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

when merging legacy test classes together in #15893, use statements where not copied, making the tests fail.

Commits
-------

8b615bb Fix legacy security tests
2015-09-26 21:22:35 +02:00
Ryan Weaver
5fa2684273 Making all "debug" messages use the debug router
Only the "auth success" and "auth failed" messages remain at info. That's
consistent with AbstractAuthenticationListener
2015-09-26 14:16:48 -04:00
Ryan Weaver
7f04fbb078 Making GuardTokenInterface extend TokenInterface
This makes some of our type-hints more honest: i.e. where we look for a GuardTokenInterface,
but really also expect it to implement TokenInterface.
2015-09-26 14:10:49 -04:00
Ryan Weaver
f403444cc0 Updating behavior to not continue after an authenticator has set the response
This mirrors the behavior in core: *if* a listener sets a response (on success or failure),
then the other listeners are not called. But if a response is *not* set
(which is sometimes the case for success, like in BasicAuthenticationListener),
then the other listeners are called, and can even fail.
2015-09-26 12:34:14 -04:00
WouterJ
4cdae9816e Removed Resource#isFresh() related functionality 2015-09-26 17:53:58 +02:00
Christophe Coevoet
51147e3aff Add a group for tests of the finder against the FTP server
This allows to skip them easily when running the testsuite, as they
represent a significant part of the testsuite time.
2015-09-26 17:47:39 +02:00
WouterJ
69e80beaa0 Fix trigger_error calls 2015-09-26 17:42:54 +02:00
Christophe Coevoet
8b615bb4b4 Fix legacy security tests 2015-09-26 17:38:37 +02:00
Ryan Weaver
869d5a77f0 tweaking message related to configuration edge case that we want to be helpful with 2015-09-26 10:22:30 -04:00
Ryan Weaver
da4758a2af Minor tweaks - lowering the required security-http requirement and nulling out a test field 2015-09-26 10:16:59 -04:00
Gábor Egyed
1701708c48 Fix license headers 2015-09-26 14:22:32 +02:00
Gábor Egyed
db8239ffab Fix license headers 2015-09-26 14:15:17 +02:00
Gábor Egyed
b03bcb34ec Fix license headers 2015-09-26 13:59:49 +02:00
Christophe Coevoet
0e5aa0eebf Ensure the ClockMock is loaded before using it in the testsuite 2015-09-26 13:03:21 +02:00
Christophe Coevoet
0d72411017 Allow serializer 3.0 in the PropertyInfo component
This makes the component consistent with other components.
2015-09-26 12:59:51 +02:00
Christophe Coevoet
0161212c1e Update the branch alias for new components in their 3.0 branch 2015-09-26 12:58:17 +02:00
Christophe Coevoet
9058f4683e Merge branch '2.8'
* 2.8:
  [BrowserKit] Added isFollowingRedirects and getMaxRedirects methods
  [PropertyInfo] Import the component
  deprecated the Shell Console class
  Deprecate ResourceInterface::getResource()
  Merged LegacySecurityContext tests
  [WebProfilerBundle] Added collapsed sidebar on small screens
2015-09-26 12:57:11 +02:00
Christophe Coevoet
5ef8abc916 Add the replace rules for the security-guard component 2015-09-26 12:41:38 +02:00
Christophe Coevoet
12733cba00 Forbid serializing a Crawler
Unserializing a Crawler instance creates DOM elements in an invalid
state, making the Crawler unusable.
2015-09-26 12:01:36 +02:00
Gábor Egyed
f26425bd91 [Validator] Add Hungarian translation for the BIC constraint 2015-09-26 11:13:29 +02:00
Diego Campoy
f181ea89e3 Fix phpdoc block of NativeSessionStorage class 2015-09-26 10:28:37 +02:00
Joshua Thijssen
c269d6feda Added exception when setAutoInitialize is called when locked 2015-09-26 10:25:00 +02:00
Gintautas Miselis
b47560773e [BrowserKit] Added isFollowingRedirects and getMaxRedirects methods 2015-09-26 10:21:42 +02:00
Fabien Potencier
4fcf136079 feature #15719 Deprecate ResourceInterface::getResource() (mpdude)
This PR was merged into the 2.8 branch.

Discussion
----------

Deprecate ResourceInterface::getResource()

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

The return value of this method does not make sense if you do not exactly know about the type of resource at hand. For example, it may be [an array](b49fa129bd/src/Symfony/Component/HttpKernel/Config/EnvParametersResource.php (L57)) or a [file path](87800ae47e/src/Symfony/Component/Config/Resource/FileResource.php (L51)).

As all usages of getResource() within Symfony are in tests of particular Resource implementations anyway, deprecating and later removing this method helps us with simplifying the ResourceInterface (https://github.com/symfony/symfony/issues/7176).

Commits
-------

87c0c7d Deprecate ResourceInterface::getResource()
2015-09-26 10:19:26 +02:00
arduanov
f8d53ea23a Fix with_minutes option in time widget
Option with_minutes may be configured in form
http://symfony.com/doc/current/reference/forms/types/datetime.html#with-minutes
2015-09-26 10:15:32 +02:00
Fabien Potencier
61550dc564 minor #15765 Fixed properties not explicitily declared (deguif)
This PR was merged into the 2.7 branch.

Discussion
----------

Fixed properties not explicitily declared

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

Commits
-------

d2b3fe4 Fixed properties not explicitily declared
2015-09-26 10:14:04 +02:00
Fabien Potencier
44091f579c feature #15818 [WebProfilerBundle] Add collapsed sidebar on small screens (hason)
This PR was merged into the 2.8 branch.

Discussion
----------

[WebProfilerBundle] Add collapsed sidebar on small screens

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

Desktop
![Desktop](https://cloud.githubusercontent.com/assets/288535/9927840/1e4eb7fc-5d22-11e5-9833-f1431ed2855d.png)

Mobile
![Mobile](https://cloud.githubusercontent.com/assets/288535/9927847/23a5c5c4-5d22-11e5-928a-87b167a079b5.png) ![Mobile touch](https://cloud.githubusercontent.com/assets/288535/9927851/2bb800e2-5d22-11e5-9566-c74a23eb9cb5.png)

Commits
-------

184d4f2 [WebProfilerBundle] Added collapsed sidebar on small screens
2015-09-26 10:11:55 +02:00
yethee
3ba14604a7 [FrameworkBundle] Advanced search templates of bundles
It uses two different locations to search templates of bundle,
as described in the documentation.
2015-09-26 10:02:46 +02:00
Fabien Potencier
59ee12c234 feature #15858 [PropertyInfo] Import the component (dunglas)
This PR was squashed before being merged into the 2.8 branch (closes #15858).

Discussion
----------

[PropertyInfo] Import the component

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

As discussed with @fabpot (see #14844), this PR moves [dunglas/php-property-info](https://github.com/dunglas/php-property-info) under the Symfony umbrella.

Rationale behind this new component (extracted from README.md):

PHP doesn't support explicit type definition. This is annoying, especially when doing meta programming.
Various libraries including but not limited to Doctrine ORM and the Symfony Validator provide their own type managing
system.
This library extracts various information including the type and documentation from PHP class property from metadata of popular sources:

* Setter method with type hint
* PHPDoc DocBlock
* Doctrine ORM mapping (annotation, XML, YML or custom format)
* PHP 7 scalar typehint and return type
* Serializer metadata

**Usage:**

```php
<?php

// Use Composer autoload
require 'vendor/autoload.php';

use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Tools\Setup;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\Id;
use Symfony\Component\PropertyInfo\Extractors\DoctrineExtractor;
use Symfony\Component\PropertyInfo\Extractors\PhpDocExtractor;
use Symfony\Component\PropertyInfo\Extractors\ReflectionExtractor;
use Symfony\Component\PropertyInfo\PropertyInfo;

/**
 * @Entity
 */
class MyTestClass
{
    /**
     * @Id
     * @Column(type="integer")
     */
    public $id;
    /**
     * This is a date (short description).
     *
     * With a long description.
     *
     * @var \DateTime
     */
    public $foo;
    private $bar;

    public function setBar(\SplFileInfo $bar)
    {
        $this->bar = $bar;
    }
}

// Doctrine initialization (necessary only to use the Doctrine Extractor)
$config = Setup::createAnnotationMetadataConfiguration([__DIR__], true);
$entityManager = EntityManager::create([
    'driver' => 'pdo_sqlite',
    // ...
], $config);

$doctrineExtractor = new DoctrineExtractor($entityManager->getMetadataFactory());
$phpDocExtractor = new PhpDocExtractor();
$reflectionExtractor = new ReflectionExtractor();

$propertyInfo = new PropertyInfo(
    array($reflectionExtractor),
    array($doctrineExtractor, $phpDocExtractor, $reflectionExtractor),
    array($phpDocExtractor),
    array($reflectionExtractor)
);

var_dump($propertyInfo->getProperties('MyTestClass'));
var_dump($propertyInfo->getTypes('MyTestClass', 'foo'));
var_dump($propertyInfo->getTypes('MyTestClass', 'id'));
var_dump($propertyInfo->getTypes('MyTestClass', 'bar'));
var_dump($propertyInfo->isReadable('MyTestClass', 'id'));
var_dump($propertyInfo->isReadable('MyTestClass', 'bar'));
var_dump($propertyInfo->isWritable('MyTestClass', 'foo'));
var_dump($propertyInfo->isWritable('MyTestClass', 'bar'));
var_dump($propertyInfo->getShortDescription('MyTestClass', 'foo'));
var_dump($propertyInfo->getLongDescription('MyTestClass', 'foo'));
```

Output:

```
array(3) {
  [0] =>
  string(2) "id"
  [1] =>
  string(3) "foo"
  [2] =>
  string(3) "Bar"
}
array(1) {
  [0] =>
  class Symfony\Component\PropertyInfo\Type#36 (6) {
    private $builtinType =>
    string(6) "object"
    private $nullable =>
    bool(false)
    private $class =>
    string(8) "DateTime"
    private $collection =>
    bool(false)
    private $collectionKeyType =>
    NULL
    private $collectionValueType =>
    NULL
  }
}
array(1) {
  [0] =>
  class Symfony\Component\PropertyInfo\Type#36 (6) {
    private $builtinType =>
    string(3) "int"
    private $nullable =>
    bool(false)
    private $class =>
    NULL
    private $collection =>
    bool(false)
    private $collectionKeyType =>
    NULL
    private $collectionValueType =>
    NULL
  }
}
array(1) {
  [0] =>
  class Symfony\Component\PropertyInfo\Type#245 (6) {
    private $builtinType =>
    string(6) "object"
    private $nullable =>
    bool(false)
    private $class =>
    string(11) "SplFileInfo"
    private $collection =>
    bool(false)
    private $collectionKeyType =>
    NULL
    private $collectionValueType =>
    NULL
  }
}
bool(true)
bool(false)
bool(true)
bool(true)
string(35) "This is a date (short description)."
string(24) "With a long description."
```

Commits
-------

f1eb185 [PropertyInfo] Import the component
2015-09-26 09:46:23 +02:00
Kévin Dunglas
f1eb185236 [PropertyInfo] Import the component 2015-09-26 09:46:20 +02:00
Fabien Potencier
25dccf1bb5 minor #15875 Use random_bytes function if it is available for random number generation (pierredup)
This PR was merged into the 2.3 branch.

Discussion
----------

Use random_bytes function if it is available for random number generation

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

This is an attempt to use the random_bytes function when generating secure random numbers. This function is included in PHP 7 or through the "paragonie/random_compat" library.

This PR only adds support to use the function if it is available. Changes that can be added is to add a hard dependency on the paragonie/random_compat library, so all current functionality can be deprecated.

Commits
-------

6a217dc Use random_bytes function if it is available for random number generation
2015-09-26 09:44:41 +02:00
Fabien Potencier
8209754e4e minor #15893 Merged LegacySecurityContext tests (WouterJ)
This PR was merged into the 2.8 branch.

Discussion
----------

Merged LegacySecurityContext tests

I've no idea why this test was introduced in the wrong namespace in 2.8, but I merged it in the correct test case now.

Commits
-------

2c4da3c Merged LegacySecurityContext tests
2015-09-26 09:34:51 +02:00
Fabien Potencier
7079aa9e96 feature #15892 deprecated the Shell Console class (fabpot)
This PR was merged into the 2.8 branch.

Discussion
----------

deprecated the Shell Console class

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

Commits
-------

1c17928 deprecated the Shell Console class
2015-09-26 09:27:31 +02:00
Fabien Potencier
1c17928e58 deprecated the Shell Console class 2015-09-26 09:26:13 +02:00
Fabien Potencier
967c0e439a Merge branch '2.8'
* 2.8: (23 commits)
  [Validator] added BIC (SWIFT-BIC) validation constraint
  [TwigBridge] Foundation form layout integration
  [Security] Deprecated supportsAttribute and supportsClass methods
  bumped Symfony version to 2.7.6
  updated VERSION for 2.7.5
  updated CHANGELOG for 2.7.5
  bumped Symfony version to 2.3.34
  updated VERSION for 2.3.33
  update CONTRIBUTORS for 2.3.33
  updated CHANGELOG for 2.3.33
  [Console] Fix transient HHVM test
  [OptionsResolver] Fix catched exception along the dependency tree mistakenly detects cyclic dependencies
  fixed tests
  [DI] Support deprecated definitions in decorators
  [DI] Allow to change the deprecation message in Definition
  [DI] Trigger a deprecated error on the container builder
  [DI] Dump the deprecated status
  [DI] Supports the deprecated tag in loaders
  [DI] Add a deprecated status to definitions
  Fixing test locations
  ...
2015-09-26 09:20:46 +02:00
Grégoire Pineau
9165191816 [Security] Allow user providers to be defined in many files 2015-09-25 15:16:17 +02:00
Fabien Potencier
06b4938046 feature #15519 [Validator] added BIC (SWIFT-BIC) validation constraint (mvhirsch)
This PR was squashed before being merged into the 2.8 branch (closes #15519).

Discussion
----------

[Validator] added BIC (SWIFT-BIC) validation constraint

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/5623

I've added the BIC validator, because we do often need validation for IBAN and BIC values. Since the IBAN validation was already included into Symfony, I was asking myself: why not contribute my  BIC validator to the community? So here we go ...

It depends on ISO 9362 as described on [Wikipedia](https://en.wikipedia.org/wiki/ISO_9362#Structure). It validates the structure based on alphabetic/alphanumeric values and the value's length.

Todo-list:
- [x] submit changes to the documentation

Commits
-------

d6471b3 [Validator] added BIC (SWIFT-BIC) validation constraint
2015-09-25 14:16:01 +02:00
Michael Hirschler
d6471b3338 [Validator] added BIC (SWIFT-BIC) validation constraint 2015-09-25 14:15:58 +02:00
Jean-Christophe Cuvelier [Artack]
7653d95450 [TwigBridge] Foundation form layout integration 2015-09-25 14:01:53 +02:00
Fabien Potencier
693af63d65 bug #15721 [FrameworkBundle] compatibility with older Form component versions (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] compatibility with older Form component versions

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

Commits
-------

01ad767 compatibility with older Form component versions
2015-09-25 13:59:08 +02:00
Fabien Potencier
6f7aae991c feature #15151 [Security] Deprecated supportsAttribute and supportsClass methods (WouterJ)
This PR was squashed before being merged into the 2.8 branch (closes #15151).

Discussion
----------

[Security] Deprecated supportsAttribute and supportsClass methods

These methods aren't used at all in a Symfony application and don't make sense to use in the application. They are only used internally in the voters. This means the voter interface can be made much easier.

I'm not sure how we do these deprecations, should we remove the methods from the interface now already? Also, I don't think it's possible to trigger deprecation notices for the voter methods?

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

Abstract Voter
---

There is one remaining question about the abstract voter. This currently has abstract `getSupportedAttributes()` and `getSupportedClass()` methods. One of the reasons to remove the methods for the interface was that these methods are not flexible. Does it make sense to deprecate these methods as well and replace them by an abstract `protected vote(array $attributes, $class)` method in the `AbstractVoter` (which is called from `AbstractVoter#vote()`) ?

Commits
-------

6588708 [Security] Deprecated supportsAttribute and supportsClass methods
2015-09-25 13:44:05 +02:00
WouterJ
6588708144 [Security] Deprecated supportsAttribute and supportsClass methods 2015-09-25 13:42:48 +02:00
Fabien Potencier
22100a2ca6 bumped Symfony version to 2.7.6 2015-09-25 13:39:10 +02:00
Fabien Potencier
619528a274 updated VERSION for 2.7.5 2015-09-25 13:16:52 +02:00
Fabien Potencier
6200eb5053 feature #15491 Add support for deprecated definitions (Taluu)
This PR was merged into the 2.8 branch.

Discussion
----------

Add support for deprecated definitions

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

This add a sort of marker in the Definition of a service that marks it as "deprecated". This is useful when we have a bunch of service and a bunch of where it is used, and we need to track if there are any uses before removing it (in a later version or right now). I was not sure if the `trigger_error` would be enough, or if I should log them instead.

I'm first gathering some feedback, and then I'll try to update the doc.

I was not sure if it should target 2.8 or master (3.0) though.

What's left ?
==========
- [x] Make a POC
- [x] Gather some feedbacks
- [x] Dump the tag in XML, YAML and PHP
- [x] Load the definition from XML, YAML and PHP
- [x] Fix some forgotten things such as the key existence check
- [x] Work on inline services in the php dumper
- [x] Handle deprecations for decorators
- ~~Possibility to overwrite the deprecated flag in the decorators in `XmlFileLoader` ?~~ Nope, and this behavior is also ported to the `YamlFileLoader`.

Commits
-------

83f4e9c [DI] Support deprecated definitions in decorators
0b3d0a0 [DI] Allow to change the deprecation message in Definition
954247d [DI] Trigger a deprecated error on the container builder
2f37cb1 [DI] Dump the deprecated status
8f6c21c [DI] Supports the deprecated tag in loaders
4b6fab0 [DI] Add a deprecated status to definitions
2015-09-25 13:07:29 +02:00
Fabien Potencier
a5c65c1786 Merge branch '2.8'
* 2.8:
  [Console] Add domain exceptions to replace generic exceptions
  Implement service-based Resource (cache) validation
2015-09-25 12:59:21 +02:00
Fabien Potencier
87b66a1d00 bumped Symfony version to 2.3.34 2015-09-25 12:48:04 +02:00
Nicolas Grekas
2377994b66 Merge branch '2.7' into 2.8
* 2.7:
  [Console] Fix transient HHVM test
  [OptionsResolver] Fix catched exception along the dependency tree mistakenly detects cyclic dependencies
  fixed tests
  Fixing test locations
  [VarDumper] Fix dump comparison on large arrays
  [expression-language] Code Cleanup for GetAttrNode
2015-09-25 11:20:50 +02:00
Fabien Potencier
3b8a8ee48e updated VERSION for 2.3.33 2015-09-25 11:08:49 +02:00
Nicolas Grekas
945ec0e40c [Console] Fix transient HHVM test 2015-09-25 10:32:23 +02:00
Matthias Pigulla
87c0c7d400 Deprecate ResourceInterface::getResource()
The return value of this method does not make sense if you do not exactly know
about the type of resource at hand. For example, it may be [an array](b49fa129bd/src/Symfony/Component/HttpKernel/Config/EnvParametersResource.php (L57))
or a [file path](87800ae47e/src/Symfony/Component/Config/Resource/FileResource.php (L51)).

As all usages of getResource() within Symfony are in tests of particular Resource implementations anyway, deprecating and later removing this interface
helps us with simplifying the ResourceInterface (https://github.com/symfony/symfony/issues/7176).
2015-09-25 10:18:07 +02:00
WouterJ
2c4da3ceff Merged LegacySecurityContext tests 2015-09-25 09:39:51 +02:00
Fabien Potencier
507e959e37 bug #15866 [VarDumper] Fix dump comparison on large arrays (romainneutron)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Fix dump comparison on large arrays

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

Commits
-------

6a6e7f3 [VarDumper] Fix dump comparison on large arrays
2015-09-25 09:04:33 +02:00
Mathieu Lemoine
9a188c5215 [OptionsResolver] Fix catched exception along the dependency tree mistakenly detects cyclic dependencies 2015-09-25 08:59:16 +02:00
Fabien Potencier
7d674c2135 fixed tests 2015-09-25 08:52:54 +02:00
Fabien Potencier
21e2218e14 minor #15881 Fixing security test locations (weaverryan)
This PR was merged into the 2.7 branch.

Discussion
----------

Fixing security test locations

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

There were just missed on sha: 0601ed33c4 probably because there were on a different branch.

Cheers!

Commits
-------

16e09d3 Fixing test locations
2015-09-25 08:48:53 +02:00
Fabien Potencier
dacbfe9699 feature #14894 [Console] Add domain exceptions to replace generic exceptions (GromNaN)
This PR was squashed before being merged into the 2.8 branch (closes #14894).

Discussion
----------

[Console] Add domain exceptions to replace generic exceptions

Creates domain specific exception classes for the case where a user type an invalid command name or option name.

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

TODO:
* [x] Replace `\InvalidArgumentException` by `Symfony\Component\Console\Exception\InvalidArgumentException`
* [x] Add `Symfony\Component\Console\Exception\ExceptionInterface`

Commits
-------

dd17dc0 [Console] Add domain exceptions to replace generic exceptions
2015-09-25 08:44:47 +02:00
Jérôme Tamarelle
dd17dc00ee [Console] Add domain exceptions to replace generic exceptions 2015-09-25 08:44:39 +02:00
Fabien Potencier
d60428c9ca feature #15738 Implement service-based Resource (cache) validation (mpdude)
This PR was squashed before being merged into the 2.8 branch (closes #15738).

Discussion
----------

Implement service-based Resource (cache) validation

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #7230, #15692, #7782
| License       | MIT
| Doc PR        | symfony/symfony-docs#5136

### Overview

Currently, any metadata passed to `ConfigCache` (namely implementations of `ResourceInterface`) is serialized to disk. When the `ConfigCache` is validated, the metadata is unserialized and queried through `ResourceInterface::isFresh()` to determine whether the cache is fresh. That way, `ResourceInterface` implementations cannot interact with services, for example a database connection.

This PR introduces the new concept of `ResourceCheckers`. Services implementing `ResourceCheckerInterface` can be tagged as `config_cache.resource_checker` with an optional priority.

Clients that wish to use `ConfigCache` can then obtain an instance from the `config_cache_factory` service (which implements `ConfigCacheFactoryInterface`). The factory will take care of injecting resource checkers into the `ConfigCache` instance so that they can be used for cache validation.

Checking cache metadata is easy for `ResourceCheckers`:
* First, the `ResourceCheckerInterface::supports()` implementation is passed the metadata object in question. If the checker cannot handle the type of resource passed, `supports()` should return `false`.
* Otherwise, the `ResourceCheckerInterface::isFresh()` method will be called and given the resource as well as the timestamp at which the cache was initialized. If that method returns `false`, the cache is considered stale. If it returns `true`, the resource is considered unchanged and will *not* be passed to any additional checkers.

### BC and migration path

This PR does not (intend to) break BC but it comes with deprecations. The main reason is that `ResourceInterface` contains an `isFresh()` method that does not make sense in the general case of resources.

Thus, `ResourceInterface::isFresh()` is marked as deprecated and should be removed in Symfony 3.0. Resource implementations that can (or wish to) be validated in that simple manner can implement the `SelfCheckingResourceInterface` sub-interface that still contains (and will keep) the `isFresh()` method. The change should be as simple as changing the `extends` list.

Apart from that, `ResourceInterface` will be kept as the base interface for resource implementations. It is used in several `@api` interfaces and thus cannot easily be substituted.

For the Symfony 2.x series, a `BCResourceInterfaceChecker` will be kept that performs validation through `ResourceInterface::isFresh()` but will trigger a deprecation warning. The remedy is to either implement a custom ResourceChecker with a priority higher than -1000; or to switch to the aforementioned `SelfCheckingResourceInterface` which is used at a priority of -990 (without deprecation warning).

The `ConfigCache` and `ConfigCacheFactory` classes can be used as previously but do not feature checker-based cache validation.

### Outlook and closing remarks:

This PR supersedes #7230, #15692 and works at least in parts towards the goal of #7176.

The `ResourceCheckerInterface`, `...ConfigCache` and `...ConfigCacheFactory` no longer need to be aware of the `debug` flag. The different validation rules applied previously are now just a matter of `ResourceChecker` configuration (i. e. "no checkers" in `prod`).

It might be possible to remove the `debug` flag from Symfony's `Router` and/or `Translator` classes in the future as well because it was only passed on to the `ConfigCache` there.

Commits
-------

20d3722 Implement service-based Resource (cache) validation
2015-09-25 08:33:07 +02:00
Matthias Pigulla
20d3722120 Implement service-based Resource (cache) validation 2015-09-25 08:31:17 +02:00
Fabien Potencier
31d76ec0f7 minor #15538 [expression-language] Code Cleanup for GetAttrNode (zerustech)
This PR was merged into the 2.7 branch.

Discussion
----------

[expression-language] Code Cleanup for GetAttrNode

Use ``$this->nodes['attribute']->attributes['value']`` to
replace ``$this->nodes['attribute']->evaluate($functions, $values)``
for method call and property call.

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

166e175 [expression-language] Code Cleanup for GetAttrNode
2015-09-24 13:58:55 +02:00
Nicolas Grekas
9db5d017d8 Merge branch '2.8'
* 2.8: (29 commits)
  Updating AbstractVoter so that the method receives the TokenInterface
  Adding the necessary files so that Guard can be its own installable component
  Fix syntax in a test
  Normalize the way we check versions
  Avoid errors when generating the logout URL when there is no firewall key
  Removing unnecessary override
  fabbot
  Adding a new exception and throwing it when the User changes
  Fixing a bug where having an authentication failure would log you out.
  Tweaks thanks to Wouter
  Adding logging  on this step and switching the order - not for any huge reason
  Adding a base class to assist with form login authentication
  Allowing for other authenticators to be checked
  meaningless author and license changes
  Adding missing factory registration
  Thanks again fabbot!
  A few more changes thanks to @iltar
  Splitting the getting of the user and checking credentials into two steps
  Tweaking docblock on interface thanks to @iltar
  Adding periods at the end of exceptions, and changing one class name to LogicException thanks to @iltar
  ...

Conflicts:
	UPGRADE-2.8.md
	src/Symfony/Bridge/Twig/Tests/Node/DumpNodeTest.php
	src/Symfony/Bundle/FrameworkBundle/Command/ServerCommand.php
	src/Symfony/Component/Validator/Tests/Constraints/AbstractComparisonValidatorTestCase.php
	src/Symfony/Component/Validator/Tests/Constraints/IdenticalToValidatorTest.php
	src/Symfony/Component/Validator/Tests/Constraints/RangeValidatorTest.php
2015-09-24 11:03:02 +02:00
Nicolas Grekas
995cf4ea7d Merge branch '2.7' into 2.8
* 2.7:
  Fix syntax in a test
  Normalize the way we check versions
2015-09-24 11:01:09 +02:00
Baptiste Clavié
83f4e9cf45 [DI] Support deprecated definitions in decorators 2015-09-24 10:53:13 +02:00
Baptiste Clavié
0b3d0a0bd9 [DI] Allow to change the deprecation message in Definition 2015-09-24 10:53:13 +02:00
Baptiste Clavié
954247d550 [DI] Trigger a deprecated error on the container builder 2015-09-24 10:50:44 +02:00
Baptiste Clavié
2f37cb184f [DI] Dump the deprecated status 2015-09-24 10:50:44 +02:00
Baptiste Clavié
8f6c21c2b6 [DI] Supports the deprecated tag in loaders 2015-09-24 10:50:44 +02:00
Baptiste Clavié
4b6fab0b2c [DI] Add a deprecated status to definitions 2015-09-24 10:50:44 +02:00
Fabien Potencier
5f2acfd4c7 feature #14673 New Guard Authentication System (e.g. putting the joy back into security) (weaverryan)
This PR was merged into the 2.8 branch.

Discussion
----------

New Guard Authentication System (e.g. putting the joy back into security)

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | at least partially: #14300, #11158, #11451, #10035, #10463, #8606, probably more
| License       | MIT
| Doc PR        | symfony/symfony-docs#5265

Hi guys!

Though it got much easier in 2.4 with `pre_auth`, authentication is a pain in Symfony. This introduces a new authentication provider called guard, with one goal in mind: put everything you need for *any* authentication system into one spot.

### How it works

With guard, you can perform custom authentication just by implementing the [GuardAuthenticatorInterface](https://github.com/weaverryan/symfony/blob/guard/src/Symfony/Component/Security/Guard/GuardAuthenticatorInterface.php) and registering it as a service. It has methods for every part of a custom authentication flow I can think of.

For a working example, see https://github.com/weaverryan/symfony-demo/tree/guard-auth. This uses 2 authenticators simultaneously, creating a system that handles [form login](https://github.com/weaverryan/symfony-demo/blob/guard-auth/src/AppBundle/Security/FormLoginAuthenticator.php) and [api token auth](https://github.com/weaverryan/symfony-demo/blob/guard-auth/src/AppBundle/Security/TokenAuthenticator.php) with a respectable amount of code. The [security.yml](https://github.com/weaverryan/symfony-demo/blob/guard-auth/app/config/security.yml) is also quite simple.

This also supports "manual login" without jumping through hoops: https://github.com/weaverryan/symfony-demo/blob/guard-auth/src/AppBundle/Controller/SecurityController.php#L45

I've also tested with "remember me" and "switch user" - no problems with either.

I hope you like it :).

### What's Needed

1) **Other Use-Cases?**: Please think about the code and try it. What use-cases are we *not* covering? I want Guard to be simple, but cover the 99.9% use-cases.

2) **Remember me** functionality cannot be triggered via manual login. That's true now, and it's not fixed, and it's tricky.

### Deprecations?

This is a new feature, so no deprecations. But, creating a login form with a guard authenticator is a whole heck of a lot easier to understand than `form_login` or even `simple_form`. In a perfect world, we'd either deprecate those or make them use "guard" internally so that we have just **one** way of performing authentication.

Thanks!

Commits
-------

a01ed35 Adding the necessary files so that Guard can be its own installable component
d763134 Removing unnecessary override
e353833 fabbot
dd485f4 Adding a new exception and throwing it when the User changes
302235e Fixing a bug where having an authentication failure would log you out.
396a162 Tweaks thanks to Wouter
c9d9430 Adding logging  on this step and switching the order - not for any huge reason
31f9cae Adding a base class to assist with form login authentication
0501761 Allowing for other authenticators to be checked
293c8a1 meaningless author and license changes
81432f9 Adding missing factory registration
7a94994 Thanks again fabbot!
7de05be A few more changes thanks to @iltar
ffdbc66 Splitting the getting of the user and checking credentials into two steps
6edb9e1 Tweaking docblock on interface thanks to @iltar
d693721 Adding periods at the end of exceptions, and changing one class name to LogicException thanks to @iltar
eb158cb Updating interface method per suggestion - makes sense to me, Request is redundant
c73c32e Thanks fabbot!
6c180c7 Adding an edge case - this should not happen anyways
180e2c7 Properly handles "post auth" tokens that have become not authenticated
873ed28 Renaming the tokens to be clear they are "post" and "pre" auth - also adding an interface
a0bceb4 adding Guard tests
05af97c Initial commit (but after some polished work) of the new Guard authentication system
330aa7f Improving phpdoc on AuthenticationEntryPointInterface so people that implement this understand it
2015-09-24 09:21:03 +02:00
Fabien Potencier
5b8b429795 feature #15870 Updating AbstractVoter so that the method receives the TokenInterface (weaverryan)
This PR was squashed before being merged into the 2.8 branch (closes #15870).

Discussion
----------

Updating AbstractVoter so that the method receives the TokenInterface

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

This fixes #12360, and along with already-merged #14733, this would make it possible to make calls back to the `AccessDecisionManager` inside a voter (e.g. you might check to see if `IS_AUTHENTICATED_FULLY` from inside your voter).

We originally passed the User instead of the token to be nice, but it's a limitation, and since we never sanitized the User (i.e. a string may be passed to `AbstractToken::isGranted()`), it's not helpful anyways.

Thanks!

Commits
-------

948ccec Updating AbstractVoter so that the method receives the TokenInterface
2015-09-24 08:34:00 +02:00
Ryan Weaver
948ccec1ea Updating AbstractVoter so that the method receives the TokenInterface 2015-09-24 08:33:58 +02:00
Ryan Weaver
a01ed35cfc Adding the necessary files so that Guard can be its own installable component 2015-09-23 21:55:58 -04:00
Ryan Weaver
16e09d3eaa Fixing test locations 2015-09-23 21:45:13 -04:00
Pierre du Plessis
6a217dcecc Use random_bytes function if it is available for random number generation 2015-09-23 21:31:18 +02:00
Tobias Schultze
8dcf14a02e Fix syntax in a test 2015-09-23 13:13:27 +02:00
Fabien Potencier
6d9cba8ae5 minor #15867 Normalize the way we check versions (romainneutron)
This PR was merged into the 2.7 branch.

Discussion
----------

Normalize the way we check versions

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

Commits
-------

121eade Normalize the way we check versions
2015-09-23 11:21:02 +02:00
Romain Neutron
121eade822 Normalize the way we check versions 2015-09-23 11:17:11 +02:00
Fabien Potencier
ab59d6beb3 feature #10788 [HttpKernel] Add better error message when controller action isn't callable (pierredup)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[HttpKernel] Add better error message when controller action isn't callable

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

In the `ControllerResolver`, if a controller isn't callable, try to give a better description of what went wrong

Commits
-------

e0e19f6 Add better error message when controller action isn't callable
2015-09-23 11:00:47 +02:00
Fabien Potencier
d1ae400cb1 bug #15861 Avoid errors when generating the logout URL when there is no firewall key (javiereguiluz)
This PR was squashed before being merged into the 2.8 branch (closes #15861).

Discussion
----------

Avoid errors when generating the logout URL when there is no firewall key

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

Commits
-------

a811912 Avoid errors when generating the logout URL when there is no firewall key
2015-09-23 10:16:07 +02:00
Javier Eguiluz
a81191239a Avoid errors when generating the logout URL when there is no firewall key 2015-09-23 10:16:04 +02:00
Pierre du Plessis
e0e19f6d8e Add better error message when controller action isn't callable 2015-09-23 10:09:32 +02:00
Ryan Weaver
d763134e1a Removing unnecessary override 2015-09-22 19:45:03 -04:00
Fabien Potencier
6d1b583cca fixed CS 2015-09-22 20:24:44 +02:00
Fabien Potencier
d74c02b86e feature #15868 [Finder] Remove deprecated classes (nicolas-grekas)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[Finder] Remove deprecated classes

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

Commits
-------

0addf3d [Finder] Remove deprecated classes
2015-09-22 20:22:49 +02:00
Tobias Schultze
70fcc9c5fb minor #15798 [2.8][Form] Fix php warning on invalid FormFactory::createBuilder() argument (xelaris)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8][Form] Fix php warning on invalid FormFactory::createBuilder() argument

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

Without this check it comes to a `strpos() expects parameter 1 to be string, object given` warning, when passing an invalid argument to `FormFactory::createBuilder()` (e.g. when calling `$this->createForm(new AnEntity());` instead of `$this->createForm(new AnEntityType());` in a controller).

Commits
-------

b5599a5 [Form] Fix php warning on invalid FormFactory::createBuilder() argument
2015-09-22 18:06:19 +02:00
Abdellatif Ait boudad
6ee96fb3f2 [Translation][file dump] remove deprecated format method. 2015-09-22 15:04:40 +00:00
Romain Neutron
6a6e7f3947 [VarDumper] Fix dump comparison on large arrays 2015-09-22 16:41:01 +02:00
Nicolas Grekas
0addf3d3e4 [Finder] Remove deprecated classes 2015-09-22 16:22:53 +02:00
Nicolas Grekas
111bdc5294 Merge branch '2.8'
* 2.8:
  Added the right revision date for status code registry
  [Config] Fix enum default value in Yaml dumper
  fixed typo.
  [Translation][File dumper] allow get file content without writing in file.
  Finnish translation fix
  [CssSelector] Optimize regexs matching simple selectors
  Fix the phpdoc in the CssSelector TranslatorInterface
  [Console] Add clock mock to fix transient test on HHVM
  [DomCrawler] Optimize the regex used to find namespace prefixes
  [VarDumper] Add EnumStub for dumping virtual collections with casters
  [Finder] Deprecate adapters and related classes
  [EventDispatcher] skip one lazy loading call
  [EventDispatcher] fix memory leak in a getListeners
  [WebProfilerBundle] added btn-link.
  Remove duplication of the handling of regex filters in the Finder
  Default to stderr for console helpers (only merge if #15794 gets merged)

Conflicts:
	src/Symfony/Component/Console/Tests/Helper/LegacyProgressHelperTest.php
	src/Symfony/Component/EventDispatcher/EventDispatcher.php
	src/Symfony/Component/VarDumper/Tests/CliDumperTest.php
	src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php
2015-09-22 16:11:08 +02:00
Nicolas Grekas
b75755cdde Merge branch '2.7' into 2.8
* 2.7:
  [Config] Fix enum default value in Yaml dumper
  Finnish translation fix
  [CssSelector] Optimize regexs matching simple selectors
  Fix the phpdoc in the CssSelector TranslatorInterface
  [Console] Add clock mock to fix transient test on HHVM
  [DomCrawler] Optimize the regex used to find namespace prefixes
  [EventDispatcher] skip one lazy loading call
  [EventDispatcher] fix memory leak in a getListeners
  Default to stderr for console helpers (only merge if #15794 gets merged)
2015-09-22 15:49:41 +02:00
Nicolas Grekas
b6604f3e6f Merge branch '2.3' into 2.7
* 2.3:
  Finnish translation fix
  [CssSelector] Optimize regexs matching simple selectors
  Fix the phpdoc in the CssSelector TranslatorInterface
  [Console] Add clock mock to fix transient test on HHVM
  [EventDispatcher] skip one lazy loading call
  [EventDispatcher] fix memory leak in a getListeners
2015-09-22 15:49:29 +02:00
Fabien Potencier
74c24a5315 minor #15814 [WebProfilerBundle] fixed cursor as pointer when hovering over link. (aitboudad)
This PR was merged into the 2.8 branch.

Discussion
----------

[WebProfilerBundle] fixed cursor as pointer when hovering over link.

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

Commits
-------

ac7591f [WebProfilerBundle] added btn-link.
2015-09-22 14:44:41 +02:00
Fabien Potencier
984019382a bug #15795 [Console] Default to stderr for the console helpers (2.7+) (alcohol)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Default to stderr for the console helpers (2.7+)

Interactive input/output and informational output such as progress should go to `stderr` if available.

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

Only merge if #15794 is merged.

If someone explicitly wants to use `stdout`, they can simply pass `$output->getStream()` instead of `$output` in most use-cases.

Commits
-------

90c2a96 Default to stderr for console helpers (only merge if #15794 gets merged)
2015-09-22 14:21:01 +02:00
Fabien Potencier
2e718c1f31 feature #15786 [Translation][File dumper] allow get file content without writing in file. (aitboudad)
This PR was merged into the 2.8 branch.

Discussion
----------

[Translation][File dumper] allow get file content without writing in file.

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

Commits
-------

805acc9 fixed typo.
9b877cf [Translation][File dumper] allow get file content without writing in file.
2015-09-22 14:05:07 +02:00
Baptiste Dupuch
07d08c49d3 Added the right revision date for status code registry 2015-09-22 14:02:31 +02:00
Fabien Potencier
ea43304687 feature #15805 [Finder] Deprecate adapters and related classes (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Finder] Deprecate adapters and related classes

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

Commits
-------

c08cf4b [Finder] Deprecate adapters and related classes
2015-09-22 13:58:08 +02:00
Fabien Potencier
926d9b7eaa minor #15807 Remove duplication of the handling of regex filters in the Finder (stof)
This PR was merged into the 2.8 branch.

Discussion
----------

Remove duplication of the handling of regex filters in the Finder

The logic to handle the multiple regexs in MultiplePcreFilterIterator children is the same each time (and will always be the same given it is related to the meaning of properties in MultiplePcreFilterIterator itself).
This extracts this logic in MultiplePcreFilterIterator itself rather than duplicating it in all child classes.

Commits
-------

e66bf64 Remove duplication of the handling of regex filters in the Finder
2015-09-22 13:48:07 +02:00
Fabien Potencier
b2f7753daf bug #15821 [EventDispatcher] fix memory leak in getListeners (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[EventDispatcher] fix memory leak in getListeners

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

Commits
-------

a7b7f54 [EventDispatcher] skip one lazy loading call
ec59953 [EventDispatcher] fix memory leak in a getListeners
2015-09-22 13:41:56 +02:00
Fabien Potencier
fbf7351c06 feature #15837 [VarDumper] Add EnumStub for dumping virtual collections with casters (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Add EnumStub for dumping virtual collections with casters

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

Currently, casters may use arrays to represent a collection of virtual values. They are curently dumped the same as regular arrays, and this leads to noisy output (like the `array:%n` prefix, or the quotes around "keys").

This PR adds a new EnumStub for these situations.
Here is an example when using PdoCaster:

Before :
![before](https://cloud.githubusercontent.com/assets/243674/9976105/366a37dc-5ed8-11e5-9ee8-00a4a6b68fa9.png)

After:
![after](https://cloud.githubusercontent.com/assets/243674/9976106/3a9b78a2-5ed8-11e5-8209-1d629d3b1736.png)

Commits
-------

aa50596 [VarDumper] Add EnumStub for dumping virtual collections with casters
2015-09-22 13:29:26 +02:00
Iltar van der Berg
351ebfca1a Updated CHANGELOG 2015-09-22 07:40:30 +02:00
maxime.steinhausser
0e24fc5820 [Yaml] Fix improper comments removal inside strings 2015-09-21 17:13:05 +02:00
Romain Neutron
d135d8282d [Config] Fix enum default value in Yaml dumper 2015-09-21 17:02:29 +02:00
Abdellatif Ait boudad
805acc9047 fixed typo. 2015-09-21 10:22:36 +00:00
Abdellatif Ait boudad
9b877cfa23 [Translation][File dumper] allow get file content without writing in file. 2015-09-21 10:16:40 +00:00
Kasperki
84fbfb0131 Finnish translation fix 2015-09-21 08:03:51 +02:00
Fabien Potencier
3da8af8890 minor #15852 [CssSelector] Optimize regexs matching simple selectors (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

[CssSelector] Optimize regexs matching simple selectors

| 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

These shortcut parsers are applied first when converting a CSS selector to XPath, to be faster for simple selectors (tag matching, class matching with an optional tag, id matching with an optional tag).
None of the regexes defined here could have more chances to match more element when backtracking identifiers. So the backtracking is only slowing down the regex engine when the regex does not match (i.e. for any more complex selector for instance, or even for simple selectors without namespace of without tag name). Making quantifiers possessive solves this issue.

I also turned some capturing groups (around the namespace and the namespace delimiter) into non-capturing groups as we don't care about them in the output (they are just here to be optional).

Commits
-------

d5abe0b [CssSelector] Optimize regexs matching simple selectors
2015-09-21 08:00:16 +02:00
Fabien Potencier
451bdc0bf0 minor #15848 [Console] Add clock mock to fix transient test on HHVM (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] Add clock mock to fix transient test on HHVM

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

This should fix the most frequent transient test on HHVM (ProgressBarTest::testAnsiColorsAndEmojis)

Commits
-------

549f43b [Console] Add clock mock to fix transient test on HHVM
2015-09-21 07:58:06 +02:00
Ryan Weaver
e353833baf fabbot 2015-09-20 20:45:52 -04:00
Ryan Weaver
dd485f4c13 Adding a new exception and throwing it when the User changes
This is quite technical. As you can see in the provider, the method is called
sometimes when the User changes, and so the token becomes de-authenticated (e.g.
someone else changes the password between requests).

In practice, the user should be unauthenticated. Using the anonymous token did this,
but throwing an AccountStatusException seems like a better idea. It needs to be an
AccountStatusException because the ExceptionListener from the Firewall looks for exceptions
of this class and logs the user out when they are found (because this is their purpose).
2015-09-20 20:44:39 -04:00
Christophe Coevoet
d5abe0b114 [CssSelector] Optimize regexs matching simple selectors 2015-09-21 02:13:44 +02:00
Ryan Weaver
302235e6e5 Fixing a bug where having an authentication failure would log you out.
This solution is a copy of what AbstractAuthenticationListener does. Scenario:

1) Login
2) Go back to the log in page
3) Put in a bad user/pass

You *should* still be logged in after a failed attempt. This commit gives that behavior.
2015-09-20 20:11:34 -04:00
Ryan Weaver
396a1622dc Tweaks thanks to Wouter 2015-09-20 19:51:09 -04:00
Christophe Coevoet
93ffa61e42 Fix the phpdoc in the CssSelector TranslatorInterface 2015-09-21 01:46:31 +02:00
Ryan Weaver
c9d9430913 Adding logging on this step and switching the order - not for any huge reason 2015-09-20 19:43:59 -04:00
Ryan Weaver
31f9caef00 Adding a base class to assist with form login authentication 2015-09-20 19:38:23 -04:00
Ryan Weaver
0501761504 Allowing for other authenticators to be checked
If you have 2 firewalls, 2 GuardAuthenticationProviders are still created, so we need
to be able to run through both of them.
2015-09-20 19:37:51 -04:00
Ryan Weaver
293c8a1775 meaningless author and license changes 2015-09-20 19:37:42 -04:00
Ryan Weaver
81432f9044 Adding missing factory registration 2015-09-20 19:24:22 -04:00
Ryan Weaver
7a94994e8e Thanks again fabbot! 2015-09-20 19:24:22 -04:00
Ryan Weaver
7de05be3f6 A few more changes thanks to @iltar 2015-09-20 19:24:21 -04:00
Ryan Weaver
ffdbc66534 Splitting the getting of the user and checking credentials into two steps
This looks like a subjective change (one more method, but the method implementations are
simpler), but it wasn't. The problem was that the UserChecker checkPreAuth should happen
*after* we get the user, but *before* the credentials are checked, and that wasn't possible
before this change. Now it is.
2015-09-20 19:24:21 -04:00
Ryan Weaver
6edb9e1b06 Tweaking docblock on interface thanks to @iltar 2015-09-20 19:24:21 -04:00
Ryan Weaver
d6937218be Adding periods at the end of exceptions, and changing one class name to LogicException thanks to @iltar 2015-09-20 19:24:21 -04:00
Ryan Weaver
eb158cbdb3 Updating interface method per suggestion - makes sense to me, Request is redundant 2015-09-20 19:24:21 -04:00
Ryan Weaver
c73c32e674 Thanks fabbot! 2015-09-20 19:24:21 -04:00
Ryan Weaver
6c180c78da Adding an edge case - this should not happen anyways 2015-09-20 19:24:21 -04:00
Ryan Weaver
180e2c7878 Properly handles "post auth" tokens that have become not authenticated
Here is the flow:

A) You login using guard and are given a PostAuthGuardToken
B) Your user changes between requests - AbstractToken::setUser() and hasUserChanged() - which
    results in the Token becoming "not authenticated"
C) Something calls out to the security system, which then passes the no-longer-authed
    token back into the AuthenticationProviderManager
D) Because the PostauthGuardToken implements GuardTokenInterface, the provider responds
    to it. But, seeing that this is a no-longer-authed PostAuthGuardToken, it returns
    an AnonymousToken, which triggers logout
2015-09-20 19:24:21 -04:00
Ryan Weaver
873ed284d2 Renaming the tokens to be clear they are "post" and "pre" auth - also adding an interface
The reason is that the GuardAuthenticationProvider *must* respond to *all* tokens
created by the system - both "pre auth" and "post auth" tokens. The reason is that
if a "post auth" token becomes not authenticated (e.g. because the user changes between
requests), then it may be passed to the provider system. If no providers respond (which
was the case before this commit), then AuthenticationProviderManager throws an exception.

The next commit will properly handle these "post auth" + "no-longer-authenticated" tokens,
which should cause a log out.
2015-09-20 19:24:20 -04:00
Ryan Weaver
a0bceb43c9 adding Guard tests 2015-09-20 19:24:20 -04:00
Ryan Weaver
05af97c7f7 Initial commit (but after some polished work) of the new Guard authentication system 2015-09-20 19:24:20 -04:00
Ryan Weaver
330aa7f729 Improving phpdoc on AuthenticationEntryPointInterface so people that implement this understand it 2015-09-20 19:24:20 -04:00
Nicolas Grekas
549f43b03a [Console] Add clock mock to fix transient test on HHVM 2015-09-20 23:33:09 +02:00
Christophe Coevoet
02818e4c92 [DomCrawler] Optimize the regex used to find namespace prefixes 2015-09-20 23:13:58 +02:00
Nicolas Grekas
aa50596345 [VarDumper] Add EnumStub for dumping virtual collections with casters 2015-09-20 23:07:38 +02:00
Nicolas Grekas
2359d4b774 Merge branch '2.8'
* 2.8:
  [Console] Fix whitespaces in fixture

Conflicts:
	src/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt
2015-09-19 22:43:38 +02:00
Nicolas Grekas
b1e0bd76c4 Merge branch '2.7' into 2.8
* 2.7:
  [Console] Fix whitespaces in fixture
2015-09-19 22:42:44 +02:00
Nicolas Grekas
f64cf23811 Merge branch '2.3' into 2.7
* 2.3:
  [Console] Fix whitespaces in fixture

Conflicts:
	src/Symfony/Component/Console/Tests/Fixtures/application_asxml1.txt
	src/Symfony/Component/Console/Tests/Fixtures/application_asxml2.txt
2015-09-19 22:42:33 +02:00
Nicolas Grekas
da29357d49 [Console] Fix whitespaces in fixture 2015-09-19 22:40:41 +02:00
Nicolas Grekas
19a9e7e449 Merge branch '2.8'
* 2.8:
  Remove whitespaces between <input> and <label>
  [Translation][File dumper] allow new child classes to implement only formatCatalogue.
  [travis] Remove PHP 7 from allowed failures
  [Translation] Clean whitespaces and EOL in xliff-core-2.0.xsd
  [Finder] Optimize the hot-path
  Update Process.php

Conflicts:
	.travis.yml
	composer.json
	src/Symfony/Bridge/Doctrine/composer.json
2015-09-19 22:03:10 +02:00
Nicolas Grekas
f5d6034311 Merge branch '2.7' into 2.8
* 2.7:
  Remove whitespaces between <input> and <label>
  [travis] Remove PHP 7 from allowed failures
  [Finder] Optimize the hot-path
  Update Process.php
2015-09-19 21:59:50 +02:00
Nicolas Grekas
1ba6cfee48 Merge branch '2.3' into 2.7
* 2.3:
  [travis] Remove PHP 7 from allowed failures
  [Finder] Optimize the hot-path
  Update Process.php

Conflicts:
	composer.json
	src/Symfony/Bridge/Doctrine/composer.json
	src/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php
2015-09-19 21:59:23 +02:00
Tobias Schultze
bcb2ff600d minor #15832 [Translation][File dumper] allow new child classes to implement only formatCatalogue (aitboudad)
This PR was merged into the 2.8 branch.

Discussion
----------

[Translation][File dumper] allow new child classes to implement only formatCatalogue

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

Commits
-------

5fd9f2f [Translation][File dumper] allow new child classes to implement only formatCatalogue.
2015-09-18 22:35:55 +02:00
Thomas Landauer
1b97c17c30 Remove whitespaces between <input> and <label>
Reason: With the whitespaces, there would be a "gap" between <input> and <label> which is clickable, but doesn't activate the <input>.

It's easy to *add* some margin with CSS, whereas it's impossible to *remove* whitespaces with CSS.
2015-09-18 20:31:45 +02:00
Abdellatif Ait boudad
5fd9f2f33f [Translation][File dumper] allow new child classes to implement only formatCatalogue. 2015-09-18 14:52:26 +00:00
Tobias Schultze
c4bb79a794 minor #15817 [Process] Stopped Autoruns when shelling on windows (rquadling)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Stopped Autoruns when shelling on windows

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

Stop autoruns when shelling on Windows.

Original PR was on https://github.com/symfony/Process/pull/9#issuecomment-140721398.

Commits
-------

bca6771 Update Process.php
2015-09-18 15:09:04 +02:00
Tobias Schultze
b783e40422 minor #15831 [travis] Remove PHP 7 from allowed failures (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] Remove PHP 7 from allowed failures

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

Looking at the latests PRs, PHP 7 does not segfault anymore with our test suite.

Commits
-------

ba8366e [travis] Remove PHP 7 from allowed failures
2015-09-18 15:05:57 +02:00
Nicolas Grekas
ba8366e208 [travis] Remove PHP 7 from allowed failures 2015-09-18 14:36:19 +02:00
Nicolas Grekas
ac3b17d896 Fix merge 2015-09-18 14:17:38 +02:00
Nicolas Grekas
630f3b30a3 [Translation] Clean whitespaces and EOL in xliff-core-2.0.xsd 2015-09-18 13:01:00 +02:00
Nicolas Grekas
8ad2c38a9f Merge branch '2.8'
* 2.8:
  [Finder] Fix recursive filter iterator
  [Translator][FileDumper] deprecated format method in favor of formatCatalogue.
  bug #15811 use of twig deprecated sameas test
  Improve the structure of the Finder testsuite
  Remove minimum width for web profiler content view
  [VarDumper] Fix HtmlDumper constructor calling CliDumper's
  [Finder] Handle filtering of recursive iterators and use it to skip looping over excluded directories
  Validate the extended type for lazy-loaded type extensions
  Exclude files based on path before applying the sorting
  fixed composer.json
  [Console] fix phpdoc of DialogHelper
  [Translation][Dumper] added XLIFF 2.0 support.
  [XLIFF 2.0] added support for target attributes.
  apply some fixes.
  update changelog.
  [Translation][Loader] added XLIFF 2.0 support.
  Allowed extensions to inline compiler passes

Conflicts:
	UPGRADE-2.8.md
	src/Symfony/Component/Console/Helper/DialogHelper.php
	src/Symfony/Component/Form/composer.json
2015-09-18 12:59:20 +02:00
Nicolas Grekas
f156de6b71 [Finder] Optimize the hot-path 2015-09-18 11:35:50 +02:00
Nicolas Grekas
c08cf4b7f6 [Finder] Deprecate adapters and related classes 2015-09-18 11:02:33 +02:00
Nicolas Grekas
4d275b42da Merge branch '2.7' into 2.8
* 2.7:
  [Finder] Fix recursive filter iterator
  Improve the structure of the Finder testsuite
  [VarDumper] Fix HtmlDumper constructor calling CliDumper's
  [Finder] Handle filtering of recursive iterators and use it to skip looping over excluded directories
  Exclude files based on path before applying the sorting
  fixed composer.json
  [Console] fix phpdoc of DialogHelper
  Allowed extensions to inline compiler passes
2015-09-18 09:20:16 +02:00
Nicolas Grekas
666f523984 Merge branch '2.3' into 2.7
* 2.3:
  [Finder] Fix recursive filter iterator
  Improve the structure of the Finder testsuite

Conflicts:
	src/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php
	src/Symfony/Component/Finder/Tests/FinderTest.php
	src/Symfony/Component/Finder/Tests/Iterator/DateRangeFilterIteratorTest.php
2015-09-18 09:19:55 +02:00
Alexander Schwenn
b5599a5897 [Form] Fix php warning on invalid FormFactory::createBuilder() argument 2015-09-17 23:09:48 +02:00
Nicolas Grekas
cf3019bc5a [Finder] Fix recursive filter iterator 2015-09-17 10:48:13 +02:00
Martin Hasoň
184d4f2df0 [WebProfilerBundle] Added collapsed sidebar on small screens 2015-09-17 10:17:00 +02:00
Tobias Schultze
a7b7f5479e [EventDispatcher] skip one lazy loading call 2015-09-17 03:42:05 +02:00
Tobias Schultze
ec59953f4c [EventDispatcher] fix memory leak in a getListeners 2015-09-17 03:14:14 +02:00
Abdellatif Ait boudad
366879ba83 [Translator][FileDumper] deprecated format method in favor of formatCatalogue. 2015-09-16 14:54:16 +00:00
Abdellatif Ait boudad
7b358a144a feature #15717 [Translator][Loader] added XLIFF 2.0 support. (xphere, aitboudad)
This PR was merged into the 2.8 branch.

Discussion
----------

[Translator][Loader] added XLIFF 2.0 support.

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

Commits
-------

0c24d55 [Translation][Dumper] added XLIFF 2.0 support.
7af4fc7 [XLIFF 2.0] added support for target attributes.
ace6042 apply some fixes.
ce540ae update changelog.
ff5d6a3 [Translation][Loader] added XLIFF 2.0 support.
2015-09-16 14:51:54 +00:00
Richard Quadling
bca67712d0 Update Process.php
Stop autoruns when shelling on Windows.

Original PR was on https://github.com/symfony/Process/pull/9#issuecomment-140721398.
2015-09-16 14:19:29 +01:00
Abdellatif Ait boudad
ac7591f505 [WebProfilerBundle] added btn-link. 2015-09-16 12:52:37 +00:00
Nicky De Maeyer
534c5db3a3 bug #15811 use of twig deprecated sameas test 2015-09-16 11:31:47 +02:00
Jakub Zalas
4982b02bdd [Console] Add the command name to input arguments if it's missing 2015-09-16 09:04:45 +01:00
Christophe Coevoet
20f2d03d2e Improve the structure of the Finder testsuite
Testing against different adapters is now handled by multiple subclasses
of a common test case rather than using data providers. This allows
tests to be marked as skipped for unsupported adapters instead of making
them disappear from the testsuite.
2015-09-16 09:54:32 +02:00
John Bafford
62dc0147bf Remove minimum width for web profiler content view 2015-09-15 16:21:23 -04:00
Christophe Coevoet
e66bf64da7 Remove duplication of the handling of regex filters in the Finder 2015-09-15 16:03:47 +02:00
Nicolas Grekas
4c7bb9cd14 [VarDumper] Fix HtmlDumper constructor calling CliDumper's 2015-09-15 14:30:50 +02:00
Fabien Potencier
c67e8b26b3 Merge branch '2.3' into 2.7
* 2.3:
  [Finder] Handle filtering of recursive iterators and use it to skip looping over excluded directories
  Exclude files based on path before applying the sorting
  [Console] fix phpdoc of DialogHelper
2015-09-15 13:37:25 +02:00
Nicolas Grekas
8c691bd01f [Finder] Handle filtering of recursive iterators and use it to skip looping over excluded directories 2015-09-15 13:35:06 +02:00
Christophe Coevoet
8826d39e0f Validate the extended type for lazy-loaded type extensions 2015-09-15 12:07:24 +02:00
Christophe Coevoet
e5bf0ab877 Exclude files based on path before applying the sorting
Sorting can be slow, so it is best to applied it after all filtering
rules are applied instead of using a bigger list and filtering again
after that.
2015-09-15 11:15:55 +02:00
Jakub Zalas
c1d028e73d [HttpKernel] removed Profiler::import/export 2015-09-15 09:57:39 +01:00
Jakub Zalas
1672a8344a [WebProfilerBundle] removed import/export commands 2015-09-15 09:57:25 +01:00
Fabien Potencier
1abfaba2a5 feature #13761 Automatically process extensions when they implement CompilerPassInterface (WouterJ)
This PR was merged into the 2.7 branch.

Discussion
----------

Automatically process extensions when they implement CompilerPassInterface

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | todo (if people are in favor of this PR)

Compiler passes are very powerfull, but also quite strange to work with. Especially when you just need a very simple compiler pass (like https://github.com/symfony-cmf/RoutingBundle/blob/master/DependencyInjection/Compiler/SetRouterPass.php). For 3 lines of code, you need to tweak your bundle class and create a new class.

When using the DI component standalone, compiler passes are even harder to work with, as DI extensions can't register them. I believe that's why libraries like Behat make their extensions compiler passes by default.

I think it would be very easy to just implement an interface and have a `compile` method for the simple compiler pass stuff. If a bundle needs multiple compiler passes or need compiler passes to be executed at other times in the compile process, a bundle can use the normal compiler passes. But if it's just one simple thing, like replacing a definition or getting services with a specific tag, I think this method will be very usefull.

Commits
-------

6c50013 Allowed extensions to inline compiler passes
2015-09-15 10:30:42 +02:00
Michael Lee
e24a798d8f [property-access] Improvement for Accessing Reference Chain
Improve performance for the following scenarios:

- Example 1:
```php
$a = array(
    'a' => array(
        'b' => array(
            'c' => 'old-value'
        )
    )
);
$pa->setValue($a, '[a][b][c]', 'new-value');
// The PropertyAccessor will try to set values for
// $a['a']['b']['c'], $a['a']['b'] and $a['a'],
// but in fact it may terminate the loop
// right after the value of $a[a][b][c] is set,
// because $a, $[a], $[a][b] and $[a][b][c]
// are all passed as reference - the reference chain is not broken.
```

- Example 2
```php
$b = array(
    'a' => array(
        'b' => array(
            'c' => 'old-value'
        )
    )
)

$a = new Foo($b);
// In this example, the reference chain of $b is broken,
// because it's passed to $a.value as value
// But its elements are all passed as reference,
// so after setting the value for $b[a][b][c], there is no need
// to set value for $b[a][b] and $b[a]

$pa->setValue($a, 'value[a][b][c]', 'new-value');
```

| 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
2015-09-15 15:17:44 +08:00
Fabien Potencier
47b17ebef4 minor #15791 [Console] fix phpdoc of DialogHelper (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] fix phpdoc of DialogHelper

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

Commits
-------

fd22d8f [Console] fix phpdoc of DialogHelper
2015-09-15 09:14:43 +02:00
Rob Bast
90c2a96936 Default to stderr for console helpers (only merge if #15794 gets merged) 2015-09-14 23:39:58 +02:00
Fabien Potencier
68353a6305 fixed composer.json 2015-09-14 17:18:35 +02:00
Tobias Schultze
fd22d8fa03 [Console] fix phpdoc of DialogHelper 2015-09-14 17:16:40 +02:00
Fabien Potencier
538a71d76f Merge branch '2.8'
* 2.8: (31 commits)
  [DomCrawler] Invalid uri created from forms if base tag present
  [VarDumper] Add caster for OuterIterator objects
  [Console] update param type phpdoc for StreamOutput
  [Console] fix typo in OutputInterface
  Use stderr by default when a specific output is not injected
  fixed bad merge
  [Debug] Fix case mismatch detection
  [HttpKernel] Add entry point to more easily create/configure the DI extension
  [DX] Added a logout link in the security panel of the web debug toolbar
  [HttpKernel] fix broken multiline <esi:remove>
  [DoctrineBridge] Fixed #14840
  [FrameworkBundle] add a suggest for the serializer component
  fixed CS
  removed non-working tests
  [WIP] #15502 Make template shortcuts be usable without Templating component
  Redesigned the Symfony Profiler
  [Yaml] Fix the parsing of float keys
  Make the exception output visible even in quiet mode, fixes #15680
  Convert Output::write's type to an options arg where verbosity can be passed in as well
  [Console] Ensure the console output is only detected as decorated when both stderr and stdout support colors
  ...
2015-09-14 16:15:24 +02:00
Fabien Potencier
6393ec3169 Merge branch '2.7' into 2.8
* 2.7:
  [DomCrawler] Invalid uri created from forms if base tag present
  [Console] update param type phpdoc for StreamOutput
  [Console] fix typo in OutputInterface
  Use stderr by default when a specific output is not injected
  [Debug] Fix case mismatch detection
  [HttpKernel] fix broken multiline <esi:remove>
  [DoctrineBridge] Fixed #14840
  [FrameworkBundle] add a suggest for the serializer component
  [Yaml] Fix the parsing of float keys
  [Console] Ensure the console output is only detected as decorated when both stderr and stdout support colors
  [HttpKernel] fix DumpDataCollector compat with Twig 2.0
  Improve exception messages.
  Fix that two DirectoryResources with different patterns would be deduplicated
  Tests fix clockmock
  [WebProfilerBundle] Added tabindex="-1" to not interfer with normal UX
  missing "YAML" in the exception message.
  [Translator][warmup][fallback locales] fixed missing cache file generation.
  [framework-bundle] Add Test for TranslationUpdateCommand
  Use ObjectManager interface instead of EntityManager
2015-09-14 16:15:17 +02:00
Fabien Potencier
cafd4af7cd Merge branch '2.3' into 2.7
* 2.3:
  [DomCrawler] Invalid uri created from forms if base tag present
  [Console] update param type phpdoc for StreamOutput
  [Console] fix typo in OutputInterface
  [HttpKernel] fix broken multiline <esi:remove>
  [DoctrineBridge] Fixed #14840
  [FrameworkBundle] add a suggest for the serializer component
  [Yaml] Fix the parsing of float keys
  [Console] Ensure the console output is only detected as decorated when both stderr and stdout support colors
  Improve exception messages.
  Fix that two DirectoryResources with different patterns would be deduplicated
  Tests fix clockmock
  [WebProfilerBundle] Added tabindex="-1" to not interfer with normal UX
  missing "YAML" in the exception message.
  [framework-bundle] Add Test for TranslationUpdateCommand
  Use ObjectManager interface instead of EntityManager
2015-09-14 16:14:09 +02:00
Fabien Potencier
6d3f124854 bug #13794 [DomCrawler] Invalid uri created from forms if base tag present (danez)
This PR was squashed before being merged into the 2.3 branch (closes #13794).

Discussion
----------

[DomCrawler] Invalid uri created from forms if base tag present

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

Since #13145 was merged the provided testcase does not work anymore and creates an invalid link

This affects the latest versions of 2.3, 2.5, 2.6 and 2.7

Right now this PR only includes the failing test, as I could no easy find a fix. If someone immediately knows whats the problem, give me a hint please.

Commits
-------

dc57a7a [DomCrawler] Invalid uri created from forms if base tag present
2015-09-14 16:00:14 +02:00
Daniel Tschinder
dc57a7a5a7 [DomCrawler] Invalid uri created from forms if base tag present 2015-09-14 16:00:12 +02:00
Fabien Potencier
eff9a26c76 bug #15728 Use stderr by default when a specific output is not injected (Seldaek)
This PR was merged into the 2.7 branch.

Discussion
----------

Use stderr by default when a specific output is not injected

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

stderr is really the best place to put logs by default, so unless someone explicitly passes something else we should use it, and especially not depend on the log level to decide where to output.

Commits
-------

c28796e Use stderr by default when a specific output is not injected
2015-09-14 15:18:21 +02:00
Fabien Potencier
3cf95ee08a minor #15789 [Console] update param type phpdoc for StreamOutput (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] update param type phpdoc for StreamOutput

Makes it consistent with `getStream()`

| 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

Commits
-------

c036352 [Console] update param type phpdoc for StreamOutput
2015-09-14 15:17:39 +02:00
Fabien Potencier
d87db39aa1 bug #15637 Use ObjectManager interface instead of EntityManager (gnat42)
This PR was merged into the 2.3 branch.

Discussion
----------

Use ObjectManager interface instead of EntityManager

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

If you use the EntityManager Decorator pattern that doctrine provides
then simply specifying a query_builder closure where your decorated
em is used fails as it isn't an instance of Doctrine\ORM\EntityManager.
Testing against the ObjectManager interface fixes the issue.

Commits
-------

1f3ea0f Use ObjectManager interface instead of EntityManager
2015-09-14 15:16:06 +02:00
Nicolas Grekas
f64b72ddf0 [VarDumper] Add caster for OuterIterator objects 2015-09-14 14:30:18 +02:00
Tobias Schultze
c0363524a9 [Console] update param type phpdoc for StreamOutput 2015-09-14 14:22:54 +02:00
Tobias Schultze
50afff1647 [Console] fix typo in OutputInterface 2015-09-14 14:10:47 +02:00
Jordi Boggiano
c28796ed74 Use stderr by default when a specific output is not injected 2015-09-14 11:58:30 +01:00
Fabien Potencier
7d343e6430 fixed bad merge 2015-09-14 12:33:37 +02:00
François-Xavier de Guillebon
d2b3fe4c72 Fixed properties not explicitily declared 2015-09-14 11:40:15 +02:00
Fabien Potencier
2f31cbfc5f bug #15783 [Debug] Fix case mismatch detection (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Fix case mismatch detection

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

Commits
-------

18e9f45 [Debug] Fix case mismatch detection
2015-09-14 11:35:35 +02:00
Jakub Zalas
f12a4c1aee [Console] Fix input validation when required arguments are missing
Previous rule was only working when arguments are passed from command line, as in command line there is no way of skipping an argument. The rule does not work for arguments set on the Input after a command is run.
2015-09-14 10:33:21 +01:00
Nicolas Grekas
18e9f45e8d [Debug] Fix case mismatch detection 2015-09-14 10:41:38 +02:00
Eric GELOEN
9bae1ae10c [HttpKernel] Add entry point to more easily create/configure the DI extension 2015-09-14 10:28:58 +02:00
Fabien Potencier
74e408600e feature #14378 [DX] Added a logout link in the security panel of the web debug toolbar (javiereguiluz)
This PR was squashed before being merged into the 2.8 branch (closes #14378).

Discussion
----------

[DX] Added a logout link in the security panel of the web debug toolbar

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

While developing applications, it's common to login/logout users continuously to test security features. I usually type `/logout` in the URL, but this is boring and, depending on the application, not always works.

This PR adds a small *Logout* link in the security panel when you are logged in the application:

![logged](https://cloud.githubusercontent.com/assets/73419/7184976/6c66831a-e460-11e4-86a9-eb5a48c9aa4c.png)

Anonymous users won't see anything:

![anonymous](https://cloud.githubusercontent.com/assets/73419/7184982/74a95b60-e460-11e4-8b35-72d8336355fb.png)

Commits
-------

192523a [DX] Added a logout link in the security panel of the web debug toolbar
2015-09-14 09:18:59 +02:00
Javier Eguiluz
192523aeab [DX] Added a logout link in the security panel of the web debug toolbar 2015-09-14 09:18:57 +02:00
Fabien Potencier
b185056776 bug #14802 [HttpKernel] fix broken multiline <esi:remove> (sstok)
This PR was squashed before being merged into the 2.3 branch (closes #14802).

Discussion
----------

[HttpKernel] fix broken multiline <esi:remove>

|Q            |A  |
|---          |---|
|Bug Fix?     |yes|
|New Feature? |n  |
|BC Breaks?   |n  |
|Deprecations?|n  |
|Tests Pass?  |yes|
|Fixed Tickets|   |
|License      |MIT|
|Doc PR       |   |

Originally found in https://github.com/symfony/symfony/pull/14800#discussion-diff-31388942

`<esi:remove>` blocks with multiline contents were not removed.
`<esi:comment>` blocks with multiline contents were not removed.

Note. According to http://www.w3.org/TR/esi-lang
`comment is an empty element, and must not have an end tag.` so the support for multi line comments are not actually supported in the standard.

Commits
-------

06f97bf [HttpKernel] fix broken multiline <esi:remove>
2015-09-14 09:14:59 +02:00
Sebastiaan Stok
06f97bfbd1 [HttpKernel] fix broken multiline <esi:remove> 2015-09-14 09:14:56 +02:00
Fabien Potencier
dcc6581206 bug #14841 [DoctrineBridge] Fixed #14840 (saksmt)
This PR was squashed before being merged into the 2.3 branch (closes #14841).

Discussion
----------

[DoctrineBridge] Fixed #14840

[DoctrineBridge] Fixed compatibility with entities packed in Phar

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

Commits
-------

92ad5df [DoctrineBridge] Fixed #14840
2015-09-14 09:11:55 +02:00
Kirill Saksin
92ad5df567 [DoctrineBridge] Fixed #14840 2015-09-14 09:11:51 +02:00
Lukas Kahwe Smith
c7acde8024 [FrameworkBundle] add a suggest for the serializer component 2015-09-14 08:48:11 +02:00
Fabien Potencier
f20e4e5ed8 fixed CS 2015-09-14 08:46:24 +02:00
Fabien Potencier
7b776e7ac5 removed non-working tests 2015-09-14 08:45:34 +02:00
Fabien Potencier
46eaafcd63 feature #15620 [WIP] #15502 Make template shortcuts be usable without Templating component (Koc)
This PR was squashed before being merged into the 2.8 branch (closes #15620).

Discussion
----------

[WIP] #15502 Make template shortcuts be usable without Templating component

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

Commits
-------

d547ec0 [WIP] #15502 Make template shortcuts be usable without Templating component
2015-09-14 08:44:24 +02:00
Konstantin.Myakshin
d547ec0084 [WIP] #15502 Make template shortcuts be usable without Templating component 2015-09-14 08:44:21 +02:00
Fabien Potencier
72111334b2 minor #15673 [framework-bundle] Add Test for TranslationUpdateCommand (zerustech)
This PR was merged into the 2.3 branch.

Discussion
----------

[framework-bundle] Add Test for TranslationUpdateCommand

Added the test script as per the discussion in PR #15562

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

232f6fd [framework-bundle] Add Test for TranslationUpdateCommand
2015-09-14 08:41:36 +02:00
Fabien Potencier
a2eebe8128 feature #15523 Redesigned the Symfony Profiler (javiereguiluz)
This PR was squashed before being merged into the 2.8 branch (closes #15523).

Discussion
----------

Redesigned the Symfony Profiler

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

### Context

Recently, we redesigned the web debug toolbar ([read announcement](http://symfony.com/blog/new-in-symfony-2-8-redesigned-web-debug-toolbar)). We maintained "the spirit" of the original toolbar, but its visual appearance was completely changed.

Now it's the turn of the Symfony Profiler. We want to update it to match the new toolbar design and to give it a more modern look and feel.

### The redesign

Most of the redesign is focused on updating just the visual appearance, but we've seized this opportunity to make some minor functional changes as well. Testing this pull request in your own applications may be difficult, so we'll provide below a complete walkthrough of the redesign. (Click on the images to see them in full resolution)

### Overview

This is the new general structure of the profiler pages:

![profiler-structure](https://cloud.githubusercontent.com/assets/73419/9226162/c1bf71f0-410d-11e5-8a7b-5c690b7c8c8a.png)

### Request panel

* Renamed `Request` panel to `Request / Response`
* Divided contents into tabs: Request, Response, Session, etc. (this prevents ultra long pages)

![profiler-request](https://cloud.githubusercontent.com/assets/73419/9226172/cb7f7938-410d-11e5-8ffd-cea8264446dd.png)

### Timeline panel

* Renamed `Timeline` panel to `Performance`
* Highlighted the most important metrics
* Added "Peak Memory Usage" to those metrics
* The timeline graph is now easier to read (font size is slightly larger, updated the color palette, made the canvas wider, etc.)
* If there is only one request, the page doesn't distract you with the "Master Request" heading. If there are several sub-requests, headings are now bigger and graphs are more separated.

![profiler-performance](https://cloud.githubusercontent.com/assets/73419/9226178/d1335782-410d-11e5-9f9a-5ace45b0dfa0.png)

### Twig panel

* Just a minor update to highlight the important metrics. The rest of the contents remain the same.

![profiler-twig](https://cloud.githubusercontent.com/assets/73419/9226180/d5bd6ff4-410d-11e5-86c8-beba426516c1.png)

### Exception panel

* Just minor design tweaks.

![profiler-exception](https://cloud.githubusercontent.com/assets/73419/9226182/da0dfd9e-410d-11e5-965c-e980f7144541.png)

### Events panel

When the `framework.ide` config option is set:

* The listeners are now displayed as more evident clickable links.
* Bellow the listener we show its full class namespace (if you don't need this information, it doesn't distract you much; if you need it, you don't have to wait for the `<abbr>` tooltip to show it)

![profiler-events-links-enabled](https://cloud.githubusercontent.com/assets/73419/9226188/e403ae48-410d-11e5-8c86-5d28fed940e7.png)

When the `framework.ide` config option is NOT set:

* In this case the developer cannot click on the listener name to go to that file and line. Therefore, we think it's important to display that information (full class namespace + full file path + line number). At first it may seem that it contains too much information ... but this panel should be more "useful" than "beautiful".

![profiler-events-links-disabled](https://cloud.githubusercontent.com/assets/73419/9226198/eb9f3bae-410d-11e5-8bbe-95c148809387.png)

### Logs panel

* Logs are now grouped in: "Info. & Errors" (this is the panel that you need most of the times); "Deprecations" (separated from the normal logs because they are specific to the process of updating your Symfony version); and "Debug" (which are all those messages that you almost never need)
* We now show the channel for the log messages (for built-in Symfony channels it may be redundant, but your application can define custom channels)

![profiler-logger](https://cloud.githubusercontent.com/assets/73419/9226203/f345163a-410d-11e5-85e6-cf9fceb885fc.png)

### Routing panel

* Just a minor redesign and highlighted some information.

![profiler-routing](https://cloud.githubusercontent.com/assets/73419/9226213/00e99130-410e-11e5-90c0-dda9394dabd7.png)

### Forms panel

* Not redesigned yet.

### Translation panel

* Highlighted the important metrics.
* Replaced the old selector by the new tabbed navigation.

![profiler-translation](https://cloud.githubusercontent.com/assets/73419/9226215/06036c40-410e-11e5-90c9-fe3b43dd6156.png)

### Security panel

* Just a minor redesign and highlighted some information.

![profiler-security](https://cloud.githubusercontent.com/assets/73419/9226217/0a92fbcc-410e-11e5-9438-e9e230a7865b.png)

### E-mails panel

* Not redesigned yet.

### Doctrine panel

* Queries are no longer displayed "shrinked". We display the full query without parameters by default.
* The three old actions ("expand", "runnable" and "explain") have been reduced to two actions ("runnable" and "explain")

![profiler-doctrine](https://cloud.githubusercontent.com/assets/73419/9226225/13e0b5d4-410e-11e5-96ce-1eb67f99df49.png)

Here you can see what happens when you click on the "Show runnable query" and "Explain query" links:

![profiler-doctrine-detail](https://cloud.githubusercontent.com/assets/73419/9226247/33b47918-410e-11e5-9657-e1351787657a.png)

### Debug panel

* Not redesigned yet.

### Config panel

* This was probably the "ugliest" panel in the old profiler, because of the two first tables.
* We now display the information of those tables highlighted in a different way.

![profiler-config](https://cloud.githubusercontent.com/assets/73419/9226257/3d728850-410e-11e5-86d8-da807f6a1217.png)

### Search results

Results with response status different from 2xx now are highlighted:

![profiler-search-results](https://cloud.githubusercontent.com/assets/73419/9226279/44bacd8e-410e-11e5-8daf-e77d2be7e3c6.png)

### Other design elements

The page title now changes for each section:

**Before**

![page-title-before](https://cloud.githubusercontent.com/assets/73419/9226312/6301b9c4-410e-11e5-8ef7-001be222ac53.png)

**After**

![page-title-after](https://cloud.githubusercontent.com/assets/73419/9226316/693bce42-410e-11e5-897a-c5e4413bc638.png)

Empty elements now display a dashed border. This allows to make design more consistent between different section. Besides, once you are used to the new design, your brain will immediately associate that design to an empty element, so you'll no longer need to read the inner text content.

![profiler-empty-element](https://cloud.githubusercontent.com/assets/73419/9226400/c9ffe06a-410e-11e5-9859-f095e444d9af.png)

Besides, when the entire panel doesn't have any content, its menu label looks disabled:

![sidebar-menu](https://cloud.githubusercontent.com/assets/73419/9226405/cf4ee5e8-410e-11e5-9501-523cd6b3413e.png)

Long pages have been break down using a tabs-based navigation:

![tabbed-navigation](https://cloud.githubusercontent.com/assets/73419/9226409/d918dba6-410e-11e5-9cd4-516a082950de.gif)

Below the page header we display a "summary section" which displays the profiled URL and some useful profiling information. The big URL is the natural way to "go back to application" from the profiler:

![summary-back-to-application](https://cloud.githubusercontent.com/assets/73419/9226414/df1abb00-410e-11e5-88ff-59dbd35b584f.gif)

Besides, the summary background color changes according to the response HTTP status code:

![profiler-summary](https://cloud.githubusercontent.com/assets/73419/9226423/e5b03850-410e-11e5-9163-2f2153c5d1de.png)

Above the main menu we now display two shortcuts to common operations: "display the 10 most recent profiles" and "search profiles":

![sidebar-shortcuts](https://cloud.githubusercontent.com/assets/73419/9226427/eaea4586-410e-11e5-8ff4-f6141723996a.png)

The search form in the sidebar has been collapsed and it's revealed when clicking on the "Search" shortcut button:

![search-form-reveal](https://cloud.githubusercontent.com/assets/73419/9226435/ef907fec-410e-11e5-9627-37cb2a241f86.gif)

-----

And that's all! Please tell us what you think about this redesign. **Don't hesitate to criticize anything you don't like or think it's wrong or it's worse than in the previous profiler.** Let's work together to make the new profiler a reality! Thanks!

Commits
-------

05773c2 Redesigned the Symfony Profiler
2015-09-14 08:10:06 +02:00
Javier Eguiluz
05773c263b Redesigned the Symfony Profiler 2015-09-14 08:10:04 +02:00
Jose Gonzalez
520bd26642 [Yaml] Fix the parsing of float keys 2015-09-13 18:26:34 +01:00
Jordi Boggiano
e9ee8f559d Make the exception output visible even in quiet mode, fixes #15680 2015-09-12 23:39:36 +01:00
Jordi Boggiano
749fba54f9 Convert Output::write's type to an options arg where verbosity can be passed in as well 2015-09-12 23:35:49 +01:00
Jordi Boggiano
f3d844434b [Console] Ensure the console output is only detected as decorated when both stderr and stdout support colors 2015-09-12 19:38:39 +01:00
Tomas Votruba
cf18a997fb [Validator] mark test as legacy 2015-09-12 10:46:41 +02:00
Fabien Potencier
238531fea1 bug #15750 Add tests to the recently added exceptions thrown from YamlFileLoaders (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

Add tests to the recently added exceptions thrown from YamlFileLoaders

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

* use the `Symfony\Component\DependencyInjection\Exception\InvalidArgumentException` in the DI component
* add tests

Commits
-------

93e418f Improve exception messages.
2015-09-11 17:27:18 +02:00
Nicolas Grekas
92e50a3b14 [HttpKernel] fix DumpDataCollector compat with Twig 2.0 2015-09-11 14:32:48 +02:00
Gennady Telegin
bfdc35439b [Translation] added option flags to JsonFileDumper.
It's passed to json_encode function second argument.
2015-09-11 09:07:49 +00:00
Jakub Zalas
93e418f48e Improve exception messages. 2015-09-11 08:57:18 +01:00
Fabien Potencier
95a1e9002d feature #15759 [3.0][Translator] remove deprecated DiffOperation class. (aitboudad)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[3.0][Translator] remove deprecated DiffOperation class.

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

Commits
-------

273b048 [Translator] remove deprecated DiffOperation class.
2015-09-11 09:56:09 +02:00
Nicolas Grekas
f8fa136652 Hot fix 2015-09-10 20:17:51 +02:00
Nicolas Grekas
79d2e8e95f Merge branch '2.8'
* 2.8:
  [HttpKernel] Fix RequestStack argument position and deprecated behavior

Conflicts:
	src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php
2015-09-10 19:25:44 +02:00
Abdellatif Ait boudad
273b04895e [Translator] remove deprecated DiffOperation class. 2015-09-10 15:32:20 +00:00
Matthias Pigulla
2b36ac5a61 Fix that two DirectoryResources with different patterns would be deduplicated
ResourceInterface::__toString is mainly important because in various places, array_uniqe() is called to perform a de-duplication of resources and will use the string representation for objects.

Thus, we need to take care that if DirectoryResources apply different patterns they must be kept after array_unique calls.
2015-09-10 14:18:59 +02:00