Commit Graph

47663 Commits

Author SHA1 Message Date
Nicolas Grekas
f46ab58bcf feature #35673 [Process] Add getter for process starttime (dompie)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[Process] Add getter for process starttime

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | issue #35531
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Add a getter for process start time.

Commits
-------

3b9ed3e378 [Process] Add getter for process starttime
2020-02-14 14:09:35 +01:00
Dominik Piekarski
3b9ed3e378 [Process] Add getter for process starttime 2020-02-14 14:09:17 +01:00
Nicolas Grekas
0f46aa602a [Contracts] Add changelog entry for "symfony/deprecation-contracts" 2020-02-14 10:07:39 +01:00
Nicolas Grekas
6f5932689a minor #35715 [Contracts] add missing changelog entries (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Contracts] add missing changelog entries

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

Commits
-------

9181c3ad61 [Contracts] add missing changelog entries
2020-02-14 10:05:28 +01:00
Nicolas Grekas
9181c3ad61 [Contracts] add missing changelog entries 2020-02-14 10:04:22 +01:00
Fabien Potencier
4c1ca329a4 Merge branch '5.0'
* 5.0:
  fix unix root dir issue
  sync validator translation files with master
  fix anchor
  fix links to releases page (formerly known as "roadmap")
  [Console] Don't load same-namespace alternatives on exact match found
  [HttpKernel] Fix method name in doc comments
2020-02-14 08:43:15 +01:00
Fabien Potencier
05f71d3fd5 Merge branch '4.4' into 5.0
* 4.4:
  fix unix root dir issue
  sync validator translation files with master
  [HttpFoundation] fix not sending Content-Type header for 204 responses
  [ErrorHandler] silence warning when zend.assertions=-1
  fix anchor
  [Console] Handle zero row count in appendRow() for Table
  fix links to releases page (formerly known as "roadmap")
  [Console] Don't load same-namespace alternatives on exact match found
2020-02-14 08:43:07 +01:00
Fabien Potencier
7a6e3c07b3 Merge branch '3.4' into 4.4
* 3.4:
  fix unix root dir issue
  sync validator translation files with master
  fix anchor
  fix links to releases page (formerly known as "roadmap")
  [Console] Don't load same-namespace alternatives on exact match found
2020-02-14 08:42:58 +01:00
Fabien Potencier
f6f6a600a8 bug #35693 [Finder] Fix unix root dir issue (chr-hertel)
This PR was submitted for the 4.4 branch but it was merged into the 3.4 branch instead.

Discussion
----------

[Finder] Fix unix root dir issue

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

not quite sure about this one 🤔

Commits
-------

9e431038b2 fix unix root dir issue
2020-02-14 08:34:28 +01:00
Christopher Hertel
9e431038b2 fix unix root dir issue 2020-02-14 08:34:21 +01:00
Fabien Potencier
c09128cf9f Merge branch '4.4'
* 4.4:
  [HttpFoundation] fix not sending Content-Type header for 204 responses
  [ErrorHandler] silence warning when zend.assertions=-1
  [Console] Handle zero row count in appendRow() for Table
2020-02-14 08:32:25 +01:00
Fabien Potencier
a603b14c21 minor #35708 [symfony/contracts] Reference one main CHANGELOG in each contracts (nicolas-grekas)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[symfony/contracts] Reference one main CHANGELOG in each contracts

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

Reverts #35663
This PR makes it easier to publish the changelog for the contracts: there is only one to reference. We also need a changelog for symfony/contracts and this PR fixes this concern.

Commits
-------

d6fa13bafd [symfony/contracts] Reference one main CHANGELOG in each contracts
2020-02-14 08:32:04 +01:00
Nicolas Grekas
d6fa13bafd [symfony/contracts] Reference one main CHANGELOG in each contracts 2020-02-14 08:31:56 +01:00
Fabien Potencier
1a7e4ea746 bug #35709 [HttpFoundation] fix not sending Content-Type header for 204 responses (Tobion)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] fix not sending Content-Type header for 204 responses

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       |
| License       | MIT
| Doc PR        |

