Commit Graph

23016 Commits

Author SHA1 Message Date
Michal Piotrowski
cf284742ff fix unused variable warning 2015-11-25 05:19:33 +01:00
Fabien Potencier
515007e941 bug #16469 [DependencyInjection] [FrameworkBundle] Enhance autowiring DX (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DependencyInjection] [FrameworkBundle] Enhance autowiring DX

| 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

* Dump autowiring data when using the container
* Add autowiring data to the `debug:container` command

Commits
-------

9c3b910 [FrameworkBundle] Autowiring support for debug:container
18913e1 [DependencyInjection] Add autowiring support to dumpers
2015-11-07 09:30:54 +01:00
Fabien Potencier
0e66da8abb feature #16464 [DependencyInjection] Fix some edge cases with autowiring (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DependencyInjection] Fix some edge cases with autowiring

| 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

Enhance the autowiring system:

- Works with parent definitions and decorator
- Always exclude parent definitions

It allows to autowire major services of the standard edition (tested with Swift Mailer, Monolog, Doctrine and Twig).

Commits
-------

faefc60 [DependencyInjection] Autowing: exclude abstract definitons
71d502a [DependencyInjection] Autowiring: support parent/decorators
2015-11-07 09:14:48 +01:00
Kévin Dunglas
faefc6074f [DependencyInjection] Autowing: exclude abstract definitons 2015-11-06 14:16:58 +01:00
Kévin Dunglas
71d502a174 [DependencyInjection] Autowiring: support parent/decorators 2015-11-06 14:09:32 +01:00
Kévin Dunglas
9c3b910849 [FrameworkBundle] Autowiring support for debug:container 2015-11-06 14:08:21 +01:00
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
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
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
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
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
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
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
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
Fabien Potencier
eab0f0a4f4 added a micro kernel 2015-11-04 18:19:57 +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
Nicolas Grekas
770bd8cfda [Security\Core] Deprecate passing $salt to BCryptPasswordEncoder::encodePassword() 2015-11-04 14:11:51 +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
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
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
Fabien Potencier
ed4e3e87ac feature #16423 [VarDumper] Deprecate VarDumperTestCase in favor of the trait (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Deprecate VarDumperTestCase in favor of the trait

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

Because people must upgrade to PHP 5.5 before upgrading to Sf 3.0, this can be done on the 2.8 branch.

Commits
-------

31e51ba [VarDumper] Deprecate VarDumperTestCase in favor of the trait
2015-11-04 01:37:54 +01:00
Fabien Potencier
a594b9fc18 feature #16424 [DI] Deprecate ContainerAware in favor of ContainerAwareTrait (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] Deprecate ContainerAware in favor of ContainerAwareTrait

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

To be merged before #16411 (that then should be rebased) if we agree that this is the right approach (which I believe personally).
The deprecation notice will be triggered by the existing mechanism in the DebugClassLoader (it can't be added inline because that would make symfony itself trigger it).
PHP 5.3 users migrating to 3.0 must already move to 2.8+5.5 beforehand so this is really on the CUP (Continuous Upgrade Path).

Commits
-------

807ebac [DI] Deprecate ContainerAware in favor of ContainerAwareTrait
2015-11-04 01:36:48 +01:00
Fabien Potencier
e53b3b3a78 minor #16428 asset test coverage (eventhorizonpl)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #16428).

Discussion
----------

asset test coverage

Hi,

This PR adds 100% tests code coverage for Asset component.

Best regards,
Michal

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

Commits
-------

5a6c1f2 asset test coverage
2015-11-04 01:23:36 +01:00
Michal Piotrowski
5a6c1f2626 asset test coverage 2015-11-04 01:23:35 +01:00
Fabien Potencier
4fd60aacd4 minor #16416 [Security][Guard] Check whether $this->logger is not null on GuardAuthenticationListener (aeoris, Diego Agulló)
This PR was merged into the 2.8 branch.

Discussion
----------

[Security][Guard] Check whether $this->logger is not null on GuardAuthenticationListener

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

Commits
-------

ebc751d Write the log message on a single line againn
713b99f Check whether $this->logger is not null on GuardAuthenticationListener
2015-11-04 01:18:15 +01:00
Fabien Potencier
1da126802a feature #16430 [HttpKernel] PostResponseEvent should extend the KernelEvent (jakzal)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpKernel] PostResponseEvent should extend the KernelEvent

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

Technically the `PostResponseEvent` is a `KernelEvent`.

Commits
-------

b9863d5 [HttpKernel] PostResponseEvent should extend the KernelEvent
2015-11-04 01:17:14 +01:00
Fabien Potencier
38a92c825f minor #16443 [travis] session.gc_probability=0 to fix transient tests on hhvm (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] session.gc_probability=0 to fix transient tests on hhvm

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

Should fix tests failing with:
`ps_files_cleanup_dir: opendir(/var/lib/hhvm/sessions) failed: Permission denied (13)`

Commits
-------

b4dd254 [travis] session.gc_probability=0 to fix transient tests on hhvm
2015-11-04 01:15:33 +01:00
Kévin Dunglas
18913e15d5 [DependencyInjection] Add autowiring support to dumpers 2015-11-03 15:47:58 -08:00
Jakub Zalas
b9863d521d [HttpKernel] PostResponseEvent should extend the KernelEvent 2015-11-03 16:51:19 +00:00
Nicolas Grekas
b4dd254774 [travis] session.gc_probability=0 to fix transient tests on hhvm 2015-11-03 16:54:52 +01:00
Nicolas Grekas
5805cc5040 Merge branch '2.7' into 2.8
* 2.7:
  [Security][2.7] Clean deps
  [HttpKernel] Fix time-sensitive test case
  [travis] Fail early when an invalid composer.json is found

Conflicts:
	src/Symfony/Component/Security/Core/composer.json
	src/Symfony/Component/Security/composer.json
2015-11-03 15:28:10 +01:00
Nicolas Grekas
4883586c32 minor #16440 [Security] Clean deps (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Security] Clean deps

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

This follows the split of security-acl.

Commits
-------

ae072b7 [Security] Clean deps
2015-11-03 15:26:27 +01:00
Nicolas Grekas
399b1d5cb0 minor #16441 [Security][2.7] Clean deps (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security][2.7] Clean deps

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

Commits
-------

d51ab88 [Security][2.7] Clean deps
2015-11-03 15:25:10 +01:00