Commit Graph

34911 Commits

Author SHA1 Message Date
Fabien Potencier
3a55814eb8 minor #32544 [Validator] Add Lithuanian translation for Range validator (norkunas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add Lithuanian translation for Range validator

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | -   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

Translation for #32435.

<!--
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/roadmap):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->

Commits
-------

20ef151eb3 [Validator] Add Lithuanian translation for Range validator
2019-07-15 08:26:17 +02:00
Tomas
20ef151eb3 [Validator] Add Lithuanian translation for Range validator 2019-07-15 08:12:34 +03:00
Arman Hosseini
8a5a8fa835
Add HTTPS to a URL 2019-07-14 15:17:28 +04:30
Christian Flothmann
fa317f23f5 fix some deprecations and add upgrade instructions 2019-07-14 10:01:32 +02:00
Christian Flothmann
1bfb8106d3 minor #32400 [Form] Name related PHPDoc fixes (vudaltsov)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Name related PHPDoc fixes

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

As I started working on #32179 in #32237, I noticed some PHPDoc inconsistencies around the form's name. I have researched the issue thoroughly and here's my proposal:

1. All "factory" methods (`FormFactory::create*`, `ResolvedFormType::createBuilder`, `FormBuilder::create|add`, `Form::add`) currently accept string and integer names. This should not be deprecated, because it's very convenient and natural to pass ints when adding children to types like `ChoiceType` or `CollectionType`.
1. None of the "factory" methods explicitly accepts `null` as a name, although passing `null` works the same as passing `''`. I consider passing `null` in this case to be ugly, so I corrected the builder's constructors mentioning `null` as a possible argument. One should pass an empty string `''` when creating such a form. We could also deprecate passing `null` in a PR targeting 4.4.
1. Currently the name becomes a string in the builder's (or config builder's) constructor. Which means that `FormConfigInterface::getName` always returns a string and thus the form's `$name` property is always a string. All related checks and PHPDocs should be corrected.
1. The "children accessors" (`Form::has|get|remove`, `FormBuilder::has|get|remove`) should accept both strings and ints because they are array-accessible by design (so it does not really matter, if the key is a string or an int). If it's valid to have `$collectionForm->add(1, ItemType::class)`, then it should be valid to do `$collectionForm->get(1)`. And it works in code, but is not mentioned in the PHPDoc.

ping @nicolas-grekas , @xabbuh , @HeahDude

Commits
-------

eae95c4e49 PHPDoc fixes
2019-07-13 13:29:38 +02:00
Christian Flothmann
209226a3f6 sync translation files 2019-07-13 12:19:24 +02:00
Christian Flothmann
24b7feff91 fix typo 2019-07-13 12:01:31 +02:00
Valentin
eae95c4e49 PHPDoc fixes 2019-07-13 00:04:51 +03:00
Ion Bazan
b35131a9bf Add notInRange translation 2019-07-12 14:10:16 +03:00
Patrick Reimers
dc2e36d7c7 Add danish translation for Range validator 2019-07-12 14:08:46 +03:00
Patrick Reimers
d392e49993 Add german translation for Range validator 2019-07-12 14:07:09 +03:00
Pablo Lozano
b5a96409b7
Update validators.es.xlf 2019-07-12 13:06:55 +02:00
Lctrs
5ba6cc9b7c [Validator] Add missing en and fr translation ids from 4.4 2019-07-12 10:45:11 +02:00
Thomas Calvet
0185527297 [Debug][DebugClassLoader] Don't check class if the included file don't exist 2019-07-12 10:40:08 +02:00
Javier Eguiluz
41f51fd7c1 [Validator] Added the Spanish translation for the new Range validator 2019-07-12 11:27:25 +03:00
JoppeDC
29ecf224a5 Added Nl translations
Added NL translations for the validator when both `min` and `max` are set.
2019-07-12 11:25:50 +03:00
JoppeDC
871ca3713a
Added Nl translations
Added NL translations for the validator when both `min` and `max` are set.
2019-07-12 10:08:35 +02:00
Fabien Potencier
03b0284810 fixed CS 2019-07-12 09:03:00 +03:00
Fabien Potencier
dcd0a64394 Merge branch '4.2' into 4.3
* 4.2:
  fixed CS
  [Debug][DebugClassLoader] Include found files instead of requiring them
