Commit Graph

33548 Commits

Author SHA1 Message Date
Fabien Potencier
7f899a965a bug #24468 [DI] Turn private defs to non-public ones before removing passes (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Turn private defs to non-public ones before removing passes

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

As spotted by @stof in https://github.com/symfony/symfony/issues/24465#issuecomment-334786670.

Commits
-------

e5d0934b87 [DI] Turn private defs to non-public ones before removing passes
2017-10-09 21:03:01 -07:00
Fabien Potencier
5fd0fe6631 bug #23711 Fix support for PHP 7.2 (Simperfit, nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix support for PHP 7.2

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

There are still the deprecation problem with phpunit since it use `each()`.

There are 3 tests linked to session that I don't know how to fix / what to do, do you have any idea @nicolas-grekas ?

Commits
-------

fdf285b5c9 Fix 7.2 compat layer
e229dd0302 Fix PHP 7.2 support
2017-10-09 21:00:26 -07:00
Nicolas Grekas
fdf285b5c9 Fix 7.2 compat layer 2017-10-09 20:05:34 +02:00
Nicolas Grekas
91c9287c55 [DI] Prefixed env vars and load time inlining are incompatible 2017-10-09 19:43:01 +02:00
Fabien Potencier
1b1f39a55e bug #24494 [HttpFoundation] Add missing session.lazy_write config option (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Add missing session.lazy_write config option

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

See http://php.net/manual/en/session.configuration.php#ini.session.lazy-write

Commits
-------

dbc9a44333 [HttpFoundation] Add missing session.lazy_write config option
2017-10-09 10:15:50 -07:00
Fabien Potencier
592c8fe72a minor #24495 Remove unnecessary condition; (243083df)
This PR was merged into the 4.0-dev branch.

Discussion
----------

Remove unnecessary condition;

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

Commits
-------

f09f0ae7ba Remove unnecessary condition;
2017-10-09 10:15:01 -07:00
Fabien Potencier
f756fb8b5b bug #24491 [DI] Exclude inline services declared in XML from autowiring candidates (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Exclude inline services declared in XML from autowiring candidates

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

As reported in #24311, inline services should not be candidates for autowiring.
This PR fixes the issue, but is submitted against 3.4 because there is a potential BC break here, for ppl that didn't realize they relied on this (already deprecated) behavior.
We *could* not merge this PR and consider the deprecation is fine - but in practice, the WTF is hitting several ppl already AFAIK, so we should close that door IMHO.

Commits
-------

d90e7212ea [DI] Exclude inline services declared in XML from autowiring candidates
2017-10-09 10:13:32 -07:00
Nicolas Grekas
e2418975e1 Merge branch '3.3' into 3.4
* 3.3:
  bug #24499 [Bridge\PhpUnit] Fix infinite loop when running isolated method (bis) (nicolas-grekas)
2017-10-09 17:30:26 +02:00
Nicolas Grekas
9b6b3c0304 bug #24499 [Bridge\PhpUnit] Fix infinite loop when running isolated method (bis) (nicolas-grekas)
This PR was merged into the 4.0-dev branch.

Discussion
----------

[Bridge\PhpUnit] Fix infinite loop when running isolated method (bis)

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

The blacklisting system is a bit rigid, so let's work around it.

Commits
-------

9d9d596 [Bridge\PhpUnit] Fix infinite loop when running isolated method (bis)
2017-10-09 17:29:37 +02:00
Nicolas Grekas
473911b091 bug #24499 [Bridge\PhpUnit] Fix infinite loop when running isolated method (bis) (nicolas-grekas)
This PR was merged into the 4.0-dev branch.

Discussion
----------

[Bridge\PhpUnit] Fix infinite loop when running isolated method (bis)

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

The blacklisting system is a bit rigid, so let's work around it.

Commits
-------

9d9d596 [Bridge\PhpUnit] Fix infinite loop when running isolated method (bis)
2017-10-09 17:28:48 +02:00
Nicolas Grekas
9d9d596524 [Bridge\PhpUnit] Fix infinite loop when running isolated method (bis) 2017-10-09 17:26:49 +02:00
Nicolas Grekas
7c63eaee5c Merge branch '3.4'
* 3.4:
  [Bridge\PhpUnit] Fix infinite loop when running isolated method
  remove unused fixtures file
  parse references on merge keys with objects
