Commit Graph

22672 Commits

Author SHA1 Message Date
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
Fabien Potencier
a56f9076ca feature #15869 [Translation][file dump] remove deprecated format method. (aitboudad)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[Translation][file dump] remove deprecated format method.

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

Commits
-------

6ee96fb [Translation][file dump] remove deprecated format method.
2015-09-22 20:09:33 +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
Fabien Potencier
830a7ac833 minor #15796 Added the right revision date for status code registry (dupuchba)
This PR was submitted for the 2.3 branch but it was merged into the 2.8 branch instead (closes #15796).

Discussion
----------

Added the right revision date for status code registry

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

It's just a doc-fix.
Last updated status codes were not the right ones, not very useful though but you can merge it :-).

http://www.iana.org/assignments/http-status-codes/

Commits
-------

07d08c4 Added the right revision date for status code registry
2015-09-22 14:02:31 +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
Fabien Potencier
5ae3499452 minor #15855 [3.0] Finish of the SecurityContext (follow-up pr) (iltar)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[3.0] Finish of the SecurityContext (follow-up pr)

| Q             | A
| ------------- | ---
| Fixed tickets | #12445
| License       | MIT
| Doc PR        | ~

Because the original PR was getting too big for pretty much nothing (everything was already done in smaller commits over time), I have opened just this PR to confirm the changes by adding it to the CHANGELOG.md files.

Commits
-------

351ebfc Updated CHANGELOG
2015-09-22 13:27:39 +02:00
Iltar van der Berg
351ebfca1a Updated CHANGELOG 2015-09-22 07:40:30 +02:00
Fabien Potencier
d9d5dbf5d9 bug #15859 [Config] Fix enum default value in Yaml dumper (romainneutron)
This PR was merged into the 2.7 branch.

Discussion
----------

[Config] Fix enum default value in Yaml dumper

| 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 default value is not correctly included when dumping an EnumNode in Yaml. This is now fixed

Commits
-------

d135d82 [Config] Fix enum default value in Yaml dumper
2015-09-21 18:36:22 +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
Fabien Potencier
bd415c6985 minor #15843 Finnish translation fix (Kasperki)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15843).

Discussion
----------

Finnish translation fix

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

Fix for finnish translation typo
https://github.com/symfony/symfony/issues/15790

Commits
-------

84fbfb0 Finnish translation fix
2015-09-21 08:03:52 +02: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
Fabien Potencier
e47d3f1e7b minor #15851 Fix the phpdoc in the CssSelector TranslatorInterface (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Fix the phpdoc in the CssSelector TranslatorInterface

| 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 phpdoc of the interface does not match the behavior of the implementation. And the return type documented by the interface is impossible to return because the interface asks to apply a string prefix, and the only way is to cast the ``XPathExpr`` used internally to a string (which is what the implementation does).

This interface is an internal interface anyway.

Commits
-------

93ffa61 Fix the phpdoc in the CssSelector TranslatorInterface
2015-09-21 07:55:21 +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