Commit Graph

32899 Commits

Author SHA1 Message Date
Fabien Potencier
02b77f54fb feature #16835 [Security] Add Guard authenticator <supports> method (Amo, chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Add Guard authenticator <supports> method

This method will be called before starting an authentication against a guard authenticator.
The authentication will be tried only if the supports method returned `true`
This improves understanding of code, increase consistency and removes responsability for `getCredentials` method to decide if the current request should be supported or not.

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

Commits
-------

78eecba780 Fix BC layer
a7a6f8a678 [Security] Add Guard authenticator <supports> method
2017-10-05 05:19:50 -07:00
Fabien Potencier
86684f1c07 feature #24289 [FrameworkBundle][HttpKernel] Reset profiler (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle][HttpKernel] Reset profiler

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

This PR adds the ability to reset the profiler between requests. Furthermore, the profiler service has been tagged with the new `kernel.reset` tag from #24155. For this, I had to readd the ability to define multiple reset methods for a service.

Note: This PR requires twigphp/Twig#2560.

Commits
-------

8c39bf7845 Reset profiler.
2017-10-05 05:04:23 -07:00
Robin Chalas
78eecba780 Fix BC layer 2017-10-05 13:44:36 +02:00
Alexander M. Turek
8c39bf7845 Reset profiler. 2017-10-05 12:20:28 +02:00
Fabien Potencier
d6b68e19e5 Merge branch '3.3' into 3.4
* 3.3:
  [Config] Fix dumped files invalidation by OPCache
  [DI] Allow setting any public non-initialized services
2017-10-04 11:58:07 -07:00
Fabien Potencier
0a963d2b4e Merge branch '2.8' into 3.3
* 2.8:
  [Config] Fix dumped files invalidation by OPCache
2017-10-04 11:56:58 -07:00
Fabien Potencier
8f41e336f2 Merge branch '2.7' into 2.8
* 2.7:
  [Config] Fix dumped files invalidation by OPCache
2017-10-04 11:56:36 -07:00
Fabien Potencier
253cde2062 bug #24421 [Config] Fix dumped files invalidation by OPCache (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Config] Fix dumped files invalidation by OPCache

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

While demoing Flex, I've noticed that container invalidation takes a few seconds on my setup.
I've debugged that down to OPcache, which serves the legacy container while it's been overridden.
Let's invalidate the file explicitly when it changes.

Commits
-------

b1290da21b [Config] Fix dumped files invalidation by OPCache
2017-10-04 11:52:35 -07:00
Fabien Potencier
8b7b902bc1 minor #24426 [DI] remove inheritdoc from dumped container (Tobion)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] remove inheritdoc from dumped container

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

The inheritdoc without adding text is pointless on it's own as any decent IDE will show that those methods are overwriting the base method. This removes it from the dumped container to remove memory and generation time. This goes in the same direction as #23673, #18048 and #24342
It does not affect phpdocs of the compiled container that might actually be useful (factory methods of services explaining if the service is private, shared etc.).

Commits
-------

d779845c3b [DI] remove inheritdoc from dumped container
2017-10-04 11:51:16 -07:00
Tobias Schultze
d779845c3b [DI] remove inheritdoc from dumped container 2017-10-04 18:30:17 +02:00
Nicolas Grekas
b7f1daabed bug #24418 [DI] Allow setting any public non-initialized services (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Allow setting any public non-initialized services

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

I think we went a but too far with this deprecation and that we should relax the rule: setting a pre-defined service is OK *if* it has not already been initialized.
This will allow setting them in test cases, as reported several times (see linked issues).

Commits
-------

