Commit Graph

23292 Commits

Author SHA1 Message Date
Christophe Coevoet
528d3bd153 Add a few additional tests for the Crawler 2015-10-03 01:29:51 +02:00
Tobias Schultze
dd5064578e [Form] remove obsolete deprecation comments 2015-10-03 00:55:12 +02:00
Tobias Schultze
3b7cb3350a fix validator test dependency 2015-10-02 19:46:29 +02:00
Fabien Potencier
6acd43d45f minor #16085 [Debug] Deprecate providing $fileLinkFormat as second argument (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Debug] Deprecate providing $fileLinkFormat as second argument

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

Commits
-------

ed3611d [Debug] Deprecate providing $fileLinkFormat as second argument
2015-10-02 19:35:32 +02:00
Fabien Potencier
d606e76ecf feature #16075 [3.0] Clean Form, Validator, DowCrawler and some more (nicolas-grekas)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[3.0] Clean Form, Validator, DowCrawler and some more

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

Commits
-------

abca2d6 [3.0] Clean Form, Validator, DowCrawler and some more
2015-10-02 19:33:59 +02:00
Nicolas Grekas
abca2d6fdc [3.0] Clean Form, Validator, DowCrawler and some more 2015-10-02 19:05:43 +02:00
Fabien Potencier
98d9f26e79 minor #16082 Updated PHPDoc of the AbstractVoter class (Koc)
This PR was merged into the 2.8 branch.

Discussion
----------

Updated PHPDoc of the AbstractVoter class

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

ref https://github.com/symfony/symfony/pull/16035/files#r41016746

Commits
-------

68d010a Updated PHPDoc of the AbstractVoter class
2015-10-02 18:42:52 +02:00
Fabien Potencier
513fc315d6 minor #16084 [Form] minor CS fix (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] minor CS fix

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

Commits
-------

