Commit Graph

43678 Commits

Author SHA1 Message Date
Gildas Quéméner
b17ebdf081
bug #33942 [DI] Add extra type check to php dumper 2019-10-11 18:58:45 +02:00
Nicolas Grekas
fefb2ff020 bug #32943 [Dotenv] search variable values in ENV first then env file (soufianZantar)
This PR was merged into the 3.4 branch.

Discussion
----------

[Dotenv] search variable values in ENV first then env file

| 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 | #32595
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- 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.
-->

I think we must searhing the value of variables in $_ENV before the .env file to fix this issues.
before this fix Parse method will return the value in .env file and not the value passed in this command `composer dump-env prod `.

**the issue:**

In my .env file, I have a variable TEST that depends on the APP_ENV variable like this:

```
# .env file

###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=2eb810c79fba0dd5c029a2fa53bfdb51
###< symfony/framework-bundle ###

TEST=foo_${APP_ENV}

```
I run composer dump-env dev command to generate my .env.locale.php, everything works fine, the value of my variable TEST is correct.

```
// .env.locale.php

return array (
  'APP_ENV' => 'dev',
  'TEST' => 'foo_dev',
  'APP_SECRET' => '2eb810c79fba0dd5c029a2fa53bfdb51',
);
```
Then I run the same command with prod environment (composer dump-env prod), the value of TEST is wrong (it is same as for dev)

```
// .env.locale.php

return array (
  'APP_ENV' => 'prod',
  'TEST' => 'foo_dev',
  'APP_SECRET' => '2eb810c79fba0dd5c029a2fa53bfdb51',
);
```

Commits
-------

3018041782 [Dotenv] search variable values in ENV first then env file
2019-10-11 15:39:49 +02:00
soufianZantar
3018041782 [Dotenv] search variable values in ENV first then env file 2019-10-11 15:36:17 +02:00
Nicolas Grekas
49ad46e283 bug #33943 [VarDumper] fix resetting the "bold" state in CliDumper (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] fix resetting the "bold" state in CliDumper

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

Commits
-------

21645a5b96 [VarDumper] fix resetting the "bold" state in CliDumper
2019-10-11 15:34:05 +02:00
Anto
843bb76f8a
[PropertyInfo] Respect property name case when guessing from public method name 2019-10-11 06:14:16 +02:00
Fabien Potencier
417222515b minor #33938 SCA: added missing break in a loop (kalessil)
This PR was merged into the 3.4 branch.

Discussion
----------

SCA: added missing break in a loop

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

Commits
-------

6af04bbac6 SCA: added missing break in a loop
2019-10-10 21:22:59 +02:00
Nicolas Grekas
21645a5b96 [VarDumper] fix resetting the "bold" state in CliDumper 2019-10-10 13:03:19 +02:00
Nicolas Grekas
9c635615de bug #33936 [HttpClient] Missing argument in method_exists (detinkin)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Missing argument in method_exists

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

Commits
-------

d2a8e94c79 Missing argument in method_exists
2019-10-10 10:42:52 +02:00
detinkin
d2a8e94c79 Missing argument in method_exists 2019-10-10 10:41:55 +02:00
Nicolas Grekas
76f44df8ff bug #33937 [Cache] ignore unserialization failures in AbstractTagAwareAdapter::doDelete() (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[Cache] ignore unserialization failures in AbstractTagAwareAdapter::doDelete()

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

Making things more robust, part of #33924

Commits
-------

a1f334c1b7 [Cache] ignore unserialization failures in AbstractTagAwareAdapter::doDelete()
2019-10-10 09:36:50 +02:00
Nicolas Grekas
585a7a4caf bug #33935 [HttpClient] send Accept: */* by default, fix removing it when needed (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] send `Accept: */*` by default, fix removing it when needed

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

Reported on Slack.

Commits
-------