d314b1f [DI] Allow setting any public non-initialized services
2017-10-04 13:52:46 +02:00
Nicolas Grekas
b1290da21b [Config] Fix dumped files invalidation by OPCache 2017-10-04 11:33:55 +02:00
Amaury Leroux de Lens
a7a6f8a678 [Security] Add Guard authenticator <supports> method
This method will be called before starting an authentication against a guard authhenticator.
The authentication will be tried only if the supports method returned <true>
This improves understanding of code, increase consistency and removes responsability for <getCredentials> method
To decide if the current request should be supported or not.
2017-10-04 11:30:31 +02:00
Nicolas Grekas
d314b1ff62 [DI] Allow setting any public non-initialized services 2017-10-04 09:45:46 +02:00
Fabien Potencier
2abe788f6e minor #24407 [FrameworkBundle] Make Controller helpers final (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Make Controller helpers final

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

I propose to make all ControllerTrait methods final so we can add type hints.
I also propose to add ControllerTrait::has/get so that AbstractController also has the methods.
This will help move from Controller to AbstractController.

Commits
-------

bbc52a1d14 [FrameworkBundle] Make Controller helpers final
2017-10-03 11:13:57 -07:00
Fabien Potencier
c66ed68a4c bug #24410 [Yaml] fix refreshing line numbers for the inline parser (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] fix refreshing line numbers for the inline parser

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

Commits
-------

5518896c26 fix refreshing line numbers for the inline parser
2017-10-03 11:12:48 -07:00
Fabien Potencier
dcca1804f5 feature #24144 [FrameworkBundle] Expose dotenv in bin/console about (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Expose dotenv in bin/console about

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

For completeness in CLI, shown in web under "Server parameters".

```php
(new Dotenv())->populate(['APP_ENV' => 'prod', 'APP_DEBUG' => '1']);
```

