Commit Graph

28341 Commits

Author SHA1 Message Date
Nicolas Grekas
fa36e1d377 [ClassLoader] Deprecate Apc/WinCache/Xcache class loaders 2016-12-06 11:57:32 +01:00
Kévin Dunglas
24d8135f17
feature #19958 [Serializer] Throw exception when extra attributes are used during an object denor… (juliendidier)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Serializer] Throw exception when extra attributes are used during an object denor…

| Q | A |
| --- | --- |
| Branch? | "master" |
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #19948 |
| License | MIT |
| Doc PR | [#6975](https://github.com/symfony/symfony-docs/pull/6975) |

I will update the doc if you're ok with this PR.

Commits
-------

565a984 throw exception when extra attributes are used during an object denormalization
2016-12-05 13:56:10 +01:00
Fabien Potencier
60b4dd0514 feature #20310 [Ldap] Allow search scoping (xunto)
This PR was squashed before being merged into the 3.3-dev branch (closes #20310).

Discussion
----------

[Ldap] Allow search scoping

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

Quite trivial, PR adds "scope" attribute to the query options. For example:

```php
    public function ldapAction()
    {
        $ldap = $this->get("app.ldap");
        $dn = $this->getParameter("dn");

        $results = $ldap->query($dn, "(objectClass=*)", [
            "scope" => Query::SCOPE_ONELEVEL
        ])->execute();

        foreach ($results as $entry) {
            var_dump($entry->getDn()); echo "<br/>";
        }

        return new Response("");
    }
```

SCOPE_BASE: http://php.net/manual/ru/function.ldap-read.php
SCOPE_ONELEVEL: http://php.net/manual/ru/function.ldap-list.php
SCOPE_SUBTREE: http://php.net/manual/ru/function.ldap-search.php

Commits
-------

83c7915 [Ldap] Allow search scoping
2016-12-04 14:44:28 +01:00
orlovv
83c79156a5 [Ldap] Allow search scoping 2016-12-04 14:44:26 +01:00
Fabien Potencier
d6e8937e69 feature #18952 [Security] Add a JSON authentication listener (dunglas)
This PR was squashed before being merged into the 3.3-dev branch (closes #18952).

Discussion
----------

[Security] Add a JSON authentication listener

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

Add a new authentication listener allowing to login by sending a JSON document like:

 `{"_username": "dunglas", "_password": "foo"}`.

It is similar to the traditional form login (but take a JSON document as entry) and is convenient for APIs, especially used in combination with JWT.

See https://github.com/api-platform/core/issues/563 and https://github.com/lexik/LexikJWTAuthenticationBundle/issues/123#issuecomment-173860682 for previous discussions.
- [x] Add functional tests in security bundle

Commits
-------

02178bc [Security] Add a JSON authentication listener
2016-12-03 12:13:37 +01:00
Kévin Dunglas
02178bc12f [Security] Add a JSON authentication listener 2016-12-03 12:13:36 +01:00
Fabien Potencier
e8553a818e feature #20161 add toolbar & profiler SVG style classes (havvg)
This PR was submitted for the 2.8 branch but it was merged into the 3.3-dev branch instead (closes #20161).

Discussion
----------

add toolbar & profiler SVG style classes

| Q | A |
| --- | --- |
| Bug fix? | no |
| New feature? | Technically, yes - but actually not |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| License | MIT |

This allows the usage of SVG not only containing `path` elements. I opted for a generic solution using the two classes to apply to any SVG, one would like to use within the toolbar (`sf-toolbar-path`) and/or profiler (`sf-profiler-path`).

Commits
-------

155a1fc add toolbar & profiler SVG style classes
2016-12-02 13:16:34 +01:00
Toni Uebernickel
155a1fc785 add toolbar & profiler SVG style classes 2016-12-02 13:16:33 +01:00
Fabien Potencier
122fae8757 feature #20467 [DomCrawler] Add support for formaction and formmethod attributes (stof)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DomCrawler] Add support for formaction and formmethod attributes

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

This adds supports for the ``formaction`` and ``formmethod`` of submit elements, which override the values defined on the ``<form>`` element.
This works only when you call ``$crawler->form()`` on a Crawler containing a button, not when it contains the ``<form>`` itself of course (as the button override is applied only when using this button to submit, not when using another way).

Other button-level overrides are not implemented:
- ``formtarget`` is useless as we don't implement ``target`` either (the Crawler does not deal with frame-based pages anyway)
- ``formnovalidate`` is ignored, as we don't automatically disable the form validation on ``novalidate`` either, but we require an explicit disabling instead (this might be subject to a separate PR though, as it could make sense)
- ``formenctype`` is ignored as we also ignore ``enctype`` (we always submit file fields, even when missing the proper enctype)

Commits
-------

717cf8a [DomCrawler] Add support for formaction and formmethod attributes
2016-12-02 13:07:28 +01:00
Fabien Potencier
20076b0d12 minor #20452 debug service with one line by tag (nykopol)
This PR was submitted for the 2.8 branch but it was merged into the 3.3-dev branch instead (closes #20452).

Discussion
----------

debug service with one line by tag

| Q             | A
| ------------- | ---
| Branch?       | 2.8, 3.*
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Since the 2.8 branch, the `debug:container` command output service tags in one single line.
So if the debugged service have many tags, this print an unreadable large table.

This PR solve this issue by printing one line by tag.

Commits
-------

dbf4850 debug service with one line by tag
2016-12-02 13:03:41 +01:00
Johan DESMYTER
dbf4850268 debug service with one line by tag 2016-12-02 13:03:32 +01:00
Fabien Potencier
fe454e42e1 feature #20509 [Serializer] Allow to specify a single value in @Groups (dunglas)
This PR was squashed before being merged into the 3.3-dev branch (closes #20509).

Discussion
----------

[Serializer] Allow to specify a single value in @Groups

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

Tiny DX improvement:

Before:

```php
use Symfony\Component\Serializer\Annotation\Groups;

class Product
{
    /**
     * @Groups({"admins"})
     */
    public $itemsSold;
}
```

Now allowed:

```php
use Symfony\Component\Serializer\Annotation\Groups;

class Product
{
    /**
     * @Groups("admins")
     */
    public $itemsSold;
}
```

Commits
-------

926aa48 [Serializer] Allow to specify a single value in @Groups
2016-12-02 12:58:15 +01:00
Kévin Dunglas
926aa480b2 [Serializer] Allow to specify a single value in @Groups 2016-12-02 12:58:14 +01:00
Fabien Potencier
6a0ee38c64 feature #20722 Updated the "Symfony Config" panel in the profiler (javiereguiluz)
This PR was squashed before being merged into the 3.3-dev branch (closes #20722).

Discussion
----------

Updated the "Symfony Config" panel in the profiler

| 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 adds more information about the status of your Symfony version:

![symfony_config](https://cloud.githubusercontent.com/assets/73419/20830798/8ad42a1c-b882-11e6-9c5f-fac392d3118f.png)

And here some screenshots of the different statuses:

![symfony-dev](https://cloud.githubusercontent.com/assets/73419/20830807/9757aa2a-b882-11e6-8049-c156d9b16c83.png)

![symfony-eom](https://cloud.githubusercontent.com/assets/73419/20830810/9973b330-b882-11e6-8d57-6da3baafc256.png)

![symfony-eol](https://cloud.githubusercontent.com/assets/73419/20830811/9b99c67c-b882-11e6-8ff4-c76c77266e0c.png)

Commits
-------

0e454f3 Updated the "Symfony Config" panel in the profiler
2016-12-02 12:40:48 +01:00
Javier Eguiluz
0e454f3021 Updated the "Symfony Config" panel in the profiler 2016-12-02 12:40:47 +01:00
Nicolas Grekas
e765849215 Merge branch '3.2'
* 3.2:
  Switch to NoRFCWarningsValidation
2016-11-29 14:39:51 +01:00
Nicolas Grekas
0e12427838 bug #20607 [Validator] Bring egulias/email-validator ~2.0 to parity with ~1.2 (Lctrs)
This PR was merged into the 3.2 branch.

Discussion
----------

[Validator] Bring egulias/email-validator ~2.0 to parity with ~1.2

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

When using egulias/email-validator ~1.2, we make a strict check of the email, which means that emails with RFC warnings will fail validation.
Currently with egulias/email-validator ~2.0, emails with warnings are considerate valids.

This pull request make EmailValidator with egulias/email-validator ~2.0 behave as with egulias/email-validator ~1.2.

Commits
-------

01b2f66 Switch to NoRFCWarningsValidation
2016-11-29 14:39:34 +01:00
Nicolas Grekas
2cdc6d2a07 Merge branch '3.2'
* 3.2:
  [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class
  [VarDumper] Use default color for ellipsed namespaces/paths
  mark alias as private during creation
  [Serializer] Remove unused GetSetMethodNormalizer::denormalize
2016-11-29 12:12:53 +01:00
Nicolas Grekas
bd5af67f08 Merge branch '3.1' into 3.2
* 3.1:
  [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class
  mark alias as private during creation
  [Serializer] Remove unused GetSetMethodNormalizer::denormalize
2016-11-29 12:12:32 +01:00
Nicolas Grekas
b9ed4bfacc Merge branch '2.8' into 3.1
* 2.8:
  [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class
2016-11-29 12:09:13 +01:00
Nicolas Grekas
25fa4a0ddf Merge branch '2.7' into 2.8
* 2.7:
  [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class
2016-11-29 12:08:50 +01:00
Nicolas Grekas
c360a222ef bug #20671 [Config] ConfigCache::isFresh() should return false when unserialize() fails (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Config] ConfigCache::isFresh() should return false when unserialize() fails

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

Removes some `Warning: Class __PHP_Incomplete_Class has no unserializer` failures when clearing the cache.

Commits
-------

609245e [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class
2016-11-29 11:51:46 +01:00
Nicolas Grekas
609245e953 [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class 2016-11-29 11:39:48 +01:00
Nicolas Grekas
726c781b11 bug #20679 [VarDumper] Use default color for ellipsed namespaces/paths (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[VarDumper] Use default color for ellipsed namespaces/paths

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

Eases readability by helping the eye to focus more quickly on the class name and less on its namespace.
And let' disable ellipses on the profiler panels, fixing #20669 meanwhile.

![capture du 2016-11-29 11-00-00](https://cloud.githubusercontent.com/assets/243674/20705475/5d512c9a-b623-11e6-881d-04ae58453824.png)

Commits
-------

ebc23cf [VarDumper] Use default color for ellipsed namespaces/paths
2016-11-29 11:33:09 +01:00
Nicolas Grekas
ebc23cf222 [VarDumper] Use default color for ellipsed namespaces/paths 2016-11-29 11:23:40 +01:00
Fabien Potencier
8835522120 Merge branch '3.2'
* 3.2:
  [ClassLoader] Use only forward slashes in generated class map
  [VarDumper][HttpKernel] Enhance perf of ExceptionCaster & DataCollector
  ensure the proper context for nested validations
  bug #20653 [WebProfilerBundle] Profiler includes ghost panels
  Fixed getRouteParams() when no parameters are available
  bumped Symfony version to 3.2.0
  updated VERSION for 3.2.0-RC2
  updated CHANGELOG for 3.2.0-RC2
2016-11-29 09:26:23 +01:00
Fabien Potencier
d5624a61c3 Merge branch '2.8' into 3.2
* 2.8:
  [ClassLoader] Use only forward slashes in generated class map
  ensure the proper context for nested validations
  bug #20653 [WebProfilerBundle] Profiler includes ghost panels
2016-11-29 09:26:13 +01:00
Fabien Potencier
27e2b9d957 Merge branch '2.8' into 3.1
* 2.8:
  [ClassLoader] Use only forward slashes in generated class map
  ensure the proper context for nested validations
  bug #20653 [WebProfilerBundle] Profiler includes ghost panels
2016-11-29 09:26:03 +01:00
Fabien Potencier
d3014e4695 Merge branch '2.7' into 2.8
* 2.7:
  [ClassLoader] Use only forward slashes in generated class map
  ensure the proper context for nested validations
  bug #20653 [WebProfilerBundle] Profiler includes ghost panels
2016-11-29 09:25:54 +01:00
Fabien Potencier
ee4ae55896 minor #20675 [VarDumper][HttpKernel] Enhance perf of ExceptionCaster & DataCollector (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[VarDumper][HttpKernel] Enhance perf of ExceptionCaster & DataCollector

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

In **dev** on 3.2 , serializing collectors' data is slow because VarDumper is called so many times.
Here is a PR to make it a bit faster, with its Blackfire profile:
https://blackfire.io/profiles/compare/6f0fdc7a-9157-4dad-bee4-4c98a96184b2/graph

Note that it is possible to make things fast again by replacing these multiple calls by a single one juste before serializing the data. Yet, it's not trivial and VarDumper misses a few features to allow dealing with an unserialized Data object and make it look like a real data structure to other code. I'll look at it for 3.3.

Commits
-------

be2b7df [VarDumper][HttpKernel] Enhance perf of ExceptionCaster & DataCollector
2016-11-29 09:21:10 +01:00
Fabien Potencier
49addbe040 bug #20676 [ClassLoader] Use only forward slashes in generated class map (nicolas-grekas)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #20676).

Discussion
----------

[ClassLoader] Use only forward slashes in generated class map

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

Commits
-------

6d1f1b5 [ClassLoader] Use only forward slashes in generated class map
2016-11-29 09:16:08 +01:00
Nicolas Grekas
6d1f1b5d4a [ClassLoader] Use only forward slashes in generated class map 2016-11-29 09:16:08 +01:00
Fabien Potencier
ec937cbcd9 bug #20664 [Validator] ensure the proper context for nested validations (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] ensure the proper context for nested validations

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

Commits
-------

56c8ff8 ensure the proper context for nested validations
2016-11-29 09:13:44 +01:00
Fabien Potencier
e4a2c17a19 minor #20666 [FrameworkBundle] mark alias as private during creation (xabbuh)
This PR was merged into the 3.1 branch.

Discussion
----------

[FrameworkBundle] mark alias as private during creation

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

Commits
-------

828c761 mark alias as private during creation
2016-11-29 09:10:50 +01:00
Fabien Potencier
64593496ed minor #20623 [Serializer] Remove unused GetSetMethodNormalizer::denormalize (dunglas)
This PR was merged into the 3.1 branch.

Discussion
----------

[Serializer] Remove unused GetSetMethodNormalizer::denormalize

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

Commits
-------

0896b02 [Serializer] Remove unused GetSetMethodNormalizer::denormalize
2016-11-29 09:09:40 +01:00
Fabien Potencier
6d01ad2a92 bug #20661 bug #20653 [WebProfilerBundle] Profiler includes ghost panels (jzawadzki)
This PR was merged into the 2.7 branch.

Discussion
----------

bug #20653 [WebProfilerBundle] Profiler includes ghost panels

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Fixed tickets | #20653
| License       | MIT

Commits
-------

73cf796 bug #20653 [WebProfilerBundle] Profiler includes ghost panels
2016-11-29 09:07:07 +01:00
Nicolas Grekas
be2b7df5c5 [VarDumper][HttpKernel] Enhance perf of ExceptionCaster & DataCollector 2016-11-28 21:08:24 +01:00
Christian Flothmann
56c8ff8b21 ensure the proper context for nested validations 2016-11-28 10:01:58 +01:00
Christian Flothmann
828c76154f mark alias as private during creation 2016-11-28 07:44:24 +01:00
Jerzy Zawadzki
73cf796029 bug #20653 [WebProfilerBundle] Profiler includes ghost panels 2016-11-27 21:52:05 +00:00
Nicolas Grekas
cb03103570 bug #20652 Fixed getRouteParams() when no parameters are available (wouterj)
This PR was merged into the 3.2 branch.

Discussion
----------

Fixed getRouteParams() when no parameters are available

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

Commits
-------

040da81 Fixed getRouteParams() when no parameters are available
2016-11-27 12:54:20 +01:00
WouterJ
040da8116e Fixed getRouteParams() when no parameters are available 2016-11-27 12:45:23 +01:00
Fabien Potencier
02dc4be9e4 bumped Symfony version to 3.2.0 2016-11-26 21:16:08 -08:00
Fabien Potencier
1a29cec155 Merge pull request #20649 from fabpot/release-3.2.0-RC2
released v3.2.0-RC2
2016-11-26 20:46:36 -08:00
Fabien Potencier
42d6eac045 updated VERSION for 3.2.0-RC2 2016-11-26 20:46:10 -08:00
Fabien Potencier
6f04b220ac updated CHANGELOG for 3.2.0-RC2 2016-11-26 20:45:52 -08:00
Fabien Potencier
ea7e2452bd Merge branch '3.2'
* 3.2:
  Fix tests that do not trigger any depreciation
  [HttpFoundation] Fix test ensuring isMethodSafe() checks cacheable
  [Cache] Mark FilesystemAdapterTrait as internal
  [FrameworkBundle] Dont rely on any parent definition for "cache.annotations"
2016-11-26 20:22:04 -08:00
Fabien Potencier
a8c279d7a8 Merge branch '3.1' into 3.2
* 3.1:
  [HttpFoundation] Fix test ensuring isMethodSafe() checks cacheable
2016-11-26 20:21:38 -08:00
Fabien Potencier
401396ac12 Merge branch '2.8' into 3.1
* 2.8:
  [HttpFoundation] Fix test ensuring isMethodSafe() checks cacheable
2016-11-26 20:21:07 -08:00
Fabien Potencier
cae4755096 Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] Fix test ensuring isMethodSafe() checks cacheable
2016-11-26 20:20:28 -08:00