Commit Graph

25778 Commits

Author SHA1 Message Date
Krzysztof Piasecki
d583ec3543 Lower complexity of Form:isValid() 2016-04-01 09:09:19 +02:00
Fabien Potencier
35be993861 feature #18167 [DependencyInjection] Fix a limitation of the PhpDumper (Ener-Getick)
This PR was squashed before being merged into the 3.1-dev branch (closes #18167).

Discussion
----------

[DependencyInjection] Fix a limitation of the PhpDumper

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

The ``PhpDumper`` cannot currently dump several services' id containing characters unsupported by php.
This PR tries to solve this issue by removing the unsupported characters and by sufixing their camelized association to avoid conflicts.

Commits
-------

0d147b2 [DependencyInjection] Fix a limitation of the PhpDumper
2016-04-01 08:52:24 +02:00
Ener-Getick
0d147b254b [DependencyInjection] Fix a limitation of the PhpDumper 2016-04-01 08:52:19 +02:00
Fabien Potencier
c5b792c65f minor #18389 Exclude Bridge\PhpUnit from composer.json by default (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Exclude Bridge\PhpUnit from composer.json by default

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

Commits
-------

4f90495 Exclude Bridge\PhpUnit from composer.json by default
2016-04-01 08:35:52 +02:00
Nicolas Grekas
f29476e514 [Intl] Fix int32 min boundary check 2016-04-01 08:34:33 +02:00
Fabien Potencier
aa459497bd feature #18387 [DX] [LDAP] Added default service name for the Security component's Ldap providers (csarrazi)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[DX] [LDAP] Added default service name for the Security component's Ldap providers

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

This PR adds a default service name (`ldap`) for the Security component's Ldap factories (`LdapFactory`, `FormLoginLdapFactory` and `HttpBasicLdapFactory`.

Commits
-------

29e3d38 Added default service name for the Security component's Ldap providers
2016-04-01 08:33:02 +02:00
Fabien Potencier
4b0b3d95a8 minor #18396 upgrade 3.1/4.0 minor cs fixes (HeahDude)
This PR was merged into the 3.1-dev branch.

Discussion
----------

upgrade 3.1/4.0 minor cs fixes

| Q             | A
| ------------- | ---
| Branch?       | master
| License       | MIT

Commits
-------

b8e2911 upgrade 3.1/4.0 minor fixes
2016-04-01 08:31:30 +02:00
Fabien Potencier
d177747812 feature #18290 [Translation] deprecate the backup feature (xabbuh)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Translation] deprecate the backup feature

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

Commits
-------

6c3ddf1 [Translation] deprecate the backup feature
2016-04-01 08:29:04 +02:00
Jules Pietri
b8e29110ca upgrade 3.1/4.0 minor fixes 2016-04-01 08:28:05 +02:00
Fabien Potencier
b3580ce832 minor #18398 skipped dns-sensitive tests when DnsMock is not found (2.7) (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

skipped dns-sensitive tests when DnsMock is not found (2.7)

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

Commits
-------

efc1de7 skipped dns-sensitive tests when DnsMock is not found
2016-04-01 08:18:52 +02:00
Fabien Potencier
ffb4ff3fec bug #18394 [FrameworkBundle][2.7] Return the invokable service if its name is the class name (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle][2.7] Return the invokable service if its name is the class name

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

Backport #18289 to 2.7 as this is a bug fix.

Commits
-------

5c87d76 [FrameworkBundle] Return the invokable service if its name is the class name
2016-04-01 08:15:08 +02:00
Fabien Potencier
efc1de7786 skipped dns-sensitive tests when DnsMock is not found 2016-04-01 08:10:39 +02:00
Fabien Potencier
9d45acc6a5 minor #18392 [ci] Skip dns-sensitive tests when DnsMock is not found (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[ci] Skip dns-sensitive tests when DnsMock is not found

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

Commits
-------

7e01187 [ci] Skip dns-sensitive tests when DnsMock is not found
2016-04-01 08:07:56 +02:00
Fabien Potencier
0756bbe4ed minor #18393 [VarDumper] Relax tests to pass on appveyor (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Relax tests to pass on appveyor

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

Commits
-------

6dbb117 [VarDumper] Relax tests to pass on appveyor
2016-04-01 08:06:35 +02:00
Fabien Potencier
78830a16fc fixed typo 2016-04-01 08:03:58 +02:00
Kévin Dunglas
5c87d766d5 [FrameworkBundle] Return the invokable service if its name is the class name 2016-03-31 22:45:44 +02:00
Nicolas Grekas
6dbb11719e [VarDumper] Relax tests to pass on appveyor 2016-03-31 22:42:22 +02:00
Nicolas Grekas
7e01187781 [ci] Skip dns-sensitive tests when DnsMock is not found 2016-03-31 22:06:39 +02:00
Nicolas Grekas
4f90495e59 Exclude Bridge\PhpUnit from composer.json by default 2016-03-31 20:43:11 +02:00
Christian Flothmann
6c3ddf1d88 [Translation] deprecate the backup feature 2016-03-31 20:23:24 +02:00
Charles Sarrazin
29e3d389e5 Added default service name for the Security component's Ldap providers 2016-03-31 18:22:22 +02:00
Fabien Potencier
b03d370be0 feature #18036 [Serializer] XmlEncoder: Make load flags configurable (dunglas)
This PR was squashed before being merged into the 3.1-dev branch (closes #18036).

Discussion
----------

[Serializer] XmlEncoder: Make load flags configurable

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

Commits
-------

0826068 [Serializer] XmlEncoder: Make load flags configurable
2016-03-31 12:08:54 +02:00
Kévin Dunglas
08260680e4 [Serializer] XmlEncoder: Make load flags configurable 2016-03-31 12:08:49 +02:00
Fabien Potencier
ba1cd26237 fixed CS 2016-03-31 12:00:43 +02:00
Fabien Potencier
f03dc6eec5 minor #18257 [Routing] Don't needlessly execute strtr's as they are fairly expensive (arjenm)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] Don't needlessly execute strtr's as they are fairly expensive

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

As requested in #18230 this is a new version of the prevention of using strtr's. I've posted some performance-numbers in that PR as well.

Commits
-------

b3da6a1 [Routing] Don't needlessly execute strtr's as they are fairly expensive
2016-03-31 11:59:59 +02:00
Fabien Potencier
8acc6010ad made test clearer 2016-03-31 11:55:22 +02:00
Fabien Potencier
f76e99b9f4 bug #18320 [FrameworkBundle] Fix Templating Engine autowiring (dunglas)
This PR was squashed before being merged into the 3.1-dev branch (closes #18320).

Discussion
----------

[FrameworkBundle] Fix Templating Engine autowiring

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/18242#discussion_r57471337
| License       | MIT
| Doc PR        | n/a

Commits
-------

c4ccfac [FrameworkBundle] Fix Templating Engine autowiring
2016-03-31 11:54:22 +02:00
Kévin Dunglas
c4ccfac047 [FrameworkBundle] Fix Templating Engine autowiring 2016-03-31 11:54:21 +02:00
Fabien Potencier
e4816def29 bug #18347 Fixed the styles of the Symfony icon in the web debug toolbar (javiereguiluz)
This PR was merged into the 2.8 branch.

Discussion
----------

Fixed the styles of the Symfony icon in the web debug toolbar

| 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        | -

### Before

![symfony_icon_before](https://cloud.githubusercontent.com/assets/73419/14114615/d63240fc-f5d7-11e5-9cd2-b0a67077dbe7.png)

### After

![symfony_icon_after](https://cloud.githubusercontent.com/assets/73419/14114617/d95e7cc8-f5d7-11e5-8ff3-6e706b8c5de8.png)

---

@WhiteEagle88 the change from `24` to `40` was made in [this commit](d120c08f8b) of yours to fix some problems with Microsoft Edge browser. Could you please check if this pull request breaks anything for you? Thanks!

Commits
-------

ddc8d4e Fixed the styles of the Symfony icon in the web debug toolbar
2016-03-31 11:51:31 +02:00
Fabien Potencier
9945d8a159 bug #18265 Optimize ReplaceAliasByActualDefinitionPass (ajb-in)
This PR was merged into the 2.3 branch.

Discussion
----------

Optimize ReplaceAliasByActualDefinitionPass

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

Previous implementation passed over every definition for every alias (n*m runtime).
New implementation passes once over all aliases and once over all definitions (n+m).
Also removing needless "restart" logic.

Commits
-------

ab8dc0c Optimize ReplaceAliasByActualDefinitionPass
2016-03-31 11:36:43 +02:00
Fabien Potencier
536a6cdbd8 feature #17589 [3.1] [WebProfilerBundle] [DX] Feature allow forward and redirection detection in wdt (HeahDude)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[3.1] [WebProfilerBundle] [DX] Feature allow forward and redirection detection in wdt

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

This PR allows to :
- track explicit forward from `\Symfony\Bundle\FrameWorkBundle\Controller\Controller` in the web debug toolbar.
- or pass a request attribute `_forwarded` with the current request attributes (an instance of `ParameterBag`) as value to your sub request before handling it.
- see if you've been redirected (require session enabled)

When redirected you will see the name of the route (if any) and a link to the profile of the original request.

![redirect](https://cloud.githubusercontent.com/assets/10107633/12716952/9aacdcba-c8e4-11e5-9a64-d26fe27f1cae.jpg)

In case of forwarding, the name of the controller is a file link and next to it there is a direct link to the profile of the sub request.

![forward](https://cloud.githubusercontent.com/assets/10107633/12716968/ba6b1fbc-c8e4-11e5-85fc-7f71969cb372.jpg)

This works pretty well in __Silex__ too by registering `SessionServiceProvider()` for redirections or by providing this method for forwarding :

```php
class App extends \Silex\Application
//  (php7 bootstrap) $app = new class extends \Silex\Application {
{
    public function forward($controller, array $path = array(), array $query = array()
    {
        if (!$this->booted) {
            throw new LogicException(sprintf('Method %s must be called from a controller.', __METHOD__));
        }

        $this->flush();

        $request = $this['request_stack']->getCurrentRequest();
        $path['_forwarded'] = $request->attributes;
        $path['_controller'] = $controller;
        $subRequest = $request->duplicate($query, null, $path);

        return $this['kernel']->handle($subRequest, HttpKernelInterface::SUB_REQUEST);
    }
}
```

Commits
-------

0a0e8af [WebProfilerBundle] show the http method in wdt if not 'GET'
4f020b5 [FrameworkBundle] Extends the RequestDataCollector
227ac77 [WebProfilerBundle] [FrameworkBundle] profile forward controller action
0a1b284 [WebProfiler] [HttpKernel] profile redirections
2016-03-31 11:32:58 +02:00
Ariel J. Birnbaum
ab8dc0c9d3 Optimize ReplaceAliasByActualDefinitionPass
Previous implementation passed over every alias and every definition, for every
alias (n*(n+m) runtime). New implementation passes once over all aliases and
once over all definitions (n+m).

Also removing needless "restart" logic --- it has no real effect in either case.
2016-03-31 11:29:03 +02:00
Fabien Potencier
facb21eed9 feature #18260 Add Inflector component (from StringUtil of PropertyAccess) (teohhanhui)
This PR was merged into the 3.1-dev branch.

Discussion
----------

Add Inflector component (from StringUtil of PropertyAccess)

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

As proposed by @dunglas here: https://github.com/symfony/symfony/issues/18166#issuecomment-196707518

This will help us fix #18166

Commits
-------

8abebf6 Add Inflector component (from StringUtil of PropertyAccess)
2016-03-31 10:46:45 +02:00
Fabien Potencier
f1a87dbb58 minor #18375 [Process] use __METHOD__ where applicable (annesosensio)
This PR was squashed before being merged into the 2.3 branch (closes #18375).

Discussion
----------

[Process] use __METHOD__ where applicable

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

Commits
-------

5fd054e [Process] use __METHOD__ where applicable
2016-03-31 10:39:44 +02:00
annesosensio
5fd054e282 [Process] use __METHOD__ where applicable 2016-03-31 10:39:43 +02:00
Fabien Potencier
110d56fdf2 feature #18356 [FrameworkBundle] Deprecated form types as services (HeahDude)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[FrameworkBundle] Deprecated form types as services

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

These services are needless in regard of #15079.
If they have no dependencies, whatever are the registered extensions, `FormTypeInterface` instances will be autoloaded by their FQCN.

Commits
-------

dfe4f53 [FrameworkBundle] Deprecated form types as services
2016-03-31 10:38:23 +02:00
Nicolas Grekas
6ed73d56d9 Merge branch '3.0'
* 3.0:
  [Process] Fix stream_select priority when writing to stdin
  bumped Symfony version to 3.0.5
  updated VERSION for 3.0.4
  updated CHANGELOG for 3.0.4
  [Form] NumberToLocalizedStringTransformer should return floats when possible
  [Form] remove useless code in ChoiceType
  [DependencyInjection] Enabled alias for service_container

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/Process/Pipes/AbstractPipes.php
2016-03-31 10:13:34 +02:00
Nicolas Grekas
c3f0bfe36b Merge branch '2.8' into 3.0
* 2.8:
  [Process] Fix stream_select priority when writing to stdin
  [Form] NumberToLocalizedStringTransformer should return floats when possible
  [Form] remove useless code in ChoiceType
  [DependencyInjection] Enabled alias for service_container

Conflicts:
	src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php
	src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
2016-03-31 10:11:51 +02:00
Nicolas Grekas
f7010ce180 Merge branch '2.7' into 2.8
* 2.7:
  [Process] Fix stream_select priority when writing to stdin
  [Form] NumberToLocalizedStringTransformer should return floats when possible
  [Form] remove useless code in ChoiceType
  [DependencyInjection] Enabled alias for service_container

Conflicts:
	src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php
2016-03-31 10:07:27 +02:00
Nicolas Grekas
2f2ce3e637 Merge branch '2.3' into 2.7
* 2.3:
  [Form] NumberToLocalizedStringTransformer should return floats when possible
  [DependencyInjection] Enabled alias for service_container

Conflicts:
	src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php
2016-03-31 10:05:11 +02:00
Fabien Potencier
26c84dd85f feature #17458 Add strict image validation (Koc)
This PR was merged into the 3.1-dev branch.

Discussion
----------

Add strict image validation

| Q             | A
| ------------- | ---
| Bug fix?      | yes (current validator does not validates corrupted images)
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | not, but fail looks like not relates to this PR
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

getimagesize returns correct size for corrupted images, so I've added another check

Commits
-------

7b6a96e Add corrupted images validation
2016-03-31 09:41:07 +02:00
Teoh Han Hui
8abebf6417 Add Inflector component (from StringUtil of PropertyAccess) 2016-03-31 15:36:48 +08:00
Fabien Potencier
c61077c454 feature #18350 [Process] Accept Traversable input (nicolas-grekas)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Process] Accept Traversable input

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

Commits
-------

b9782b7 [Process] Accept Traversable input
2016-03-31 09:35:54 +02:00
Fabien Potencier
93e09feeba feature #18135 [Security] Deprecate onAuthenticationSuccess() (weaverryan)
This PR was squashed before being merged into the 3.1-dev branch (closes #18135).

Discussion
----------

[Security] Deprecate onAuthenticationSuccess()

| Q             | A
| ------------- | ---
| Branch        | master
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #18027
| License       | MIT
| Doc PR        | not yet - the existing feature is not currently documented

Because of the new `TargetPathTrait`, implementing `onAuthenticationSuccess` yourself is quite easy. I think we should just remove it. This also will fix #18027.

Thanks!

Commits
-------

c4ae80a [Security] Deprecate onAuthenticationSuccess()
2016-03-31 07:34:01 +02:00
Ryan Weaver
c4ae80a9e4 [Security] Deprecate onAuthenticationSuccess() 2016-03-31 07:33:59 +02:00
Konstantin.Myakshin
7b6a96e4f5 Add corrupted images validation 2016-03-31 00:26:49 +03:00
Jules Pietri
dfe4f5308a [FrameworkBundle] Deprecated form types as services 2016-03-30 19:13:54 +02:00
Nicolas Grekas
b9782b7eef [Process] Accept Traversable input 2016-03-30 19:10:46 +02:00
Fabien Potencier
9d7f85ed0e bug #18349 [Process] Fix stream_select priority when writing to stdin (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Process] Fix stream_select priority when writing to stdin

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

Commits
-------

f31e783 [Process] Fix stream_select priority when writing to stdin
2016-03-30 19:06:17 +02:00
Jules Pietri
0a0e8afa09 [WebProfilerBundle] show the http method in wdt if not 'GET'
When the request method is different from 'GET', the wdt add a
hint before the route name in the request panel.
2016-03-30 19:04:14 +02:00