![image](https://user-images.githubusercontent.com/1047696/30293203-fe360d0a-9738-11e7-80ed-94901cea8898.png)

Commits
-------

9011f47e8f [FrameworkBundle] Expose dotenv in bin/console about
2017-10-03 11:11:21 -07:00
Roland Franssen
9011f47e8f [FrameworkBundle] Expose dotenv in bin/console about 2017-10-03 17:06:18 +02:00
Christian Flothmann
5518896c26 fix refreshing line numbers for the inline parser 2017-10-03 17:01:31 +02:00
Christian Flothmann
ed57e748dc fix version in changelog 2017-10-03 15:54:22 +02:00
Christian Flothmann
cfbe2ffec0 Merge branch '3.3' into 3.4
* 3.3:
  fix tests
2017-10-03 15:34:05 +02:00
Christian Flothmann
b87a395025 Merge branch '2.8' into 3.3
* 2.8:
  fix tests
2017-10-03 15:33:10 +02:00
Nicolas Grekas
bbc52a1d14 [FrameworkBundle] Make Controller helpers final 2017-10-03 11:44:07 +02:00
Fabien Potencier
5f55beffa3 feature #24403 [FrameworkBundle][Routing] Show welcome message if no routes are configured (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle][Routing] Show welcome message if no routes are configured

| Q             | A
| ------------- | ---
| Branch?       | 3.4 (it would be good, else 4.1)
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/flex/issues/20
| License       | MIT
| Doc PR        | -

Another attempt to improve the first time experience with a different technical approach this time.

Just after a fresh "SymfonyFlex" installation:
```bash
$ composer create-project symfony/skeleton flex
$ cd flex
$ make serve
```

![welcome](https://user-images.githubusercontent.com/2028198/31088339-4b84f95a-a76e-11e7-8b70-be53507f18e1.png)

When the first route is added, this message is no longer displayed (same if debug mode is disabled).

ping @javiereguiluz, @sstok

Commits
-------

e097ab3141 Show welcome message if no routing configuration could be found
2017-10-02 16:35:53 -07:00
Yonel Ceruto
e097ab3141 Show welcome message if no routing configuration could be found 2017-10-02 19:25:29 -04:00
Nicolas Grekas
5e2f869033 minor #24399 [DI] Fix missing CHANGELOG update + typo (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix missing CHANGELOG update + typo

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

Commits
-------

f9aeee5 [DI] Fix missing CHANGELOG update + typo
2017-10-02 16:55:08 +02:00
Nicolas Grekas
579e3b3bb5 feature #22679 [Form] Add tel and color types (apetitpa)
This PR was squashed before being merged into the 3.4 branch (closes #22679).

Discussion
----------

[Form] Add tel and color types

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

Commits
-------

5b07ca7 [Form] Add tel and color types
2017-10-02 14:59:32 +02:00
apetitpa
5b07ca7f2f [Form] Add tel and color types 2017-10-02 14:59:30 +02:00
Maxime Steinhausser
f9aeee5e63 [DI] Fix missing CHANGELOG update + typo 2017-10-02 14:00:46 +02:00
Nicolas Grekas
fc6b9ec67e Merge branch '2.7' into 2.8
* 2.7:
  fix tests
2017-10-02 10:46:46 +02:00
Nicolas Grekas
817f594f48 fix tests 2017-10-02 10:43:16 +02:00
Nicolas Grekas
f86b4c43a3 fix tests 2017-10-02 09:56:07 +02:00
Nicolas Grekas
681ff3333d Merge branch '3.3' into 3.4
* 3.3:
  fix merge
2017-10-02 09:25:08 +02:00
Nicolas Grekas
7fa94dc846 fix merge 2017-10-02 09:25:00 +02:00
Nicolas Grekas
d6972d4233 Merge branch '3.3' into 3.4
* 3.3:
  fix merge
  Fix in simple-phpunit script
2017-10-02 09:23:43 +02:00
Nicolas Grekas
e36a69710e Merge branch '2.8' into 3.3
* 2.8:
  fix merge
2017-10-02 09:18:51 +02:00
Nicolas Grekas
ef4f532395 fix merge 2017-10-02 09:17:52 +02:00
Nicolas Grekas
90986f4502 fix merge 2017-10-02 09:00:01 +02:00
Nicolas Grekas
09e512851f Fix in simple-phpunit script 2017-10-02 08:54:00 +02:00
Nicolas Grekas
fedcc91c8d Merge branch '3.3' into 3.4
* 3.3: (23 commits)
  Tests and fix for issue in array model data in EntityType field with multiple=true
  [Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
  removed useless PHPDoc
  [Form] Fix FormInterface::submit() annotation
  [PHPUnitBridge] don't remove when set to  empty string
  PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4
  HttpCache does not consider ESI resources in HEAD requests
  Fix translation for "This field was not expected"
  [Routing] Enhance Route(Collection) docblocks
  Added improvement for accuracy in MoneyToLocalizedStringTransformer.
  Removed unused private property
  Use correct verb form in the pull request template
  Use PHP_MAXPATHLEN in Filesystem.
  Added null as explicit return type (?TokenInterface)
  [FrameworkBundle] Fix Routing\DelegatingLoader
  Render all line breaks according to the exception message
  [Form] Fix phpdoc
  [DI] remove confusing code
  [Form] Fixed GroupSequence with "constraints" option
  [Validator] Clarify UUID validator behavior
  ...
2017-10-02 08:49:52 +02:00
Nicolas Grekas
a707bbf090 Merge branch '2.8' into 3.3
* 2.8: (22 commits)
  Tests and fix for issue in array model data in EntityType field with multiple=true
  [Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
  removed useless PHPDoc
  [Form] Fix FormInterface::submit() annotation
  PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4
  HttpCache does not consider ESI resources in HEAD requests
  Fix translation for "This field was not expected"
  [Routing] Enhance Route(Collection) docblocks
  Added improvement for accuracy in MoneyToLocalizedStringTransformer.
  Removed unused private property
  Use correct verb form in the pull request template
  Use PHP_MAXPATHLEN in Filesystem.
  Added null as explicit return type (?TokenInterface)
  [FrameworkBundle] Fix Routing\DelegatingLoader
  Render all line breaks according to the exception message
  [Form] Fix phpdoc
  [DI] remove confusing code
  [Form] Fixed GroupSequence with "constraints" option
  [Validator] Clarify UUID validator behavior
  [Filesystem] Fixed makePathRelative
  ...
2017-10-02 08:42:24 +02:00
Fabien Potencier
8486a501d2 minor #24391 Remove remaining @experimental annotations (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove remaining `@experimental` annotations

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

Our policy states that experimental features should be either be deprecated or go mainstream in the next minor.
I propose to make all current ones mainstream.

Commits
-------

17a413876a Remove remaining `@experimental` annotations
2017-10-01 16:14:29 -07:00
Nicolas Grekas
d4cbc70c50 Merge branch '2.7' into 2.8
* 2.7: (22 commits)
  Tests and fix for issue in array model data in EntityType field with multiple=true
  [Form] Fixed PercentToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
  removed useless PHPDoc
  [Form] Fix FormInterface::submit() annotation
  PdoSessionHandler: fix advisory lock for pgsql when session.sid_bits_per_character > 4
  HttpCache does not consider ESI resources in HEAD requests
  Fix translation for "This field was not expected"
  [Routing] Enhance Route(Collection) docblocks
  Added improvement for accuracy in MoneyToLocalizedStringTransformer.
  Removed unused private property
  Use correct verb form in the pull request template
  Use PHP_MAXPATHLEN in Filesystem.
  Added null as explicit return type (?TokenInterface)
  [FrameworkBundle] Fix Routing\DelegatingLoader
  Render all line breaks according to the exception message
  [Form] Fix phpdoc
  [DI] remove confusing code
  [Form] Fixed GroupSequence with "constraints" option
  [Validator] Clarify UUID validator behavior
  [Filesystem] Fixed makePathRelative
  ...
2017-10-01 23:00:16 +02:00
Nicolas Grekas
17a413876a Remove remaining @experimental annotations 2017-10-01 22:19:08 +02:00
Fabien Potencier
a11589f45c bug #23980 Tests and fix for issue in array model data in EntityType field with multiple=true (stoccc)
This PR was squashed before being merged into the 2.7 branch (closes #23980).

Discussion
----------

Tests and fix for issue in array model data in EntityType field with multiple=true

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

Provided some tests and the fix for #23927.
Rebased to 2.7, replaces #23930

Commits
-------

aaba6b4c2b Tests and fix for issue in array model data in EntityType field with multiple=true
2017-10-01 11:10:38 -07:00
stoccc
aaba6b4c2b Tests and fix for issue in array model data in EntityType field with multiple=true 2017-10-01 11:10:36 -07:00
Fabien Potencier
09dbed766d feature #23845 [Validator] Add unique entity violation cause (Ilya Vertakov)
This PR was squashed before being merged into the 3.4 branch (closes #23845).

Discussion
----------

[Validator] Add unique entity violation cause

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

This PR adds unique entity validation error cause which can be array of entities to constraint violation

Commits
-------

7ae06dc617 [Validator] Add unique entity violation cause
2017-10-01 11:06:53 -07:00
Ilya Vertakov
7ae06dc617 [Validator] Add unique entity violation cause 2017-10-01 11:06:51 -07:00
Fabien Potencier
af384aeee0 feature #22132 [Lock] Automaticaly release lock when user forget it (jderusse)
This PR was squashed before being merged into the 3.4 branch (closes #22132).

Discussion
----------

[Lock] Automaticaly release lock when user forget it

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

The objective of this PR is to automatically release the Lock when the user forget to call the `release` method (like the `fclose` function does in, php core).
The implementation is comparable to #22115 but the purpose is not the same.

I create a new PR to not mix things.

Commits
-------

2eedc1fd37 [Lock] Automaticaly release lock when user forget it
2017-10-01 11:03:21 -07:00
Jérémy Derussé
2eedc1fd37 [Lock] Automaticaly release lock when user forget it 2017-10-01 11:03:19 -07:00