Commit Graph

44391 Commits

Author SHA1 Message Date
Fabien Potencier
f7130e332f bug #33518 [Yaml] don't dump a scalar tag value on its own line (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Yaml] don't dump a scalar tag value on its own line

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

This commit fine tunes the bugfix made in #33377 with the feedback provided in https://github.com/symfony/symfony/issues/33464#issuecomment-528290985.

Commits
-------

a549069a49 don't dump a scalar tag value on its own line
2019-09-10 13:35:27 +02:00
Fabien Potencier
51ffc18b6d Simplify usage of dirname() 2019-09-10 13:34:21 +02:00
Fabien Potencier
c709d43878 Merge branch '4.3' into 4.4
* 4.3:
  Remove Google references when not needed
  Simplify usage of dirname()
  Remove Google references when not needed
2019-09-10 13:27:29 +02:00
Fabien Potencier
1517d1682f Remove Google references when not needed 2019-09-10 13:27:19 +02:00
Fabien Potencier
6f459b9419 Merge branch '3.4' into 4.3
* 3.4:
  Remove Google references when not needed
2019-09-10 13:25:17 +02:00
Fabien Potencier
2c87f69fee minor #33527 Dirname simplification (fabpot)
This PR was merged into the 4.3 branch.

Discussion
----------

Dirname simplification

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| 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 | n/a
| License       | MIT
| Doc PR        | n/a

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

c4d44eb089 Simplify usage of dirname()
2019-09-10 13:24:14 +02:00
Fabien Potencier
c4d44eb089 Simplify usage of dirname() 2019-09-10 13:22:25 +02:00
Fabien Potencier
f436cc80f1 minor #33530 Remove Google references when not needed (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove Google references when not needed

| Q             | A
| ------------- | ---
| Branch?       | 3.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 | n/a
| License       | MIT
| Doc PR        | n/a

No need to promote Google.

Commits
-------

9665d7633d Remove Google references when not needed
2019-09-10 13:21:38 +02:00
Christian Flothmann
a549069a49 don't dump a scalar tag value on its own line 2019-09-10 12:38:46 +02:00
Fabien Potencier
9665d7633d Remove Google references when not needed 2019-09-10 12:13:59 +02:00
Fabien Potencier
1c3d409490 bug #33525 [DI] fix Preloader (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] fix Preloader

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

Commits
-------

4cc8641326 [DI] fix Preloader
2019-09-10 11:48:59 +02:00
Fabien Potencier
3f0cf49298 bug #33524 [HttpClient] fix calling the buffer-enabling callback (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] fix calling the buffer-enabling callback

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

Commits
-------

0e28518b33 [HttpClient] fix calling the buffer-enabling callback
2019-09-10 11:48:08 +02:00
Nicolas Grekas
4cc8641326 [DI] fix Preloader 2019-09-10 11:11:45 +02:00
Nicolas Grekas
0e28518b33 [HttpClient] fix calling the buffer-enabling callback 2019-09-10 10:51:24 +02:00
Nicolas Grekas
6a7b77ecb2 [HttpClient] fix php notice on push 2019-09-10 08:36:23 +02:00
Robin Chalas
92e64a1dfa minor #33511 Require exact match when reading from stdin with a dash (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Require exact match when reading from stdin with a dash

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

I think reading from stdin should happen only when the argument is exactly a dash, with no other files on the command line.

The alternative is to allow a dash at any position in the list of files, but I'm not sure that'd make sense.

Commits
-------

3d14b79dad Require exact match when reading from stdin with a dash
2019-09-09 18:45:50 +02:00
Yonel Ceruto
ddffc972a8 minor tweaks to the welcome page 2019-09-09 09:46:27 -04:00
Nicolas Grekas
a28f5b2eee minor #33512 [HttpClient] do not perform string operations on null (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] do not perform string operations on null

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

Commits
-------

600bde9562 do not perform string operations on null
2019-09-09 13:19:47 +02:00
Christian Flothmann
600bde9562 do not perform string operations on null 2019-09-09 12:09:16 +02:00
Nicolas Grekas
e9f524a37e feature #32565 [HttpClient] Allow enabling buffering conditionally with a Closure (rjwebdev)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] Allow enabling buffering conditionally with a Closure

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

