Commit Graph

47828 Commits

Author SHA1 Message Date
Fabien Potencier
db46f3bede feature #35913 [LDAP] Add error code in exceptions generated by ldap (Victor Garcia)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[LDAP] Add error code in exceptions generated by ldap

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  |no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

This PR add the exception code returned by ldap PHP component to LdapException, and allow users a better way to detect the errors. Before this LdapException allways return code 0, and make neccesary evaluate the string returned to detect the error.

Commits
-------

b4c90f08f1 [LDAP] Add error code in exceptions generated by ldap
2020-03-02 11:50:15 +01:00
Victor Garcia
b4c90f08f1 [LDAP] Add error code in exceptions generated by ldap 2020-03-02 11:50:09 +01:00
Fabien Potencier
6429999e91 Merge branch '5.0'
* 5.0:
  [Dotenv] Documentation improvement
  [DI] Clarified deprecation for TypedReference in 4.4
  [Validator] Add missing vietnamese translations
  add German translation
  add missing Messenger options to XML schema definition
  [5.0] Remove some unused variables
  [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc
  [DomCrawler][Form] Fix PHPDoc on get & offsetGet
  [ErrorHandler] fix parsing static return type on interface method annotation (fix #35836)
  prevent method calls on null values
  Return int if scale = 0
2020-02-29 11:07:16 +01:00
Fabien Potencier
65d06cbd41 Merge branch '4.4' into 5.0
* 4.4:
  [Dotenv] Documentation improvement
  [DI] Clarified deprecation for TypedReference in 4.4
  [Validator] Add missing vietnamese translations
  add German translation
  add missing Messenger options to XML schema definition
  [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc
  [DomCrawler][Form] Fix PHPDoc on get & offsetGet
  [ErrorHandler] fix parsing static return type on interface method annotation (fix #35836)
  prevent method calls on null values
  Return int if scale = 0
2020-02-29 11:07:09 +01:00
Fabien Potencier
8f7b8aa41d Merge branch '3.4' into 4.4
* 3.4:
  [Validator] Add missing vietnamese translations
  add German translation
  [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc
  [DomCrawler][Form] Fix PHPDoc on get & offsetGet
  prevent method calls on null values
  Return int if scale = 0
2020-02-29 11:05:28 +01:00
Fabien Potencier
4ac38ef200 minor #35887 [Dotenv] Documentation improvement (jonmldr)
This PR was submitted for the master branch but it was merged into the 4.4 branch instead.

Discussion
----------

[Dotenv] Documentation improvement

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License       | MIT
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch master.
-->

Equalization with the component description in the [documentation](https://symfony.com/doc/current/components/dotenv.html).
My suggestion is to remove `getenv()` from this description. [Since Symfony 4.3](https://github.com/symfony/symfony/blob/master/UPGRADE-4.3.md), `$usePutenv = false` by default in `Dotenv::__construct()`. Because of this, `getenv()` is not usable by default.

Commits
-------

4f61247ccc [Dotenv] Documentation improvement
2020-02-29 11:04:08 +01:00
jonmldr
4f61247ccc [Dotenv] Documentation improvement 2020-02-29 11:04:02 +01:00
Fabien Potencier
0888ff6dbd minor #35894 [ExpressionLanguage] Fixed exception message (atailouloute)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[ExpressionLanguage] Fixed exception message

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

4d695b380d [ExpressionLanguage] Fixed exception message
2020-02-29 11:02:13 +01:00
Fabien Potencier
34c2e96b08 bug #35781 [Form] NumberToLocalizedStringTransformer return int if scale = 0 (VincentLanglet)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] NumberToLocalizedStringTransformer return int if scale = 0

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35775
| License       | MIT
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch master.
-->

Commits
-------

2993fc9fc5 Return int if scale = 0
2020-02-29 10:59:06 +01:00
Fabien Potencier
146945ad8e feature #35782 [Routing] Add stateless route attribute (mtarld)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Routing] Add stateless route attribute

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Ticket		| https://github.com/orgs/symfony/projects/1#card-30506005
| License       | MIT
| Doc PR        | TODO

On top of https://github.com/symfony/symfony/pull/35732

Add a stateless attribute for:
Routes in annotations
```
@Route(stateless=true)
```
Yaml
```yml
route:
  stateless: true
```
Xml
```xml
<route stateless="true" />
```
PHP configurator
```php
$route->stateless(true);
```

That stateless attribute is a shortcut for setting `_stateless` default attribute in route.

Commits
-------

2da68bae8f [Routing] Add stateless route attribute
2020-02-29 10:56:15 +01:00
Fabien Potencier
7295d25f32 bug #35846 [Serializer] prevent method calls on null values (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Serializer] prevent method calls on null values

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35824
| License       | MIT
| Doc PR        |

Commits
-------

847d6dc8f3 prevent method calls on null values
2020-02-29 10:53:07 +01:00
Fabien Potencier
dc9a0b586f bug #35897 [FrameworkBundle] add missing Messenger options to XML schema definition (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] add missing Messenger options to XML schema definition

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix symfony/symfony-docs#13010
| License       | MIT
| Doc PR        | symfony/symfony-docs#13277

Commits
-------

45a033d67b add missing Messenger options to XML schema definition
2020-02-29 10:50:54 +01:00
Fabien Potencier
8ed2e66de4 minor #35898 [DI] Clarified deprecation for TypedReference in 4.4 (linaori)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[DI] Clarified deprecation for TypedReference in 4.4

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #35752 <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        |~ <!-- required for new features -->

Changes the deprecation message to indicate the argument has been removed and how to fix it.

Commits
-------

1c70048e9c [DI] Clarified deprecation for TypedReference in 4.4
2020-02-29 10:50:10 +01:00
Lynn
1c70048e9c [DI] Clarified deprecation for TypedReference in 4.4 2020-02-29 10:50:04 +01:00
Fabien Potencier
4520e61045 minor #35895 Added ROLE_PREVIOUS_ADMIN deprecation to UPGRADE guide (wouterj)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Added ROLE_PREVIOUS_ADMIN deprecation to UPGRADE guide

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

I forgot to update the UPGRADE guides in https://github.com/symfony/symfony/pull/35858

Commits
-------

3c8d316f65 Added ROLE_PREVIOUS_ADMIN deprecation to UPGRADE guide
2020-02-29 10:49:11 +01:00
Fabien Potencier
eff7d14402 minor #35902 [Validator] add Japanese translation (souweb22)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Validator] add Japanese translation

| Q             | A
| ------------- | ---
| Branch?       | master<!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | -<!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | -<!-- required for new features -->

I added a Japanese translation, taking into account existing translations.

Commits
-------

90104a919d [Validator] add Japanese translation
2020-02-29 10:09:43 +01:00
Fabien Potencier
6c042661e2 minor #35901 [Validator] add German translation (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] add German translation

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

9d837ecb34 add German translation
2020-02-29 10:08:42 +01:00
Fabien Potencier
e4104b6411 minor #35903 [Validator] add Vietnamese translation (jschaedl)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] add Vietnamese translation

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       |  <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        |  <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained 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 branch master.
-->

Commits
-------

c16d153522 [Validator] Add missing vietnamese translations
2020-02-29 10:07:39 +01:00
Jan Schädlich
c16d153522 [Validator] Add missing vietnamese translations 2020-02-29 09:57:15 +01:00
arai
90104a919d [Validator] add Japanese translation 2020-02-29 09:37:39 +09:00
Christian Flothmann
9d837ecb34 add German translation 2020-02-28 15:30:03 +01:00
Christian Flothmann
45a033d67b add missing Messenger options to XML schema definition 2020-02-28 14:15:16 +01:00
Wouter de Jong
3c8d316f65 Added ROLE_PREVIOUS_ADMIN deprecation to UPGRADE guide 2020-02-28 12:20:28 +01:00
Ahmed TAILOULOUTE
4d695b380d [ExpressionLanguage] Fixed exception message 2020-02-28 11:19:56 +01:00
Nicolas Grekas
5ffb96452f minor #35861 [DomCrawler][Form] Fix PHPDoc on get & offsetGet (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[DomCrawler][Form] Fix PHPDoc on get & offsetGet

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

`FormFieldRegistry::get()` returns mixed. For example, it can return an array when the field is a collection.

Commits
-------

f8735cc47b [DomCrawler][Form] Fix PHPDoc on get & offsetGet
2020-02-27 11:19:42 +01:00
Nicolas Grekas
dd8f580eda minor #35877 [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc (fancyweb)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator][ConstraintValidator] Update wrong PRETTY_DATE doc

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

That is really minor but the current doc is not up to date with the real behavior.

Commits
-------

491fc5c24d [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc
2020-02-27 11:12:24 +01:00
Nicolas Grekas
421c7f8fcd minor #35872 Optimize HttpClient when body is iterable (jderusse)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Optimize HttpClient when body is iterable

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | /
| License       | MIT
| Doc PR        | /

Small optimization on HttpClient by avoiding calling Reflection when body is a known Traversable.

Commits
-------

03b7743ff5 Optimize HttpClient when body is iterable
2020-02-27 11:09:40 +01:00
Fabien Potencier
15297b1409 minor #35880 [5.0] Remove some unused variables (fancyweb)
This PR was merged into the 5.0 branch.

Discussion
----------

[5.0] Remove some unused variables

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Some cleanup.

Commits
-------

1f953e42f2 [5.0] Remove some unused variables
2020-02-27 07:04:32 +01:00
Jérémy Derussé
03b7743ff5
Optimize HttpClient when body is iterable 2020-02-27 00:20:25 +01:00
Thomas Calvet
1f953e42f2 [5.0] Remove some unused variables 2020-02-26 23:30:10 +01:00
Thomas Calvet
491fc5c24d [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc 2020-02-26 21:34:36 +01:00
Thomas Calvet
f8735cc47b [DomCrawler][Form] Fix PHPDoc on get & offsetGet 2020-02-26 18:12:32 +01:00
Nicolas Grekas
da0e2f94bb bug #35870 [ErrorHandler] fix parsing static return type on interface method annotation (alekitto)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] fix parsing static return type on interface method annotation

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35836
| License       | MIT

As suggested in the issue, the regex has been adapted to capture the return type, then it will be checked while determining if the method to be implemented should be static or just returns an instance of `static`.

Commits
-------

55734a297f [ErrorHandler] fix parsing static return type on interface method annotation (fix #35836)
2020-02-26 17:55:50 +01:00
Mathias Arlaud
2da68bae8f [Routing] Add stateless route attribute 2020-02-26 15:20:07 +01:00
Alessandro Chitolina
55734a297f
[ErrorHandler] fix parsing static return type on interface method annotation (fix #35836) 2020-02-26 12:45:31 +01:00
Fabien Potencier
7995fed10b feature #35732 [FrameworkBundle][HttpKernel] Add session usage reporting in stateless mode (mtarld)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle][HttpKernel] Add session usage reporting in stateless mode

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| License       | MIT
| Doc PR        | TODO

https://github.com/orgs/symfony/projects/1#card-30506005

Provide a `@Stateless` annotation that forbid session usage for annotated controllers (or classes).

## Implementations
**v1**
- ~~New session proxy that allows session to be marked as disabled~~
- ~~New default route attribute: `_stateless` (automatically set by `@Stateless`)~~
- ~~On kernel controller event, if `_stateless` is `true`, session is marked as disabled~~
- ~~Session listener is able to check if the session is disabled and prevent its creation~~

**v2**
- New default route attribute: `_stateless` (automatically set by `@Stateless`)
- On kernel response, check the session usage and if session was used when `_stateless` attribute is set to `true`: Either throw an exception (debug enabled) or log a warning (debug disabled)

Commits
-------

bc48db2424 [FrameworkBundle][HttpFoundation] Add `_stateless`
2020-02-26 11:40:28 +01:00
Robin Chalas
dca77c42ec Merge branch '5.0'
* 5.0:
  [Security] Allow switching to another user when already switched
2020-02-26 11:32:20 +01:00
Robin Chalas
4206b4dc4a Merge branch '4.4' into 5.0
* 4.4:
  [Security] Allow switching to another user when already switched
2020-02-26 11:31:10 +01:00
Robin Chalas
3057c68b93 Merge branch '3.4' into 4.4
* 3.4:
  [Security] Allow switching to another user when already switched
2020-02-26 11:27:30 +01:00
Mathias Arlaud
bc48db2424 [FrameworkBundle][HttpFoundation] Add _stateless 2020-02-26 11:16:11 +01:00
Nicolas Grekas
6f95125a09 bug #35839 [Security] Allow switching to another user when already switched (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security] Allow switching to another user when already switched

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34690
| License       | MIT
| Doc PR        | -

Commits
-------

0353077083 [Security] Allow switching to another user when already switched
2020-02-26 10:44:17 +01:00
Robin Chalas
0353077083 [Security] Allow switching to another user when already switched 2020-02-26 04:23:24 +01:00
Nicolas Grekas
d0e5593b1f Merge branch '5.0'
* 5.0:
  [FrameworkBundle] Fix test
2020-02-25 15:44:02 +01:00
Nicolas Grekas
cd355dff07 Merge branch '4.4' into 5.0
* 4.4:
  [FrameworkBundle] Fix test
2020-02-25 15:39:06 +01:00
Nicolas Grekas
1b377a86db Merge branch '3.4' into 4.4
* 3.4:
  [FrameworkBundle] Fix test
2020-02-25 15:33:04 +01:00
Nicolas Grekas
159ef1bf1d [FrameworkBundle] Fix test 2020-02-25 15:31:47 +01:00
Nicolas Grekas
c56cf2da5d Merge branch '5.0'
* 5.0:
  minor #35833 [FrameworkBundle] Add missing items in the unused tag pass whitelist (fabpot)
  [HttpClient][DX] Add URL context to JsonException messages
  [Routing] Improve localized routes performances
  [4.4][DoctrineBridge] Use new Types::* constants and support new json type
  [Validator] Add missing translations
  [Notifier] Dispatch message event in null transport
  [Messenger] Use Doctrine DBAL new Types::* constants
2020-02-25 15:29:12 +01:00
Nicolas Grekas
11097a5aa6 Merge branch '4.4' into 5.0
* 4.4:
  minor #35833 [FrameworkBundle] Add missing items in the unused tag pass whitelist (fabpot)
  [HttpClient][DX] Add URL context to JsonException messages
  [Routing] Improve localized routes performances
  [4.4][DoctrineBridge] Use new Types::* constants and support new json type
  [Validator] Add missing translations
  [Messenger] Use Doctrine DBAL new Types::* constants
2020-02-25 15:24:11 +01:00
Nicolas Grekas
1107548146 Merge branch '3.4' into 4.4
* 3.4:
  minor #35833 [FrameworkBundle] Add missing items in the unused tag pass whitelist (fabpot)
  [Validator] Add missing translations
2020-02-25 15:19:32 +01:00
Nicolas Grekas
b515bc9a97 minor #35833 [FrameworkBundle] Add missing items in the unused tag pass whitelist (fabpot)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle] Add missing items in the unused tag pass whitelist

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | n/a

We have some missing tags in the whitelist. I've added a script that adds the missing ones, and added a test to avoid forgetting about updating the whitelist.

Commits
-------

d1bcc0fc5e [FrameworkBundle] Add a script that checks for missing items in the unused tag whitelist
2020-02-25 15:18:39 +01:00