Commit Graph

23270 Commits

Author SHA1 Message Date
Christian Flothmann
346943e2f5 add subject variable to expression context 2015-11-30 11:54:38 +01:00
Fabien Potencier
729b98c2ad bug #16642 [DI][autowiring] throw exception when many services use the same class. (aitboudad)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI][autowiring] throw exception when many services use the same class.

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

Commits
-------

a21a016 [DI][autowiring] throw exception when many services use the same class.
2015-11-30 07:56:28 +01:00
Fabien Potencier
6f349c6ac1 bug #16745 [Yaml] look for colon in parsed inline string (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Yaml] look for colon in parsed inline string

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

Looking for a colon in an unquoted mapping value can lead to falsely
reported parse errors (e.g. when a comment after the mapping value
contains a colon).

Commits
-------

2127058 [Yaml] look for colon in parsed inline string
2015-11-29 20:56:34 +01:00
Christian Flothmann
21270585a6 [Yaml] look for colon in parsed inline string
Looking for a colon in an unquoted mapping value can lead to falsely
reported parse errors (e.g. when a comment after the mapping value
contains a colon).
2015-11-29 19:08:13 +01:00
Nicolas Grekas
6ff5015d8f minor #16743 [Bridge/Doctrine+Ldap] Fix tests (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Bridge/Doctrine+Ldap] Fix tests

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

Using "choice_list" is deprecated and thus can't work with 3.0 deps loaded. Test upgrades backported from #16725
@csarrazi : the Ldap tests now require the ldap extension. Annotations added.

Commits
-------

4819a70 [Bridge/Doctrine+Ldap] Fix tests
2015-11-29 17:25:46 +01:00
Nicolas Grekas
4819a702d7 [Bridge/Doctrine+Ldap] Fix tests 2015-11-29 17:07:42 +01:00
Fabien Potencier
afe1668b41 feature #16735 [WIP] [Ldap] Marked the Ldap component as internal (csarrazi)
This PR was merged into the 2.8 branch.

Discussion
----------

[WIP] [Ldap] Marked the Ldap component as internal

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

As mentioned earlier, the LDAP component suffers from a few problems, addressed in PR #15994
However, as raised by @Tobion, the component does not yet have tests (they can be added at a later time, though), and is not considered stable yet.

Commits
-------

3f89b2c Marked the Ldap component as internal and removed Ldap constants polyfill
2015-11-29 11:47:37 +01:00
Nicolas Grekas
b255dfebc3 minor #16739 [Bridge/Doctrine] Fix legacy tests (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Bridge/Doctrine] Fix legacy tests

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

Commits
-------

7d92372 [Bridge/Doctrine] Fix legacy tests
2015-11-29 10:58:44 +01:00
Nicolas Grekas
0dd72cd5be Merge branch '2.7' into 2.8
* 2.7:
  [Bridge/Twig] Fix lowest form dep
  [Form] Fix tests and reference usage

Conflicts:
	src/Symfony/Bridge/Twig/composer.json
2015-11-29 10:57:23 +01:00
Nicolas Grekas
beb8525fe4 [Bridge/Twig] Fix lowest form dep 2015-11-29 10:55:05 +01:00
Nicolas Grekas
7d9237200f [Bridge/Doctrine] Fix legacy tests 2015-11-29 10:46:30 +01:00
Nicolas Grekas
a3991535d7 minor #16729 [Form] Fix tests and reference usage (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fix tests and reference usage

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

Commits
-------

