Commit Graph

30262 Commits

Author SHA1 Message Date
Grégoire Pineau
fb5e6cec57 minor #22042 [Workflow] add Phpdoc for better IDE support (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

[Workflow] add Phpdoc for better IDE support

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

Allow IDEs to provide more precise auto-completion support.

Commits
-------

916a97c834 [Workflow] add Phpdoc for better IDE support
2017-03-17 16:57:43 +01:00
Christian Flothmann
916a97c834 [Workflow] add Phpdoc for better IDE support
Allow IDEs to provide more precise auto-completion support.
2017-03-17 16:32:08 +01:00
Nicolas Grekas
398d78d758 Merge branch '3.2'
* 3.2:
  [Cache] cache/integration-tests is now compatible with phpunit namespaces
  [FrameworkBundle] Fix translation dep constraint
  [Workflow] Added more tests
  [Cache] Enhance error reporting for FilesystemAdapter
2017-03-17 15:59:00 +01:00
Fabien Potencier
813a7e9ef3 minor #22041 [FrameworkBundle] fix package name in conflict rule (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] fix package name in conflict rule

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

Commits
-------

71e93dddf2 fix package name in conflict rule
2017-03-17 07:56:05 -07:00
Nicolas Grekas
ce55ce7d97 minor #22037 [Cache] cache/integration-tests is now compatible with phpunit namespaces (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[Cache] cache/integration-tests is now compatible with phpunit namespaces

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

Commits
-------

2e2d018 [Cache] cache/integration-tests is now compatible with phpunit namespaces
2017-03-17 15:49:01 +01:00
Christian Flothmann
71e93dddf2 fix package name in conflict rule 2017-03-17 15:28:59 +01:00
Christian Flothmann
46c12c9d1d improve message when workflows are missing 2017-03-17 15:26:20 +01:00
Nicolas Grekas
2e2d018dd8 [Cache] cache/integration-tests is now compatible with phpunit namespaces 2017-03-17 14:59:28 +01:00
Robin Chalas
fc1ba0d64a Skip abstract definitions in compiler passes 2017-03-17 14:55:48 +01:00
Nicolas Grekas
3fe34be1ed bug #22032 [FrameworkBundle] Fix translation dep constraint (chalasr)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Fix translation dep constraint

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

The framework Translator makes use of the Translator component domain exceptions which exist since 3.2 only, leading to a fatal error when one of these exceptions is thrown in the framework using `symfony/translations:<3.2`. Bug introduced in https://github.com/symfony/symfony/pull/20012

Commits
-------

e1caf7d [FrameworkBundle] Fix translation dep constraint
2017-03-17 13:00:40 +01:00
Nicolas Grekas
6315c1d5aa bug #21996 [Cache] Enhance error reporting for FilesystemAdapter (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[Cache] Enhance error reporting for FilesystemAdapter

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

So that we can provide feedback for cases like #21995

Commits
-------

ebb316d [Cache] Enhance error reporting for FilesystemAdapter
2017-03-17 12:53:30 +01:00
Robin Chalas
e1caf7da7f [FrameworkBundle] Fix translation dep constraint 2017-03-17 11:28:35 +01:00
Fabien Potencier
eb6f3f7515 minor #22026 Fix dotenv documentation link (bitdagger)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Fix dotenv documentation link

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see comment below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | <!--highly recommended for new features-->

Replaces the Documentation link for the DotEnv component with the correct link.

Context: https://github.com/symfony/symfony-docs/issues/7526#issuecomment-287095159

Commits
-------

8810d61ee3 Fix dotenv documentation link
2017-03-16 14:55:36 -07:00
Nicolas Grekas
e0a5eecf2a [DI] Remove useless state from ServiceLocator 2017-03-16 19:18:58 +01:00
Matt Fields
8810d61ee3 Fix dotenv documentation link
Context: https://github.com/symfony/symfony-docs/issues/7526#issuecomment-287095159
2017-03-16 11:46:40 -04:00
Grégoire Pineau
067ce70b34 minor #22020 [Workflow] Added more tests (lyrixx)
This PR was merged into the 3.2 branch.

Discussion
----------