With this PR, responses can be buffered automatically from a closure passed to the `buffer` option.

```php
$resp = $client->request('GET', $url, [
    'buffer' => function (array $headers): bool { return true/false; },
]);
```

When no option is provided, buffering is now enabled only for json, xml and text/* content types.

Commits
-------

f705ac9dc4 [HttpClient] Allow enabling buffering conditionally with a Closure
2019-09-09 09:21:48 +02:00
Nicolas Grekas
312cbf94f1 minor #33508 [Cache] Add types to constructors and private/final/internal methods (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache] Add types to constructors and private/final/internal methods

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

I'm currently preparing a large PR collecting changes like these. However, the changeset for the Cache component was large enough to justify a dedicated PR, imho.

Commits
-------

919afd2112 [Cache] Add types to constructors and private/final/internal methods.
2019-09-09 09:00:22 +02:00
Nicolas Grekas
3d14b79dad Require exact match when reading from stdin with a dash 2019-09-09 08:40:31 +02:00
Alexander M. Turek
919afd2112 [Cache] Add types to constructors and private/final/internal methods. 2019-09-08 23:57:26 +02:00
Nicolas Grekas
81ac674b61 Merge branch '4.3' into 4.4
* 4.3:
  SCA: minor code tweaks
  [HttpClient] fallbackto CURLMOPT_MAXCONNECTS when CURLMOPT_MAX_HOST_CONNECTIONS is not available
  fixed typo
  [HttpKernel] Fix Apache mod_expires Session Cache-Control issue
  Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler
2019-09-08 22:40:04 +02:00
Nicolas Grekas
5a06f94c08 Merge branch '3.4' into 4.3
* 3.4:
  SCA: minor code tweaks
  [HttpKernel] Fix Apache mod_expires Session Cache-Control issue
  Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler
2019-09-08 22:39:53 +02:00
Nicolas Grekas
26954bc4ff minor #33410 [HttpFoundation] Add types to private/final/internal methods and constructors (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Add types to private/final/internal methods and constructors

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

Commits
-------

1978d88f1b [HttpFoundation] Add types to private/final/internal methods and constructors.
2019-09-08 22:35:39 +02:00
Nicolas Grekas
c79b45df4e minor #33506 [appveyor] exclude tty group (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[appveyor] exclude tty group

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

Tests on appveyor block and are killed after 1h... This might be the fix.

Commits
-------

beb7ed36d8 [appveyor] exclude tty group
2019-09-08 22:31:35 +02:00
Nicolas Grekas
200eae3199 minor #33266 [DependencyInjection] Add types to private/final/internal methods and constructors (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Add types to private/final/internal methods and constructors

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

Commits
-------

def0ac7a2b Add types to private/final/internal methods and constructors.
2019-09-08 22:29:23 +02:00
Nicolas Grekas
beb7ed36d8 [appveyor] exclude tty group 2019-09-08 22:24:24 +02:00
Alexander M. Turek
1978d88f1b [HttpFoundation] Add types to private/final/internal methods and constructors. 2019-09-08 21:38:13 +02:00
Alexander M. Turek
def0ac7a2b Add types to private/final/internal methods and constructors. 2019-09-08 21:37:35 +02:00
Fabien Potencier
4d10d9e0c6 bug #33505 [HttpClient] fallbackto CURLMOPT_MAXCONNECTS when CURLMOPT_MAX_HOST_CONNECTIONS is not available (nicolas-grekas)
This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] fallbackto CURLMOPT_MAXCONNECTS when CURLMOPT_MAX_HOST_CONNECTIONS is not available

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

Commits
-------

0aae1d7c0a [HttpClient] fallbackto CURLMOPT_MAXCONNECTS when CURLMOPT_MAX_HOST_CONNECTIONS is not available
2019-09-08 19:52:35 +02:00
Fabien Potencier
6f332ce0e0 minor #33504 SCA: minor code tweaks (kalessil)
This PR was squashed before being merged into the 3.4 branch (closes #33504).

Discussion
----------

SCA: minor code tweaks

| Q             | A
| ------------- | ---
| Branch?       | 3.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

Minor code tweaks: disabled sorting in glob (the order is not important there), used implode() negative index support in order to drop an array_pop() call.

Commits
-------

32ea449679 SCA: minor code tweaks
2019-09-08 19:26:35 +02:00
Vladimir Reznichenko
32ea449679 SCA: minor code tweaks 2019-09-08 19:26:24 +02:00
Fabien Potencier
afad96285e feature #32032 [DI] generate preload.php file for PHP 7.4 in cache folder (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[DI] generate preload.php file for PHP 7.4 in cache folder

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

This PR makes the PhpDumper generate a preloading file suited for PHP 7.4.
On a skeleton app, the generated file is `var/cache/dev/srcApp_KernelDevDebugContainer.preload.php` (of course, this varies by env name + kernel class)

One missing thing is listing some classes that are always needed but are not related to services.

Typically: `Request` and `Response`. We might need a new mechanism to make this list extensible.

I did not measure the benefit of this on PHP 7.4. I would really appreciate if someone could give it a try on PHP 7.4 with preloading enabled.

Commits
-------

c4dad0de5d [DI] generate preload.php file for PHP 7.4 in cache folder
2019-09-08 19:24:47 +02:00
Fabien Potencier
b29775ec03 minor #33500 Allow version 2 of the contracts package (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Allow version 2 of the contracts package

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

The plan is to release a version 2 of the contracts package that will require php 7.2 but remains compatible to Symfony 4.

Commits
-------

a1ee32039b Allow version 2 of the contracts package.
2019-09-08 19:17:13 +02:00
Fabien Potencier
70a1843878 Tweak output 2019-09-08 19:15:29 +02:00
Fabien Potencier
86c2619c01 feature #33117 [FrameworkBundle] Added --sort option for TranslationUpdateCommand (k0d3r1s)
This PR was squashed before being merged into the 4.4 branch (closes #33117).

Discussion
----------

[FrameworkBundle] Added --sort option for TranslationUpdateCommand

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #33014
| License       | MIT
| Doc PR        | symfony/symfony-docs#12136
Added sorting option for translation:update command

Commits
-------

3249a4e850 [FrameworkBundle] Added --sort option for TranslationUpdateCommand
2019-09-08 19:13:53 +02:00
k0d3r1s
3249a4e850 [FrameworkBundle] Added --sort option for TranslationUpdateCommand 2019-09-08 19:13:44 +02:00
Nicolas Grekas
0aae1d7c0a [HttpClient] fallbackto CURLMOPT_MAXCONNECTS when CURLMOPT_MAX_HOST_CONNECTIONS is not available 2019-09-08 18:59:44 +02:00
Nicolas Grekas
c4dad0de5d [DI] generate preload.php file for PHP 7.4 in cache folder 2019-09-08 17:48:39 +02:00
Wouter J
0da2761c15 Move Anonymous config to a SecurityFactory 2019-09-08 16:32:40 +02:00
Alexander M. Turek
a1ee32039b Allow version 2 of the contracts package. 2019-09-08 12:38:38 +02:00
Fabien Potencier
47a87849c0 bug #32818 [HttpKernel] Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler (Arman-Hosseini)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler

| Q             | A
| ------------- | ---
| Branch?       | >= 3.4 <!-- see below -->
| 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 | #32444   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A <!-- required for new features -->

I had this problem and I noticed that an issue had already been registered.
So I registered the pull request.

Commits
-------

9ed5f03b98 Fix getFileLinkFormat() to avoid returning the wrong URL in Profiler
2019-09-08 09:16:45 +02:00
Fabien Potencier
6916822e46 feature #32832 [Serializer] Allow multi-dimenstion object array in AbstractObjectNormalizer (alediator)
This PR was submitted for the 4.3 branch but it was squashed and merged into the 4.4 branch instead (closes #32832).

Discussion
----------

[Serializer] Allow multi-dimenstion object array in AbstractObjectNormalizer

Modify ´AbstractObjectNormalizer´ adding the capability of parsing nested arrays of objects instead of parsing them into arrays

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #31175
| License       | MIT

I was trying to parse a nested array of objects and I'd find out with this #31175 behavior. After trying to solve in different ways, I was able to do it adding the fix that allows the `AbstractObjectNormalizer` to parse more than one dimension array of objects.

I would like to add some tests to assure it works and doesn't generate any side effects, but I'd prefer to open the PR to link it to the existing issue https://github.com/symfony/symfony/issues/31175.

On the other hand, if you think it is not applicable or you want me to change anything, please let me know.

Commits
-------

ea03f6d664 [Serializer] Allow multi-dimenstion object array in AbstractObjectNormalizer
2019-09-08 09:15:48 +02:00
Alejandro Diaz Torres
ea03f6d664 [Serializer] Allow multi-dimenstion object array in AbstractObjectNormalizer 2019-09-08 09:15:36 +02:00
Fabien Potencier
1bfbaeb894 fixed typo 2019-09-08 09:09:18 +02:00
Fabien Potencier
dc75ae2614 feature #33189 New welcome page on startup for 4.4 LTS & 5.0 (yceruto)
This PR was merged into the 4.4 branch.

Discussion
----------

New welcome page on startup for 4.4 LTS & 5.0

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

A new LTS version of Symfony is coming and a new major version too. That deserves a little more ❤️ than usual.

This picture simulate two components of the live: the Ocean and the sky/Universe, with the aim of inspiring calm at the same time desire to build good & great things:

 ![welcome-page](https://user-images.githubusercontent.com/2028198/63116799-77dd3300-bf68-11e9-8bb5-8c03b301c9e2.gif)

The HUE value changes randomly each time you enter to the homepage. That's just an idea to make it dynamic. I invite you to try it and send your ideas too. I'd like this experience to be extremely exciting for newcomers.

About all text & message this would be a good time to say what people want to hear :) Symfony's amazing \o/. Some communication skills are required here.

I'm not a designer, so I'd want some expert on this topic destroying the proposal making it even better :)

HTML+CSS only: I tried to use some moderm features that were compatible with most of browser, but I might be forgetting something.

The icons were taken from https://material.io/resources/icons/ (free), but I don't know how to deal with this license:
> Our icons are free for everyone to use. Please don’t try to sell them.
> Available under [Apache license version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html).

Should we copy it somewhere? should it be visible to the user?

**Before:**
![old-welcome-page](https://user-images.githubusercontent.com/2028198/63117275-6cd6d280-bf69-11e9-9ffc-cce6000e3518.png)

A good first feeling is really really important, is it worth it? Thoughts!

ping to my friend @javiereguiluz this is for sure something you would like to check.

Cheers!

Commits
-------

328b97ec71 New welcome page
2019-09-08 09:00:00 +02:00
Fabien Potencier
e776419cee feature #33295 [OptionsResolver] Display full nested option hierarchy in exceptions (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[OptionsResolver] Display full nested option hierarchy in exceptions

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

It kind of improve the DX, especially when you define a lot of nested form options since the file and line cannot be displayed.

```php
$resolver->setDefaults([
    'array' => function (OptionsResolver $arrayResolver): void {
        $arrayResolver->setRequired('foo');
    },
]);

```

Before:
`The required option "foo" is missing.`

After:
`The required option "array[foo]" is missing.`

That can go to 4.3 I guess.

Commits
-------

a981fc3b50 [OptionsResolver] Display full nested options hierarchy in exceptions
2019-09-08 08:56:26 +02:00
Fabien Potencier
8aa708eeb9 feature #33486 [VarDumper] Display fully qualified title (pavinthan, nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] Display fully qualified title

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

We can see the objects with namespace that help us to navigate to the file easily.

Before: These are diffrent Collection class
<img width="203" alt="Screen Shot 2019-09-06 at 1 02 37 PM" src="https://user-images.githubusercontent.com/13897936/64410319-663f0500-d0a8-11e9-98d5-743e2ccf2737.png">

Now: we can see the diffrent
<img width="376" alt="Screen Shot 2019-09-06 at 1 02 20 PM" src="https://user-images.githubusercontent.com/13897936/64410304-60e1ba80-d0a8-11e9-9cb1-f88c0f8c3de9.png">

Commits
-------

a8252a23ff [VarDumper] display ellipsed FQCN for nested classes
84682eaa03 [VarDumper] Display fully qualified title
2019-09-08 08:52:49 +02:00