Commit Graph

41215 Commits

Author SHA1 Message Date
Wouter J
ce38fe3e58 Skip Glob brace test when GLOB_BRACE is unavailable 2019-04-02 21:54:57 +02:00
Fabien Potencier
a362b8b838 bumped Symfony version to 4.2.6 2019-04-02 21:06:21 +02:00
Fabien Potencier
5365a36a02
Merge pull request #30838 from fabpot/release-4.2.5
released v4.2.5
2019-04-02 21:04:13 +02:00
Fabien Potencier
da9ad29165 updated VERSION for 4.2.5 2019-04-02 21:03:51 +02:00
Fabien Potencier
6c6e085d66 updated CHANGELOG for 4.2.5 2019-04-02 21:03:43 +02:00
Fabien Potencier
668f585df4 bumped Symfony version to 3.4.25 2019-04-02 21:03:08 +02:00
Fabien Potencier
4783969de0
Merge pull request #30837 from fabpot/release-3.4.24
released v3.4.24
2019-04-02 15:48:13 +02:00
Fabien Potencier
3dc0a03d8b updated VERSION for 3.4.24 2019-04-02 15:47:51 +02:00
Fabien Potencier
483ec24812 update CONTRIBUTORS for 3.4.24 2019-04-02 15:47:34 +02:00
Fabien Potencier
86b382787d updated CHANGELOG for 3.4.24 2019-04-02 15:47:25 +02:00
Nicolas Grekas
755f41192f minor #30831 [HttpClient][Contracts] rename "raw_headers" to "response_headers" (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[HttpClient][Contracts] rename "raw_headers" to "response_headers"

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

A preliminary step before adding the `request_headers` info on responses to ease debugging.

Commits
-------

