Commit Graph

40439 Commits

Author SHA1 Message Date
Christian Flothmann
ace651e255 minor #30064 [Form][MappingRule] Remove unnecessary cast (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form][MappingRule] Remove unnecessary cast

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

fc09c285a6 [Form][MappingRule] Remove unnecessary cast
2019-02-11 12:05:01 +01:00
Javier Eguiluz
33145dae62 minor #30130 [WebProfilerBundle] Add ajax request number (Antoine Lamirault)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[WebProfilerBundle] Add ajax request number

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

Add request number foreach ajax call in profiler.
![screenshot_2019-02-10_18-54-02](https://user-images.githubusercontent.com/9253091/52537598-c830c980-2d68-11e9-815e-90345b6bbd88.png)

Commits
-------

70a38cfdfd [WebProfilerBundle] Add ajax request number
2019-02-11 08:56:29 +01:00
Christian Flothmann
0daeba8e8a add back test after fixing it 2019-02-10 22:02:18 +01:00
Antoine Lamirault
70a38cfdfd [WebProfilerBundle] Add ajax request number 2019-02-10 19:13:17 +01:00
Christian Flothmann
3be0d35b17 forward valid numeric values to transform() 2019-02-09 15:44:59 +01:00
Thomas Calvet
fc09c285a6 [Form][MappingRule] Remove unnecessary cast 2019-02-09 11:17:15 +01:00
Antoine Lamirault
15db914984 [Security] fix switch user without having current token 2019-02-09 10:27:13 +01:00
Yonel Ceruto
31d7a09bf5 Add support for translator paths and twig paths in translation commands 2019-02-08 12:20:37 -05:00
Christian Flothmann
03abfc09bd add missing null return type 2019-02-08 18:03:34 +01:00
Christian Flothmann
ce546f5e5b consolidate the mime types service definition 2019-02-08 14:33:15 +01:00
Nicolas Grekas
5ed68eec7e Merge branch '4.2'
* 4.2:
  replace mocks with real objects in tests
2019-02-08 14:20:39 +01:00
Nicolas Grekas
37f6be15d3 minor #30113 [Form] replace mocks with real objects in tests (xabbuh)
This PR was merged into the 4.2 branch.

Discussion
----------

[Form] replace mocks with real objects in tests

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

reapplies parts of #30108 on the `4.2` branch

Commits
-------

cee3ccd70f replace mocks with real objects in tests
2019-02-08 14:20:09 +01:00
Christian Flothmann
cee3ccd70f replace mocks with real objects in tests 2019-02-08 14:13:18 +01:00
Nicolas Grekas
41cc6d2676 Merge branch '4.2'
* 4.2:
  New extensions were released supporting PHP 7.3
  Remove "internal" annotation from datacollector serialization methods
  replace mocks with real objects in tests
  [DependencyInjection] fix #29930 add $lazyLoad flag to the generated factory code for lazy non-shared services
  escape function does not always take a string
  Fix phpunit 8 compatibility
  render integer types with grouping as text input
  ignore _method forms in NativeRequestHandler
  don't lose int precision with not needed type casts
2019-02-08 14:07:06 +01:00
Nicolas Grekas
17ac014306 Merge branch '3.4' into 4.2
* 3.4:
  Remove "internal" annotation from datacollector serialization methods
  replace mocks with real objects in tests
  Fix phpunit 8 compatibility
  render integer types with grouping as text input
  ignore _method forms in NativeRequestHandler
  don't lose int precision with not needed type casts
2019-02-08 14:06:27 +01:00
Nicolas Grekas
bb54e40ca7 minor #30112 Remove "internal" annotation from datacollector serialization methods (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove "internal" annotation from datacollector serialization methods

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

I've been a bit too aggressively adding `@internal` in #30035.

Commits
-------

3c8fd2072f Remove "internal" annotation from datacollector serialization methods
2019-02-08 13:55:24 +01:00
Nicolas Grekas
ba54881dc8 minor #30057 New extensions were released supporting PHP 7.3 (tvlooy)
This PR was merged into the 4.2 branch.

Discussion
----------

New extensions were released supporting PHP 7.3

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | see travis
| License       | MIT

Requested in #30030

Commits
-------

31de71d216 New extensions were released supporting PHP 7.3
2019-02-08 13:49:05 +01:00
Tom Van Looy
31de71d216 New extensions were released supporting PHP 7.3 2019-02-08 13:40:57 +01:00
Nicolas Grekas
ac7d43b73f feature #30027 [FrameworkBundle] Add sid_length and sid_bits_per_character session ini options in session configuration (XuruDragon)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] Add sid_length and sid_bits_per_character session ini options in session configuration

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

this a fix for the issue #29830

After deliberation, we estimate that only `sid_length` and` sid_bits_per_character` session options should be exposed. These options à optional.

For others, we recommend changing your php.ini file

We can now configure the session like this :

```yaml
framwork:
  session:
    sid_length: 64 //optional, recommended value is 32
    sid_bits_per_character: 6 //optional, recommended value is 5
```

Commits
-------

0403e4ad67 [FrameworkBundle] Add sid_length and sid_bits_per_character session ini options in configuration
2019-02-08 13:28:53 +01:00
Nicolas Grekas
3c8fd2072f Remove "internal" annotation from datacollector serialization methods 2019-02-08 13:25:22 +01:00
Anthony MARTIN
0403e4ad67 [FrameworkBundle] Add sid_length and sid_bits_per_character session ini options in configuration
| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29830
| License       | MIT
| Doc PR        | n/a

this a fix for the issue #29830

After deliberation, we estimate that only `sid_length` and` sid_bits_per_character` session options should be exposed. These options à optional.

For others, we recommend changing your php.ini file

We can now configure the session like this :

```yaml
framwork:
  session:
    sid_length: 64 //optional, recommended value is 32
    sid_bits_per_character: 6 //optional, recommended value is 5
```
2019-02-08 13:22:56 +01:00
Nicolas Grekas
f331c54dbc bug #30061 [Form] render integer types with grouping as text input (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] render integer types with grouping as text input

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

Commits
-------

d6a5fde521 render integer types with grouping as text input
2019-02-08 13:13:01 +01:00
Nicolas Grekas
eb2a18ece1 bug #30063 [Form] don't lose int precision with not needed type casts (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] don't lose int precision with not needed type casts

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

Commits
-------

72136f1c04 don't lose int precision with not needed type casts
2019-02-08 13:10:33 +01:00
Nicolas Grekas
68b4825d91 bug #30076 [Form] ignore _method forms in NativeRequestHandler (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] ignore _method forms in NativeRequestHandler

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

Commits
-------

bc4b0913b4 ignore _method forms in NativeRequestHandler
2019-02-08 13:09:54 +01:00
Nicolas Grekas
a36dc51273 bug #30084 Fix KernelTestCase compatibility for PhpUnit 8 (alexander-schranz)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix KernelTestCase compatibility for PhpUnit 8

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

As the PhpUnit 8 Testcase has different return types as PhpUnit 7 there need to be 2 different classes to support both PhpUnit 8 and PhpUnit 7. With a class alias we can then change which version is used based on the PhpUnit Version constant. The fix is a little bit hacky but to support different major versions I see no other way.

Not sure as we can't upgrade symfony/symfony to PhpUnit 8 how we can create a TestCase for this change.

Commits
-------

83a56a0cbe Fix phpunit 8 compatibility
2019-02-08 13:09:15 +01:00
Nicolas Grekas
db445c4994 minor #30108 [Form] replace mocks with real objects in tests (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] replace mocks with real objects in tests

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

Commits
-------

6ac2550dc8 replace mocks with real objects in tests
2019-02-08 13:06:05 +01:00
Nicolas Grekas
717dcc9001 bug #30093 [DependencyInjection] add $lazyLoad context to the generated code for lazy non-shared service by PhpDumper (XuruDragon)
This PR was merged into the 4.2 branch.

Discussion
----------

[DependencyInjection] add $lazyLoad context to the generated code for lazy non-shared service by PhpDumper

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

Fix #29930  by adding $lazyLoad context to the generated code for lazy non-shared service by PhpDumper

Commits
-------

98d4dfdadb [DependencyInjection] fix #29930 add $lazyLoad flag to the generated factory code for lazy non-shared services
2019-02-08 13:00:12 +01:00
Nicolas Grekas
fd4306a3ab feature #30075 [DependencyInjection] Added information about deprecated aliases in debug:autowiring (XuruDragon)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[DependencyInjection] Added information about deprecated aliases in debug:autowiring

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

Fix and improves a bit PR #29968 and #29995

![Screenshot](https://i.imgur.com/GDj2NIY.png)

Commits
-------

3d2378dab5 [DependencyInjection] Added information about deprecated aliases in debug:autowiring
2019-02-08 12:50:01 +01:00
Grégoire Pineau
bac2c99733 bug #30102 [Workflow] Graphviz dumper escape not always a string (Korbeil)
This PR was merged into the 4.2 branch.

Discussion
----------

[Workflow] Graphviz dumper escape not always a string

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

The `escape` function takes a string as parameter but it can be a `bool` (see `findTransitions` method in same class). In this PR I allow any type in `escape` and does escaping only for `string`.

Commits
-------

1b17192b0a escape function does not always take a string
2019-02-08 11:00:05 +01:00
Christian Flothmann
6ac2550dc8 replace mocks with real objects in tests 2019-02-07 23:32:19 +01:00
Nicolas Grekas
7f3f75d85d Merge branch '4.2'
* 4.2:
  fix merge
  [FrameworkBundle] fix xsd
  [FrameworkBundle] update xsd to match the 4.2 configuration
  [FrameworkBundle] Update the xsd to match the actual session configuration
  [Form] CsrfValidationListener marks the token as invalid if it is not a string
  [Routing] fix perf issue when dumping large number of routes
  Fix wrong value in file id attribute for Xliff 2.0
  [VarDumper] Fixed phpDoc
  [PhpUnitBridge] fix PHP  5.3 compat
  [Messenger] Fix DataCollector template
  [Filesystem] Fixed some docblocks and typos
  bumped Symfony version to 4.2.4
  updated VERSION for 4.2.3
  updated CHANGELOG for 4.2.3
  bumped Symfony version to 3.4.23
  updated VERSION for 3.4.22
  update CONTRIBUTORS for 3.4.22
  updated CHANGELOG for 3.4.22
  fix some minor typos
  do not overwrite the constraint being evaluated
2019-02-07 19:43:24 +01:00
Nicolas Grekas
02adcc33a2 fix merge 2019-02-07 19:39:48 +01:00
Nicolas Grekas
f8209784ee minor #30106 [FrameworkBundle] fix xsd (XuruDragon)
This PR was merged into the 4.2 branch.

Discussion
----------

[FrameworkBundle] fix xsd

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

fix a mistake introduce in #30101

Commits
-------

436c3b9402 [FrameworkBundle] fix xsd
2019-02-07 19:34:43 +01:00
Anthony MARTIN
436c3b9402 [FrameworkBundle] fix xsd 2019-02-07 19:28:32 +01:00
Anthony MARTIN
98d4dfdadb [DependencyInjection] fix #29930 add $lazyLoad flag to the generated factory code for lazy non-shared services
| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29930
| License       | MIT
| Doc PR        | n/a

Fix #29930  by adding $lazyLoad context to the generated code for lazy non-shared service by PhpDumper
2019-02-07 19:08:46 +01:00
Baptiste Leduc
1b17192b0a
escape function does not always take a string 2019-02-07 19:06:43 +01:00
Nicolas Grekas
696f82122d minor #30101 [FrameworkBundle] update xsd to match the 4.2 configuration (XuruDragon)
This PR was merged into the 4.2 branch.

Discussion
----------

[FrameworkBundle] update xsd to match the 4.2 configuration

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

Update the FrameworkBundle xsd to match the 4.2 configuration

Commits
-------

7782e60b00 [FrameworkBundle] update xsd to match the 4.2 configuration
2019-02-07 15:27:51 +01:00
Anthony MARTIN
3d2378dab5 [DependencyInjection] Added information about deprecated aliases in debug:autowiring
| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | n/a

Fix and improves a bit PR #29968 and #29995
2019-02-07 13:21:48 +01:00
Anthony MARTIN
7782e60b00 [FrameworkBundle] update xsd to match the 4.2 configuration
| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/A

Update the FrameworkBundle xsd to match the 4.2 configuration
2019-02-07 12:59:23 +01:00
Nicolas Grekas
32e14005a6 Merge branch '3.4' into 4.2
* 3.4:
  [FrameworkBundle] Update the xsd to match the actual session configuration
  [Form] CsrfValidationListener marks the token as invalid if it is not a string
  [VarDumper] Fixed phpDoc
  [PhpUnitBridge] fix PHP  5.3 compat
  [Filesystem] Fixed some docblocks and typos
  bumped Symfony version to 3.4.23
  updated VERSION for 3.4.22
  update CONTRIBUTORS for 3.4.22
  updated CHANGELOG for 3.4.22
  fix some minor typos
  do not overwrite the constraint being evaluated
2019-02-07 12:40:08 +01:00
Nicolas Grekas
8f29f56d67 minor #30100 [FrameworkBundle] Update the xsd to match the actual session configuration (XuruDragon)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Update the xsd to match the actual session configuration

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

Update the FrameworkBundle xsd to match the actual session configuration

Commits
-------

40bd76c9d4 [FrameworkBundle] Update the xsd to match the actual session configuration
2019-02-07 12:35:39 +01:00
Anthony MARTIN
40bd76c9d4 [FrameworkBundle] Update the xsd to match the actual session configuration
| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Update the FrameworkBundle xsd to match the actual session configuration
2019-02-07 11:24:20 +01:00
Nicolas Grekas
5c7931c992 bug #29884 [Form] CsrfValidationListener marks the token as invalid if it is not a string (umpirsky)
This PR was squashed before being merged into the 3.4 branch (closes #29884).

Discussion
----------

[Form] CsrfValidationListener marks the token as invalid if it is not a string

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

Commits
-------

deb8e95091 [Form] CsrfValidationListener marks the token as invalid if it is not a string
2019-02-07 10:44:29 +01:00
Saša Stamenković
deb8e95091 [Form] CsrfValidationListener marks the token as invalid if it is not a string 2019-02-07 10:44:13 +01:00
Nicolas Grekas
a6a1be803d feature #30024 [Debug] Display more details in the simple error page of Debug (javiereguiluz)
This PR was squashed before being merged into the 4.3-dev branch (closes #30024).

Discussion
----------

[Debug] Display more details in the simple error page of Debug

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

Note: this only changes the simple error page of Debug component, which is different from the full-featured error page of WebProfilerBundle.

-----

#29891 shows a confusing error page. In #29928 we improved the first error message displayed to the user. In this PR we implement @nicolas-grekas' idea to replace the generic error page title by a better error message. So, this PR + #29928 would fix #29891 to me.

### Before

![error-before](https://user-images.githubusercontent.com/73419/51920135-1519b500-23e5-11e9-99d6-e9b631b97499.png)

### After

![error-after](https://user-images.githubusercontent.com/73419/51920141-1945d280-23e5-11e9-97c3-49b2170dbd15.png)

Commits
-------

75ff151580 [Debug] Display more details in the simple error page of Debug
2019-02-07 10:41:46 +01:00
Javier Eguiluz
75ff151580 [Debug] Display more details in the simple error page of Debug 2019-02-07 10:41:41 +01:00
Nicolas Grekas
fd720ed704 bug #30058 [Routing] fix perf issue when dumping large number of routes (nicolas-grekas)
This PR was merged into the 4.2 branch.

Discussion
----------

[Routing] fix perf issue when dumping large number of routes

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

In my reproducer, dumping 12k routes goes from 40s to 3s without xdebug, and from 50s to 12s with xdebug.

There is a lower level issue which is that `strpos` is called 16M times, but that's still a lot faster than calling `preg_match` 16M times. Reducing the number of checks is certainly possible, but that would be more involving. This could happen on master if someone is up to dig into it.

Commits
-------

872efe5729 [Routing] fix perf issue when dumping large number of routes
2019-02-07 10:20:22 +01:00
Nicolas Grekas
e8c3f9e0d0 feature #30052 [Security] Replace serialization API (renanbr)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Security] Replace serialization API

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

New `getState()` and `setState()` methods in `AbstractToken` and `AuthenticationException` allow users to append data to the serialization payload.

It allow us to have zero impact in user land when changing the serialization engine.

Commits
-------

006c6ddda3 makes serialize methods final
2019-02-07 10:19:49 +01:00
Nicolas Grekas
872efe5729 [Routing] fix perf issue when dumping large number of routes 2019-02-07 10:16:03 +01:00
Alexander Schranz
83a56a0cbe Fix phpunit 8 compatibility 2019-02-07 09:56:45 +01:00