Commit Graph

29441 Commits

Author SHA1 Message Date
Christian Flothmann
49cb4dbd8c [DI] deprecate the strict attribute 2017-01-30 15:44:22 +01:00
SpacePossum
f9f862f6af Update DebugHandlersListener.php 2017-01-30 15:13:32 +01:00
Christian Flothmann
f19788dd2e ignore invalid cookies expires date format 2017-01-30 15:00:07 +01:00
Nicolas Grekas
4aebd3a086 minor #21456 [Console] SfStyleTest: Remove COLUMNS env on tearDown (ogizanagi)
This PR was merged into the 3.2 branch.

Discussion
----------

[Console] SfStyleTest: Remove COLUMNS env on tearDown

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/21424#discussion_r98360703
| License       | MIT
| Doc PR        | N/A

Commits
-------

b715a36 [Console] SfStyleTest: Remove COLUMN env on tearDown
2017-01-30 14:21:10 +01:00
Nicolas Grekas
84a664f929 [HttpFoundation] Mark more methods as @final 2017-01-30 10:14:56 +01:00
Fabien Potencier
10c9d19f6d minor #21453 [DI][DX] Do not map id to class for global classes (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI][DX] Do not map id to class for global classes

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

Using a global classname as service id without specifying the definition class attribute won't work anymore after this, in the benefit of properly throwing an exception at compilation time for a misconfigured service. Service ids could previously be wrongly interpreted as a class name.

So:
```yml
services:
    app_bar:
        arguments: ['foo']
```

will now properly result into:
> Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\RuntimeException: The definition for "app_bar" has no class.

at compilation time.

Commits
-------

bb870304f0 [DI][DX] Do not map id to class for global classes
2017-01-29 14:49:01 -08:00
Maxime Steinhausser
bb870304f0 [DI][DX] Do not map id to class for global classes 2017-01-29 23:41:20 +01:00
Nicolas Grekas
f7ba71db7c bug #21438 [Console] Fix TableCell issues with decoration (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix TableCell issues with decoration

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (failure unrelated)
| Fixed tickets | #21434
| License       | MIT
| Doc PR        | N/A

Commits
-------