2017-10-09 16:53:01 +02:00
Nicolas Grekas
92f621fcf7 Merge branch '3.3' into 3.4
* 3.3:
  [Bridge\PhpUnit] Fix infinite loop when running isolated method
  remove unused fixtures file
  parse references on merge keys with objects
2017-10-09 16:52:13 +02:00
Nicolas Grekas
4ed67a6649 bug #24498 [Bridge\PhpUnit] Fix infinite loop when running isolated method (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[Bridge\PhpUnit] Fix infinite loop when running isolated method

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

May unlock #23003 (ping @paul-m)
And required to make #23711 pass.

Commits
-------

e07c2f1 [Bridge\PhpUnit] Fix infinite loop when running isolated method
2017-10-09 16:51:13 +02:00
Nicolas Grekas
e07c2f17b6 [Bridge\PhpUnit] Fix infinite loop when running isolated method 2017-10-09 16:32:40 +02:00
Amrouche Hamza
e229dd0302 Fix PHP 7.2 support 2017-10-09 12:03:31 +02:00
243083df
f09f0ae7ba Remove unnecessary condition; 2017-10-09 13:31:38 +04:00
Nicolas Grekas
dbc9a44333 [HttpFoundation] Add missing session.lazy_write config option 2017-10-09 11:21:24 +02:00
Nicolas Grekas
3c05652270 Merge branch '3.4'
* 3.4:
  Clarify the exceptions are going to be rendered just after
  [DI] Remove colon from env placeholders
  fixed CS
  [Yaml] initialize inline line numbers
  [Workflow] Added tests for the is_valid() guard expression
  [Workflow] Added guard 'is_valid()' method support
  Add & use OptionResolverIntrospector
  Add debug:form type option
2017-10-09 10:45:52 +02:00
Fabien Potencier
61cda3e6cd feature #24208 [Form] Display option definition from a given form type (yceruto, ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Display option definition from a given form type

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (deps=high failure expected)
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