6001644 [Form] Fix tests and reference usage
2015-11-29 10:16:52 +01:00
Fabien Potencier
ff2addc4f9 bug #16734 Make sure security.role_hierarchy.roles always exists (WouterJ)
This PR was squashed before being merged into the 2.8 branch (closes #16734).

Discussion
----------

Make sure security.role_hierarchy.roles always exists

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

Commits
-------

b272ab5 Make sure security.role_hierarchy.roles always exists
2015-11-29 09:13:24 +01:00
WouterJ
b272ab569f Make sure security.role_hierarchy.roles always exists 2015-11-29 09:13:21 +01:00
Charles Sarrazin
3f89b2c714 Marked the Ldap component as internal and removed Ldap constants polyfill 2015-11-28 23:36:49 +01:00
Nicolas Grekas
6001644ffe [Form] Fix tests and reference usage 2015-11-28 17:53:21 +01:00
Fabien Potencier
6ae61f6d0f minor #16460 [SecurityBundle] Fix disabling of RoleHierarchyVoter when passing empty hierarchy (WouterJ)
This PR was submitted for the 2.3 branch but it was merged into the 2.8 branch instead (closes #16460).

Discussion
----------

[SecurityBundle] Fix disabling of RoleHierarchyVoter when passing empty hierarchy

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

 * When passing `role_hierarchy: ~` in the config, the role hierarchy voter was still enabled. I've now changed this so that an empty hierarchy also results in disabling this voter. With an empty hierarchy, the voter behaves exactly the same as the RoleVoter, so no BC break is introduced here.
 * Added some tests for the RoleHierarchyVoter when passing an empty hierarchy. As it then behaves exactly like RoleVoter, the question is whether we shouldn't just always return ACCESS_ABSTAIN when the hierarchy is empty

Commits
-------

96afff6 [SecurityBundle] Fix disabling of RoleHierarchyVoter when passing empty hierarchy
2015-11-28 16:45:57 +01:00
WouterJ
96afff6a05 [SecurityBundle] Fix disabling of RoleHierarchyVoter when passing empty hierarchy 2015-11-28 16:45:57 +01:00
Fabien Potencier
5486c689cf feature #16722 [Security][SecurityBundle] Use csrf_token_id instead of deprecated intention (jakzal)
This PR was squashed before being merged into the 2.8 branch (closes #16722).

Discussion
----------

[Security][SecurityBundle] Use csrf_token_id instead of deprecated intention

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

Commits
-------

0450865 [Security][SecurityBundle] Use csrf_token_id instead of deprecated intention
2015-11-28 16:40:59 +01:00
Jakub Zalas
04508658b5 [Security][SecurityBundle] Use csrf_token_id instead of deprecated intention 2015-11-28 16:40:40 +01:00
Nicolas Grekas
f94c6d4126 [Bundle\Twig] Fix lowet form dep 2015-11-28 13:49:09 +01:00
Fabien Potencier
cd0639d95b Merge branch '2.7' into 2.8
* 2.7:
  [HttpKernel] clearstatcache() so the Cache sees when a .lck file has been released
  [WIP] [Form] [TwigBridge] Bootstrap horizontal theme missing tests
  AssetBundle - fix docs
  CS: remove impossible default argument value
2015-11-28 12:03:39 +01:00
Fabien Potencier
e3f4278d59 Merge branch '2.3' into 2.7
* 2.3:
  [HttpKernel] clearstatcache() so the Cache sees when a .lck file has been released
2015-11-28 12:02:41 +01:00
Fabien Potencier
b2899a6c2e bug #16312 [HttpKernel] clearstatcache() so the Cache sees when a .lck file has been released (mpdude)
This PR was squashed before being merged into the 2.3 branch (closes #16312).

Discussion
----------

[HttpKernel] clearstatcache() so the Cache sees when a .lck file has been released

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

I've been trying to debug #15813 and modified the Store in a way to keep unique request IDs in the .lck file. That way, I was hoping to find out which request is blocking and/or if the request is actually still running.

It turned out that `is_file()` would claim that a lock file still exists, but a subsequent attempt to read the information from that file returned "file not found" errors.

So, my assumption is that the `is_file()` result is based on the fstat cache and wrong once a process has seen the lock file.

@jakzal said in https://github.com/symfony/symfony/issues/15813#issuecomment-149013691 that `unlink()`ing the lock file should clear the statcache, but I doubt this is true across PHP processes.

Commits
-------

982710f [HttpKernel] clearstatcache() so the Cache sees when a .lck file has been released
2015-11-28 11:48:57 +01:00
Matthias Pigulla
982710ff18 [HttpKernel] clearstatcache() so the Cache sees when a .lck file has been released 2015-11-28 11:48:55 +01:00
Fabien Potencier
fdbf1fa5d8 bug #16351 [WIP] [Form] [TwigBridge] Bootstrap horizontal theme missing tests (pieter2627)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #16351).

Discussion
----------

[WIP] [Form] [TwigBridge] Bootstrap horizontal theme missing tests

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

The current bootstrap horizontal theme has a limitation where the inputs will always have `col-sm-2` class applied to them and the developer has no way on changing this when he wants larger/smaller labels or wants to target another screen size only. The same applies for the `div` around the `input`.

PR checks if a label's class has a `col-*` class set and then uses it rather than the default so that the developer can change them as is needed. Again the same for the `div` by checking the `group_attr.class`

This is my first contribution to Symfony and from the contribution docs I see that the following is still needed.

### ToDo
- [ ] Create Doc and its PR
- [ ] Edit `CHANGELOG???`

For the Doc it seems best to edit `cookbook/form/form_customization.rst` and add another 'admonition' below the "built-in form themes" section that highlights this capability?

I'm not sure what will go into the CHANGELOG?

Commits
-------

a35d3d4 [WIP] [Form] [TwigBridge] Bootstrap horizontal theme missing tests
2015-11-28 11:44:05 +01:00
Pieter
a35d3d44d0 [WIP] [Form] [TwigBridge] Bootstrap horizontal theme missing tests 2015-11-28 11:44:04 +01:00
Fabien Potencier
2659c8e3a8 minor #16547 [Serializer] Improve ObjectNormalizer performance (dunglas)
This PR was squashed before being merged into the 2.8 branch (closes #16547).

Discussion
----------

[Serializer] Improve ObjectNormalizer performance

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

Cache attributes detection in a similar way than in #16294 for PropertyAccess.

As for the PropertyAccess Component, I'll open another PR (in 2.8 or 3.1) allowing to cache these attributes between requests using Doctrine Cache.

@Tobion, can you try this PR with your benchmark to estimate the gain?

Commits
-------

683f0f7 [Serializer] Improve ObjectNormalizer performance
2015-11-28 11:40:26 +01:00
Kévin Dunglas
683f0f7315 [Serializer] Improve ObjectNormalizer performance 2015-11-28 11:40:16 +01:00
Fabien Potencier
83f9ae0f7e minor #16673 AssetBundle - fix docs (eventhorizonpl)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #16673).

Discussion
----------

AssetBundle - fix docs

Hi,

This PR updates some docs in Asset Bundle.

Best regards,
Michal

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

Commits
-------

62b3cb2 AssetBundle - fix docs
2015-11-28 11:26:33 +01:00
Michal Piotrowski
62b3cb2805 AssetBundle - fix docs 2015-11-28 11:26:33 +01:00
Fabien Potencier
0cb308f634 minor #16697 CS: remove impossible default argument value (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

CS: remove impossible default argument value

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

Commits
-------

acef3a3 CS: remove impossible default argument value
2015-11-28 11:22:51 +01:00
Fabien Potencier
06279791c5 minor #16662 [Yaml] more fixes to changelog and upgrade files (Christian Flothmann)
This PR was merged into the 2.8 branch.

Discussion
----------

[Yaml] more fixes to changelog and upgrade files

| Q             | A
| ------------- | ---
| Fixed tickets | #16433, #16654
| License       | MIT

Commits
-------

273ed25 [Yaml] more fixes to changelog and upgrade files
2015-11-28 11:18:42 +01:00
Nicolas Grekas
953ed3c28c minor #16718 [SecurityBundle] test legacy CSRF configuration options (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[SecurityBundle] test legacy CSRF configuration options

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

Commits
-------

444b6ef test legacy CSRF configuration options
2015-11-28 10:21:20 +01:00
Nicolas Grekas
d94c322272 Merge branch '2.7' into 2.8
* 2.7:
  [ci] Force update of ./phpunit deps
  [Form] Fixed: Duplicate choice labels are remembered when using "choices_as_values" = false
  [Process] Don't catch RuntimeException when it complicates tests debugging
  [appveyor] Workaround transient segfault when APCu is enabled
2015-11-28 10:05:52 +01:00
Nicolas Grekas
60b02fcc97 Merge branch '2.3' into 2.7
* 2.3:
  [ci] Force update of ./phpunit deps
  [Process] Don't catch RuntimeException when it complicates tests debugging
  [appveyor] Workaround transient segfault when APCu is enabled
2015-11-28 10:05:32 +01:00
Nicolas Grekas
59b782a200 [ci] Force update of ./phpunit deps 2015-11-28 10:05:13 +01:00
Christian Flothmann
444b6eff0a test legacy CSRF configuration options 2015-11-28 09:35:12 +01:00
Tobias Schultze
cdfae4f8a9 minor #16717 [PhpUnitBridge] fix typo (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[PhpUnitBridge] fix typo

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

Commits
-------

1cec08b [PhpUnitBridge] fix typo
2015-11-28 03:32:59 +01:00
Christian Flothmann
1cec08b844 [PhpUnitBridge] fix typo 2015-11-27 23:51:43 +01:00
Nicolas Grekas
d628d925c1 bug #16685 [Form] Fixed: Duplicate choice labels are remembered when using "choices_as_values" = false (webmozart)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed: Duplicate choice labels are remembered when using "choices_as_values" = false

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

Commits
-------

1179f07 [Form] Fixed: Duplicate choice labels are remembered when using "choices_as_values" = false
2015-11-27 23:37:53 +01:00
Nicolas Grekas
342786aa8f feature #16709 [Bridge\PhpUnit] Display the stack trace of a deprecation on-demand (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Bridge\PhpUnit] Display the stack trace of a deprecation on-demand

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

This PR has been essential into making #16708, and I think everyone working on a 3.0 migration will need this.

Example:

```
$ SYMFONY_DEPRECATIONS_HELPER=/FormExtensionBootstrap3LayoutTest/ ./phpunit src/Symfony/Bridge/Twig/
PHPUnit 4.8.18 by Sebastian Bergmann and contributors.

Testing src/Symfony/Bridge/Twig/
................................................
Remaining deprecation triggered by Symfony\Bridge\Twig\Tests\Extension\FormExtensionBootstrap3LayoutTest::testSingleChoiceGrouped:
The value "false" for the "choices_as_values" option is deprecated since version 2.8 and will not be supported anymore in 3.0. Set this option to "true" and flip the contents of the "choices" option instead.
Stack trace:
#0 src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php(286): trigger_error()
#1 src/Symfony/Component/OptionsResolver/OptionsResolver.php(962): Symfony\Component\Form\Extension\Core\Type\ChoiceType->Symfony\Component\Form\Extension\Core\Type\{closure}()
#2 src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php(277): Symfony\Component\OptionsResolver\OptionsResolver->offsetGet()
#3 src/Symfony/Component/OptionsResolver/OptionsResolver.php(962): Symfony\Component\Form\Extension\Core\Type\ChoiceType->Symfony\Component\Form\Extension\Core\Type\{closure}()
#4 src/Symfony/Component/OptionsResolver/OptionsResolver.php(791): Symfony\Component\OptionsResolver\OptionsResolver->offsetGet()
#5 src/Symfony/Component/Form/ResolvedFormType.php(156): Symfony\Component\OptionsResolver\OptionsResolver->resolve()
#6 src/Symfony/Component/Form/FormFactory.php(119): Symfony\Component\Form\ResolvedFormType->createBuilder()
#7 src/Symfony/Component/Form/FormFactory.php(48): Symfony\Component\Form\FormFactory->createNamedBuilder()
#8 src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php(540): Symfony\Component\Form\FormFactory->createNamed()
#9 [internal function]: Symfony\Component\Form\Tests\AbstractBootstrap3LayoutTest->testSingleChoiceGrouped()
#10 {main}
KO src/Symfony/Bridge/Twig/
```

Commits
-------

5a88fb6 [Bridge\PhpUnit] Display the stack trace of a deprecation on-demand
2015-11-27 23:34:17 +01:00
Christian Flothmann
273ed25573 [Yaml] more fixes to changelog and upgrade files 2015-11-27 22:31:42 +01:00
Nicolas Grekas
5a88fb619f [Bridge\PhpUnit] Display the stack trace of a deprecation on-demand 2015-11-27 17:34:29 +01:00
Nicolas Grekas
fad3d38e95 bug #16704 [Form+SecurityBundle] Trigger deprecation for csrf_provider+intention options (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form+SecurityBundle] Trigger deprecation for csrf_provider+intention options

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

ping @stof

Commits
-------

62eba7c [Form+SecurityBundle] Trigger deprecation for csrf_provider+intention options
2015-11-27 15:37:15 +01:00
Bernhard Schussek
1179f0727b [Form] Fixed: Duplicate choice labels are remembered when using "choices_as_values" = false 2015-11-27 15:25:47 +01:00
Nicolas Grekas
de08816caa Merge branch '2.7' into 2.8
* 2.7:
  [Form] Fix missing choices_as_values=true in tests

Conflicts:
	src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php
	src/Symfony/Component/Form/Tests/AbstractDivLayoutTest.php
	src/Symfony/Component/Form/Tests/AbstractLayoutTest.php
2015-11-27 15:19:27 +01:00
Nicolas Grekas
f84beb449c minor #16708 [Form] Fix missing choices_as_values=true in tests (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fix missing choices_as_values=true in tests

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

Commits
-------

2a16e87 [Form] Fix missing choices_as_values=true in tests
2015-11-27 15:13:55 +01:00
Nicolas Grekas
2a16e87aec [Form] Fix missing choices_as_values=true in tests 2015-11-27 14:50:51 +01:00
Nicolas Grekas
62eba7c426 [Form+SecurityBundle] Trigger deprecation for csrf_provider+intention options 2015-11-27 13:22:26 +01:00