50373f3 [Console] Fix TableCell issues with decoration
2017-01-29 20:56:41 +01:00
Maxime Steinhausser
b715a36932 [Console] SfStyleTest: Remove COLUMN env on tearDown 2017-01-29 20:47:08 +01:00
Maxime Steinhausser
efd00bac20 [FrameworkBundle] Revert AbstractDescriptorTest output trimming 2017-01-29 20:35:38 +01:00
Nicolas Grekas
6791124f93 minor #21454 [Cache] Fix trigger_error (jderusse)
This PR was squashed before being merged into the 3.3-dev branch (closes #21454).

Discussion
----------

[Cache] Fix trigger_error

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

Commits
-------

ca38551 [Cache] Fix trigger_error
2017-01-29 20:06:27 +01:00
Jérémy Derussé
ca385510f0 [Cache] Fix trigger_error 2017-01-29 20:06:24 +01:00
Nicolas Grekas
fb200a0d2f [DI] Enhance logging in compiler passes 2017-01-29 19:31:47 +01:00
Fabien Potencier
bcf8b68be9 feature #21402 [Security] make LdapBindAuthenticationProvider capable of searching for the DN (lsmith77, nietonfir)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Security] make LdapBindAuthenticationProvider capable of searching for the DN

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #16823, #20905
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/7420

I guess due to the separation between the user and auth provider something like the following isn't ok  (note: the following works just fine for me but if course in the end the username is the DN and not the user provided shorter username):

```diff
diff --git a/src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php b/src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php
index 5ebb09a..18d7825 100644
--- a/src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php
+++ b/src/Symfony/Component/Security/Core/Authentication/Provider/LdapBindAuthenticationProvider.php
@@ -70,7 +70,7 @@ class LdapBindAuthenticationProvider extends UserAuthenticationProvider
      */
     protected function checkAuthentication(UserInterface $user, UsernamePasswordToken $token)
     {
-        $username = $token->getUsername();
+        $username = $user->getUsername();
         $password = $token->getCredentials();

         if ('' === $password) {
@@ -78,10 +78,7 @@ class LdapBindAuthenticationProvider extends UserAuthenticationProvider
         }

         try {
-            $username = $this->ldap->escape($username, '', LdapInterface::ESCAPE_DN);
-            $dn = str_replace('{username}', $username, $this->dnString);
-
-            $this->ldap->bind($dn, $password);
+            $this->ldap->bind($username, $password);
         } catch (ConnectionException $e) {
             throw new BadCredentialsException('The presented password is invalid.');
         }
diff --git a/src/Symfony/Component/Security/Core/User/LdapUserProvider.php b/src/Symfony/Component/Security/Core/User/LdapUserProvider.php
index fc42419..8194c4c 100644
--- a/src/Symfony/Component/Security/Core/User/LdapUserProvider.php
+++ b/src/Symfony/Component/Security/Core/User/LdapUserProvider.php
@@ -115,7 +115,7 @@ class LdapUserProvider implements UserProviderInterface
     {
         $password = $this->getPassword($entry);

-        return new User($username, $password, $this->defaultRoles);
+        return new User($entry->getDn(), $password, $this->defaultRoles);
     }

     /**
```

Therefore I created an entire new auth provider.

Commits
-------

8ddd5333a3 Merge pull request #1 from nietonfir/http_basic_ldap
a783e5c9c5 Update HttpBasicLdapFactory
a30191f30a make LdapBindAuthenticationProvider capable of searching for the DN
2017-01-28 14:14:50 -08:00
Fabien Potencier
536e073601 minor #21445 [TwigBundle] Fix the name of the cache warming test class (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] Fix the name of the cache warming test class

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

Rename the test class according to PSR-4.

Commits
-------

2bc4d3b2c1 [TwigBundle] Fix the name of the cache warming test class
2017-01-28 14:11:14 -08:00
Kévin Dunglas
f025392867
Merge branch '3.2'
* 3.2:
  [FrameworkBundle] Remove useless checks in descriptors
  fixed typo
2017-01-28 18:13:06 +01:00
Kévin Dunglas
39c81c2dce
Merge branch '2.8' into 3.2
* 2.8:
  [FrameworkBundle] Remove useless checks in descriptors
  fixed typo
2017-01-28 18:06:51 +01:00
Kévin Dunglas
5bc83c4142
minor #21341 [FrameworkBundle] Remove useless checks in descriptors (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] Remove useless checks in descriptors

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

As pointed out by @ogizanagi in https://github.com/symfony/symfony/pull/21315#discussion_r96476201, some code in FrameworkBundle's descriptors is useless because the bundle works only with DI 2.8.

Commits
-------

c759345781 [FrameworkBundle] Remove useless checks in descriptors
2017-01-28 17:36:39 +01:00
Kévin Dunglas
2bc4d3b2c1
[TwigBundle] Fix the name of the cache warming test class 2017-01-28 17:26:00 +01:00
Fabien Potencier
b2b48b1573 minor #21314 Fix upgrade guide (Jean85)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix upgrade guide

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

This merges back the `UPGRADE-3.0.md` guide from master back up to 2.7. There were a lot of missing parts and a few duplications. I fear that also the other guides have the same issues.

Commits
-------

bd0c206a32 Add missing pieces in the upgrade guide to 3.0
2017-01-28 08:19:52 -08:00
Kévin Dunglas
c759345781
[FrameworkBundle] Remove useless checks in descriptors 2017-01-28 17:17:55 +01:00
Nicolas Grekas
cb498580d1 [DI] Add getter injection 2017-01-28 08:49:57 +01:00
Fabien Potencier
b1098d9492 Merge branch '3.2'
* 3.2:
  fixed composer dep
2017-01-27 18:43:25 -08:00
Fabien Potencier
71066530de Merge branch '3.1' into 3.2
* 3.1:
  fixed composer dep
2017-01-27 18:43:14 -08:00
Fabien Potencier
dba3e75fb2 fixed composer dep 2017-01-27 18:42:42 -08:00
Fabien Potencier
9f3072c416 Merge branch '3.2'
* 3.2:
  fixed typo
  fixed composer.json
  [HttpKernel] Fix Bundle name regression
  always check for all fields to be mapped
  clarify exception when no args are configured
  [PropertyAccess] Handle interfaces in the invalid argument exception
  [DI] Fix defaults overriding empty strings in AutowirePass
  [Debug] Workaround "null" $context
  [Debug] Remove $context arg from handleError(), preparing for PHP 7.2
  [FrameworkBundle] Dont wire "annotations.cached_reader" before removing passes
  [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
  Fix tests with ICU 57.1
  Fix the condition checking the minimum ICU version
2017-01-27 18:39:08 -08:00
Fabien Potencier
09d5f4eb72 Merge branch '3.1' into 3.2
* 3.1:
  fixed typo
  fixed composer.json
  always check for all fields to be mapped
  clarify exception when no args are configured
  [PropertyAccess] Handle interfaces in the invalid argument exception
  [DI] Fix defaults overriding empty strings in AutowirePass
  [Debug] Workaround "null" $context
  [Debug] Remove $context arg from handleError(), preparing for PHP 7.2
  [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
  Fix tests with ICU 57.1
  Fix the condition checking the minimum ICU version
2017-01-27 18:37:08 -08:00
Fabien Potencier
137a7748d6 fixed typo 2017-01-27 17:00:17 -08:00
Fabien Potencier
537b932302 fixed typo 2017-01-27 16:27:58 -08:00
Fabien Potencier
f904f0406d Merge branch '2.8' into 3.1
* 2.8:
  fixed composer.json
2017-01-27 16:21:39 -08:00
Fabien Potencier
4b5930ca44 fixed composer.json 2017-01-27 16:19:36 -08:00
Fabien Potencier
e8895ad102 Merge branch '2.8' into 3.1
* 2.8:
  always check for all fields to be mapped
  clarify exception when no args are configured
  [PropertyAccess] Handle interfaces in the invalid argument exception
  [DI] Fix defaults overriding empty strings in AutowirePass
  [Debug] Workaround "null" $context
  [Debug] Remove $context arg from handleError(), preparing for PHP 7.2
  [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
  Fix tests with ICU 57.1
  Fix the condition checking the minimum ICU version
2017-01-27 16:04:57 -08:00
Fabien Potencier
791b143914 Merge branch '2.7' into 2.8
* 2.7:
  always check for all fields to be mapped
  clarify exception when no args are configured
  [PropertyAccess] Handle interfaces in the invalid argument exception
  [Debug] Workaround "null" $context
  [Debug] Remove $context arg from handleError(), preparing for PHP 7.2
  [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
  Fix tests with ICU 57.1
  Fix the condition checking the minimum ICU version
2017-01-27 15:54:58 -08:00
Maxime Steinhausser
50373f3530 [Console] Fix TableCell issues with decoration 2017-01-27 20:08:51 +01:00
Maxime Steinhausser
531c6cc5ff [HttpKernel] Fix Bundle name regression 2017-01-27 07:30:57 -08:00
Fabien Potencier
bc391c130e bug #21431 [DoctrineBridge] always check for all fields to be mapped (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DoctrineBridge] always check for all fields to be mapped

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

Commits
-------

1e3421d6f0 always check for all fields to be mapped
2017-01-27 07:29:46 -08:00
Alessandro Lai
bd0c206a32
Add missing pieces in the upgrade guide to 3.0 2017-01-27 15:42:16 +01:00
Christian Flothmann
1e3421d6f0 always check for all fields to be mapped 2017-01-27 10:14:45 +01:00
Lukas Kahwe Smith
8ddd5333a3
Merge pull request #1 from nietonfir/http_basic_ldap
Update HttpBasicLdapFactory
2017-01-27 08:30:49 +01:00
Fabien Potencier
a35986f657 minor #21416 [DependencyInjection] clarify exception when no args are configured (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[DependencyInjection] clarify exception when no args are configured

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

Commits
-------

428814b25d clarify exception when no args are configured
2017-01-26 07:56:09 -08:00
nietonfir
a783e5c9c5 Update HttpBasicLdapFactory
so that it matches the current FormLoginLdapFactory ldap implementation,
where the DN can be search for before binding.
2017-01-26 11:58:09 +01:00
Christian Flothmann
428814b25d clarify exception when no args are configured 2017-01-26 11:48:39 +01:00
Lukas Kahwe Smith
a30191f30a
make LdapBindAuthenticationProvider capable of searching for the DN 2017-01-25 21:32:38 +01:00
Fabien Potencier
b9b6ebd643 feature #21404 [DI] Generalize constructor autowiring to partial method calls (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Generalize constructor autowiring to partial method calls

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

When autowiring is enabled:

currently, the constructor can be partially wired, and autowiring will complete the remaining missing arguments.
But there is no reason this should only apply to the constructor.
This PR fixes this inconsistency by looking at all method calls, and wire missing arguments in the same way.

Commits
-------

29c2fd5f74 [DI] Generalize constructor autowiring to partial method calls
2017-01-25 07:53:09 -08:00
Fabien Potencier
a6d2420f00 bug #21360 [PropertyAccess] Handle interfaces in the invalid argument exception (fancyweb)
This PR was squashed before being merged into the 2.7 branch (closes #21360).

Discussion
----------

[PropertyAccess] Handle interfaces in the invalid argument exception

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

Before :
`Expected argument of type "dule\MenuBundle\Entity\AbstractMenu::setMenuElements() must implement interface Doctrine\Common\Collections\Collection", "array" given`

After :
`Expected argument of type "Doctrine\Common\Collections\Collection", "array" given`

Commits
-------

be52b39031 [PropertyAccess] Handle interfaces in the invalid argument exception
2017-01-25 07:13:56 -08:00
Thomas Calvet
be52b39031 [PropertyAccess] Handle interfaces in the invalid argument exception 2017-01-25 07:13:54 -08:00
Fabien Potencier
21f1be16d5 bug #21403 [DI] Fix defaults overriding empty strings in AutowirePass (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] Fix defaults overriding empty strings in AutowirePass

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

Commits
-------

89e27240ab [DI] Fix defaults overriding empty strings in AutowirePass
2017-01-25 07:08:36 -08:00
Fabien Potencier
74ee29dc2f bug #21401 [Debug] Workaround "null" $context (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Workaround "null" $context

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

As reported in #20068, the imap extension can call error handlers with $context = null.

Commits
-------

2555f3151d [Debug] Workaround "null" $context
2017-01-25 07:05:34 -08:00
Nicolas Grekas
29c2fd5f74 [DI] Generalize constructor autowiring to partial method calls 2017-01-25 14:16:38 +01:00
Nicolas Grekas
89e27240ab [DI] Fix defaults overriding empty strings in AutowirePass 2017-01-25 13:37:59 +01:00