`$headers->remove('Content-Type')` did not actually work because PHP sends the Content-Type header based on the https://www.php.net/manual/en/ini.core.php#ini.default-mimetype ini setting anyway (which defaults to html). So we need to disable this ini for empty responses.

Commits
-------

06f5a1113d [HttpFoundation] fix not sending Content-Type header for 204 responses
2020-02-14 08:31:13 +01:00
Fabien Potencier
a6773c115b bug #35710 [ErrorHandler] silence warning when zend.assertions=-1 (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] silence warning when zend.assertions=-1

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

Reported at 1000287d03 (commitcomment-37276894)

Commits
-------

67ef532f8c [ErrorHandler] silence warning when zend.assertions=-1
2020-02-14 08:27:30 +01:00
Fabien Potencier
f20b36e3de minor #35712 [Validator] sync translation files with master (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] sync translation files with master

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

Commits
-------

e171386299 sync validator translation files with master
2020-02-14 08:25:01 +01:00
Christian Flothmann
e171386299 sync validator translation files with master 2020-02-14 07:56:04 +01:00
Tobias Schultze
06f5a1113d [HttpFoundation] fix not sending Content-Type header for 204 responses 2020-02-13 20:40:01 +01:00
Nicolas Grekas
67ef532f8c [ErrorHandler] silence warning when zend.assertions=-1 2020-02-13 19:41:25 +01:00
Fabien Potencier
fb743a545f minor #35705 fix anchor (garak)
This PR was merged into the 3.4 branch.

Discussion
----------

fix anchor

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

This is a continuation of PR #35703 that was merged a bit too early.
It accepts suggestion made there and, moreover, fixes anchor link (that changed from old roadmap page)

Commits
-------

5825e3c58c fix anchor
2020-02-13 18:43:56 +01:00
Fabien Potencier
657b8ec872 bug #35706 Fix package names (fabpot)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Fix package names

| 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 <!-- required for new features -->

Consistency fix.

Commits
-------

5b1e3ddda9 Fix package names
2020-02-13 18:23:00 +01:00
Fabien Potencier
5b1e3ddda9 Fix package names 2020-02-13 18:19:37 +01:00
Massimiliano Arione
5825e3c58c
fix anchor 2020-02-13 16:21:59 +01:00
Fabien Potencier
e87b59971e bug #35676 [Console] Handle zero row count in appendRow() for Table (Adam Prickett)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Console] Handle zero row count in appendRow() for Table

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

When a `Table` is created and rendered with no rows (headers only) and subsequently rows are added using `appendRow()`, the first call to `appendRow()` clears back one line too far., thus removing the last run

This is caused by `calculateRowCount()` not accounting for the fact that the footer separator is also the header separator when no rows are present.

This PR works around the issue by checking to ensure that at least 1 row exists before including the footer separator in the row count.

## Example

Command:
```php
<?php

namespace App\Command;

class TableTestCommand extends Command
{
    // ...

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $output->writeln('My table');

        $table = new Table($output->section());
        $table->setHeaders(['Column', 'Another column']);
        $table->render();

        $table->appendRow(['Value', 'Another Value']);
        $table->appendRow(['Value', 'Another Value']);
    }
}
```

Before fix:
```
+--------+----------------+
| Column | Another column |
+--------+----------------+
| Value  | Another Value  |
| Value  | Another Value  |
+--------+----------------+
```

After fix:
```
My table
+--------+----------------+
| Column | Another column |
+--------+----------------+
| Value  | Another Value  |
| Value  | Another Value  |
+--------+----------------+
```

Commits
-------

9b382590ee [Console] Handle zero row count in appendRow() for Table
2020-02-13 16:06:04 +01:00
Adam Prickett
9b382590ee [Console] Handle zero row count in appendRow() for Table 2020-02-13 16:05:57 +01:00
Fabien Potencier
7e0239b75e feature #35689 [String] Transliterate & to and (Warxcell)
This PR was submitted for the 5.0 branch but it was squashed and merged into the 5.1-dev branch instead.

Discussion
----------

[String] Transliterate & to and

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

Commits
-------

