Commit Graph

41286 Commits

Author SHA1 Message Date
Ryan Weaver
2df023be46 Updating SyncTransport for recent changes + tests 2019-03-31 11:45:52 -04:00
Fabien Potencier
88042a317a feature #30628 Making the serializer configurable by transport (weaverryan)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Making the serializer configurable by transport

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30293 (already closed, but I don't think this was reasonably possible before)
| License       | MIT
| Doc PR        | TODO - as many of the new messenger PRs will be done at once

Use cases:
* #30293
* Transport A will be consumed by your Symfony app (so native php serialization is cool) but transport B will be consumed by another app, so you want to serialize as JSON
* Upgrading from Symfony 4.2 to 4.3. The change to the `PhpSerialize` means that messages that were sent to the queue on 4.2, will fail on 4.3. The solution is to use the old serializer in your config. This would allow you to make your existing transport use the old serializer, then migrate to a new transport using the new serializer (then remove the old one later).

Thanks!

Commits
-------

ef6f23e8b9 Making the serializer configurable by transport
2019-03-31 16:55:57 +02:00
Ryan Weaver
ef6f23e8b9 Making the serializer configurable by transport 2019-03-31 16:54:31 +02:00
Nicholas Ruunu
49ab2cd9d9 Make MessengerPass less strict when auto-register handlers 2019-03-31 16:44:42 +02:00
Vincent Touzet
88d008c828 [Messenger] Add a Doctrine transport 2019-03-31 16:05:11 +02:00
Fabien Potencier
07276642de fixed typo 2019-03-31 15:49:16 +02:00
Fabien Potencier
dd47fda441 fixed bad merge 2019-03-31 14:18:54 +02:00
Fabien Potencier
460da96f45 feature #30569 [FrameworkBundle][HttpKernel] Provide intuitive error message when a controller fails because it's not registered as a service (moynzzz)
This PR was squashed before being merged into the 4.3-dev branch (closes #30569).

Discussion
----------

[FrameworkBundle][HttpKernel] Provide intuitive error message when a controller fails because it's not registered as a service

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

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Create a very late controller argument value resolver to throw an intuitive error message when controller fails because it is not registered as a service.

Commits
-------

fbfc623b72 [FrameworkBundle][HttpKernel] Provide intuitive error message when a controller fails because it's not registered as a service
2019-03-31 14:12:04 +02:00
Simeon Kolev
fbfc623b72 [FrameworkBundle][HttpKernel] Provide intuitive error message when a controller fails because it's not registered as a service 2019-03-31 14:11:56 +02:00
Robin Chalas
caa0aded89 [EventDispatcher] Fix BC layer 2019-03-31 14:11:52 +02:00
Fabien Potencier
b14d5cd358 feature #26484 [Validator] String normalization options for string-based validators (renan-taranto)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Validator] String normalization options for string-based validators

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

Todo:
- [x] Document the new options
- [x] Update Doc PR

Add trimming options to the string constraints.

Commits
-------

708d759b8d [Validator] String normalization options for string-based validators
2019-03-31 13:55:59 +02:00
Fabien Potencier
6bc2ae4018 feature #30320 [Form][TwigBridge] Add row_attr to form theme (alexander-schranz)
This PR was squashed before being merged into the 4.3-dev branch (closes #30320).

Discussion
----------

[Form][TwigBridge] Add row_attr to form theme

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | waiting for confirmation to implement
| Fixed tickets |
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Currently you need to copy the whole form_row block if you just want to add a class to the form_row div. Instead we could introduce a `row_attr` which can then simple be set the following in the theme e.g.:

```twig
{% block form_row %}
    {% set row_attr = { class: 'form__field' } %}
    {{ parent() }}
{% endblock %}
```

or in php:

```
$builder->add('test', TextType::class, ['row_attr' => ['class' => 'form__field']]);
```

Commits
-------

7ab1b00e02 [Form][TwigBridge] Add row_attr to form theme
2019-03-31 13:48:32 +02:00
Alexander Schranz
7ab1b00e02 [Form][TwigBridge] Add row_attr to form theme 2019-03-31 13:48:18 +02:00
Fabien Potencier
ce24e15775 feature #30371 [OptionsResolver] Add a new method addNormalizer and normalization hierarchy (yceruto)
This PR was squashed before being merged into the 4.3-dev branch (closes #30371).

Discussion
----------

[OptionsResolver] Add a new method addNormalizer and normalization hierarchy

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

### 3rd-party package

<details><summary>Given: (CLICK ME)</summary>
<p>

Generic type:
```php
class FooType extends AbstractType
{
    private $registry;

    public function __construct(ManagerRegistry $registry)
    {
        $this->registry = $registry;
    }

    // buildForm ...

    public function configureOptions(OptionsResolver $resolver): void
    {
        $resolver->setRequired('class');
        $resolver->setDefaults([
            'em' => null,
            'query' => null,
        ]);
        $resolver->setAllowedTypes('em', ['null', 'string']);
        $resolver->setAllowedTypes('query', ['null', 'callable']);

        $resolver->setNormalizer('em', function (Options $options, $em) {
            if (null !== $em) {
                return $this->registry->getManager($em);
            }

            return $this->registry->getManagerForClass($options['class']);
        });

        $resolver->setNormalizer('query', function (Options $options, $query) {
            if (\is_callable($query)) {
                $query = $query($options['em']->getRepository($options['class']));

                if (!$query instanceof Query) {
                    throw new UnexpectedTypeException($query, 'Doctrine\ORM\Query');
                }
            }

            return $query;
        });
    }
}
```
</p>
</details>

### App context

<details><summary>Before (CLICK ME)</summary>
<p>

Normalizing the new allowed value will require to override the parent's normalizer:
```php
class BarType extends AbstractType
{
    private $registry;

    public function __construct(ManagerRegistry $registry)
    {
        $this->registry = $registry;
    }

    // buildForm ...

    public function configureOptions(OptionsResolver $resolver): void
    {
        $resolver->addAllowedTypes('em', 'Doctrine\ORM\EntityManagerInterface');

        $resolver->setNormalizer('em', function (Options $options, $em) {
            if ($em instanceof EntityManagerInterface) {
                return $em;
            }

            if (null !== $em) {
                return $this->registry->getManager($em);
            }

            return $this->registry->getManagerForClass($options['class']);
        });

        $resolver->addAllowedTypes('query', 'string');

        $resolver->setNormalizer('query', function (Options $options, $query) {
            if (\is_callable($query)) {
                $query = $query($options['em']->getRepository($options['class']));

                if (!$query instanceof Query) {
                    throw new UnexpectedTypeException($query, 'Doctrine\ORM\Query');
                }
            }

            if (\is_string($query)) {
                $query = $options['em']->createQuery($query);
            }

            return $query;
        });
    }

    public function getParent()
    {
        return FooType::class;
    }
}
```
</p>
</details>

<details><summary>After (CLICK ME)</summary>
<p>

The new normalizer is added to the stack and it'll receive the previously normalized value or if `forcePrepend = true` the validated value:
```php
class BarType extends AbstractType
{
    // buildForm ...

    public function configureOptions(OptionsResolver $resolver): void
    {
        $resolver->addAllowedTypes('em', 'Doctrine\ORM\EntityManagerInterface');

        $resolver->addNormalizer('em', function (Options $options, $em) {
            if ($em instanceof EntityManagerInterface) {
                return $em;
            }

            return $em;
        }, true); // $forcePrepend = true (3rd argument)

        $resolver->addAllowedTypes('query', 'string');

        $resolver->addNormalizer('query', function (Options $options, $query) {
            if (\is_string($query)) {
                $query = $options['em']->createQuery($query);
            }

            return $query;
        });
    }

    public function getParent()
    {
        return FooType::class;
    }
}
```
</p>
</details>

Commits
-------

cf41254223 [OptionsResolver] Add a new method addNormalizer and normalization hierarchy
2019-03-31 13:47:22 +02:00
Yonel Ceruto
cf41254223 [OptionsResolver] Add a new method addNormalizer and normalization hierarchy 2019-03-31 13:47:13 +02:00
Fabien Potencier
7554cf6f1d feature #27735 [Validator][DoctrineBridge][FWBundle] Automatic data validation (dunglas)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Validator][DoctrineBridge][FWBundle] Automatic data validation

| 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        | https://github.com/symfony/symfony-docs/pull/11132

This feature automatically adds some validation constraints by inferring existing metadata. To do so, it uses the PropertyInfo component and Doctrine metadata, but it has been designed to be easily extendable.

Example:

```php
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 */
class Dummy
{
    /**
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     * @ORM\Column(type="integer")
     */
    public $id;

    /**
     * @ORM\Column(nullable=true)
     */
    public $columnNullable;

    /**
     * @ORM\Column(length=20)
     */
    public $columnLength;

    /**
     * @ORM\Column(unique=true)
     */
    public $columnUnique;
}

$manager = $this->managerRegistry->getManager();
$manager->getRepository(Dummy::class);

$firstOne = new Dummy();
$firstOne->columnUnique = 'unique';
$firstOne->columnLength = '0';

$manager->persist($firstOne);
$manager->flush();

$dummy = new Dummy();
$dummy->columnNullable = 1; // type mistmatch
$dummy->columnLength = '012345678901234567890'; // too long
$dummy->columnUnique = 'unique'; // not unique

$res = $this->validator->validate($dummy);
dump((string) $res);

/*
Object(App\Entity\Dummy).columnUnique:\n
    This value is already used. (code 23bd9dbf-6b9b-41cd-a99e-4844bcf3077f)\n
Object(App\Entity\Dummy).columnLength:\n
    This value is too long. It should have 20 characters or less. (code d94b19cc-114f-4f44-9cc4-4138e80a87b9)\n
Object(App\Entity\Dummy).id:\n
    This value should not be null. (code ad32d13f-c3d4-423b-909a-857b961eb720)\n
Object(App\Entity\Dummy).columnNullable:\n
    This value should be of type string. (code ba785a8c-82cb-4283-967c-3cf342181b40)\n
*/
```

It also works for DTOs:

```php

class MyDto
{
    /** @var string */
    public $name;
}

$dto = new MyDto();
$dto->name = 1; // type error

dump($validator->validate($dto));

/*
Object(MyDto).name:\n
    This value should be of type string. (code ba785a8c-82cb-4283-967c-3cf342181b40)\n
*/
```

Supported constraints currently are:

* `@NotNull` (using PropertyInfo type extractor, so supports Doctrine metadata, getters/setters and PHPDoc)
* `@Type` (using PropertyInfo type extractor, so supports Doctrine metadata, getters/setters and PHPDoc)
* `@UniqueEntity` (using Doctrine's `unique` metadata)
* `@Length` (using Doctrine's `length` metadata)

Many users don't understand that the Doctrine mapping doesn't validate anything (it's just a hint for the schema generator). It leads to usability and security issues (that are not entirely fixed by this PR!!).
Even the ones who add constraints often omit important ones like `@Length`, or `@Type` (important when building web APIs).
This PR aims to improve things a bit, and ease the development process in RAD and when prototyping. It provides an upgrade path to use proper validation constraints.

I plan to make it opt-in, disabled by default, but enabled in the default Flex recipe. (= off by default when using components, on by default when using the full stack framework)

TODO:

* [x] Add configuration flags
* [x] Move the Doctrine-related DI logic from the extension to DoctrineBundle: doctrine/DoctrineBundle#831
* [x] Commit the tests

Commits
-------

2d64e703c2 [Validator][DoctrineBridge][FWBundle] Automatic data validation
2019-03-31 13:41:16 +02:00
Fabien Potencier
6f0863020a bug #30660 [Bridge][Twig] DebugCommand - fix escaping and filter (SpacePossum)
This PR was squashed before being merged into the 3.4 branch (closes #30660).

Discussion
----------

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

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

The PR fixes:
- output escaping was not done for decorated consoles
- filter was not applied when using format json

+ added some tests for paths currently not tested

Commits
-------

7bdb06641d [Bridge][Twig] DebugCommand - fix escaping and filter
2019-03-31 13:33:25 +02:00
SpacePossum
7bdb06641d [Bridge][Twig] DebugCommand - fix escaping and filter 2019-03-31 13:33:18 +02:00
Fabien Potencier
cbbfe84154 minor #30793 [Messenger] Remove the mention of handler in the ReceiverInterface::get phpdoc. (sroze)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Messenger] Remove the mention of handler in the `ReceiverInterface::get` phpdoc.

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

As spotted by @Tobion, we don't have an handler as an argument anymore.

Commits
-------

9c63112d7c Remove the mention of handler in the phpdoc.
2019-03-31 12:26:30 +02:00
Fabien Potencier
3df44f5679 feature #30758 [PropertyAccess] Allow Can Accessor in Property Access (ragboyjr)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[PropertyAccess] Allow Can Accessor in Property Access

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| 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 |
| License       | MIT
| Doc PR        |

- Added ability to support `can` methods in the property access
  in order to be compatible with PropertyInfo component
  which allows for `can` accessors

Commits
-------

a4c95745bb [PropertyAccess] Allow Can Accessor in Property Access
2019-03-31 12:12:59 +02:00
Samuel ROZE
9c63112d7c Remove the mention of handler in the phpdoc. 2019-03-31 11:12:50 +01:00
Fabien Potencier
6d51eaf5fc fixed CS 2019-03-31 12:10:11 +02:00
Fabien Potencier
e92c120f27 feature #30116 [Filesystem] Fix mirroring a directory into itself or in his child with realpath checks (Fleuv, XuruDragon)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Filesystem] Fix mirroring a directory into itself or in his child with realpath checks

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

This this the continuity of #29857 by @Fleuv

Fix a bug while trying to mirror a directory into itself or in a child
Adding handle real path checks when mirroring.

Commits
-------

8011f494d4 Handling relative/absolute path
59437a4af9 Skipping iterations in the mirror() method where the iterated file's path name is equal to the target path
2019-03-31 11:15:35 +02:00
Fabien Potencier
67083b6f93 feature #28879 [Debug] Mimic __toString php behavior in FlattenException (Deltachaos)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Debug] Mimic __toString php behavior in FlattenException

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

The `Symfony\Component\Debug\Exception\FlattenException` object is returned by `Symfony\Component\HttpKernel\DataCollector\ExceptionDataCollector::getException` method, but the docblock of this method indicates that it should return `\Exception` object.

As the `FlattenException` class should behave as much as possible like a php `\Exception` object, it should implement the same methods as `\Exception`.

This PR is adding `__toString` and `getTraceAsString` methods. Those methods are (in my opinion) the most useful methods of a `\Exception` object. A potential use case (where i am stumbled across this inconsistency) is to get the last exception of a request in a `WebTestCase` using the profiler and printing the trace.

Commits
-------

514a1b506c [Debug] Mimic __toString php behavior in FlattenException
2019-03-31 11:12:58 +02:00
Fabien Potencier
47242e36e0 fixed CS 2019-03-31 10:40:49 +02:00
Fabien Potencier
2bd27ffd1b feature #29495 [Ldap] Implement pagination (kevans91)
This PR was squashed before being merged into the 4.3-dev branch (closes #29495).

Discussion
----------

[Ldap] Implement pagination

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yno
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | N/A (cannot test at the moment)
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Implement pagination support in the ExtLdap adapter. In a more abstract sense, other adapters should use a query's pageSize option to determine if pagination is being needed. Pagination is required in some environments that frequently query for more results than the remote server is willing to allow.

BC break was avoided by having Query->getResource() return the first result, if available.

A small hack is included to work around php-ldap failing to reset pagination properly; the LDAP_OPT_SERVER_CONTROLS are sent with every request, whether pagination has been 'reset' by sending a 0-page request or not. This appears to be a php-ldap bug that will need to be addressed there, but we can work-around it for now by doing both: setting the 0-page option *and* unsetting the OID directly. This was resulting in odd results, like queries returning 0 results or returning < server_page_size results for a query that should have returned >= server_page_size.

Commits
-------

b96347485c [Ldap] Implement pagination
2019-03-31 10:40:08 +02:00
Kyle Evans
b96347485c [Ldap] Implement pagination 2019-03-31 10:39:25 +02:00
Fabien Potencier
5e079536c9 [LDAP] fixed typos and CS 2019-03-31 10:31:43 +02:00
Fabien Potencier
22234e331e feature #29448 [Ldap] Entry move support (kevans91)
This PR was squashed before being merged into the 4.3-dev branch (closes #29448).

Discussion
----------

[Ldap] Entry move support

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no (see [1])
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A (see [2])

Add Move support to the ldap EntryManagerInterface and the ExtLdap adapter. This is used to re-parent an entry to another part of the directory. The interface to do so need not be complicated, requiring only the entry to be moved and the parent DN to be moved to.

Underlying implementations may require a 'newrdn' attribute -- this is generally the RDN w.r.t. the immediate parent of the entry, which is easily parsed.

I've attempted to implement it as the rename functionality was originally implemented: adding an interface to be deprecated effective immediately, presumably to allow it to be backported without breaking existing interfaces, and then implementing this interface in the ExtLdap adapter.

[1] I do not have the capacity to run the ldap tests for this locally due to current $work situation; I have no reason to believe this test will fail as written, though. This functionality has been used as currently implemented (against Windows ADS) for some time in my production environment, so it has been functionally tested otherwise.

[2] No doc PR has been created for this feature addition, since it's a minor addition. The LDAP documentation should likely be amended to include rename functionality as well as this.

Commits
-------

32743c850f [Ldap] Entry move support
2019-03-31 10:29:16 +02:00
Kyle Evans
32743c850f [Ldap] Entry move support 2019-03-31 10:29:07 +02:00
Fabien Potencier
c9b8ca631c minor #30788 [Mailer] Remove unneeded catch in ping() (sstok)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Mailer] Remove unneeded catch in ping()

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

The stop() method doesn't throw.

Commits
-------

907adf47e3 [Mailer] Remove unneeded catch in ping()
2019-03-30 17:00:28 +01:00
Fabien Potencier
2fb2508cee Merge branch '3.4' into 4.2
* 3.4:
  [Serializer] Added check of constuctor modifiers to AbstractNormalizer
  [Intl] Simplify the compile binary
  [Routing] Fix routes annotation loading with glob pattern
  Fix hardcoded hotPathTagName
  [Validator] Improve constraint default option check
  [Validator] Fix annotation default for @Count and @Length
  Update composer.json
  Fix getSetMethodNormalizer to correctly ignore the attributes specified in "ignored_attributes"
  Add missing "vi" translations
  add missing German translations
  [Intl] Fix test
  added missing translation
  use behavior instead of behaviour
  [Validator] Translate JSON message to Hungarian
  [Validator] fix sr_Latn translations
  [FrameworkBundle][HttpFoundation] make session service resettable
2019-03-30 16:58:42 +01:00
Sebastiaan Stok
907adf47e3
[Mailer] Remove unneeded catch in ping()
The stop() method doesn't throw
2019-03-30 16:56:09 +01:00
Fabien Potencier
c7c1c3bad9 bug #30784 [Translator] Add resource path to exception message for schema valida… (jschaedl)
This PR was submitted for the master branch but it was merged into the 4.2 branch instead (closes #30784).

Discussion
----------

[Translator] Add resource path to exception message for schema valida…

…tion errors

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

Commits
-------

3ce7f5a5f9 [Translator] Add resource path to exception message for schema validation errors
2019-03-30 16:56:03 +01:00
Jan Schädlich
3ce7f5a5f9 [Translator] Add resource path to exception message for schema validation errors 2019-03-30 16:55:39 +01:00
Fabien Potencier
c128d50196 bug #30787 [Mailer] Fix SMTP support when a message cannot be sent (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Mailer] Fix SMTP support when a message cannot be sent

| 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

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

3d25c1c613 [Mailer] fixed SMTP support when a message cannot be sent
2019-03-30 16:52:03 +01:00
Fabien Potencier
3d25c1c613 [Mailer] fixed SMTP support when a message cannot be sent 2019-03-30 14:46:29 +01:00
Fabien Potencier
086f4a20f7 minor #30786 [Mailer] fix typo (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

[Mailer] fix typo

| 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

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

9cf665f2ea [Mailer] fixed typo
2019-03-30 14:30:35 +01:00
Fabien Potencier
9cf665f2ea [Mailer] fixed typo 2019-03-30 14:28:10 +01:00
Fabien Potencier
f3f1ebc520 minor #30783 Fix author (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Fix author

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

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

827e61f645 fixed author
2019-03-30 13:11:35 +01:00
Fabien Potencier
827e61f645 fixed author 2019-03-30 13:09:36 +01:00
Fabien Potencier
845cf9e271 feature #30741 Add the Mailer component (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Add the Mailer component

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

https://speakerdeck.com/fabpot/mailer

Commits
-------

69b9ee794c added the Mailer component
2019-03-30 12:38:45 +01:00
Fabien Potencier
69b9ee794c added the Mailer component 2019-03-30 09:09:06 +01:00
Fabien Potencier
e3bbf8de11 bug #30720 Fix getSetMethodNormalizer to correctly ignore the attributes specified in "ignored_attributes" (Emmanuel BORGES)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix getSetMethodNormalizer to correctly ignore the attributes specified in "ignored_attributes"

…ed in "ignored_attributes"

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

The GetSetMethodNormalizer class correctly ignores the attributes specified in "ignored_attributes"

Commits
-------

606d8d370d Fix getSetMethodNormalizer to correctly ignore the attributes specified in "ignored_attributes"
2019-03-30 08:48:10 +01:00
Fabien Potencier
760bbd595b feature #30780 Fix some exception previous type hints (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Fix some exception previous type hints

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

follow-up for #30729

Commits
-------

f92efeb429 fixed some exception previous type hints
2019-03-30 08:46:07 +01:00
Fabien Potencier
f92efeb429 fixed some exception previous type hints 2019-03-30 08:40:00 +01:00
Fabien Potencier
2041924587 minor #30779 Remove obsolete code (fabpot)
This PR was merged into the 4.3-dev branch.

Discussion
----------

Remove obsolete code

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

The bug referenced was fixed in 7.0 beta 3 (668ecaa606)

Commits
-------

8d25319783 removed obsolete code
2019-03-30 08:37:12 +01:00
Fabien Potencier
8d25319783 removed obsolete code 2019-03-30 08:32:15 +01:00
Fabien Potencier
e9e2f217a3 feature #30729 [HttpKernel] change $previous argument for HttpException to \Throwable (sGy1980de)
This PR was submitted for the 4.2 branch but it was squashed and merged into the 4.3-dev branch instead (closes #30729).

Discussion
----------

[HttpKernel] change $previous argument for HttpException to \Throwable

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

This will fix #30728 with the suggested solution to change the signature of `HttpException` and all its descendants from `\Exception` to `\Throwable`.

Commits
-------

15cb4754e7 [HttpKernel] change $previous argument for HttpException to \Throwable
2019-03-30 08:30:17 +01:00
Silvio Ginter
15cb4754e7 [HttpKernel] change $previous argument for HttpException to \Throwable 2019-03-30 08:30:07 +01:00