2019-07-12 08:54:53 +03:00
Fabien Potencier
a8d8cf8b45 Merge branch '3.4' into 4.2
* 3.4:
  fixed CS
  [Debug][DebugClassLoader] Include found files instead of requiring them
2019-07-12 08:51:03 +03:00
Fabien Potencier
ee5e5de9e0 fixed CS 2019-07-12 08:50:39 +03:00
Fabien Potencier
6f73e62285 minor #32476 Add missing message parameter (apfelbox)
This PR was merged into the 4.4 branch.

Discussion
----------

Add missing message parameter

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://github.com/symfony/symfony/pull/32231#discussion_r301943379
| License       | MIT
| Doc PR        | —

<!--
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/roadmap):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->

Add the missing parameter in the `sprintf()` call.

Found in https://github.com/symfony/symfony/pull/32231#discussion_r301943379

Commits
-------

a060642637 Replace missing message parameter
2019-07-12 08:14:53 +03:00
Fabien Potencier
fd3ad6520c feature #32435 [Validator] Add a new constraint message when there is both min and max (Lctrs)
This PR was squashed before being merged into the 4.4 branch (closes #32435).

Discussion
----------

[Validator] Add a new constraint message when there is both min and max

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | Part of #31503
| License       | MIT
| Doc PR        | to do

Currently, the failed validation messages in the `Range` constraint doesn't carry a notion of range. This can be confusing and error-prone if we report these messages to the user as-is.

This PR introduces a new message to the `Range` constraint (`This value should be between {{ min }} and {{ max }}.`) that will be displayed if both `min` and `max` are not `null`.

Commits
-------

c5488bcec1 [Validator] Add a new constraint message when there is both min and max
2019-07-12 08:12:45 +03:00
Lctrs
c5488bcec1 [Validator] Add a new constraint message when there is both min and max 2019-07-12 08:12:33 +03:00
Fabien Potencier
aefb8bdb26 minor #32447 [LDAP] add new option implemented in php 7.1 (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[LDAP] add new option implemented in php 7.1

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets |  #18448  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | none <!-- 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/roadmap):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->

Add new options to the LDAP connection class.

Commits
-------

d1a0ca6b9a [LDAP] add new option implemented in php 7.1
2019-07-12 07:55:23 +03:00
Fabien Potencier
8c1f61f5a6 fixed CS 2019-07-12 07:47:23 +03:00
Fabien Potencier
adcd643094 minor #32452 [Bundles] Rename getPublicPath() as getPublicDir() (javiereguiluz)
This PR was squashed before being merged into the 4.4 branch (closes #32452).

Discussion
----------

[Bundles] Rename getPublicPath() as getPublicDir()

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | -
| License       | MIT
| Doc PR        | I'll add this if approved

While documenting #31975 (see https://github.com/symfony/symfony-docs/pull/11930) I realized that the `getPublicPath()` method name is not consistent with the rest of Symfony.

In Symfony, "path" is usually associated to routes and we use "dir" for things similar to this:

* `getCacheDir()` and `getLogdir()` to override Symfony structure (https://symfony.com/doc/current/configuration/override_dir_structure.html)
* `binDir`, `configDir`, `srcDir`, `varDir`, `publicDir` in Symfony Flex recipes (https://github.com/symfony/recipes) to override the dir structure

So, this PR proposes to rename `getPublicPath()` as `getPublicDir()`

Commits
-------

4ab2f9955b [Bundles] Rename getPublicPath() as getPublicDir()
2019-07-12 07:45:48 +03:00
Javier Eguiluz
4ab2f9955b [Bundles] Rename getPublicPath() as getPublicDir() 2019-07-12 07:45:28 +03:00
Fabien Potencier
c4568d1485 minor #32478 Remove experimental notice from components (teohhanhui)
This PR was merged into the 4.4 branch.

Discussion
----------

Remove experimental notice from components

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

@fabpot:
> Nothing can be marked as experimental in 4.4.
>
> https://github.com/symfony/symfony/pull/32277

Commits
-------

390c9a67bf Remove experimental notice from components
2019-07-12 07:44:05 +03:00
Paulo Ribeiro
c5ee4bedc2 [FrameworkBundle] Fix descriptor of routes described as callable array 2019-07-11 16:09:41 -03:00
Thomas Calvet
c7141c82d1 [Debug][DebugClassLoader] Include found files instead of requiring them 2019-07-11 20:09:53 +02:00
Christian Flothmann
d7d2eac087 remove invalid test cases 2019-07-11 14:40:03 +02:00
Nicolas Grekas
a2dce3a6c6 Merge branch '4.2' into 4.3
* 4.2:
  [HttpKernel] fix tests
2019-07-11 12:26:11 +02:00
Nicolas Grekas
07557ec94a Merge branch '3.4' into 4.2
* 3.4:
  [HttpKernel] fix tests
2019-07-11 12:26:05 +02:00
Nicolas Grekas
6eee2a8144 [HttpKernel] fix tests 2019-07-11 12:21:37 +02:00
Teoh Han Hui
390c9a67bf
Remove experimental notice from components 2019-07-11 11:03:49 +02:00
Nicolas Grekas
4499e2a21a feature #32470 Rename ErrorCatcher to ErrorRenderer (rendering part only) (yceruto)
This PR was squashed before being merged into the 4.4 branch (closes #32470).

Discussion
----------

Rename ErrorCatcher to ErrorRenderer (rendering part only)

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

Follow up https://github.com/symfony/symfony/pull/32377

Commits
-------

fb5b0429b2 Rename ErrorCatcher to ErrorRenderer (rendering part only)
2019-07-11 10:47:06 +02:00
Yonel Ceruto
fb5b0429b2 Rename ErrorCatcher to ErrorRenderer (rendering part only) 2019-07-11 10:46:43 +02:00
Amrouche Hamza
d1a0ca6b9a
[LDAP] add new option implemented in php 7.1 2019-07-11 05:49:14 +02:00
Nicolas Grekas
2e5a8c80c6 Merge branch '4.3' into 4.4
* 4.3: (26 commits)
  Fix Twig 1.x compatibility
  [Translator] Improve farsi(persian) translations for Form
  Improve fa translations
  Spell "triggering" properly
  Added tests to cover the possibility of having scalars as services.
  fixed tests on old PHP versions
  [FrameworkBundle] Inform the user when save_path will be ignored
  fixed CS
  [SecurityBundle] Fix profiler dump for non-invokable security listeners
  fixed CS
  [Messenger] Doctrine Transport: Support setting auto_setup from DSN
  [Translator] Load plurals from po files properly
  [Serializer]: AbstractObjectNormalizer ignores the property types of discriminated classes
  [EventDispatcher] Add tag kernel.rest on 'debug.event_dispatcher' service
  [Console] Update to inherit and add licence
  Add missing test for workflow dump description
  [Intl] Remove --dev from intl compile autoloader
  [Messenger] fix publishing headers set on AmqpStamp
  Remove call to deprecated method
  [Intl] Init compile tmp volume
  ...
2019-07-10 20:47:17 +02:00
Nicolas Grekas
f884d659ec Merge branch '4.2' into 4.3
* 4.2:
  Fix Twig 1.x compatibility
  [Translator] Improve farsi(persian) translations for Form
  Improve fa translations
  Added tests to cover the possibility of having scalars as services.
  fixed tests on old PHP versions
  [FrameworkBundle] Inform the user when save_path will be ignored
  fixed CS
  [Translator] Load plurals from po files properly
  [Serializer]: AbstractObjectNormalizer ignores the property types of discriminated classes
  [EventDispatcher] Add tag kernel.rest on 'debug.event_dispatcher' service
  [Console] Update to inherit and add licence
  [Intl] Remove --dev from intl compile autoloader
  Remove call to deprecated method
  [Intl] Init compile tmp volume
  PHP 5 compat
  Add test case
  Update Request.php
  Don't assume port 0 for X-Forwarded-Port
  Load plurals from mo files properly
2019-07-10 20:43:18 +02:00
Nicolas Grekas
68d36d50ad Merge branch '3.4' into 4.2
* 3.4:
  Fix Twig 1.x compatibility
  [Translator] Improve farsi(persian) translations for Form
  Improve fa translations
  Added tests to cover the possibility of having scalars as services.
  fixed tests on old PHP versions
  [FrameworkBundle] Inform the user when save_path will be ignored
  fixed CS
  [Translator] Load plurals from po files properly
  [EventDispatcher] Add tag kernel.rest on 'debug.event_dispatcher' service
  [Console] Update to inherit and add licence
  [Intl] Remove --dev from intl compile autoloader
  [Intl] Init compile tmp volume
  PHP 5 compat
  Add test case
  Update Request.php
  Don't assume port 0 for X-Forwarded-Port
  Load plurals from mo files properly
2019-07-10 20:39:05 +02:00
Jannik Zschiesche
a060642637
Replace missing message parameter 2019-07-10 11:53:52 +02:00
Fabien Potencier
d3c17f2ade feature #32462 [WebProfilerBundle] Deprecating templateExists method (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[WebProfilerBundle] Deprecating templateExists method

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

Follow up https://github.com/symfony/symfony/pull/32458, so in 5.0 we can remove these methods safely.

I'm not deprecating the `Symfony\Bundle\TwigBundle\Controller\ExceptionController::templateExists()` method because the whole class is being deprecated in https://github.com/symfony/symfony/pull/31398

See also https://github.com/symfony/symfony/pull/32461

Commits
-------

2e81e45bc3 Deprecating templateExists method
2019-07-09 20:31:13 +02:00
Fabien Potencier
0349294175 bug #32464 [WebProfilerBundle] Fix Twig 1.x compatibility (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] Fix Twig 1.x compatibility

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

Commits
-------

a9a6eb5c58 Fix Twig 1.x compatibility
2019-07-09 20:26:56 +02:00
Yonel Ceruto
a9a6eb5c58 Fix Twig 1.x compatibility 2019-07-09 11:57:56 -04:00
Yonel Ceruto
2e81e45bc3 Deprecating templateExists method 2019-07-09 11:53:26 -04:00
Amin-Hosseini
346ce8811e [Translator] Improve farsi(persian) translations for Form 2019-07-09 13:50:53 +02:00
Lctrs
9d725054ce
[Validator] Fix Changelog for #31511 2019-07-09 09:54:33 +02:00
Fabien Potencier
ac7938b116 minor #32450 [Lock][Console] bump lock requirement in console (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[Lock][Console] bump lock requirement in console

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  |no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets |    <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | not needed <!-- 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/roadmap):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->

Fix test of the console component, by bumping the lock requirement

Commits
-------

41de6333db [Lock][Console] bump lock requirement in console
2019-07-09 09:19:54 +02:00
Fabien Potencier
e69d1cb38d minor #32441 [PHPUnit Bridge] Spell "triggering" properly (greg0ire)
This PR was merged into the 4.3 branch.

Discussion
----------

[PHPUnit Bridge] Spell "triggering" properly

As a side effect, the property name matches the one in the declaration,
which was correct.

| Q             | A
| ------------- | ---
| Branch?       | 4.3 for bug fixes
| 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
-------

cad5f9a106 Spell "triggering" properly
2019-07-09 09:10:48 +02:00
Amrouche Hamza
41de6333db
[Lock][Console] bump lock requirement in console 2019-07-09 09:02:15 +02:00
Fabien Potencier
342461014e minor #32449 [Lock] minor: add missing alias for PersistStoreInterface (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[Lock] minor: add missing alias for PersistStoreInterface

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | none   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | todo <!-- 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/roadmap):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->

Add missing alias highlited by @jderusse in order to do:
```
public function __construct(PersistStoreInterface $store) {}
```

Commits
-------

f1e98f2a10 [Lock] minor: add missing alias for PersistenStoreInterface
2019-07-09 08:52:26 +02:00
Amrouche Hamza
f1e98f2a10
[Lock] minor: add missing alias for PersistenStoreInterface 2019-07-09 08:33:03 +02:00
Fabien Potencier
4078686d3e feature #32446 [Lock] rename and deprecate Factory into LockFactory (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[Lock] rename and deprecate Factory into LockFactory

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes<!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | none  <!-- #-prefixed issue number(s), 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/roadmap):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->
As highlighted in https://github.com/symfony/symfony/pull/32198#pullrequestreview-255808664 we need to rename the factory to LockFactory for consistency and readability.

Commits
-------

fc75eb9bef [Lock] rename and deprecate Factory into LockFactory
2019-07-09 08:22:23 +02:00
Arman
e9abc7d654 Improve fa translations 2019-07-09 08:19:25 +02:00
Fabien Potencier
37756d3b22 minor #32432 [DependencyInjection] Added tests to cover the possibility of having scalars as services (derrabus)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] Added tests to cover the possibility of having scalars as services

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

Commits
-------

60939d988d Added tests to cover the possibility of having scalars as services.
2019-07-09 08:16:48 +02:00
Fabien Potencier
de710f6640 feature #31975 Dynamic bundle assets (garak)
This PR was squashed before being merged into the 4.4 branch (closes #31975).

Discussion
----------

Dynamic bundle assets

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no (new method in interface as annotation)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29213
| License       | MIT
| Doc PR        | none (yet)

Everything is explained in linked issue

Commits
-------

c16fcc93e2 Dynamic bundle assets
2019-07-09 08:13:12 +02:00
Massimiliano Arione
c16fcc93e2 Dynamic bundle assets 2019-07-09 08:12:54 +02:00
Amrouche Hamza
fc75eb9bef
[Lock] rename and deprecate Factory into LockFactory 2019-07-09 07:41:12 +02:00
Nicolas Grekas
4a50400d3d minor #32377 [Debug] Restoring back the state of the Debug component (1st step) (yceruto)
This PR was squashed before being merged into the 4.4 branch (closes #32377).

Discussion
----------

[Debug] Restoring back the state of the Debug component (1st step)

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/32371
| License       | MIT

After a good discussion with @nicolas-grekas, we made the decision to split the current `ErrorCatcher` component into several:
 * `ErrorHandler` it would be the Debug component before these changes https://github.com/symfony/symfony/pull/31065, with everything related to ErrorHandler, Debug, DebugClassLoader classes and change its name.
 * `ErrorDumper` it would be the current ErrorCatcher but with FlattenException + the new error renderer system only.

This is the first step, then we can deprecate everything for the Debug component in favor of the ErrorHandler and ErrorDumper components, **BUT without moving any code !!**, that would give us more freedom to do it correctly in the new components.

NOTE: For this PR I've copy the `Debug` component directory from the revision prior to merged commit  https://github.com/symfony/symfony/pull/31065 in 4.4 branch.

Commits
-------

eda49e295e [Debug] Restoring back the state of the Debug component (1st step)
2019-07-09 07:29:33 +02:00
Yonel Ceruto
eda49e295e [Debug] Restoring back the state of the Debug component (1st step) 2019-07-09 07:29:09 +02:00
Ryan Weaver
90d1b059fd Adding missing event_dispatcher wiring for messenger.middleware.send_message 2019-07-08 13:53:30 -04:00
Grégoire Paris
cad5f9a106
Spell "triggering" properly
As a side effect, the property name matches the one in the declaration,
which was correct.
2019-07-08 19:17:40 +02:00
Maxime Steinhausser
c1bfaa1de4 [Serializer] XmlEncoder: don't cast padded strings 2019-07-08 17:39:29 +02:00
Amrouche Hamza
2c5089b235
[Lock] Fix tests 2019-07-08 16:26:57 +02:00
Alexander M. Turek
60939d988d Added tests to cover the possibility of having scalars as services. 2019-07-08 16:11:17 +02:00
Fabien Potencier
29654a4c02 feature #32429 [VarDumper] Let browsers trigger their own search on double CMD/CTRL + F (ogizanagi)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] Let browsers trigger their own search on double CMD/CTRL + F

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29748   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Simple way to enhance DX & mitigate #29748

Commits
-------

d2430584cd [VarDumper] Let browsers trigger their own search on double CMD/CTRL + F hit
2019-07-08 15:41:43 +02:00
Fabien Potencier
d9aace2db3 fixed CS 2019-07-08 15:38:56 +02:00
Fabien Potencier
608d428160 feature #32198 [Lock] Split "StoreInterface" into multiple interfaces with less responsability (Simperfit)
This PR was squashed before being merged into the 4.4 branch (closes #32198).

Discussion
----------

[Lock] Split "StoreInterface" into multiple interfaces with less responsability

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | Contribute to #28694 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | TODO <!-- 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/roadmap):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->

We are removing the StoreInterface in order to split into multiple interface, it will help reduce de responsability of the StoreInterface.

Firstly, since not all stores needs to have all the methods of the StoreInterface, we can split this like this in order to limit the methods that are needed for each store.

Secondly, we add supportsX methods in order to avoid throwing exception when a store does not supports a feature it's easier an instance of the special interface or not, and it can return true/false on the support method.

**Really big thanks to** @jderusse for working with me on this, 1-2 hours of talking together, and another 1-2 hours of pre-review :). now giving it to the whole community !

*some time has been sponsored by* @izisolutions

Commits
-------

91fcbea977 [Lock] Split \"StoreInterface\" into multiple interfaces with less responsability
2019-07-08 15:38:00 +02:00
Amrouche Hamza
91fcbea977 [Lock] Split \"StoreInterface\" into multiple interfaces with less responsability 2019-07-08 15:37:49 +02:00
Maxime Steinhausser
d2430584cd [VarDumper] Let browsers trigger their own search on double CMD/CTRL + F hit 2019-07-08 15:18:18 +02:00
Fabien Potencier
350ec6cc7e minor #32428 [Stopwatch] Fix missing deprecations (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

[Stopwatch] Fix missing deprecations

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

Fix https://github.com/symfony/symfony/pull/32408

Commits
-------

527bf89a27 Fix missing deprecations
2019-07-08 15:06:45 +02:00
Fabien Potencier
e1cea970c0 feature #31511 [Validator] Allow to use property paths to get limits in range constraint (Lctrs)
This PR was squashed before being merged into the 4.4 branch (closes #31511).

Discussion
----------

[Validator] Allow to use property paths to get limits in range constraint

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | Part of #31503
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/11793

Similar as #22576, but for the `Range` constraint.

Commits
-------

2b509904c8 [Validator] Allow to use property paths to get limits in range constraint
2019-07-08 15:05:23 +02:00
Lctrs
2b509904c8 [Validator] Allow to use property paths to get limits in range constraint 2019-07-08 15:04:44 +02:00
Yonel Ceruto
527bf89a27 Fix missing deprecations 2019-07-08 08:57:32 -04:00
Fabien Potencier
5328c4b552 fixed tests on old PHP versions 2019-07-08 14:55:32 +02:00
Fabien Potencier
fea98a8473 bug #31620 [FrameworkBundle] Inform the user when save_path will be ignored (gnat42)
This PR was squashed before being merged into the 3.4 branch (closes #31620).

Discussion
----------

[FrameworkBundle] Inform the user when save_path will be ignored

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

When a project is created, framework.yaml or config.yml has handler_id set to ~. This uses the native php SessionHandler object which is instantiated with the save_path setting from php.ini or php-fpm.d/www.conf. If you set a save_path, it is silently ignored. When using mod_php for apache or php-fpm running as apache/nginx this is typically not a big deal (except your session files are stored someplace other than you actually wanted). However if using php-fpm and running as a non-standard user for the distro, it will fail silently. Sessions won't be saved because the setting has no effect. This throws a warning in those cases to inform the user.

_It could be a BC because it changes the default configuration however fixes a 'long standing bug' if you will. Not sure what you want to do about that part._

Commits
-------

a0901294d4 [FrameworkBundle] Inform the user when save_path will be ignored
2019-07-08 14:54:13 +02:00
Nathanael d. Noblet
a0901294d4 [FrameworkBundle] Inform the user when save_path will be ignored 2019-07-08 14:54:05 +02:00
Fabien Potencier
2d04e20e7e bug #32056 [DI] deprecate booting the kernel twices (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] deprecate booting the kernel twices

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #31233   <!-- #-prefixed issue number(s), 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/roadmap):
 - 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 4.4.
 - Legacy code removals go to the master branch.
-->

This adds a check to see if the kernel has been booted twices in a single test, and throw a deprecation

Commits
-------

905bec4577 [DI] throw an exception when the kernel has been booted twices
2019-07-08 14:22:23 +02:00
Fabien Potencier
bd498f2503 fixed CS 2019-07-08 13:57:06 +02:00
Fabien Potencier
931965a448 bug #32096 Don't assume port 0 for X-Forwarded-Port (alexbowers, xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

Don't assume port 0 for X-Forwarded-Port

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

If you use X-Forwarded-Host but don't provide X-Forwarded-Port, it will default to `0.0.0.0:` which then assumes port `0` instead of following its default assumption based on the scheme.

Commits
-------

adcdd938a4 PHP 5 compat
6c49a0c758 Add test case
c266d6c737 Update Request.php
23db9be884 Don't assume port 0 for X-Forwarded-Port
2019-07-08 13:55:51 +02:00
Fabien Potencier
98bbc57e95 bug #31820 [SecurityBundle] Fix profiler dump for non-invokable security listeners (chalasr)
This PR was merged into the 4.3 branch.

Discussion
----------

[SecurityBundle] Fix profiler dump for non-invokable security listeners

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

Listeners can be any callable since 4.3.

Commits
-------

f7738d934b [SecurityBundle] Fix profiler dump for non-invokable security listeners
2019-07-08 13:31:38 +02:00
Robin Chalas
f7738d934b [SecurityBundle] Fix profiler dump for non-invokable security listeners 2019-07-08 12:43:35 +02:00
Fabien Potencier
ea0da05cd6 feature #32424 [Console] don't redraw progress bar more than every 100ms by default (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] don't redraw progress bar more than every 100ms by default

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no (behavior change)
| BC breaks?    | no (behavior change)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Follow up of https://github.com/symfony/symfony/pull/26339
Looks like something we can and should do on 4.4 to me.

Commits
-------

df551e945c [Console] don't redraw progress bar more than every 100ms by default
2019-07-08 12:34:39 +02:00
Nicolas Grekas
df551e945c [Console] don't redraw progress bar more than every 100ms by default 2019-07-08 12:29:08 +02:00
Fabien Potencier
7647209b9a feature #32418 [Console] Added Application::reset() (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Added Application::reset()

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

Symfony leaks a lot in CLI when using the EventDispatcher. I'm working on it.

But instead of fixing the root cause, it can be legit to go quick and to reset all services.
So IMHO, this services should be exposed, and always available

Commits
-------

15ba5791cd [Console] Added Application::reset()
2019-07-08 12:10:30 +02:00
Fabien Potencier
400eaa676a feature #31217 [WebserverBundle] Deprecate the bundle in favor of symfony local server (Simperfit)
This PR was merged into the 4.4 branch.

Discussion
----------

[WebserverBundle] Deprecate the bundle in favor of symfony local server

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | none   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | to do <!-- required for new features -->

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Since most of the feature added to the symfony local server (using php-fpm) will be handy for all developers and as said in https://github.com/symfony/symfony/issues/25748#issuecomment-485740082, I agree that we should deprecate the WebserverBundle in favor of the [Symfony Local Server](https://symfony.com/doc/current/setup/symfony_server.html) cc @stof @fabpot

Commits
-------

7307907585 [WebserverBundle] Deprecate the bundle in favor of symfony local server
2019-07-08 11:58:44 +02:00
Grégoire Pineau
15ba5791cd [Console] Added Application::reset() 2019-07-08 11:58:42 +02:00
Fabien Potencier
87a6f04409 feature #31554 [SECURITY] AbstractAuthenticationListener.php error instead info. Rebase of #28462 (berezuev)
This PR was merged into the 4.4 branch.

Discussion
----------

[SECURITY] AbstractAuthenticationListener.php error instead info. Rebase of #28462

| Q             | A
| ------------- | ---
| Branch? | 4.4
| -- | --
| Bug fix? | yes
| New feature? | no
| BC breaks? | no I think
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ...
| License | MIT

Rebase of #28462. Origin description:
> ```
> [2018-09-13 20:43:38] security.INFO: Authentication request failed. {"exception":"[object] (Symfony\\Component\\Security\\Core\\Exception\\AuthenticationServiceException(code: 0): An exception occurred while executing
>  ...
>  Doctrine\\DBAL\\Driver\\PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.phone' in 'field list' at
> ```
>
> Definitely I think this is NOT info, but error.
> And since it's info, it's not logged in production because of `fingers_crossed` with `action_level: error` - so to actually see the real error behind `Authentication request could not be processed due to a system problem.` I had to debug on production. Very bad practice IMHO.

Commits
-------

867eb78cfe [SECURITY] AbstractAuthenticationListener.php error instead info. Rebase of #28462
2019-07-08 11:56:07 +02:00
Fabien Potencier
14614bd895 feature #32284 [Cache] Add argument $prefix to AdapterInterface::clear() (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Add argument $prefix to AdapterInterface::clear()

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

This PR allows clearing `AdapterInterface` implementations by prefix of keys. The goal is to fix an edge case situation in `ProxyAdapter`: right now, when one calls `->clear()` on a proxy adapter that is configured to add a prefix to all the keys passed to the decorated pool, we clear it all; while only the subset that starts with the prefix should be.

Since `AdapterInterface` is an "internal" interface (ie its purpose is to create compatible implementations - *NOT* to be type-hinted for), this is not really a user-facing change.

/cc @Nyholm, this came out after we talked about proxified chain pools

Commits
-------

ad6f6cf900 [Cache] Add argument $prefix to AdapterInterface::clear()
2019-07-08 11:50:54 +02:00
Fabien Potencier
3e2ee71bcb feature #32423 [ServerBundle] Display all logs by default (lyrixx)
This PR was merged into the 4.4 branch.

Discussion
----------

[ServerBundle] Display all logs by default

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

Instead of relying on `-vvv` behavior, we display all logs.
End user has two ways of filtering now:

* with the `--filter` options
* by configuring the handler in `config/dev/monolog.yaml`

Commits
-------

54b0809d2c [ServerBundle] Display all logs by default
2019-07-08 11:44:22 +02:00
Amrouche Hamza
7307907585
[WebserverBundle] Deprecate the bundle in favor of symfony local server 2019-07-08 11:40:47 +02:00
Fabien Potencier
c202e96cd6 feature #26339 [Console] Add ProgressBar::preventRedrawFasterThan() and forceRedrawSlowerThan() methods (ostrolucky)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Add ProgressBar::preventRedrawFasterThan() and forceRedrawSlowerThan() methods

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

The way ProgressBar redraw frequency works currently requires to know speed of progress beforehand, which is impossible to know in some situations, e.g. when showing progress of download, or I/O speed. Setting frequency too low relative to progress speed throttles I/O speed and makes progress bar flicker too much, setting it too high makes progress bar unresponsive. Current behaviour IMHO undermines usefulness of ProgressBar.

This is an attempt to replace this with more consistent experience, not requiring to know speed of progress.)

Commits
-------

83edac321e [Console] Add ProgressBar::preventRedrawFasterThan() and forceRedrawSlowerThan() methods
2019-07-08 11:29:00 +02:00
Fabien Potencier
853e032c19 fixed CS 2019-07-08 11:24:04 +02:00
Ben Davies
213dfd1492 [Messenger] Doctrine Transport: Support setting auto_setup from DSN 2019-07-08 11:23:12 +02:00
Alexey Berezuev
867eb78cfe [SECURITY] AbstractAuthenticationListener.php error instead info. Rebase of #28462 2019-07-08 12:18:00 +03:00
Grégoire Pineau
54b0809d2c [ServerBundle] Display all logs by default
Instead of relying on `-vvv` behavior, we display all logs.
End user has two ways of filtering now (instead of 3 previously):

* with the `--filter` options
* by configuring the handler in `config/dev/monolog.yaml`
2019-07-08 11:06:24 +02:00
Stadly
dc31739288 [Translator] Dump native plural formats to po files 2019-07-08 10:26:08 +02:00
Fabien Potencier
feab919c86 bug #31267 [Translator] Load plurals from mo files properly (Stadly)
This PR was merged into the 3.4 branch.

Discussion
----------

[Translator] Load plurals from mo files properly

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/10152#issuecomment-55522675
| License       | MIT
| Doc PR        |

Plurals were not handled correctly when loading mo files.
```
msgid "foo"
msgid_plural "foos"
msgstr[0] "bar"
msgstr[1] "bars"
```

Before, the mo entry above was treated as two entries, which doesn't make sense:
```
'foo' => 'bar'
'foos' => '{0} bar|{1} bars'
```

With this PR, it is treated as one entry:
```
'foo|foos' => 'bar|bars'
```

This PR does the same as #31266, just for mo files instead of po files. Note, however, that the old behavior differed between po and mo files: `'foos' => 'bar|bars'` for po files and `'foos' => '{0} bar|{1} bars'` for mo files.

Commits
-------

97d28b5e4e Load plurals from mo files properly
2019-07-08 10:22:53 +02:00