76ff984ab5 [String] Transliterate & to and
2020-02-13 16:04:05 +01:00
Bozhidar Hristov
76ff984ab5 [String] Transliterate & to and 2020-02-13 16:03:58 +01:00
Fabien Potencier
648d488bb2 bug #35696 [Console] Don't load same-namespace alternatives on exact match (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] Don't load same-namespace alternatives on exact match

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #35479
| 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):
 - 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
-------

707c5bade0 [Console] Don't load same-namespace alternatives on exact match found
2020-02-13 16:01:49 +01:00
Fabien Potencier
7f92a165de minor #35703 fix links to releases page (formerly known as "roadmap") (garak)
This PR was merged into the 3.4 branch.

Discussion
----------

fix links to releases page (formerly known as "roadmap")

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

Current releases page is https://symfony.com/releases
Formerly it was https://symfony.com/roadmap and there's a nice redirect to new URL.
Anyway, I think that pointing to the right new URL would be better

Commits
-------

1c8fbe1cf9 fix links to releases page (formerly known as "roadmap")
2020-02-13 16:01:15 +01:00
Massimiliano Arione
1c8fbe1cf9
fix links to releases page (formerly known as "roadmap") 2020-02-13 15:46:26 +01:00
Robin Chalas
707c5bade0 [Console] Don't load same-namespace alternatives on exact match found 2020-02-13 01:35:20 +01:00
Fabien Potencier
31fb219896 feature #34550 [Form] Added an AbstractChoiceLoader to simplify implementations and handle global optimizations (HeahDude)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Form] Added an AbstractChoiceLoader to simplify implementations and handle global optimizations

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | ~
| 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):
 - 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.
-->
Taking over #33218 (taking over #30983)

The `ChoiceLoaderInterface` is not easy to understand/implement, while its goal is simple, lazy load an array of choices.
What may seem complicated is the how/what to optimize loading, we need to deal with a `$value` callback (which refers to the `choice_value` option allowing to transform a model choice to a unique string value that can be displayed/submitted).

We have now enough implementations in core to justify the need of an abstraction and provide a better DX in the process.

Before this PR we needed to implement 3 methods to create a loader:
 - `loadChoiceList(?callable $value): ChoiceListInterface`
 - `loadChoicesForValues(array $values, ?callable $value): array`
 - `loadValuesForChoices(array $choices, ?callable $value): array`
and handle optimization, in each.

Now we only need to implement:
 - `loadChoices():  iterable`

and optionnally:
 - `doLoadChoicesForValues(array $values, ?callable $value): array`
if more optimization is needed to only load submitted values, (i.e the core intl loader prevents loading values that are the same as choices, and the doctrine one performs a `WHERE id IN ($ids)` query).

Commits
-------

1394df2dea [Form] Added an AbstractChoiceLoader to simplify implementations and handle global optimizations
2020-02-12 20:40:35 +01:00
Fabien Potencier
3fb89ef179 feature #35688 [Notifier] Simplify OVH implementation (fabpot)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Notifier] Simplify OVH implementation

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| 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 <!-- 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):
 - 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
-------

39f9ac2620 [Notifier] Simplify OVH implementation
2020-02-12 17:30:07 +01:00
Fabien Potencier
39f9ac2620 [Notifier] Simplify OVH implementation 2020-02-12 17:24:01 +01:00
Fabien Potencier
5150fc51f6 bug #35685 sms endpoint is only available in ovh-eu (cbourgois)
This PR was merged into the 5.1-dev branch.

Discussion
----------

sms endpoint is only available in ovh-eu

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

`/sms` endpoint is only available for `ovh-eu` api.

Signed-off-by: Cyrille Bourgois <cyrille.bourgois@corp.ovh.com>

Commits
-------

a49dead4e0 sms endpoint is only available in ovh-eu
2020-02-12 17:20:01 +01:00
Fabien Potencier
fb14669c08 minor #35687 [HttpKernel] Fix method name in doc comments (successgo)
This PR was merged into the 5.0 branch.

Discussion
----------

[HttpKernel] Fix method name in doc comments

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #35686  <!-- 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/roadmap):
 - 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
-------