![debug-form-option](https://user-images.githubusercontent.com/2028198/30569305-12a30738-9ca8-11e7-98b7-6eaf78d3d5a7.png)

Show friendly message if typo:
![debug-form-not-found](https://user-images.githubusercontent.com/2028198/30450999-83d58b56-9960-11e7-8705-b60ba33baf48.png)

complement of https://github.com/symfony/symfony/pull/24185

Commits
-------

d6d187d26e Add & use OptionResolverIntrospector
8bbb5e7884 Add debug:form type option
2017-10-08 18:27:15 -07:00
Fabien Potencier
79c1f5e4ad bug #24434 [Form] Use for=ID on radio/checkbox label. (Nyholm)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Use for=ID on radio/checkbox label.

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

I recently let Europe's leading accessibility experts (Funkanu.se) review a site of mine, they gave me (among other) this feedback.

> Putting the checkbox/radio input inside the label is great, but the label still needs the "for=ID". Screen readers like Jaws does not work properly without this attribute.

Commits
-------

53d7857092 Use for=ID on radio/checkbox label.
2017-10-08 16:46:06 -07:00
Fabien Potencier
7b933ababf feature #22228 [HttpKernel] minor: add ability to construct with headers on http exceptions (gsdevme)
This PR was merged into the 4.0-dev branch.

Discussion
----------

[HttpKernel] minor: add ability to construct with headers on http exceptions

| 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 the ability to set the headers for the exception within the constructor.

With alot of the following exceptions its sometimes very useful to be able to set the headers. For example with a reverse proxy cache (Varnish) if you want to match the `Retry-After` with a Varnish cache header to protect the backend.

I see that `setHeaders()` did get added 6a1080f899 but that means the exception needs to be assigned to a variable and set and then thrown, it also doesn't merge with the existing header set in some of the constructors.

~~I've chosen to `array_merge()` where key/values~~ were being set within the constructor as I think this is the most useful and 'correct' whereas `setHeaders` is explicit that its setting not amending or adding to.

Commits
-------

612fb59b32 [HttpKernel] minor: add ability to construct with headers on http exceptions
2017-10-08 16:42:21 -07:00
Fabien Potencier
5e40274b95 minor #24473 [DX][FrameworkBundle] Clarify where to find exceptions for non-registered commands (sroze)
This PR was merged into the 3.4 branch.

Discussion
----------

[DX][FrameworkBundle] Clarify where to find exceptions for non-registered commands

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

As a developer, when I saw "Some commands could not be registered." displayed on my console... it wasn't clear ether the next displayed exception was related to this or not. Just adding a reference to the "following errors" would help.

Commits
-------

427212d869 Clarify the exceptions are going to be rendered just after
2017-10-08 07:56:21 -07:00
Fabien Potencier
e7c3456ad1 minor #24486 [DI] Remove colon from env placeholders (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Remove colon from env placeholders

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

These colons in placeholders make them less neutral. Let's remove them.

Commits
-------

dca930f579 [DI] Remove colon from env placeholders
2017-10-08 07:54:29 -07:00
Nicolas Grekas
d90e7212ea [DI] Exclude inline services declared in XML from autowiring candidates 2017-10-08 16:39:03 +02:00
Christian Schmidt
1f76a70b6f [HttpFoundation] Combine Cache-Control headers 2017-10-08 16:27:20 +02:00
Samuel ROZE
427212d869
Clarify the exceptions are going to be rendered just after 2017-10-08 14:05:23 +01:00
Christian Flothmann
042eac4624 [Form] fix parsing invalid floating point numbers 2017-10-08 14:45:17 +02:00
Robin Chalas
42a41b3b45 bug #24455 [Console] Escape command usage (sroze)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Escape command usage

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

Escape the console usage to prevent arguments named `info` or similar to be formatted.

Commits
-------

2141056 Escape command usage when displaying it in the text descriptor
2017-10-08 14:16:30 +02:00
Samuel ROZE
2141056471
Escape command usage when displaying it in the text descriptor 2017-10-08 13:00:23 +01:00
Nicolas Grekas
dca930f579 [DI] Remove colon from env placeholders 2017-10-08 11:22:35 +02:00
Nicolas Grekas
84ce7e6250 minor #24485 [HttpFoundation] Refactoring; (243083df)
This PR was merged into the 4.0-dev branch.

Discussion
----------

[HttpFoundation] Refactoring;

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

Improve performance, clean code;

Commits
-------

79978db Replace function chain to a single call.
2017-10-08 09:35:07 +02:00
243083df
79978dba05 Replace function chain to a single call. 2017-10-08 02:59:09 +04:00
Nicolas Grekas
fe7f26d4f3 [DI] Throw accurate failures when accessing removed services 2017-10-07 23:38:34 +02:00
Nicolas Grekas
e5d0934b87 [DI] Turn private defs to non-public ones before removing passes 2017-10-07 10:21:26 +02:00
Fabien Potencier
a95fe36bfa feature #24467 [Process] drop non-existent working directory support (xabbuh)
This PR was merged into the 4.0-dev branch.

Discussion
----------

[Process] drop non-existent working directory support

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

Commits
-------

ade7c90589 drop non-existent working directory support
2017-10-06 09:30:12 -07:00
Christian Flothmann
ade7c90589 drop non-existent working directory support 2017-10-06 18:19:45 +02:00
Fabien Potencier
7ffd22b050 minor #24466 [DependencyInjection] remove unused fixtures file (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[DependencyInjection] remove unused fixtures file

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

I was wondering why the conflict markers in the `master` branch (see b6e9471ded/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services31.php (L43-L52)) did not cause any issues. Turned out that this fixtures file was not used anymore (it was only partially removed in #23022).

Commits
-------

3702e5ff37 remove unused fixtures file
2017-10-06 08:53:44 -07:00
Fabien Potencier
b43bdf398d fixed CS 2017-10-06 08:49:22 -07:00
Fabien Potencier
13d75a4adb feature #23499 [Workflow] add guard is_valid() method support (alain-flaus, lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Workflow] add guard is_valid() method support

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | Yes
| License       | MIT

Workflow guard configuration support expression language like **is_fully_authenticated()**, **has_role()** or **is_granted()**, etc...
I would like to add the support for a new **is_valid()** expression.
Configuration allow to validate subject against specific validation groups to check if a transition can be applied.

In the next configuration exemple, my issue must validate "affectable" validation group to apply "affect" transistion:

```yaml
framework:
    workflows:
        issue:
            marking_store:
                type: single_state
                arguments:
                    - state
            supports: AppBundle\Entity\Issue
            initial_place: created
            places:
                - created
                - affected
                - closed
            transitions:
                affect:
                    guard: "is_valid(subject, ['affectable'])"
                    from: created
                    to:   affected
                close:
                    from: completed
                    to: closed
```

Commits
-------

06d8198714 [Workflow] Added tests for the is_valid() guard expression
9499bc291c [Workflow] Added guard 'is_valid()' method support
2017-10-06 08:47:04 -07:00
Fabien Potencier
3561be7739 bug #24462 [Yaml] parse references on merge keys with objects (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[Yaml] parse references on merge keys with objects

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

Applies necessary changes on the `3.3` branch to make #24417 work with the `PARSE_OBJECT_FOR_MAP` flag.

Commits
-------

ce10f356a3 parse references on merge keys with objects
2017-10-06 08:22:09 -07:00
Christian Flothmann
3702e5ff37 remove unused fixtures file 2017-10-06 17:17:51 +02:00
Fabien Potencier
bfda40706e minor #24463 [Yaml] initialize inline line numbers (xabbuh)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #24463).

Discussion
----------

[Yaml] initialize inline line numbers

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

Without this change, tests from `InlineTest` cannot be executed
standalone as the parsed line number would never be initialized.

Commits
-------

33d2aa5382 [Yaml] initialize inline line numbers
2017-10-06 08:16:57 -07:00
Christian Flothmann
33d2aa5382 [Yaml] initialize inline line numbers
Without this change, tests from `InlineTest` cannot be executed
standalone as the parsed line number would never be initialized.
2017-10-06 08:16:57 -07:00
Fabien Potencier
b6e9471ded feature #24364 [DependencyInjection][Filesystem][Security][SecurityBundle] remove deprecated features (xabbuh)
This PR was merged into the 4.0-dev branch.

Discussion
----------

[DependencyInjection][Filesystem][Security][SecurityBundle] remove deprecated features

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

Commits
-------

45dd40cde8 remove deprecated features
2017-10-06 07:38:43 -07:00
Christian Flothmann
45dd40cde8 remove deprecated features 2017-10-06 14:47:08 +02:00
Christian Flothmann
ce10f356a3 parse references on merge keys with objects 2017-10-06 14:26:09 +02:00
Christian Flothmann
0ab92ece1f Merge branch '3.4'
* 3.4: (26 commits)
  bumped Symfony version to 3.3.11
  updated VERSION for 3.3.10
  updated CHANGELOG for 3.3.10
  bumped Symfony version to 2.8.29
  updated VERSION for 2.8.28
  updated CHANGELOG for 2.8.28
  bumped Symfony version to 2.7.36
  updated VERSION for 2.7.35
  update CONTRIBUTORS for 2.7.35
  updated CHANGELOG for 2.7.35
  Added deprecation to cwd not existing Fixes #18249
  [Session] fix MongoDb session handler to gc all expired sessions
  Add changelog for deprecated DbalSessionHandler
  [Security] Look at headers for switch user username parameter
  Updated Test name and exception name to be more accurate
  newline at end of file
  changed exception message
  Ahh, I see.  It actually wants a newline!
  Removed newline
  Created new Exception to throw and modified tests.
  ...
2017-10-06 11:34:09 +02:00
Christian Flothmann
a165f1bc08 Merge branch '3.3' into 3.4
* 3.3: (23 commits)
  bumped Symfony version to 3.3.11
  updated VERSION for 3.3.10
  updated CHANGELOG for 3.3.10
  bumped Symfony version to 2.8.29
  updated VERSION for 2.8.28
  updated CHANGELOG for 2.8.28
  bumped Symfony version to 2.7.36
  updated VERSION for 2.7.35
  update CONTRIBUTORS for 2.7.35
  updated CHANGELOG for 2.7.35
  [Session] fix MongoDb session handler to gc all expired sessions
  Updated Test name and exception name to be more accurate
  newline at end of file
  changed exception message
  Ahh, I see.  It actually wants a newline!
  Removed newline
  Created new Exception to throw and modified tests.
  Created new Exception to throw and modified tests
  Code standard fixes
  Changed automatic token generation to throw an exception instead
  ...
2017-10-06 11:16:43 +02:00
Christian Flothmann
1dfa63feac Merge branch '2.8' into 3.3
* 2.8:
  bumped Symfony version to 2.8.29
  updated VERSION for 2.8.28
  updated CHANGELOG for 2.8.28
2017-10-06 11:15:28 +02:00