[Workflow] Added more tests

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

---

It's not the first time that people try to fix the workflow because they don't understand how it works. Basically, it's because the default configuration is using the "workflow" and not the "state_machine" type. It was a mistake but it's too late because it will be BC break. May be we could solve that by triggering a deprecation if the type is not explicit. But nobody will see it because it will be triggered during the compilation. It could also be fixed with more documentation.

Anyway, I want to add more tests to cover that with a little comment in the test suite. Right now, only one tests failed. With this PR more tests are failing.

Commits
-------

e47cfe903e [Workflow] Added more tests
2017-03-16 11:26:54 +01:00
Grégoire Pineau
e47cfe903e [Workflow] Added more tests 2017-03-16 10:59:44 +01:00
Dmytro Boiko
522ec3ef0c [Security] Added option to return true in the method isRememberMeRequested 2017-03-16 00:06:02 +02:00
Fabien Potencier
18bbf3741a feature #21837 [FrameworkBundle] Lazy configuration of annotations' loader and @required (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Lazy configuration of annotations' loader and `@required`

| 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 would remove the need for https://github.com/symfony/symfony-standard/pull/1052 and for the `autoload.php` file altogether.

Tested on symfony-demo with great success so far.

Commits
-------

d332b37b4b [FrameworkBundle] Lazy configuration of annotations' loader and `@required`
2017-03-15 09:56:25 -07:00
Grégoire Pineau
0a638f5352 [FrameworkBundle][Serializer] Add option to register a "circular_reference_handler" 2017-03-15 17:32:58 +01:00
Christian Flothmann
25ea510ba4 remove translator helper if Translator is disabled 2017-03-15 12:04:33 +01:00
Fabien Potencier
2a99e161d1 bug #22002 [WebServerBundle] fix server:log when Monolog is not installed (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[WebServerBundle] fix server:log when Monolog is not installed

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

Commits
-------

9d56f0cf7d [WebServerBundle] fixed server:log when Monolog is not installed
2017-03-14 20:08:50 -07:00
Fabien Potencier
9d56f0cf7d [WebServerBundle] fixed server:log when Monolog is not installed 2017-03-14 20:05:57 -07:00
Fabien Potencier
133c37a9a3 minor #22000 [DependencyInjection] Remove the "id" attribute of "callable" (GuilhemN)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DependencyInjection] Remove the "id" attribute of "callable"

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | ?
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets |  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |

It seems like this attribute was added by mistake as it's used nowhere.
It should be removed but I don't think it's worth adding a bc layer.

Commits
-------

19547a2639 [DependencyInjection] Remove the "id" attribute of "callable"
2017-03-14 14:50:16 -07:00
Nicolas Grekas
ebb316d616 [Cache] Enhance error reporting for FilesystemAdapter 2017-03-14 22:48:08 +01:00
Fabien Potencier
209b0bc629 feature #21970 [DependencyInjection] Support anonymous services in Yaml (GuilhemN)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DependencyInjection] Support anonymous services in Yaml

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/16328
| License       | MIT
| Doc PR        |

This PR allows creating anonymous services in yaml using the `!service` tag as proposed by @nicolas-grekas:
```yml
services:
    _instanceof:
        FooInterface:
            arguments:
                - !service
                    class: Bar
                    autowire: true

    Foo:
        factory: [ !service { class: Quz }, 'constructFoo' ]
```

Anonymous services are forbidden in parameters as in xml.
Defaults and instanceof conditionals aren't applied on anonymous services, as in xml too.

Commits
-------

9b7138545e [DependencyInjection] Support anonymous services in Yaml
2017-03-14 14:36:40 -07:00
Fabien Potencier
cee0136acf feature #21979 [FrameworkBundle][TwigBundle] Require PSR-11 container instead of Symfony container (enumag)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle][TwigBundle] Require PSR-11 container instead of Symfony container

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

As discussed in #21978 here is the second PR.

Commits
-------