c92809a [Form] minor CS fix
2015-10-02 18:41:44 +02:00
Fabien Potencier
2c9153c9c9 minor #15999 Updated the style of the event commands (javiereguiluz)
This PR was squashed before being merged into the 2.8 branch (closes #15999).

Discussion
----------

Updated the style of the event commands

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

![event_1](https://cloud.githubusercontent.com/assets/73419/10164747/a04d2188-66bb-11e5-975f-4c3246981ed9.png)

![event_2](https://cloud.githubusercontent.com/assets/73419/10164749/a245f96a-66bb-11e5-99b0-d6f2814e1e9b.png)

![event_3](https://cloud.githubusercontent.com/assets/73419/10164752/a4a4880c-66bb-11e5-9595-4fc14f33b871.png)

Commits
-------

6633cac Updated the style of the event commands
2015-10-02 18:40:56 +02:00
Javier Eguiluz
6633cac4e7 Updated the style of the event commands 2015-10-02 18:40:54 +02:00
Nicolas Grekas
ed3611da25 [Debug] Deprecate providing $fileLinkFormat as second argument 2015-10-02 18:37:57 +02:00
Nicolas Grekas
c92809a1fd [Form] minor CS fix 2015-10-02 18:35:24 +02:00
Konstantin Myakshin
68d010aaff Updated PHPDoc of the AbstractVoter class 2015-10-02 18:38:39 +03:00
Fabien Potencier
4478cde89a Merge branch '2.8'
* 2.8:
  use PHP_OS instead of php_uname('s')
2015-10-02 16:58:35 +02:00
Fabien Potencier
1805649181 Merge branch '2.7' into 2.8
* 2.7:
  use PHP_OS instead of php_uname('s')
2015-10-02 16:08:20 +02:00
Fabien Potencier
fdce6ac104 Merge branch '2.3' into 2.7
* 2.3:
  use PHP_OS instead of php_uname('s')
2015-10-02 15:59:42 +02:00
Tobias Schultze
e8d6764e32 [HttpFoundation] change precedence of parameters in Request::get 2015-10-02 15:56:23 +02:00
Fabien Potencier
4067a5cd8f Merge branch '2.8'
* 2.8:
  Updated the stlyes of the YAML commands
  [Security] Configuring a user checker per firewall
  [PropertyInfo] Test behavior when an extractor return null.
2015-10-02 15:22:00 +02:00
Fabien Potencier
112c66c944 minor #15991 Updated the stlyes of the YAML commands (javiereguiluz)
This PR was squashed before being merged into the 2.8 branch (closes #15991).

Discussion
----------

Updated the stlyes of the YAML commands

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

![yaml_1](https://cloud.githubusercontent.com/assets/73419/10158656/dfedd2ec-6693-11e5-8691-304b5dd19edc.png)

![yaml_2](https://cloud.githubusercontent.com/assets/73419/10158658/e22e1bfc-6693-11e5-9626-38f21ffb5a9a.png)

Commits
-------

c3ce7ca Updated the stlyes of the YAML commands
2015-10-02 15:03:18 +02:00
Javier Eguiluz
c3ce7ca141 Updated the stlyes of the YAML commands 2015-10-02 15:03:16 +02:00
Fabien Potencier
1e0adf4c21 feature #14721 [Security] Configuring a user checker per firewall (iltar)
This PR was squashed before being merged into the 2.8 branch (closes #14721).

Discussion
----------

[Security] Configuring a user checker per firewall

_Changed my base branch to avoid issues, closed old PR_

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed ticket | #11090 and helps #14673
| License       | MIT
| Doc PR        | symfony/symfony-docs/pull/5530

This pull request adds support for a configurable user checker per firewall. An example could be:

```yml
services:
    app.user_checker:
        class: App\Security\UserChecker
        arguments:
            - "@request_stack"

security:
    firewalls:
        secured_area:
            pattern: ^/
            anonymous: ~
            basic_auth: ~
            user_checker: app.user_checker

```
The above example will use the `UserChecker` defined as `app.user_checker`. If the `user_checker` option is left empty, `security.user_checker` will  be used. If the `user_checkers` option is not defined, it will fall back to the original behavior to not break backwards compatibility and will validate using the existing `UserChecker`: `security.user_checker`.

I left the default argument in the service definitions to be `security.user_checker` to include backwards compatibility for people who for some reason don't have the extension executed. You can obtain the checker for a specific firewall by appending the firewall name to it. For the firewall `secured_area`, this would be `security.user_checker.secured_area`.

Commits
-------

76bc662 [Security] Configuring a user checker per firewall
2015-10-02 14:49:38 +02:00
Iltar van der Berg
76bc662463 [Security] Configuring a user checker per firewall 2015-10-02 14:49:36 +02:00
Fabien Potencier
8879a5fa9a bug #16053 [Console] use PHP_OS instead of php_uname('s') (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] use PHP_OS instead of php_uname('s')

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

The php_uname() function may be disabled for security reasons.

Commits
-------

40e0dc8 use PHP_OS instead of php_uname('s')
2015-10-02 14:47:06 +02:00
Fabien Potencier
cddc6b9532 minor #16068 [PropertyInfo] Test behavior when an extractor returns null (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[PropertyInfo] Test behavior when an extractor returns null

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

Add a test as suggested by @stof in https://github.com/symfony/symfony/pull/16064#issuecomment-144975004

Commits
-------

73ee226 [PropertyInfo] Test behavior when an extractor return null.
2015-10-02 14:45:01 +02:00
Fabien Potencier
7e3c4a6afd feature #16035 [3.0][Security] Remove deprecated features (follow up of #15899) (Koc)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[3.0][Security] Remove deprecated features (follow up of #15899)

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

- updated UPGRADE-3.0.md
- removed unused `supportsClass` methods
- changed visibility of `supportsAttribute` methods from public to private, removed `inheritdoc` annotation from them because there is no definition for this methods in parent interface
- removed tests for `supportsClass` and `supportsAttribute` method
- removed unused mock creation

Commits
-------

437398d [3.0][Security] Remove deprecated features (follow up of #15899)
2015-10-02 14:41:26 +02:00
Fabien Potencier
094ca41a5f Merge branch '2.8'
* 2.8:
  [Yaml] Add regression test for comments indents
  Fix the DomCrawler tests
  Revert "bug #15860 [Yaml] Fix improper comments removal (ogizanagi)"
2015-10-02 14:38:08 +02:00
Fabien Potencier
f4a2752f9a Merge branch '2.7' into 2.8
* 2.7:
  [Yaml] Add regression test for comments indents
  Revert "bug #15860 [Yaml] Fix improper comments removal (ogizanagi)"
2015-10-02 14:38:01 +02:00
Fabien Potencier
34c8a7c51c Merge branch '2.3' into 2.7
* 2.3:
  [Yaml] Add regression test for comments indents
  Revert "bug #15860 [Yaml] Fix improper comments removal (ogizanagi)"
2015-10-02 14:36:41 +02:00
Fabien Potencier
8fdb41249d feature #8967 [HttpFoundation] Request->getRequestFormat should only rely on the request attributes (pvandommelen)
This PR was squashed before being merged into the 3.0-dev branch (closes #8967).

Discussion
----------

[HttpFoundation] Request->getRequestFormat should only rely on the request attributes

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

Added test case and fix for #8966. Is this functionality relied on somewhere?

Commits
-------

7115c1e [HttpFoundation] Request->getRequestFormat should only rely on the request attributes
2015-10-02 14:34:37 +02:00
Peter van Dommelen
7115c1e1d9 [HttpFoundation] Request->getRequestFormat should only rely on the request attributes 2015-10-02 14:34:33 +02:00
Fabien Potencier
351bccbffb minor #16074 [Yaml] Add regression test for comments indents (ogizanagi)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] Add regression test for comments indents

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

This is related to #16065, #15857 and #15860  (last one has been reverted due to this regression)

Commits
-------

7b9d519 [Yaml] Add regression test for comments indents
2015-10-02 14:33:33 +02:00
Fabien Potencier
a6d5c3305c minor #16073 Fix the DomCrawler tests (stof)
This PR was merged into the 2.8 branch.

Discussion
----------

Fix the DomCrawler tests

| 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

This fixes the tests by applying changes from #16057 and #16058 in the right order in ``addNode``

Commits
-------

e6feed2 Fix the DomCrawler tests
2015-10-02 14:32:10 +02:00
Fabien Potencier
c3bad5aafd Merge branch '2.8'
* 2.8:
  added missing a deprecated notice
  Move AjaxCollector for use without framework bundle
  Deprecate loading multiple documents in the same crawler
  [VarDumper] Add $this->getDump($var) when using VarDumperTestTrait
  Prevent adding non-DOMElement elements in DomCrawler
  [appveyor] Fix command line
  Using a service as a router resource
  Fluid interface for building routes in PHP
  Updated the styles of the container commands
  fix tests after twig commands style changes
  synchronize tests for static and non-static API
  [DomCrawler] fix deprecation triggers
  [Yaml] Fix improper comments removal inside strings
2015-10-02 14:29:10 +02:00
maxime.steinhausser
7b9d519b0f [Yaml] Add regression test for comments indents 2015-10-02 14:20:54 +02:00
Christophe Coevoet
e6feed285a Fix the DomCrawler tests 2015-10-02 14:05:56 +02:00
Fabien Potencier
5ab9954432 feature #16067 [3.0] Remove more deprecated interfaces in Form and Validator (nicolas-grekas)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[3.0] Remove more deprecated interfaces in Form and Validator

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

Commits
-------

a743fb6 [3.0] Remove more deprecated interfaces in Form and Validator
2015-10-02 13:26:14 +02:00
Fabien Potencier
584cfc24a1 feature #16069 [WebProfilerBundle] Move AjaxCollector to HttpKernel for use with Silex (glaubinix, fabpot)
This PR was merged into the 2.8 branch.

Discussion
----------

[WebProfilerBundle] Move AjaxCollector to HttpKernel for use with Silex

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

This PR moves the AjaxDataCollector from the FrameworkBundle to the HttpKernel Component where most of the other DataCollectors are. This would allow applications which are not base on symfony/framework-bundle to use the collector. Like for instance applications based on silex or symfony components.

Commits
-------

3841f46 added missing a deprecated notice
c227806 Move AjaxCollector for use without framework bundle
2015-10-02 13:25:03 +02:00
Nicolas Grekas
a743fb6e9f [3.0] Remove more deprecated interfaces in Form and Validator 2015-10-02 12:57:59 +02:00
Fabien Potencier
6413fb7743 feature #16063 [VarDumper] Add $this->getDump($var) when using VarDumperTestTrait (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Add $this->getDump($var) when using VarDumperTestTrait

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

So useful when writing/updating dump fixtures!

Commits
-------

aa1d578 [VarDumper] Add $this->getDump($var) when using VarDumperTestTrait
2015-10-02 12:42:43 +02:00
Fabien Potencier
9e60980f5a feature #16058 Prevent adding non-DOMElement elements in DomCrawler (stof)
This PR was merged into the 2.8 branch.

Discussion
----------

Prevent adding non-DOMElement elements in DomCrawler

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

Many methods of the DomCrawler component are relying on the DOMElement API, not only on the DOMNode API. All the typehints in the Form and Link APIs were already fixed in 2.5 because they are unusable with other kinds of nodes (fatal errors). However, the Crawler itself was not fixed. and this means that a bunch of its APIs can trigger fatal errors when passing other kinds of nodes.

Thus, there is a case where the code was allowing such nodes to be injected in the Crawler for some XPath queries. I fixed it to avoid it, adding the same kind of filtering than in other places.

Commits
-------

9f362a1 Prevent adding non-DOMElement elements in DomCrawler
2015-10-02 12:40:27 +02:00
Fabien Potencier
4af8a5545a feature #16057 Deprecate loading multiple documents in the same crawler (stof)
This PR was merged into the 2.8 branch.

Discussion
----------

Deprecate loading multiple documents in the same crawler

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

Note that loading multiple documents in the same crawler already creates weird things when working with namespaces (the list of mapping of aliases to namespaces is shared between documents, which was flawed).

As said in the issue, this opens the door to optimizations in the future (sharing the DOMXpath instance for instance, including with subcrawler)

Commits
-------

0d1cb3b Deprecate loading multiple documents in the same crawler
2015-10-02 12:39:30 +02:00
Fabien Potencier
3841f4624d added missing a deprecated notice 2015-10-02 12:23:49 +02:00
Stephan Vock
c2278062b1 Move AjaxCollector for use without framework bundle 2015-10-02 12:20:34 +02:00
Kévin Dunglas
73ee226a1f [PropertyInfo] Test behavior when an extractor return null. 2015-10-02 12:16:37 +02:00
Fabien Potencier
510fdea599 Revert "bug #15860 [Yaml] Fix improper comments removal (ogizanagi)"
This reverts commit 150f52f3aa, reversing
changes made to 74af02a771.
2015-10-02 12:12:23 +02:00
Christophe Coevoet
0d1cb3bd1b Deprecate loading multiple documents in the same crawler 2015-10-02 10:46:05 +02:00
Nicolas Grekas
aa1d578c2c [VarDumper] Add $this->getDump($var) when using VarDumperTestTrait 2015-10-02 10:06:31 +02:00
Christophe Coevoet
9f362a12f6 Prevent adding non-DOMElement elements in DomCrawler
Many methods of the DomCrawler component are relying on the DOMElement
API, not only on the DOMNode API.
2015-10-02 10:01:39 +02:00
Nicolas Grekas
372be7eeb5 Fix merge 2015-10-02 09:42:39 +02:00
Nicolas Grekas
5075e6c976 [appveyor] Fix command line 2015-10-02 09:16:19 +02:00