Commit Graph

23681 Commits

Author SHA1 Message Date
Fabien Potencier
8c4e756c1b bug #16442 [LDAP] ldap_set_option should be called with a valid link identifier (pierredup)
This PR was merged into the 2.8 branch.

Discussion
----------

[LDAP] ldap_set_option should be called with a valid link identifier

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

Commits
-------

7f89196 ldap_set_option should be called with a valid link identifier
2015-11-05 14:32:43 +01:00
Fabien Potencier
4f7fd74257 bug #16462 [PropertyAccess] Fix dynamic property accessing. (dunglas)
This PR was merged into the 2.3 branch.

Discussion
----------

[PropertyAccess] Fix dynamic property accessing.

| 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

Fix a bug regarding dynamic properties access introduced by #16294.

Commits
-------

916f9e0 [PropertyAccess] Test access to dynamic properties
352dfb9 [PropertyAccess] Fix dynamic property accessing.
2015-11-05 14:31:32 +01:00
Fabien Potencier
bf849efa4b bug #16467 Fixing bad type-hint auto-wiring bug (weaverryan)
This PR was squashed before being merged into the 2.8 branch (closes #16467).

Discussion
----------

Fixing bad type-hint auto-wiring bug

| 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

Previously, if you type-hinted a bad class name, we did not set the argument value. In fact, with `continue`, we skipped setting the argument, which meant that if argument 2 was skipped, then argument 3 would be put into argument 2's location.

But really, if I type-hint a non-existent class, this should throw a clear exception. afaik, in the original PR, it was said that we cannot throw an exception for a non-existent class because a later compiler-pass may manipulate those class names and "fix" them to be real classes. But, that's an edge case, and I think if you're using advanced functionality like that, you should not use auto-wiring. Throwing an exception is much more user-friendly. I personally hit this issue and was trying to figure out what was going wrong :).

About the exception message: I would like to tell the user which class is type-hinted correctly, but getting the type-hinted class for a non-existent class is not possible with reflection.

Thanks!

cc @dunglas

Commits
-------

b7b182e Fixing bad type-hint auto-wiring bug
2015-11-05 14:26:35 +01:00
Ryan Weaver
b7b182ea9e Fixing bad type-hint auto-wiring bug 2015-11-05 14:26:31 +01:00
Fabien Potencier
3443230ad1 feature #16433 [Yaml] deprecate unquoted indicator characters (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Yaml] deprecate unquoted indicator characters

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

Commits
-------

8416f7b [Yaml] deprecate unquoted indicator characters
2015-11-05 14:24:29 +01:00
Fabien Potencier
1f57d5e33a feature #16419 [FrameworkBundle][Form] Better exception message for private form tagged services (ogizanagi)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle][Form] Better exception message for private form tagged services

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