aff4e56fc5 [HttpClient] send `Accept: */*` by default, fix removing it when needed
2019-10-10 09:36:13 +02:00
Vladimir Reznichenko
6af04bbac6 SCA: added missing break in a loop 2019-10-09 21:00:06 +02:00
Nicolas Grekas
a1f334c1b7 [Cache] ignore unserialization failures in AbstractTagAwareAdapter::doDelete() 2019-10-09 20:33:00 +02:00
Nicolas Grekas
aff4e56fc5 [HttpClient] send Accept: */* by default, fix removing it when needed 2019-10-09 18:19:03 +02:00
Nicolas Grekas
1292d8da7c Merge branch '3.4' into 4.3
* 3.4:
  [Validator] sync NO and NB translations
2019-10-09 16:33:56 +02:00
Nicolas Grekas
31fcf93253 [Validator] sync NO and NB translations 2019-10-09 16:33:48 +02:00
Nicolas Grekas
20fd92571e [Cache] cs fix 2019-10-09 15:27:34 +02:00
Nicolas Grekas
fd50d687cc Merge branch '3.4' into 4.3
* 3.4:
  Adds missing translations for no nb
  Add the missing translations for the Swedish ("sv") locale
  bumped Symfony version to 3.4.33
  updated VERSION for 3.4.32
  update CONTRIBUTORS for 3.4.32
  updated CHANGELOG for 3.4.32
2019-10-09 15:22:34 +02:00
Nicolas Grekas
6f58438f7c bug #33922 [Cache] remove implicit dependency on symfony/filesystem (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[Cache] remove implicit dependency on symfony/filesystem

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

/cc @andrerom for review

Commits
-------

85f27f270e [Cache] remove implicit dependency on symfony/filesystem
2019-10-09 15:16:32 +02:00
Nicolas Grekas
ac422dbd07 bug #33927 Allow to set SameSite config to 'none' (ihmels)
This PR was merged into the 4.3 branch.

Discussion
----------

Allow to set SameSite config to 'none'

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

Commits
-------

eec7e8cc61 Allow to set cookie_samesite to 'none'
2019-10-09 15:16:03 +02:00
Nicolas Grekas
49dfa8ac85 bug #33930 [Cache] clean tags folder on invalidation (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[Cache] clean tags folder on invalidation

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

/cc @andrerom for review :)

Commits
-------

b377e41a2c [Cache] clean tags folder on invalidation
2019-10-09 15:15:31 +02:00
Nicolas Grekas
b377e41a2c [Cache] clean tags folder on invalidation 2019-10-09 14:56:36 +02:00
Nicolas Grekas
85f27f270e [Cache] remove implicit dependency on symfony/filesystem 2019-10-09 12:18:12 +02:00
Yannick Ihmels
eec7e8cc61 Allow to set cookie_samesite to 'none' 2019-10-09 11:59:43 +02:00
Nicolas Grekas
332d9e9067 bug #33919 [VarDumper] fix array key error for class SymfonyCaster (zcodes)
This PR was squashed before being merged into the 4.3 branch (closes #33919).

Discussion
----------

[VarDumper] fix array key error for class SymfonyCaster

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

Commits
-------

1f20f35f74 [VarDumper] fix array key error for class SymfonyCaster
2019-10-09 08:54:10 +02:00
zcodes
1f20f35f74 [VarDumper] fix array key error for class SymfonyCaster 2019-10-09 08:53:52 +02:00
Nicolas Grekas
0d4914149d bug #33885 [Form][DateTimeImmutableToDateTimeTransformer] Preserve microseconds and use \DateTime::createFromImmutable() when available (fancyweb)
This PR was merged into the 4.3 branch.

Discussion
----------

[Form][DateTimeImmutableToDateTimeTransformer] Preserve microseconds and use \DateTime::createFromImmutable() when available

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

For PHP >= 7.3, we should use [\DateTime::createFromImmutable()](https://www.php.net/manual/en/datetime.createfromimmutable.php) directly.

This patch also preserves the `\DateTime` microseconds when the conversion is done with `\DateTime::createFromFormat()`.

Commits
-------

dfa23034c3 [Form][DateTimeImmutableToDateTimeTransformer] Preserve microseconds and use \DateTime::createFromImmutable() when available
2019-10-08 13:04:26 +02:00
Nicolas Grekas
4223a5b361 bug #33900 [HttpKernel] Fix to populate $dotenvVars in data collector when not using putenv() (mynameisbogdan)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpKernel] Fix to populate $dotenvVars in data collector when not using putenv()

| Q             | A
| ------------- | ---
| Branch?       | 4.3 for bug fixes
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT

Fix to populate $dotenvVars in data collector when not using putenv()

Before:
<img width="618" alt="Screen Shot 2019-10-08 at 03 53 49" src="https://user-images.githubusercontent.com/707714/66360303-49397280-e983-11e9-98b9-5272b9762dda.png">
After:
<img width="614" alt="Screen Shot 2019-10-08 at 03 55 43" src="https://user-images.githubusercontent.com/707714/66360304-4b9bcc80-e983-11e9-82de-46d484daa585.png">

Commits
-------

ca3fb258bf [HttpKernel] fix $dotenvVars in data collector
2019-10-08 13:02:48 +02:00
Fabien Potencier
c281b3b248 minor #33907 [Validator] Adds missing translations for the Norwegian Bokmål ("nb") locale (Harald Tollefsen)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Adds missing translations for the Norwegian Bokmål ("nb") locale

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? |no
| Tickets       | Fix #30176
| License       | MIT

Commits
-------

5baa3ea8d4 Adds missing translations for no nb
2019-10-08 11:22:35 +02:00
Harald Tollefsen
5baa3ea8d4 Adds missing translations for no nb 2019-10-08 11:13:14 +02:00
Fabien Potencier
986975469e minor #33893 [Validator] Add the missing translations for the Swedish ("sv") locale (terdia)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Add the missing translations for the Swedish ("sv") locale

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

This PR adds missing Swedish ("sv") locale translations
 to [src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf](src/Symfony/Component/Validator/Resources/translations/validators.sv.xlf) file.

Ref: https://github.com/symfony/symfony/issues/33629

Commits
-------

0db883888c Add the missing translations for the Swedish ("sv") locale
2019-10-08 07:50:00 +02:00
bogdan
ca3fb258bf [HttpKernel] fix $dotenvVars in data collector 2019-10-08 04:19:00 +03:00
Ogbemudia Terry Osayawe
0db883888c Add the missing translations for the Swedish ("sv") locale 2019-10-07 21:31:56 +02:00
Fabien Potencier
a4f90e8258 bumped Symfony version to 4.3.6 2019-10-07 17:19:44 +02:00
Fabien Potencier
931fecb088
Merge pull request #33891 from fabpot/release-4.3.5
released v4.3.5
2019-10-07 17:14:38 +02:00
Fabien Potencier
a87f8f983a updated VERSION for 4.3.5 2019-10-07 17:06:41 +02:00
Fabien Potencier
9371e9c72c updated CHANGELOG for 4.3.5 2019-10-07 17:06:24 +02:00
Fabien Potencier
dce0c183b4 bug #33742 [Crawler] document $default as string|null (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[Crawler] document $default as string|null

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

This has been introduced in 4.3

Commits
-------

e96add4787 [Crawler] document $default as string|null
2019-10-07 16:56:32 +02:00
Fabien Potencier
e3624e7086 bumped Symfony version to 3.4.33 2019-10-07 16:51:28 +02:00
Fabien Potencier
2815d1fa34
Merge pull request #33889 from fabpot/release-3.4.32
released v3.4.32
2019-10-07 16:42:16 +02:00
Fabien Potencier
83b90c2e00 updated VERSION for 3.4.32 2019-10-07 16:41:56 +02:00
Fabien Potencier
fd683f05ea update CONTRIBUTORS for 3.4.32 2019-10-07 16:41:46 +02:00
Fabien Potencier
ed01f3c511 updated CHANGELOG for 3.4.32 2019-10-07 16:41:35 +02:00
Fabien Potencier
38b3dc898e bug #32308 [Messenger] DoctrineTransport: ensure auto setup is only done once (bendavies)
This PR was squashed before being merged into the 4.3 branch (closes #32308).

Discussion
----------

[Messenger] DoctrineTransport: ensure auto setup is only done once

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| 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 | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Setup is done for every invocation of `get`, `find`, and `findAll`.

For `get`, this causes message consumption to be very slow, as slow as 1 message per second on my moderately sized schema, because a schema diff is done in `setup` every `get`.

I'm not sure what the desired behaviour is here, but it seems like we should try performing a query, fail once, `setup`, and retry. This will the same approach taken by the PDO Cache.

However, we still need auto setup in `get`, as `get` starts a transaction, so the auto setup in `executeQuery` won't be called.

Further more, the same problem seems to exist for the AMPQ Transport, but the performance impact should be less there, but i have not tried.

Commits
-------

02414027e1 [Messenger] DoctrineTransport: ensure auto setup is only done once
2019-10-07 16:35:38 +02:00
Ben Davies
02414027e1 [Messenger] DoctrineTransport: ensure auto setup is only done once 2019-10-07 16:35:32 +02:00
Thomas Calvet
dfa23034c3 [Form][DateTimeImmutableToDateTimeTransformer] Preserve microseconds and use \DateTime::createFromImmutable() when available 2019-10-07 15:06:40 +02:00
Nicolas Grekas
05ab86378c Merge branch '3.4' into 4.3
* 3.4:
  [travis] Fix build-packages script
  Remove useless testCanCheckIfTerminalIsInteractive test case
  [Validator] Add the missing translations for the Thai (\"th\") locale
  [Validator] Fix ValidValidator group cascading usage
2019-10-07 14:36:49 +02:00
Nicolas Grekas
0272b8d341 [travis] Fix build-packages script 2019-10-07 14:36:18 +02:00
Nicolas Grekas
bee005687a bug #33871 [HttpClient] bugfix exploding values of headers (michaljusiega)
This PR was squashed before being merged into the 4.3 branch (closes #33871).

Discussion
----------

[HttpClient] bugfix exploding values of headers

| Q             | A
| ------------- | ---
| Branch?       | 4.3 for bug fixes
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

I tried to use CachingHttpClient yesterday and I received an error.

```
explode() expects parameter 2 to be string, array given
 C:\PROJEKTY\PHPStorm\symfony\src\Symfony\Component\HttpClient\HttpClientTrait.php:200
 C:\PROJEKTY\PHPStorm\symfony\src\Symfony\Component\HttpClient\HttpClientTrait.php:131
 C:\PROJEKTY\PHPStorm\symfony\src\Symfony\Component\HttpClient\HttpClientTrait.php:45
 C:\PROJEKTY\PHPStorm\symfony\src\Symfony\Component\HttpClient\CurlHttpClient.php:105
 C:\PROJEKTY\PHPStorm\symfony\src\Symfony\Component\HttpKernel\HttpClientKernel.php:54
 C:\PROJEKTY\PHPStorm\symfony\src\Symfony\Component\HttpKernel\HttpCache\SubRequestHandler.php:85
 C:\PROJEKTY\PHPStorm\symfony\src\Symfony\Component\HttpKernel\HttpCache\HttpCache.php:477
 C:\PROJEKTY\PHPStorm\symfony\src\Symfony\Component\HttpKernel\HttpCache\HttpCache.php:450
 C:\PROJEKTY\PHPStorm\symfony\src\Symfony\Component\HttpKernel\HttpCache\HttpCache.php:347
 C:\PROJEKTY\PHPStorm\symfony\src\Symfony\Component\HttpKernel\HttpCache\HttpCache.php:222
 C:\PROJEKTY\PHPStorm\symfony\src\Symfony\Component\HttpClient\CachingHttpClient.php:96
 C:\PROJEKTY\PHPStorm\symfony\src\Symfony\Component\HttpClient\Tests\CachingHttpClientTest.php:34

```
This PR fix this.

Commits
-------

5cd8895c67 [HttpClient] bugfix exploding values of headers
2019-10-07 12:52:41 +02:00
Michał Jusięga
5cd8895c67 [HttpClient] bugfix exploding values of headers 2019-10-07 12:52:05 +02:00