857ce7c7be [FrameworkBundle][TwigBundle] Require PSR-11 container instead of Symfony container
2017-03-14 14:32:46 -07:00
Jáchym Toušek
857ce7c7be
[FrameworkBundle][TwigBundle] Require PSR-11 container instead of Symfony container 2017-03-14 22:27:21 +01:00
David Maicher
9d9d4efb88 [Doctrine Bridge] fix priority for doctrine event listeners 2017-03-14 21:52:39 +01:00
Guilhem Niot
9b7138545e
[DependencyInjection] Support anonymous services in Yaml 2017-03-14 21:40:20 +01:00
Fabien Potencier
c72a4f0a79 bug #21514 301 status code must drop request method to GET. (jlamur)
This PR was merged into the 3.3-dev branch.

Discussion
----------

301 status code must drop request method to GET.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| BC breaks?    | yes
| Tests pass?   | yes
| Fixed tickets | #20924
| License       | MIT

[RFC 7231 §6.4.2](https://tools.ietf.org/html/rfc7231#section-6.4.2) states that 301 HTTP Code should forward POST requests to the Location URI.

But, it also states that:

> For historical reasons, a user agent MAY change the request method from POST to GET for the subsequent request.

This is the behavior implemented in almost all user agents.
However the `BrowserKit` did forward the method to the subsequent request.

This PR make the `BrowserKit` change the request method from POST to GET when the response status code is 301.

Commits
-------

abda966d75 301 status code must drop request method to GET.
2017-03-14 13:25:39 -07:00
Guilhem Niot
19547a2639
[DependencyInjection] Remove the "id" attribute of "callable" 2017-03-14 21:21:43 +01:00
Fabien Potencier
dd8e50baa1 minor #21994 Use PHP functions as array_map callbacks when possible (javiereguiluz)
This PR was merged into the 2.7 branch.

Discussion
----------

Use PHP functions as array_map callbacks when possible

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

We already do that in 99% of the cases ... but there were 3 occurrences where we didn't do it.

Commits
-------

405bd4cc81 Use PHP functions as array_map callbacks when possible
2017-03-14 12:43:03 -07:00
Fabien Potencier
d1e591edd8 feature #21935 [FrameworkBundle][Workflow] Add a way to register a guard expression in the configuration (lyrixx)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle][Workflow] Add a way to register a guard expression in the configuration

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

---

Many people already asked for this feature so ... here we go 🎉

---

Usage:
```yml
            transitions:
                journalist_approval:
                    guard: "is_fully_authenticated() and has_role('ROLE_JOURNALIST') or is_granted('POST_EDIT', subject)"
                    from: wait_for_journalist
                    to: approved_by_journalist
                publish:
                    guard: "subject.isPublic()"
                    from: approved_by_journalist
                    to: published
```

Commits
-------

ab3b12d6dc [FrameworkBundle][Workflow] Add a way to register a guard expression in the configuration
2017-03-14 12:04:20 -07:00
Fabien Potencier
6166260d6e feature #21080 [FrameworkBundle][Monolog] Added a new way to follow logs (lyrixx)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle][Monolog] Added a new way to follow logs

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

----

If you want to try this PR, you can use [my fork](https://github.com/lyrixx/symfony-standard/tree/server-log):
```bash
git clone https://github.com/lyrixx/symfony-standard -b server-log symfony-se-logs
cd symfony-se-logs
composer install
bin/console server:start
bin/console server:log
```
and from anywhere `curl http://0:8000`

---

Basically, it's a new way to view and filter real time logs, from the CLI.

![screenshot13](https://cloud.githubusercontent.com/assets/408368/21898198/52fa8c3c-d8ec-11e6-98db-6b3a6f8fe50d.png)

Commits
-------

ac92375ddb [FrameworkBundle][Monolog] Added a new way to follow logs
2017-03-14 11:58:53 -07:00
Fabien Potencier
dc0eba77f6 minor #21875 Rename TimeZoneTransformer into TimezoneTransformer (lepiaf)
This PR was submitted for the 3.2 branch but it was merged into the 3.3-dev branch instead (closes #21875).

Discussion
----------

Rename TimeZoneTransformer into TimezoneTransformer

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

Commits
-------

dba163950b Rename TimeZoneTransformer into TimezoneTransformer
2017-03-14 11:55:51 -07:00
Thierry Thuon
dba163950b Rename TimeZoneTransformer into TimezoneTransformer 2017-03-14 11:55:49 -07:00
Fabien Potencier
26198cf60a bug #21981 [Console] Use proper line endings in BufferedOutput (julienfalque)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Use proper line endings in BufferedOutput

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

`BufferOutput` should be consistent with `StreamOutput` when writing newlines.

I faced an issue using this class in tests where the expected output was platform dependent (using `PHP_EOL` too).

Commits
-------

33946e69c0 Use proper line endings
2017-03-14 11:38:54 -07:00
Javier Eguiluz
405bd4cc81 Use PHP functions as array_map callbacks when possible 2017-03-14 12:32:10 +01:00
Nicolas Grekas
71b2c3a52e minor #21993 [Validator] revert wrong Phpdoc change (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] revert wrong Phpdoc change

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

Commits
-------

86e8afa [Validator] revert wrong Phpdoc change
2017-03-14 09:43:35 +01:00
Christian Flothmann
86e8afaea0 [Validator] revert wrong Phpdoc change 2017-03-14 09:04:19 +01:00
Nicolas Grekas
27dbfda18e Merge branch '3.2'
* 3.2:
  [FrameworkBundle] Fix cleaning of test dirs
2017-03-14 08:58:07 +01:00
Nicolas Grekas
efa74c5eab Merge branch '2.8' into 3.2
* 2.8:
  [FrameworkBundle] Fix cleaning of test dirs
2017-03-14 08:56:22 +01:00
Nicolas Grekas
6b4cfd6a25 Merge branch '2.7' into 2.8
* 2.7:
  [FrameworkBundle] Fix cleaning of test dirs
2017-03-14 08:55:42 +01:00
Nicolas Grekas
ac89b1c548 minor #21972 [FrameworkBundle] Fix cleaning of test dirs (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix cleaning of test dirs

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

I spent an hour or two today debugging a non existent issue that was related to a non removed temporary file.
Let's cleanup properly now in the base WebTestCase.

Commits
-------

4842c86 [FrameworkBundle] Fix cleaning of test dirs
2017-03-14 08:31:41 +01:00
Nicolas Grekas
8141d1757f bug #21983 [HttpKernel] Resolve real class when failing on proxies (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Resolve real class when failing on proxies

| 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/issues/21969
| License       | MIT
| Doc PR        | n/a

__Before__
> The controller for URI "/" is not callable. Method "home" on class "SymfonyProxy_f6aad6c251e61ad4ae1fc5a561578cae" should be public and non-abstract.

__After__
> The controller for URI "/" is not callable. Method "home" on class "Actions" should be public and non-abstract.

Commits
-------

e34e29a [HttpKernel] Resolve real class when failing on proxies
2017-03-14 08:30:58 +01:00
Nicolas Grekas
f2ae2ed75d bug #21986 Stop relying on the $mode argument (greg0ire)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Stop relying on the $mode argument

When registering the error handler, simple-phpunit might be used, and in
that case, the bootstrap process will not have environment variables
defined inside phpunit.xml.dist . This means `$mode` might differ when
registering the error handler, and when an error is triggered.
This raises a question: should the $mode argument be removed to avoid
similar errors in the future?

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes/no
| Deprecations? | yes/no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes/no
| Fixed tickets | #21980
| License       | MIT
| Doc PR        | n/a

<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

0d180d5 Stop relying on the $mode argument
2017-03-14 08:29:25 +01:00
Nicolas Grekas
4842c86324 [FrameworkBundle] Fix cleaning of test dirs 2017-03-13 22:39:55 +01:00
Grégoire Paris
0d180d5994
Stop relying on the $mode argument
When registering the error handler, simple-phpunit might be used, and in
that case, the bootstrap process will not have environment variables
defined inside phpunit.xml.dist . This means `$mode` might differ when
registering the error handler, and when an error is triggered.
This raises a question: should the $mode argument be removed to avoid
similar errors in the future?
2017-03-13 12:11:00 +01:00
Robin Chalas
e34e29a621 [HttpKernel] Resolve real class when failing on proxies 2017-03-13 10:10:30 +01:00