Similar to what is done in [RegisterListenerPass](https://github.com/symfony/symfony/blob/2.8/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php#L61-L63), those changes allow to have a better exception message when defining a private `form.type`, `form.type_extension` or `form.form_guesser` tagged service, and at container compilation instead of runtime:

> The service "my.form.type" must be public as form types are lazy-loaded.

instead of:
> You have requested a non-existent service "my.form.type"

If I'm right, similar cases were considered as new features in the past, so this targets 2.8.

Commits
-------

11d675f [FrameworkBundle][Form] Better exception message for private form tagged services
2015-11-05 14:20:52 +01:00
Fabien Potencier
9b3224b19e feature #15990 added a micro kernel (fabpot)
This PR was merged into the 2.8 branch.

Discussion
----------

added a micro kernel

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

Related to #15948 and #15820

Commits
-------

eab0f0a added a micro kernel
2015-11-05 14:17:06 +01:00
Fabien Potencier
1bed1772f6 bug #16454 [Serializer] GetSetNormalizer shouldn't set/get static methods (boekkooi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] GetSetNormalizer shouldn't set/get static methods

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

This PR fixes setting static getters and setters when serializing.
This is strictly speaking a BC break but in my opinion a needed one because the current behavior is unexpected.

Commits
-------

d8d4405 [Serializer] GetSetNormalizer shouldn't set/get static methods
2015-11-05 14:03:56 +01:00
Fabien Potencier
e21bf56c71 bug #16453 [Serializer] PropertyNormalizer shouldn't set static properties (boekkooi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] PropertyNormalizer shouldn't set static properties

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

This PR fixes a bug where static properties where set by the PropertyNormalizer.

Commits
-------

b15bdca [Serializer] PropertyNormalizer shouldn't set static properties
2015-11-05 14:02:15 +01:00
Fabien Potencier
b587fa3e94 bug #16361 Re-adding the ability to add a resource to the RouteCollectionBuilder (weaverryan)
This PR was merged into the 2.8 branch.

Discussion
----------

Re-adding the ability to add a resource to the RouteCollectionBuilder

| 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

At the end of #15778, I removed the ability to add a resource to the RouteCollectionBuilder. But, this is needed (at least internally): if you import, the returned RouteCollection may have resources, which need to be brought forward into the new RouteCollectionBuilder (the code in `import()` to do this already exists, but is calling an undefined `addResource()` method).

This adds the test with minimal code to fix.

P.S. Fabien told me to remove `addResource` originally... so isn't this *kind of* his fault?

Commits
-------

3b67daa Re-adding the ability to add a resource to the RouteCollectionBuilder
2015-11-05 13:57:14 +01:00
Nicolas Grekas
4a177d7cb9 Merge branch '2.8'
* 2.8:
  Fix tests when no Intl extension
  [VarDumper] Fix casting for ReflectionParameter
  [HttpKernel] Keep 3.0 compat by not using ContainerAware
  [DI] Clean a phpdoc
  [Security\Core] Deprecate passing $salt to BCryptPasswordEncoder::encodePassword()

Conflicts:
	src/Symfony/Component/DependencyInjection/ContainerAware.php
	src/Symfony/Component/HttpKernel/Bundle/Bundle.php
	src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php
	src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php
	src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitTest.php
2015-11-05 11:29:45 +01:00
Nicolas Grekas
c812b39ae7 Merge branch '2.7' into 2.8
* 2.7:
  [VarDumper] Fix casting for ReflectionParameter
  [DI] Clean a phpdoc

Conflicts:
	src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php
2015-11-05 11:24:07 +01:00
Nicolas Grekas
c0f0ad3039 minor #16278 Fix tests when no Intl extension (ewgRa)
This PR was squashed before being merged into the 2.8 branch (closes #16278).

Discussion
----------

Fix tests when no Intl extension

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

I haven't Intl extension installed and testFormatWithIntlTimeZone is fail because use \IntlTimeZone.

This PR fix it.

Commits
-------

84c7567 Fix tests when no Intl extension
2015-11-05 11:18:51 +01:00
Evgeniy Sokolov
84c75674fd Fix tests when no Intl extension 2015-11-05 11:18:48 +01:00
Nicolas Grekas
a3f2f5c441 bug #16471 [VarDumper] Fix casting for ReflectionParameter (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Fix casting for ReflectionParameter

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

Commits
-------

8ff449d [VarDumper] Fix casting for ReflectionParameter
2015-11-05 10:58:21 +01:00
Nicolas Grekas
e0146ed68e minor #15432 Stop faking versions in the root composer.json (nicolas-grekas)
This PR was merged into the 3.0-dev branch.

Discussion
----------

Stop faking versions in the root composer.json

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

Commits
-------

2c9a417 Stop faking versions in the root composer.json
2015-11-05 10:52:54 +01:00
Nicolas Grekas
2c6e9e495a feature #16459 [Security\Core] Deprecate passing $salt to BCryptPasswordEncoder::encodePassword() (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Security\Core] Deprecate passing $salt to BCryptPasswordEncoder::encodePassword()

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

Commits
-------

770bd8c [Security\Core] Deprecate passing $salt to BCryptPasswordEncoder::encodePassword()
2015-11-05 10:51:14 +01:00
Nicolas Grekas
697e6da19e feature #16411 [3.0] use ContainerAwareTrait (blanchonvincent, Tobion)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[3.0] use ContainerAwareTrait

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

Finished version of #12595

This adds the first deprecation in symfony 3. We cannot deprecate ContainerAware in 2.8 as the alternative, the trait, cannot be used with php 5.3. So there would not be an upgrade path for people using an older php version

Commits
-------

f75a940 [VarDumper] fix filename
2309901 [VarDumper] replace VarDumperTestCase by trait
24ff770 [TwigBundle] use ContainerAwareTrait in commands
e337ce6 Remove deprecated ContainerAware class and make use of the trait in another class
52c50e3 Remove abstract class and use Interface+Trait
2015-11-05 10:49:55 +01:00
Nicolas Grekas
2c9a417705 Stop faking versions in the root composer.json 2015-11-05 10:42:53 +01:00
Nicolas Grekas
8ff449d86c [VarDumper] Fix casting for ReflectionParameter 2015-11-05 10:33:55 +01:00
Christian Flothmann
8416f7ba51 [Yaml] deprecate unquoted indicator characters 2015-11-05 10:04:44 +01:00
Tobias Schultze
f75a940881 [VarDumper] fix filename 2015-11-05 00:39:41 +01:00
Christian Flothmann
405d4a8ead trigger deprecation warning when using empty_value
The `empty_value` option is deprecated in the `choice`, `date`, and
`time` form types. Therefore, a deprecation warning must be triggered
when the users configures a value for this option.

The `datetime` form type does not need to be updated as it passes
configured values to the `date` and `time` form types which trigger
deprecation warnings anyway.
2015-11-04 21:57:50 +01:00
Fabien Potencier
df9d0821b0 minor #16466 [HttpKernel] Keep 3.0 compat by not using ContainerAware (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpKernel] Keep 3.0 compat by not using ContainerAware

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

Commits
-------

31a0669 [HttpKernel] Keep 3.0 compat by not using ContainerAware
2015-11-04 21:18:12 +01:00
Kévin Dunglas
916f9e0671 [PropertyAccess] Test access to dynamic properties 2015-11-04 20:02:36 +01:00
Nicolas Grekas
6fe192601c Merge branch '2.3' into 2.7
* 2.3:
  [DI] Clean a phpdoc
2015-11-04 19:50:51 +01:00
Nicolas Grekas
218200d8f3 minor #16468 [DI] Clean a phpdoc (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[DI] Clean a phpdoc

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

Be carefull when merging into 2.7: the ContainerAwareTrait also needs the same fix

Commits
-------

2030f62 [DI] Clean a phpdoc
2015-11-04 19:47:31 +01:00
Nicolas Grekas
31a0669cf5 [HttpKernel] Keep 3.0 compat by not using ContainerAware 2015-11-04 19:15:57 +01:00
Nicolas Grekas
2030f62bb5 [DI] Clean a phpdoc 2015-11-04 19:12:53 +01:00
Tobias Schultze
230990188d [VarDumper] replace VarDumperTestCase by trait 2015-11-04 18:48:20 +01:00
Tobias Schultze
24ff770679 [TwigBundle] use ContainerAwareTrait in commands
I made the class final because it is not meant to be extended. By using the trait, which uses protected visibility for the container property, it would otherwise make the container property part of of BC promise
2015-11-04 18:31:30 +01:00
Fabien Potencier
eab0f0a4f4 added a micro kernel 2015-11-04 18:19:57 +01:00
Tobias Schultze
e337ce6bf7 Remove deprecated ContainerAware class and make use of the trait in another class 2015-11-04 18:12:35 +01:00
blanchonvincent
52c50e3b1e Remove abstract class and use Interface+Trait
Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
	src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php
	src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php
	src/Symfony/Component/DependencyInjection/ContainerAware.php
2015-11-04 18:03:42 +01:00
Ryan Weaver
3b67daacd5 Re-adding the ability to add a resource to the RouteCollectionBuilder
We need this because when you import a RouteCollection and this has a resource
on it, we need to pass that resource forward to the RouteCollectionBuilder
2015-11-04 11:00:43 -05:00
Kévin Dunglas
352dfb9890 [PropertyAccess] Fix dynamic property accessing. 2015-11-04 16:07:49 +01:00
Nicolas Grekas
770bd8cfda [Security\Core] Deprecate passing $salt to BCryptPasswordEncoder::encodePassword() 2015-11-04 14:11:51 +01:00
Nicolas Grekas
d67feb4fc8 Merge branch '2.8'
* 2.8:
  [HttpKernel] Clean clock-mock injection, replaced by #16455
  [Bridge\PhpUnit] Fix clock-mock registration
2015-11-04 10:24:46 +01:00
Nicolas Grekas
7beea17a02 Merge branch '2.7' into 2.8
* 2.7:
  [HttpKernel] Clean clock-mock injection, replaced by #16455
2015-11-04 10:24:34 +01:00
Nicolas Grekas
c24ca431ff Merge branch '2.3' into 2.7
* 2.3:
  [HttpKernel] Clean clock-mock injection, replaced by #16455

Conflicts:
	src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php
2015-11-04 10:24:24 +01:00
Nicolas Grekas
5298940707 minor #16456 [HttpKernel] Clean clock-mock injection, replaced by #16455 (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Clean clock-mock injection, replaced by #16455

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

I really hope this PR is the last one on the clock-mocking topic!

Commits
-------

388534e [HttpKernel] Clean clock-mock injection, replaced by #16455
2015-11-04 10:23:27 +01:00
Nicolas Grekas
d2531360b3 bug #16455 [Bridge\PhpUnit] Fix clock-mock registration (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Bridge\PhpUnit] Fix clock-mock registration

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

Once a method has been executed, PHP ignores any new function that could be injected in the namespace afterwards (HHVM does not ignore them btw).
Which means we have to inject clock-mocking functions into all clock-mocked namespaces before any actual implementation is used in that namespace.
This PR does it.

Commits
-------

0a6a10a [Bridge\PhpUnit] Fix clock-mock registration
2015-11-04 10:21:15 +01:00
Nicolas Grekas
388534ecbf [HttpKernel] Clean clock-mock injection, replaced by #16455 2015-11-04 10:02:52 +01:00
Nicolas Grekas
0a6a10a923 [Bridge\PhpUnit] Fix clock-mock registration 2015-11-04 09:57:16 +01:00
Nicolas Grekas
bceb2d969c Merge branch '2.8'
* 2.8:
  asset test coverage
  [HttpKernel] PostResponseEvent should extend the KernelEvent
  [travis] session.gc_probability=0 to fix transient tests on hhvm
  Write the log message on a single line againn
  [DI] Deprecate ContainerAware in favor of ContainerAwareTrait
  [VarDumper] Deprecate VarDumperTestCase in favor of the trait
  Check whether $this->logger is not null on GuardAuthenticationListener
  [Console] Add progress indicator helper

Conflicts:
	.travis.yml
2015-11-04 09:18:19 +01:00
Nicolas Grekas
9e393291cb Merge branch '2.7' into 2.8
* 2.7:
  asset test coverage
  [travis] session.gc_probability=0 to fix transient tests on hhvm

Conflicts:
	.travis.yml
2015-11-04 09:15:58 +01:00
Nicolas Grekas
4ccfe49f4a Merge branch '2.3' into 2.7
* 2.3:
  [travis] session.gc_probability=0 to fix transient tests on hhvm

Conflicts:
	.travis.yml
	src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php
2015-11-04 09:13:32 +01:00
Warnar Boekkooi
d8d4405e50 [Serializer] GetSetNormalizer shouldn't set/get static methods 2015-11-04 15:11:04 +08:00
Warnar Boekkooi
b15bdca96d [Serializer] PropertyNormalizer shouldn't set static properties 2015-11-04 15:01:32 +08:00
Fabien Potencier
69af9eac35 feature #16409 [Console] Add progress indicator helper (kbond)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Add progress indicator helper

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

Commits
-------

be0a364 [Console] Add progress indicator helper
2015-11-04 01:47:19 +01:00