Commit Graph

30225 Commits

Author SHA1 Message Date
Nicolas Grekas
cb452ee154 [github] Add a reminder about CHANGELOG.md files 2017-03-06 21:03:23 +01:00
Fabien Potencier
323529cba6 feature #21774 [Yaml] deprecate implicit string casting of mapping keys (xabbuh)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Yaml] deprecate implicit string casting of mapping keys

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

Commits
-------

3c5d9155d4 deprecate implicit string casting of mapping keys
2017-03-06 11:34:13 -08:00
Fabien Potencier
94d059d530 Merge branch '2.8' into 3.2
* 2.8:
  respect the umask argument in dumpFile()
  dumpFile(), preserve existing file permissions
  Add validate method to mockec validator in form TypeTestCase
  bumped Symfony version to 2.8.19
  updated VERSION for 2.8.18
  updated CHANGELOG for 2.8.18
  bumped Symfony version to 2.7.26
  updated VERSION for 2.7.25
  update CONTRIBUTORS for 2.7.25
  updated CHANGELOG for 2.7.25
  [HttpKernel] fixed Kernel name when stored in a directory starting with a number
  context listener: hardening user provider handling
  [Console] Do not squash input changes made from console.command event
2017-03-06 11:30:27 -08:00
Fabien Potencier
2a7e385dac Merge branch '2.7' into 2.8
* 2.7:
  respect the umask argument in dumpFile()
  dumpFile(), preserve existing file permissions
  Add validate method to mockec validator in form TypeTestCase
  bumped Symfony version to 2.7.26
  updated VERSION for 2.7.25
  update CONTRIBUTORS for 2.7.25
  updated CHANGELOG for 2.7.25
  [HttpKernel] fixed Kernel name when stored in a directory starting with a number
  context listener: hardening user provider handling
2017-03-06 11:26:34 -08:00
Fabien Potencier
fda2472b02 minor #21902 [Filesystem] respect the umask argument in dumpFile() (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Filesystem] respect the umask argument in dumpFile()

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

In #21823 we introduced a small BC break: The `dumpFile()` method of the `Filesystem` class allowed to pass the desired file permissions (support for this feature was dropped in Symfony 3.0).

Commits
-------

