Commit Graph

22672 Commits

Author SHA1 Message Date
WouterJ
4cdae9816e Removed Resource#isFresh() related functionality 2015-09-26 17:53:58 +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
Fabien Potencier
825490a8c8 Merge branch '2.7' into 2.8
* 2.7:
  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
2015-09-26 09:14:46 +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
Fabien Potencier
564f06b665 feature #12587 [TwigBridge] Foundation form layout integration (totophe)
This PR was submitted for the 2.7 branch but it was merged into the 2.8 branch instead (closes #12587).

Discussion
----------

[TwigBridge] Foundation form layout integration

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

As symfony integrate in its roots Bootstrap layout, why not also include Foundation layout? I think it's not a matters of including all the css frameworks in symfony but at least having two instead of one would be interesting to have a basic choice.

@hhamon told me I should create this PR :-D :-p ;-)

Commits
-------

7653d95 [TwigBridge] Foundation form layout integration
2015-09-25 14:01:54 +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
8d894a4bcc updated CHANGELOG for 2.7.5 2015-09-25 13:14:54 +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
264f694011 Merge branch '2.3' into 2.7
* 2.3:
  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
2015-09-25 13:01:10 +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
Nicolas Grekas
4d7f95cdbc minor #15888 [Console] Fix transient HHVM test (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix transient HHVM test

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

Follow up of #15848

Commits
-------

945ec0e [Console] Fix transient HHVM test
2015-09-25 11:19:55 +02:00
Fabien Potencier
3b8a8ee48e updated VERSION for 2.3.33 2015-09-25 11:08:49 +02:00
Fabien Potencier
f75b643035 update CONTRIBUTORS for 2.3.33 2015-09-25 11:08:23 +02:00
Fabien Potencier
3f2ad986b3 updated CHANGELOG for 2.3.33 2015-09-25 11:07:38 +02:00
Nicolas Grekas
945ec0e40c [Console] Fix transient HHVM test 2015-09-25 10:32:23 +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
Fabien Potencier
8eda312fc4 bug #15878 [OptionsResolver] Fix catched exception along the dependency tree mistakenly detects cyclic dependencies (lemoinem)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #15878).

Discussion
----------

[OptionsResolver] Fix catched exception along the dependency tree mistakenly detects cyclic dependencies

| 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

If an Option's normalizer (or lazy default) catches an exception thrown from one of its dependencies, the OptionResolver was left in an inconsistent state which would trigger a false positive cyclic dependency if the throwing option or any of its parent dependencies between it and the catching one are ever called again.

Commits
-------

9a188c5 [OptionsResolver] Fix catched exception along the dependency tree mistakenly detects cyclic dependencies
2015-09-25 08:59:17 +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
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