0b21268bf5 [HttpClient][Contracts] rename "raw_headers" to "response_headers"
2019-04-02 13:11:42 +02:00
Nicolas Grekas
0b21268bf5 [HttpClient][Contracts] rename "raw_headers" to "response_headers" 2019-04-02 12:06:39 +02:00
Fabien Potencier
50a5dfd4f1 feature #29312 [EventDispatcher] Split events across requests (ro0NL)
This PR was squashed before being merged into the 4.3-dev branch (closes #29312).

Discussion
----------

[EventDispatcher] Split events across requests

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #24275
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Split events per request, as currently a profiled sub-request includes all events. Follows same approach how logs are split in #23659.

Commits
-------

c3477badbc [EventDispatcher] Split events across requests
2019-04-02 12:04:12 +02:00
Roland Franssen
c3477badbc [EventDispatcher] Split events across requests 2019-04-02 12:04:04 +02:00
Fabien Potencier
3a861acd1a minor #30829 [EventDispatcher] cleanup (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[EventDispatcher] cleanup

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| 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 -->

forgotten in #29411 (https://github.com/symfony/symfony/pull/29411/files#diff-a72bc1daccda0ec7bfcfae0e8d3df141L287)

Commits
-------

19134c0554 [EventDispatcher] cleanup
2019-04-02 11:29:50 +02:00
Roland Franssen
19134c0554
[EventDispatcher] cleanup 2019-04-02 10:51:52 +02:00
Fabien Potencier
aa5b6f95b9 feature #30827 [TwigBridge] Add template file link to debug:twig command (yceruto)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[TwigBridge] Add template file link to debug:twig command

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

![debug_twig_file_link](https://user-images.githubusercontent.com/2028198/55365428-8c85c680-54b2-11e9-9d4e-e4845fc7d411.png)

Commits
-------

05e2e1e088 Add template file link
2019-04-02 09:00:23 +02:00
Fabien Potencier
a63496bcf4 feature #30826 [Form] Add file links for described classes in debug:form command (yceruto)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Form] Add file links for described classes in debug:form command

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

![debug_form_file_link](https://user-images.githubusercontent.com/2028198/55357775-d1eac980-549b-11e9-8aa8-500aee629753.png)

Commits
-------

dcba01d212 Add file links for described classes
2019-04-02 08:58:30 +02:00
Yonel Ceruto
05e2e1e088 Add template file link 2019-04-01 18:40:03 -04:00
Yonel Ceruto
dcba01d212 Add file links for described classes 2019-04-01 16:27:30 -04:00
Fabien Potencier
17a3ccf4b3 feature #30813 New PHPUnit assertions for the WebTestCase (Pierstoval, fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

New PHPUnit assertions for the WebTestCase

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

While reviewing #29990, and working on some tests, I realized that we could do better by adding PHPUnit constraint classes in various components that are then used in WebTextCase.

**Before**

```php
<?php

namespace App\Tests;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class DefaultControllerTest extends WebTestCase
{
    public function testSomething()
    {
        $client = static::createClient();
        $crawler = $client->request('GET', '/test');

        $this->assertSame(200, $client->getResponse()->getStatusCode());
        $this->assertContains('Hello World', $crawler->filter('h1')->text());
    }
}
```

**After**

```php
<?php

namespace App\Tests;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;

class DefaultControllerTest extends WebTestCase
{
    public function testSomething()
    {
        $client = static::createClient();
        $client->request('GET', '/test');

        $this->assertResponseIsSuccessful();
        $this->assertSelectorTextContains('h1', 'Hello World');
    }
}
```

Commits
-------

4f91020c8d added PHPUnit assertions in various components
2f8040ee84 Create new PHPUnit assertions for the WebTestCase
2019-04-01 18:54:09 +02:00
Fabien Potencier
4f91020c8d added PHPUnit assertions in various components 2019-04-01 18:52:57 +02:00
Fabien Potencier
fefe62c4d0 updated CHANGELOG 2019-04-01 18:49:08 +02:00
Fabien Potencier
b01fd5f370 feature #27738 [Validator] Add a HaveIBeenPwned password validator (dunglas)
This PR was squashed before being merged into the 4.3-dev branch (closes #27738).

Discussion
----------

[Validator] Add a HaveIBeenPwned password validator

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | n/a   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | todo

This PR adds a new `Pwned` validation constraint to prevent users to choose passwords that have been leaked in public data breaches.
The validator uses the https://haveibeenpwned.com/ API. The implementation is similar to the one used by [Firefox Monitor](https://blog.mozilla.org/futurereleases/2018/06/25/testing-firefox-monitor-a-new-security-tool/). It allows to not expose the password hash using a k-anonymity model. The specific implementation for HaveIBeenPwned has been [described in depth by Cloudflare](https://blog.cloudflare.com/validating-leaked-passwords-with-k-anonymity/).

Usage:

```php
// Rejects the password if is present in any number of times in any data breach
class User
{
    /** @Pwned */
    public $plainPassword;
}

// Rejects the password if is present more than 5 times in data breaches
class User
{
    /** @Pwned(maxCount=5) */
    public $plainPassword;
}

// Customize the error message
class User
{
    /** @Pwned(message='Please select another password, this one has already been hacked.') */
    public $plainPassword;
}
```

Commits
-------

ec1ded898a [Validator] Add a HaveIBeenPwned password validator
2019-04-01 18:48:04 +02:00
Kévin Dunglas
ec1ded898a [Validator] Add a HaveIBeenPwned password validator 2019-04-01 18:47:55 +02:00
Nicolas Grekas
4a6a925a56 minor #30824 fix testIgnoredAttributesInContext (Raulnet)
This PR was merged into the 4.2 branch.

Discussion
----------

fix testIgnoredAttributesInContext

| Q             | A
| ------------- | ---
| Branch?       | fix/test_serializer
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | fix CI
| License       | MIT

<!--
fix test GetSetMethodNormalizerTest::testIgnoredAttributesInContext
method setIgnoredAttributes is deprecated since 4.2
key "ignored_attributes" is use in the context
-->

Commits
-------

61547a291d fix testIgnoredAttributesInContext
2019-04-01 18:30:38 +02:00
Raulnet
61547a291d fix testIgnoredAttributesInContext 2019-04-01 18:12:17 +02:00
Fabien Potencier
1fcc994021 feature #30690 Changing messenger bus id from 'message_bus' to 'messenger.default_bus' (THERAGE Kévin)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Changing messenger bus id from 'message_bus' to 'messenger.default_bus'

Changing messenger bus tag from 'message_bus' to 'messenger.message_bus'

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

All is in the title.
This PR change the tag of the default bus from 'message_bus' to 'messenger.message_bus'.

Commits
-------

3cee1cac12 #30690 - Changing messenger bus id from 'message_bus' to 'messenger.default_bus'
2019-04-01 16:50:37 +02:00
Alex Rock Ancelet
2f8040ee84 Create new PHPUnit assertions for the WebTestCase 2019-04-01 16:44:23 +02:00
Fabien Potencier
b921076df4 bug #30805 [Messenger] bug fixes in Doctrine Transport (vincenttouzet)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] bug fixes in Doctrine Transport

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

Just tested the new Doctrine transport and I've see 3 bugs so far :
- [x] The message is not return by the transport
- [x] The headers column must be of type TEXT and not just STRING
- [ ] When using the PhpSerializer the message is truncated (PR: https://github.com/symfony/symfony/pull/30814)

The body in database looks like this :
```
O:36:"Symfony\Component\Messenger\Envelope":2:{s:44:"
```

The body given by the serializer is the following :
```
O:36:"Symfony\Component\Messenger\Envelope":2:{s:44:"Symfony\Component\Messenger\Envelopestamps";a:3:{s:49:"Symfony\Component\Messenger\Stamp\SerializerStamp";a:1:{i:0;O:49:"Symfony\Component\Messenger\Stamp\SerializerStamp":1:{s:58:"Symfony\Component\Messenger\Stamp\SerializerStampcontext";a:0:{}}}s:46:"Symfony\Component\Messenger\Stamp\BusNameStamp";a:1:{i:0;O:46:"Symfony\Component\Messenger\Stamp\BusNameStamp":1:{s:55:"Symfony\Component\Messenger\Stamp\BusNameStampbusName";s:21:"messenger.bus.default";}}s:43:"Symfony\Component\Messenger\Stamp\SentStamp";a:1:{i:0;O:43:"Symfony\Component\Messenger\Stamp\SentStamp":2:{s:56:"Symfony\Component\Messenger\Stamp\SentStampsenderClass";s:64:"Symfony\Component\Messenger\Transport\Doctrine\DoctrineTransport";s:56:"Symfony\Component\Messenger\Stamp\SentStampsenderAlias";s:16:"environment.stop";}}}s:45:"Symfony\Component\Messenger\Envelopemessage";O:34:"App\Message\EnvironmentStopMessage":1:{s:51:"App\Message\AbstractEnvironmentMessageenvironment";O:22:"App\Entity\Environment":5:{s:26:"App\Entity\Environmentid";s:36:"3bade252-b7a9-4188-82bd-3e68129e0da7";s:37:"App\Entity\EnvironmentrepositoryUrl";s:6:"string";s:30:"App\Entity\Environmentbranch";s:6:"string";s:33:"App\Entity\EnvironmenthostNames";a:1:{i:0;N;}s:27:"App\Entity\Environmentenv";a:2:{s:7:"APP_ENV";s:4:"prod";s:7:"APP_VAR";s:13:"example value";}}}}
```

Commits
-------

27466498d0 [Messenger] Fix get in Doctrine Transport
2019-04-01 16:43:38 +02:00
Fabien Potencier
1a5ab6b750 bug #30814 [Messenger] base64_encoding inside PhpSerializer to avoid null characters (weaverryan)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] base64_encoding inside PhpSerializer to avoid null characters

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

Hi!

As pointed out in #30805, the `PhpSerializer` creates strings with null bytes. This apparently causes problems on at least some database systems (I didn't notice, but @vincenttouzet did). I also read that, for example, SQS doesn't like null characters. And, in general, because we're sending this data over a transport, `base64_encoding` data is pretty standard.

Does anyone see any downsides?

Cheers!

Commits
-------

fe7ad812c7 base64_encoding inside PhpSerializer to avoid null characters
2019-04-01 16:41:45 +02:00
Fabien Potencier
29b48141ce minor #30816 Re-generate icu 64.1 data (jakzal)
This PR was merged into the 4.2 branch.

Discussion
----------

Re-generate icu 64.1 data

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? |no <!-- 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 | https://github.com/symfony/symfony/pull/30781#issuecomment-478468287
| License       | MIT
| Doc PR        | -

Commits
-------

6fb2c8668b Re-generate icu 64.1 data
2019-04-01 16:37:38 +02:00
Fabien Potencier
643e9f6b9d minor #30815 [Process] Added more detail to the exception when the CWD is invalid (lyrixx)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Process] Added more detail to the exception when the CWD is invalid

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

---

When using panther with "special" directory structure, the message is
not really usefull. Let's add the CWD to the exception

Commits
-------

d27858f77b [Process] Added more detail to the exception when the CWD is invalid
2019-04-01 16:24:06 +02:00
Fabien Potencier
bdfeb575bb minor #30817 [Config] Improve PHPdoc / IDE autocomplete for config tree builder (Koc)
This PR was merged into the 4.2 branch.

Discussion
----------

[Config] Improve PHPdoc / IDE autocomplete for config tree builder

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

follow up of #27476 and #21047

Commits
-------

21f797714e Improve PHPdoc / IDE autocomplete for config tree builder
2019-04-01 16:21:40 +02:00
Jakub Zalas
6fb2c8668b
Re-generate icu 64.1 data 2019-04-01 15:13:08 +01:00
Fabien Potencier
c8670ee6ca feature #30810 [Inflector] remove "internal" marker from the component (nicolas-grekas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Inflector] remove "internal" marker from the component

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

This code works: making it non-internal won't increase the maintenance burden and can help others build on it.

Commits
-------

164b45b79c [Inflector] remove "internal" marker from the component
2019-04-01 16:12:23 +02:00
Konstantin Myakshin
21f797714e
Improve PHPdoc / IDE autocomplete for config tree builder 2019-04-01 17:03:25 +03:00
Nicolas Grekas
164b45b79c [Inflector] remove "internal" marker from the component 2019-04-01 15:53:46 +02:00
Grégoire Pineau
d27858f77b [Process] Added more detail to the exception when the CWD is invalid 2019-04-01 15:29:45 +02:00
Ryan Weaver
fe7ad812c7 base64_encoding inside PhpSerializer to avoid null characters 2019-04-01 08:36:54 -04:00
THERAGE Kévin
3cee1cac12 #30690 - Changing messenger bus id from 'message_bus' to 'messenger.default_bus' 2019-04-01 14:33:42 +02:00
Fabien Potencier
81955dfac9 minor #30811 [Bridge][Twig] DebugCommand - fix escaping and filter (SpacePossum)
This PR was merged into the 4.2 branch.

Discussion
----------

[Bridge][Twig] DebugCommand - fix escaping and filter

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

cherry-pick on 4.2, conflicts resolved, original PR  https://github.com/symfony/symfony/pull/30660#issuecomment-478468584

Commits
-------

b7120c5e49 [Bridge][Twig] DebugCommand - fix escaping and filter
2019-04-01 14:12:35 +02:00
SpacePossum
b7120c5e49 [Bridge][Twig] DebugCommand - fix escaping and filter 2019-04-01 10:18:15 +02:00
Nicolas Grekas
99684434bc Merge branch '3.4' into 4.2
* 3.4:
  SCA: minor code tweaks
  [Intl] Update the ICU data to 64.1
  [Bridge][Twig] DebugCommand - fix escaping and filter
2019-04-01 09:32:59 +02:00
Nicolas Grekas
4f94b1769b minor #30653 SCA: minor code tweaks (kalessil)
This PR was merged into the 3.4 branch.

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
- drop private properties, which used as local variables

Commits
-------

cc4529db51 SCA: minor code tweaks
2019-04-01 09:09:39 +02:00
Vladimir Reznichenko
cc4529db51 SCA: minor code tweaks 2019-04-01 09:08:40 +02:00
Robin Chalas
9bcea2e9f4 fix test name 2019-03-31 23:15:36 +02:00
Fabien Potencier
5d0fa550df bug #30806 [EventDispatcher] Fix FC layer (bis) (chalasr)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[EventDispatcher] Fix FC layer (bis)

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

2e02986b26 [EventDispatcher] Fix FC layer (really)
2019-03-31 22:54:21 +02:00
Fabien Potencier
4c78b13ce6 minor #30807 [Messenger] Various minor fixes (fabpot)
This PR was squashed before being merged into the 4.3-dev branch (closes #30807).

Discussion
----------

[Messenger] Various minor fixes

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- 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 | n/a
| License       | MIT
| Doc PR        | n/a

Found while playing with the new Doctrine transport.

Commits
-------

96dee1ee20 [Messenger] fixed missing use statement
1044dfb93d [Messenger] simplified code
2019-03-31 22:43:17 +02:00
Robin Chalas
2e02986b26 [EventDispatcher] Fix FC layer (really) 2019-03-31 22:38:00 +02:00