Commit Graph

23096 Commits

Author SHA1 Message Date
Tobias Schultze
d37b9e699d [Form] remove validation of FormRegistry::getType as FormRegistry::hasType does not validate either
also developers do not work with the registry directly anyway but through the factory. and the factory already validates the value.
2015-10-22 02:46:43 +02:00
Christian Flothmann
6e515fbc21 [EventDispatcher] fix docblock 2015-10-20 19:27:01 +02:00
Nicolas Grekas
ab8cc29814 [Process] Inherit env vars by default in PhpProcess 2015-10-20 18:32:03 +02:00
Javier Eguiluz
3c4e45826c Changed one console output style to avoid visual issues 2015-10-20 16:38:46 +02:00
Fabien Potencier
f5f69a3d19 bug #16291 [VarDumper] Fix return type and anonymous classes dumping (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Fix return type and anonymous classes dumping

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

I missed that `getReturnType` returns a `ReflectionType` instance that should be casted to string.

Commits
-------

b42b03a [VarDumper] Fix return type and anonymous classes dumping
2015-10-20 08:11:23 +02:00
Nicolas Grekas
b42b03a62b [VarDumper] Fix return type and anonymous classes dumping 2015-10-19 20:09:55 +02:00
Fabien Potencier
87f83f7824 feature #15966 [FrameworkBundle] PropertyInfo support (dunglas)
This PR was squashed before being merged into the 2.8 branch (closes #15966).

Discussion
----------

[FrameworkBundle] PropertyInfo support

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

Commits
-------

f84a92a [FrameworkBundle] PropertyInfo support
2015-10-19 14:05:34 +02:00
Kévin Dunglas
f84a92a601 [FrameworkBundle] PropertyInfo support 2015-10-19 14:05:32 +02:00
Fabien Potencier
613910bc9f bug #16177 [HttpFoundation] Fixes /0 subnet handling in IpUtils (ultrafez)
This PR was squashed before being merged into the 2.3 branch (closes #16177).

Discussion
----------

[HttpFoundation] Fixes /0 subnet handling in IpUtils

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

Fixes bug #16055. For IP addresses with CIDR subnet length 0, the IP address must be valid - IPs with subnet masks greater than zero are implicitly validated due to the use of `ip2long` and `substr_compare` (although it's not particularly robust - there could be some future work to improve this here).

Commits
-------

d9ac571 [HttpFoundation] Fixes /0 subnet handling in IpUtils
2015-10-19 13:54:32 +02:00
Alex Silcock
d9ac57123d [HttpFoundation] Fixes /0 subnet handling in IpUtils 2015-10-19 13:54:29 +02:00
Fabien Potencier
cb273537ee feature #16161 [Validator] Add expressionLanguage to ExpressionValidator constructor (enumag)
This PR was merged into the 2.8 branch.

Discussion
----------

[Validator] Add expressionLanguage to ExpressionValidator constructor

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

Commits
-------

4ad1e20 [Validator] Add expressionLanguage to ExpressionValidator constructor
2015-10-19 13:49:28 +02:00
Fabien Potencier
66c99a0b95 minor #16238 [Form] Remove unneeded catch and re-throw in DateTimeToStringTransformer (MisatoTremor)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #16238).

Discussion
----------

[Form] Remove unneeded catch and re-throw in DateTimeToStringTransformer

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

Also fixed PHPDoc param for ``transform``.

Commits
-------

2c9b283 [Form] Simplify DateTimeToStringTransformer Avoid unneeded catch and re-throw of the same exception.
2015-10-19 13:40:25 +02:00
Steffen Roßkamp
2c9b283e01 [Form] Simplify DateTimeToStringTransformer
Avoid unneeded catch and re-throw of the same exception.
2015-10-19 13:40:24 +02:00
Fabien Potencier
43026f9846 feature #16263 [FrameworkBundle] Add a new ClassCache cache warmer (tucksaun)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] Add a new ClassCache cache warmer

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

This new cache warmer allows to remove the known slowness of the first hit of a Symfony application (even when cache has been warmed up). This also allows to make a Symfony application runnable on a read-only filesystem (like in a Docker container for example)

Commits
-------

b570d6c [FrameworkBundle] Add a new ClassCache cache warmer
2015-10-19 11:59:50 +02:00
Fabien Potencier
b9c0fe4ca3 minor #16284 [Minor] [Serializer] Removed second license header (derrabus)
This PR was merged into the 2.8 branch.

Discussion
----------

[Minor] [Serializer] Removed second license header

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

PR #15918 added a second license header to the `ArrayDenormalizer` file. One license header is probably enough.

Commits
-------

dee3be3 [Minor] [Serializer] Removed second license header
2015-10-19 11:53:21 +02:00
Fabien Potencier
4618f0b3cf feature #16271 [TwigBundle] added a Twig templates warmer when templating is disabled (fabpot)
This PR was merged into the 2.8 branch.

Discussion
----------

[TwigBundle] added a Twig templates warmer when templating is disabled

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

When disabling the templating component, Twig templates are not warmed up as the warmer depends on the template finder which needs the templating component. This PR adds a new cache warmer that covers this case.

see #16262

Commits
-------

bd3701b [TwigBundle] added a Twig templates warmer when templating is disabled
2015-10-19 11:51:31 +02:00
Alexander M. Turek
dee3be3198 [Minor] [Serializer] Removed second license header
| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | none

PR #15918 added a second license header to the `ArrayDenormalizer` file. One license header is probably enough.
2015-10-19 11:36:16 +02:00
Fabien Potencier
bd3701b30f [TwigBundle] added a Twig templates warmer when templating is disabled 2015-10-19 11:33:50 +02:00
Fabien Potencier
c94f18693e minor #16281 [HttpKernel] Remove a duplicate test for the EsiFragmentRenderer (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Remove a duplicate test for the EsiFragmentRenderer

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

Since the request was made a required argument to the `render()` method in #6829, this [test became a duplicate](23f51450bd/src/Symfony/Component/HttpKernel/Tests/RenderingStrategy/EsiRenderingStrategyTest.php (L28-L38)) of `testRenderFallbackToInlineStrategyIfEsiNotSupported()`.

Commits
-------

44d57a3 [HttpKernel] Remove a duplicate test for the EsiFragmentRenderer
2015-10-19 11:31:14 +02:00
Fabien Potencier
17053705b4 feature #16276 Unify URL generator reference type + make linking in php templates consistent with twig (Tobion)
This PR was merged into the 2.8 branch.

Discussion
----------

Unify URL generator reference type + make linking in php templates consistent with twig

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

Please see ticket.
Please merge #16277 first. I will then rebase this to make tests pass.

Commits
-------

388fa43 [Templating] deprecate low-level RouterHelper::generate method as it's cumbersome to use constants in templates
97d6828 [Templating] introduce path and url methods in php templates to be in line with twig templates
912fc4d [Routing] deprecate the old url generator reference type values
2015-10-19 11:30:00 +02:00
Jakub Zalas
44d57a340f [HttpKernel] Remove a duplicate test for the EsiFragmentRenderer
Since the request was made a required argument to the `render()` method in #6829, this test became a duplicate of `testRenderFallbackToInlineStrategyIfEsiNotSupported()`.
2015-10-18 21:45:35 +01:00
Tobias Schultze
388fa43f42 [Templating] deprecate low-level RouterHelper::generate method as it's cumbersome to use constants in templates 2015-10-18 22:34:17 +02:00
Tobias Schultze
97d6828b51 [Templating] introduce path and url methods in php templates to be in line with twig templates 2015-10-18 22:34:16 +02:00
Tobias Schultze
912fc4de8f [Routing] deprecate the old url generator reference type values 2015-10-18 22:34:15 +02:00
Tobias Schultze
a65b489d2b Merge branch '2.7' into 2.8 2015-10-18 22:33:32 +02:00
Tobias Schultze
80182faf0f [Routing] use constant in a test that is new in 2.7 2015-10-18 22:32:44 +02:00
Fabien Potencier
945630a8fa Merge branch '2.7' into 2.8
* 2.7:
  [Routing] use constants in tests
  [Process] tweaked README
  [Validator] Allow an empty path in a URL with only a fragment or a query
  [HttpFoundation] Fix some typo in the Request doc
  fixed CS
  Added separated handling of root paths
2015-10-18 22:23:24 +02:00
Fabien Potencier
fa6c58c90d Merge branch '2.3' into 2.7
* 2.3:
  [Routing] use constants in tests
  [Validator] Allow an empty path in a URL with only a fragment or a query
  [HttpFoundation] Fix some typo in the Request doc
  fixed CS
  Added separated handling of root paths
2015-10-18 22:23:18 +02:00
Fabien Potencier
2f205d47a6 minor #16277 [Routing] use constants in tests (Tobion)
This PR was squashed before being merged into the 2.3 branch (closes #16277).

Discussion
----------

[Routing] use constants in tests

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

Use constants in tests instead of hardcoded values in preparation for #16276

Commits
-------

608c8d2 [Routing] use constants in tests
2015-10-18 22:22:26 +02:00
Tobias Schultze
608c8d25a3 [Routing] use constants in tests 2015-10-18 22:22:24 +02:00
Fabien Potencier
8b3922a7e5 minor #16269 [Process] tweaked README (fabpot)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #16269).

Discussion
----------

[Process] tweaked README

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

Commits
-------

11622ad [Process] tweaked README
2015-10-18 11:49:40 +02:00
Fabien Potencier
11622ad294 [Process] tweaked README 2015-10-18 11:49:40 +02:00
Fabien Potencier
6f48ec5be6 Merge branch '2.7' into 2.8
* 2.7:
  [TwigBundle] Fix Twig cache is not properly warmed
  [Security] Use SessionAuthenticationStrategy on RememberMe login
2015-10-17 17:40:24 +02:00
Fabien Potencier
6e6a0ba79a bug #16262 [TwigBundle] Fix Twig cache is not properly warmed (tucksaun)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] Fix Twig cache is not properly warmed

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

Alternative to #15034

Commits
-------

e704ee4 [TwigBundle] Fix Twig cache is not properly warmed
2015-10-17 17:38:12 +02:00
Tugdual Saunier
e704ee4d6c [TwigBundle] Fix Twig cache is not properly warmed 2015-10-17 14:09:51 +01:00
Fabien Potencier
b06a938e63 bug #16259 [Validator] Allow an empty path in a URL with only a fragment or a query (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Allow an empty path in a URL with only a fragment or a query

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

URLs like `http://symfony.com?query=1` or `http://symfony.com#` should be valid.

According to the [RFC3986](https://tools.ietf.org/html/rfc3986#page-16):

> When authority is present, the path must either be empty or begin with a slash ("/") character.
> When authority is not present, the path cannot begin with two slash characters ("//").

Since the RFC describes URIs, the second sentence doesn't apply here as the authority is required in URLs .

Commits
-------

b3a5411 [Validator] Allow an empty path in a URL with only a fragment or a query
2015-10-17 07:39:03 +02:00
Tugdual Saunier
b570d6cd8c [FrameworkBundle] Add a new ClassCache cache warmer 2015-10-16 16:58:13 +01:00
Jakub Zalas
b3a54117c8 [Validator] Allow an empty path in a URL with only a fragment or a query 2015-10-16 14:12:47 +01:00
Fabien Potencier
751f2bebdb bug #16226 [filesystem] makeRelativePath does not work correctly from root (jaytaph, fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

[filesystem] makeRelativePath does not work correctly from root

| Q             | A
| ------------- | ---
| Bug fix?      | yes/no
| New feature?  | yes/no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #1234
| License       | MIT
| Doc PR        | #14066, #14067

When using `makeRelativePath`, it returns an incorrect path when trying to fetch an entry from the root:

      $fs->makePathRelative('/foo/bar/baz', '/');

Actual result:

      ../foo/bar/baz

Expected result:

      foo/bar/baz

As we have specified an absolute path, there is no point on having an `..` added. It works, because a root directory has a `..` which points to itself, but it could result in issues when the relative path is actually prefixed or concatted.

Commits
-------

791b124 fixed CS
7bb394e Added separated handling of root paths
2015-10-16 13:57:06 +02:00
Fabien Potencier
72c6c61dbe bug #16232 Fix missing deprecation notice for type (nicolas-grekas, WouterJ)
This PR was merged into the 2.8 branch.

Discussion
----------

Fix missing deprecation notice for `type`

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

Replaces https://github.com/symfony/symfony/pull/16231

Commits
-------

27517e3 Use entry_type instead of type
87fdffa [Form] Fix missing notice for deprecated `type`
2015-10-16 13:53:17 +02:00
Fabien Potencier
f19a7c9d8c feature #15947 Added UserLoaderInterface for loading users through Doctrine. (mtrojanowski)
This PR was submitted for the 2.7 branch but it was merged into the 2.8 branch instead (closes #15947).

Discussion
----------

Added UserLoaderInterface for loading users through Doctrine.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #11157
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/issues/4543

Based on the @weaverryan and @stof propositions from [this](https://github.com/symfony/symfony/pull/12733#issuecomment-65813565) discussion I created a new interface in the Doctrine Bridge which can be used to more easily implement a repository capable of returning a User.

Commits
-------

a8d3d12 Added UserLoaderInterface for loading users through Doctrine.
2015-10-16 13:51:34 +02:00
Michal Trojanowski
a8d3d124ca Added UserLoaderInterface for loading users through Doctrine. 2015-10-16 13:51:34 +02:00
Fabien Potencier
3510e0a2de bug #16108 [Security] #15764. Use SessionAuthenticationStrategy on RememberMe login (s12v)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #16108).

Discussion
----------

[Security] #15764. Use SessionAuthenticationStrategy on RememberMe login

Regenerate session ID with default session strategy.

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

Commits
-------

795c8b3 [Security] Use SessionAuthenticationStrategy on RememberMe login
2015-10-16 13:32:26 +02:00
Sergey Novikov
795c8b3249 [Security] Use SessionAuthenticationStrategy on RememberMe login
Regenerate session ID with default session strategy
2015-10-16 13:32:26 +02:00
Fabien Potencier
1828d0682a bug #16251 Fix the detection of the deprecated usage of the ValidationListener (stof)
This PR was merged into the 2.8 branch.

Discussion
----------

Fix the detection of the deprecated usage of the ValidationListener

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

the deprecation trigger should be triggered only when the valdiator does not implement the new interface. but implementing both the old and new interface is fine (and this is what is done in Symfony by default, as we provide a BC layer)

Commits
-------

de04070 Fix the detection of the deprecated usage of the ValidationListener
2015-10-16 13:27:11 +02:00
Christophe Coevoet
de04070ba8 Fix the detection of the deprecated usage of the ValidationListener 2015-10-15 14:57:54 +02:00
WouterJ
27517e38be Use entry_type instead of type 2015-10-15 12:37:48 +02:00
Fabien Potencier
4397a031ef minor #16228 [HttpFoundation] Fix some typo in the Request doc (alOneh)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] Fix some typo in the Request doc

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

Commits
-------

481fc12 [HttpFoundation] Fix some typo in the Request doc
2015-10-14 19:23:48 +02:00
Nicolas Grekas
eca3e37225 bug #16229 [DI] Autowiring: w/a https://bugs.php.net/62715 (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] Autowiring: w/a https://bugs.php.net/62715

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

See https://ci.appveyor.com/project/fabpot/symfony/build/1.0.2384#L722

Commits
-------

8d49573 [DI] Autowiring: w/a https://bugs.php.net/62715
2015-10-14 16:12:48 +02:00
Nicolas Grekas
87fdffa0fc [Form] Fix missing notice for deprecated type 2015-10-13 19:19:56 +02:00