3a7cd08fe7 respect the umask argument in dumpFile()
2017-03-06 11:24:50 -08:00
Christian Flothmann
3c5d9155d4 deprecate implicit string casting of mapping keys 2017-03-06 20:18:14 +01:00
Christian Flothmann
3a7cd08fe7 respect the umask argument in dumpFile() 2017-03-06 19:56:39 +01:00
Fabien Potencier
c91db73fbb bug #21823 dumpFile(), preserve existing file permissions (chs2)
This PR was squashed before being merged into the 2.7 branch (closes #21823).

Discussion
----------

dumpFile(), preserve existing file permissions

When calling Filesystem::dumpFile() on an already existing file, its permissions are lost.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- 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.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

040a9abdbf dumpFile(), preserve existing file permissions
2017-03-06 10:29:47 -08:00
ChS
040a9abdbf dumpFile(), preserve existing file permissions 2017-03-06 10:29:45 -08:00
Fabien Potencier
638bdc864f added a note in the CHANGELOG 2017-03-06 10:23:13 -08:00
Fabien Potencier
7638f6e3be feature #21780 [DX] [Form] Add helper method to register form extensions during unit testing (pierredup)
This PR was squashed before being merged into the 3.3-dev branch (closes #21780).

Discussion
----------

[DX] [Form] Add helper method to register form extensions during unit testing

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

Add helper method to register form extensions during unit testing, so it's easier to register custom form type extensions, form types, or type guessers

Commits
-------

bab562a987 [DX] [Form] Add helper method to register form extensions during unit testing
2017-03-06 10:21:35 -08:00
Pierre du Plessis
bab562a987 [DX] [Form] Add helper method to register form extensions during unit testing 2017-03-06 10:21:32 -08:00
Fabien Potencier
ae2722f046 added a note in the CHANGELOG 2017-03-06 10:19:58 -08:00
Fabien Potencier
7048fd6cba feature #21842 [HttpKernel] Allow signing URIs with a custom query string parameter (thewilkybarkid)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Allow signing URIs with a custom query string parameter

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

`UriSigner` is currently restricting to using `_hash` as the query string parameter, this makes is customisable.

Commits
-------

32301c3a30 Allow a custom query string parameter
2017-03-06 10:18:41 -08:00
Fabien Potencier
eae76953d6 bug #21880 [Form] Fixed overridden choices option in extended choice types (HeahDude)
This PR was merged into the 3.2 branch.

Discussion
----------

[Form] Fixed overridden choices option in extended choice types

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

Commits
-------

bcda2c2d8e [Form] Fixed overridden choices option in extended choice types
2017-03-06 09:46:59 -08:00
HeahDude
bcda2c2d8e [Form] Fixed overridden choices option in extended choice types 2017-03-06 18:31:33 +01:00
Fabien Potencier
a42cf1bc0c feature #21705 [Bridge/Monolog] Enhance the Console Handler (lyrixx)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Bridge/Monolog] Enhance the Console Handler

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

---

I extracted and enhanced the formatting logic from #21080.
Basically, The formatter now use the VarDumper & use more significant colors and has a more compact / readable format (IMHO).

---

I used the following code to generate before/after screenshots.

```php
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $logger = $this->getContainer()->get('logger');
        $filesystem = $this->getContainer()->get('filesystem');

        $anObject = new \stdClass;
        $anObject->firstPpt = 'foo';
        $anObject->secondePpt = 'bar';

        $logger->log('notice', 'Hello {who}', [
            'who' => 'Wold',
            'an_object' => $anObject,
            'file_system' => $filesystem,
        ]);

        $r = new \ReflectionClass(LogLevel::class);
        foreach ($r->getConstants() as $level) {
            $logger = $logger->withName($level);
            $logger->log($level, 'log at level {level}', [
                'level' => $level,
            ]);
        }
    }
```

before:

![screenshot12](https://cloud.githubusercontent.com/assets/408368/23183075/0bb21f80-f87b-11e6-8123-f6da70f2493b.png)

After:

![screenshot11](https://cloud.githubusercontent.com/assets/408368/23182971/b4022ed8-f87a-11e6-9d3b-de1a9d4ce9aa.png)

Commits
-------

b663ab5246 [Bridge/Monolog] Enhanced the Console Handler
2017-03-06 09:12:00 -08:00
Grégoire Pineau
b663ab5246 [Bridge/Monolog] Enhanced the Console Handler
Basically, the formatter now uses the VarDumper & uses more significant
colors and has a more compact / readable format (IMHO).
2017-03-06 18:10:13 +01:00
Fabien Potencier
abeb86bd23 feature #21893 Added a castToArray() config helper (javiereguiluz)
This PR was squashed before being merged into the 3.3-dev branch (closes #21893).

Discussion
----------

Added a castToArray() config helper

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

Commits
-------

3a589df5cb Added a castToArray() config helper
2017-03-06 08:50:58 -08:00
Javier Eguiluz
3a589df5cb Added a castToArray() config helper 2017-03-06 08:50:45 -08:00
Fabien Potencier
a1a7599e38 Merge branch '3.2'
* 3.2:
  Count @expectedDeprecation as an assertion
2017-03-06 08:19:41 -08:00
Fabien Potencier
cc5c233f15 bug #21896 [PHPunitBridge] Count @expectedDeprecation as an assertion (wouterj)
This PR was merged into the 3.2 branch.

Discussion
----------

[PHPunitBridge] Count @expectedDeprecation as an assertion

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

By adding `addToAssertionCount()`, the `@expectedDeprecation` annotation is recognized as an assertion by PHPUnit. This means PHPUnit will not report the test as risky because it does not contain any assertion.

Commits
-------

ba5c0f4a47 Count @expectedDeprecation as an assertion
2017-03-06 08:18:10 -08:00
Fabien Potencier
3effed88e0 bug #21865 [Security] context listener: hardening user provider handling (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] context listener: hardening user provider handling

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

After the wrong fix in #21791 this is the second attempt to solve #4498. If more than one user provider support the user for the current context, all of them will be applied instead of returning prematurely when the first user provider does not find the logged in user.

Commits
-------

0fb09293fd context listener: hardening user provider handling
2017-03-06 08:15:02 -08:00
Wouter J
ba5c0f4a47 Count @expectedDeprecation as an assertion 2017-03-06 17:08:22 +01:00
Fabien Potencier
ec134c7014 bug #21883 [HttpKernel] fix Kernel name when stored in a directory starting with a number (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] fix Kernel name when stored in a directory starting with a number

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

replaces #20750

Commits
-------

f244eb8414 [HttpKernel] fixed Kernel name when stored in a directory starting with a number
2017-03-06 07:51:41 -08:00
Nicolas Grekas
e7c12d3f2e minor #21888 [DI] Replace PHP7-conditional return-type checks by regular type-hints that work on PHP5 (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Replace PHP7-conditional return-type checks by regular type-hints that work on PHP5

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

Commits
-------

372ff7c [DI] Replace PHP7-conditional return-type checks by regular type-hints that work on PHP5
2017-03-06 10:34:52 +01:00
Nicolas Grekas
24f3135b11 minor #21886 [Form] Add validate method to mockec validator in form TypeTestCase (pierredup)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Add validate method to mockec validator in form TypeTestCase

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

When using the `Symfony\Component\Form\Tests\Extension\Validator\Type\TypeTestCase` class to unit test forms, the `validate` method is not mocked, which causes errors when the unit tests run.

Commits
-------

4013e7b Add validate method to mockec validator in form TypeTestCase
2017-03-06 10:17:24 +01:00
Nicolas Grekas
372ff7ce7d [DI] Replace PHP7-conditional return-type checks by regular type-hints that work on PHP5 2017-03-06 09:56:20 +01:00
Pierre du Plessis
4013e7b998 Add validate method to mockec validator in form TypeTestCase 2017-03-06 09:20:15 +02:00
Fabien Potencier
07dfac3bc2 bumped Symfony version to 2.8.19 2017-03-05 22:36:37 -08:00
Fabien Potencier
8c28bf706b Merge pull request #21885 from fabpot/release-2.8.18
released v2.8.18
2017-03-05 19:54:50 -08:00
Fabien Potencier
f32f6cefdf updated VERSION for 2.8.18 2017-03-05 19:54:35 -08:00
Fabien Potencier
cf8a7d27c3 updated CHANGELOG for 2.8.18 2017-03-05 19:54:29 -08:00
Fabien Potencier
7311ef36e9 bumped Symfony version to 2.7.26 2017-03-05 18:34:03 -08:00
Fabien Potencier
e22beacc93 Merge pull request #21884 from fabpot/release-2.7.25
released v2.7.25
2017-03-05 17:33:53 -08:00
Fabien Potencier
cb24ce3b52 updated VERSION for 2.7.25 2017-03-05 17:33:35 -08:00
Fabien Potencier
48c19f67e1 update CONTRIBUTORS for 2.7.25 2017-03-05 17:33:23 -08:00
Fabien Potencier
f90c78efe1 updated CHANGELOG for 2.7.25 2017-03-05 17:33:13 -08:00
Fabien Potencier
f244eb8414 [HttpKernel] fixed Kernel name when stored in a directory starting with a number 2017-03-05 14:37:48 -08:00
Nicolas Grekas
fa451b2935 fix typo 2017-03-05 23:31:39 +01:00
Fabien Potencier
e4c12daa53 fixed CS 2017-03-05 13:52:44 -08:00
Nicolas Grekas
d332b37b4b [FrameworkBundle] Lazy configuration of annotations' loader and @required 2017-03-05 22:37:22 +01:00
Fabien Potencier
3d67aba24a feature #21421 Use proper error message when session write fails #20807 (digilist)
This PR was submitted for the 2.8 branch but it was merged into the 3.3-dev branch instead (closes #21421).

Discussion
----------

Use proper error message when session write fails #20807

This improves the error message that is thrown if a session write fails (see #20807)

As there was no way to get the actual handler, I introduced a method on the SessionHandlerProxy. I hope that's okay, otherwise please give me a hint on what to do.

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

Commits
-------

c7a44be4b1 Use proper error message when session write fails #20807
2017-03-05 12:27:24 -08:00
Markus Fasselt
c7a44be4b1 Use proper error message when session write fails #20807 2017-03-05 12:27:23 -08:00
Fabien Potencier
b8b6774634 bug #21841 [Console] Do not squash input changes made from console.command event (chalasr)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Do not squash input changes made from console.command event

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/19441
| License       | MIT
| Doc PR        | n/a

Setting arguments/options from the `console.command` event is expected to work since https://github.com/symfony/symfony/pull/15938

Commits
-------

c8d364b721 [Console] Do not squash input changes made from console.command event
2017-03-05 12:03:23 -08:00
Fabien Potencier
c6e1a49731 feature #21770 [DI] Allow extensions to create ServiceLocator as services (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Allow extensions to create ServiceLocator as services

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

https://github.com/symfony/symfony/pull/21770/files?w=1

With this PR, DI extensions are able to create "service locator" services.
They are easily created as such:
```php
$container->register('my_service_locator', ServiceLocator::class)
    ->addArgument(array(
        'exposed_id' => new ServiceClosureArgument(new Reference('internal_id')),
    ))
```
I already need this in two different PRs to come.

Commits
-------

1d9663326e [DI] Allow creating ServiceLocator-based services in extensions
2017-03-05 12:01:09 -08:00
Fabien Potencier
ed303489da Merge branch '3.2'
* 3.2:
  [Form] backport DependencyInjectionExtension tests
  [Form] Fixed typo in a test after #21877
2017-03-05 11:54:04 -08:00
Fabien Potencier
4d91022480 Merge branch '2.8' into 3.2
* 2.8:
  [Form] backport DependencyInjectionExtension tests
  [Form] Fixed typo in a test after #21877
2017-03-05 11:53:04 -08:00
Fabien Potencier
82790559de Merge branch '2.7' into 2.8
* 2.7:
  [Form] backport DependencyInjectionExtension tests
  [Form] Fixed typo in a test after #21877
2017-03-05 11:52:29 -08:00
Fabien Potencier
4816f65c04 minor #21882 [Form] Fixed typo in a test after #21877 (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed typo in a test after #21877

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

Reviewing the diff on GitHub, I realized I've missed some typos in a new test of #21877. Sorry!

Commits
-------

b21a0978de [Form] Fixed typo in a test after #21877
2017-03-05 11:48:05 -08:00