5888566a89 [HttpKernel] Fix method name in doc comments
2020-02-12 17:19:20 +01:00
Success Go
5888566a89 [HttpKernel] Fix method name in doc comments 2020-02-12 22:34:24 +08:00
Cyrille Bourgois
a49dead4e0
sms endpoint is only available in ovh-eu
Signed-off-by: Cyrille Bourgois <cyrille.bourgois@corp.ovh.com>
2020-02-12 14:30:49 +01:00
Fabien Potencier
b7df5ea6bb minor #35684 Remove deprecated endpoint (antleblanc)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Remove deprecated endpoint

| Q             | A
| ------------- | ---
| Branch?       | master (deprecated endpoint)
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | no ticket.
| License       | MIT

runabove has been closed.

previous attempt made on the read-only repository: https://github.com/symfony/ovh-cloud-notifier/pull/1

Signed-off-by: Antoine Leblanc <antoine.leblanc@corp.ovh.com>

Commits
-------

e65a8cffad Remove deprecated endpoint
2020-02-12 14:12:05 +01:00
Antoine Leblanc
e65a8cffad
Remove deprecated endpoint
runabove has been closed.

Signed-off-by: Antoine Leblanc <antoine.leblanc@corp.ovh.com>
2020-02-12 12:02:15 +01:00
Fabien Potencier
da9f3af3e1 bug #35578 [Console][QuestionHelper] Use String width() to properly move the cursor backwards (fancyweb)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Console][QuestionHelper] Use String width() to properly move the cursor backwards

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/pull/35536#issuecomment-581343181
| License       | MIT
| Doc PR        | -

This bug can only be fixed on master since we need to require the String component. Once the component is required, we can iterate in the Console component to use it more where it is needed.

Commits
-------

67a1f55ce1 [Console][QuestionHelper] Use String width() to properly move the cursor backwards
2020-02-11 16:25:50 +01:00
Nicolas Grekas
b84faa4ee8 Merge branch '5.0'
* 5.0:
  [HttpClient] fix "undefined variable"
  [HttpClient] remove useless code in test
  [HttpClient] fix getting response content after its destructor throwed an HttpExceptionInterface
  [HttpClient] fix HttpClientDataCollector when handling canceled responses
  [Security] Fix exception name in doc comments
2020-02-11 15:27:37 +01:00
Nicolas Grekas
b43d418171 Merge branch '4.4' into 5.0
* 4.4:
  [HttpClient] fix "undefined variable"
  [HttpClient] remove useless code in test
  [HttpClient] fix getting response content after its destructor throwed an HttpExceptionInterface
  [HttpClient] fix HttpClientDataCollector when handling canceled responses
  [Security] Fix exception name in doc comments
2020-02-11 15:26:26 +01:00
Nicolas Grekas
ded655b669 Merge branch '3.4' into 4.4
* 3.4:
  [Security] Fix exception name in doc comments
2020-02-11 15:26:15 +01:00
Nicolas Grekas
7e734a3389 [HttpClient] fix "undefined variable" 2020-02-11 15:25:58 +01:00
Nicolas Grekas
d41ea2a02e [HttpClient] remove useless code in test 2020-02-11 15:05:45 +01:00
Fabien Potencier
5cf876f3ac bug #35674 [HttpClient] fix getting response content after its destructor throwed an HttpExceptionInterface (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix getting response content after its destructor throwed an HttpExceptionInterface

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

Spotted by @B-Galati in https://github.com/symfony/symfony/pull/35659#issuecomment-584508876

Commits
-------

6d1657b720 [HttpClient] fix getting response content after its destructor throwed an HttpExceptionInterface
2020-02-11 14:59:26 +01:00
Fabien Potencier
acc98b775a Fix typos 2020-02-11 14:52:27 +01:00
Fabien Potencier
e0a6a7331c feature #34540 [Notifier] add OvhCloud bridge (antiseptikk)
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[Notifier] add OvhCloud bridge

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | See #33687
| License       | MIT

This would add OvhCloud sms integration for the Notifier component.
Tested with 'ovh-eu' entrypoint.

Inspiration : https://github.com/ovh/php-ovh

Commits
-------

76bfb85e26 [Notifier] add OvhCloud bridge
2020-02-11 14:51:31 +01:00
Thomas Ferney
76bfb85e26 [Notifier] add OvhCloud bridge 2020-02-11 14:51:25 +01:00