Commit Graph

53524 Commits

Author SHA1 Message Date
Nicolas Grekas
0cbc9cc672 [Console] Add ConsoleCommand attribute for declaring commands on PHP 8 2021-02-18 12:02:40 +01:00
Nicolas Grekas
22c2f1af65 feature #39897 [DependencyInjection] Autoconfigurable attributes (derrabus)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[DependencyInjection] Autoconfigurable attributes

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | N/A
| License       | MIT
| Doc PR        | TODO

Alternative to #39776. Please have a look at that PR as well to see the full discussion.

With this PR, I propose to introduce a way to autoconfigure services by using PHP Attributes. The feature is enabled on all autoconfigured service definitions. The heart of this feature is a new way to register autoconfiguration rules:

```php
$container->registerAttributeForAutoconfiguration(
    MyAttribute::class,
    static function (ChildDefinition $definition, MyAttribute $attribute, \ReflectionClass $reflector): void {
        $definition->addTag('my_tag', ['some_property' => $attribute->someProperty]);
    }
);
```

An example for such an attribute is shipped with this PR with the `EventListener` attribute. This piece of code is a fully functional autoconfigurable event listener:

```php
use Symfony\Component\EventDispatcher\Attribute\EventListener;
use Symfony\Component\HttpKernel\Event\RequestEvent;

#[EventListener]
class MyListener
{
    public function __invoke(RequestEvent $event): void
    {
        // …
    }
}
```

What makes attributes interesting for this kind of configuration is that they can transport meta information that can be evaluated during autoconfiguration. For instance, if we wanted to change the priority of the listener, we can just pass it to the attribute.

```php
#[EventListener(priority: 42)]
```

The attribute itself is a dumb data container and is unaware of the DI component.

This PR provides applications and bundles with the necessary tools to build own attributes and autoconfiguration rules.

Commits
-------

2ab3caf080 [DependencyInjection] Autoconfigurable attributes
2021-02-18 10:17:18 +01:00
Alexander M. Turek
2ab3caf080 [DependencyInjection] Autoconfigurable attributes 2021-02-17 20:42:09 +01:00
Christian Flothmann
f50e6afd7d Merge branch '5.2' into 5.x
* 5.2:
  install compatible versions of mongodb/mongodb only
  fix taking error message from the correct violation
  fix resolving parent/self/static type annotations
  [Console] fix QuestionHelper::getHiddenResponse() not working with space in project directory name
  [WebLink] Escape double quotes in attributes values
  [String] Check if function exists before declaring it
2021-02-17 16:27:35 +01:00
Christian Flothmann
e3b0c8868c Merge branch '4.4' into 5.2
* 4.4:
  install compatible versions of mongodb/mongodb only
  fix resolving parent/self/static type annotations
  [Console] fix QuestionHelper::getHiddenResponse() not working with space in project directory name
  [WebLink] Escape double quotes in attributes values
2021-02-17 16:24:54 +01:00
Nyholm
1a5aec14d7
minor #40222 install compatible versions of mongodb/mongodb only (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

install compatible versions of mongodb/mongodb only

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

Commits
-------

3a231c2030 install compatible versions of mongodb/mongodb only
2021-02-17 16:05:42 +01:00
Christian Flothmann
3a231c2030 install compatible versions of mongodb/mongodb only 2021-02-17 15:20:29 +01:00
Christian Flothmann
b148f8935b bug #40211 [Validator] fix taking error message from the correct violation (xabbuh)
This PR was merged into the 5.2 branch.

Discussion
----------

[Validator] fix taking error message from the correct violation

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

Commits
-------

32cd77aecc fix taking error message from the correct violation
2021-02-17 12:42:45 +01:00
Wouter de Jong
6ae59a9a17 minor #40217 [Security] Fix some broken BC layers (chalasr)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Security] Fix some broken BC layers

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | yes (5.x only)
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

79de1da6ca [Security] Fix some broken BC layers
2021-02-16 22:57:46 +01:00
Robin Chalas
79de1da6ca [Security] Fix some broken BC layers 2021-02-16 20:02:45 +01:00
Christian Flothmann
32cd77aecc fix taking error message from the correct violation 2021-02-16 14:22:25 +01:00
Nicolas Grekas
c1c20860e5 bug #40208 [PropertyInfo] fix resolving self to name of the analyzed class (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[PropertyInfo] fix resolving self to name of the analyzed class

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

Commits
-------

e9f2ece991 fix resolving parent/self/static type annotations
2021-02-16 13:45:38 +01:00
Christian Flothmann
e9f2ece991 fix resolving parent/self/static type annotations 2021-02-16 13:45:26 +01:00
Fabien Potencier
f8ce7d0803 bug #40209 [WebLink] Escape double quotes in attributes values (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[WebLink] Escape double quotes in attributes values

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

If the attribute value contains a double quote, the serialized value is invalid: `</foo>; rel="alternate"; title="foo " bar"`. Ideally we would use `addcslashes` but we can't because users that already pass escaped values would then be impacted.

Commits
-------

7946be2b95 [WebLink] Escape double quotes in attributes values
2021-02-16 13:01:27 +01:00
Robin Chalas
9230f69106 bug #40192 [Console] fix QuestionHelper::getHiddenResponse() not working with space in project directory name (Yendric)
This PR was submitted for the 5.2 branch but it was squashed and merged into the 4.4 branch instead.

Discussion
----------

[Console] fix QuestionHelper::getHiddenResponse() not working with space in project directory name

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #40190 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Fixes #40190 to allow spaces in project directory name.

Commits
-------

0e421004eb [Console] fix QuestionHelper::getHiddenResponse() not working with space in project directory name
2021-02-16 12:16:11 +01:00
Yendric
0e421004eb [Console] fix QuestionHelper::getHiddenResponse() not working with space in project directory name 2021-02-16 12:16:02 +01:00
Thomas Calvet
7946be2b95 [WebLink] Escape double quotes in attributes values 2021-02-16 12:01:18 +01:00
Nicolas Grekas
7dcf156242 bug #40203 [String] Check if function exists before declaring it (Nyholm)
This PR was squashed before being merged into the 5.2 branch.

Discussion
----------

[String] Check if function exists before declaring it

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

If you installed a command line tool like `psalm` with composer and then try to run it on a project that included the String component you will get an error like:

> Fatal error: Cannot redeclare Symfony\Component\String\u() (previously declared in /Workspace/symfony/src/Symfony/Component/String/Resources/functions.php:14) in /user/.composer/vendor/symfony/string/Resources/functions.php on line 14

That is because we are loading two installations of the string component.

Commits
-------

cc00e0eb78 [String] Check if function exists before declaring it
2021-02-16 11:20:41 +01:00
Nyholm
cc00e0eb78 [String] Check if function exists before declaring it 2021-02-16 11:20:28 +01:00
Nicolas Grekas
4d91b8f5c2 feature #39804 [DependencyInjection] Add #[Autoconfigure] to help define autoconfiguration rules (nicolas-grekas)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[DependencyInjection] Add `#[Autoconfigure]` to help define autoconfiguration rules

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

Being inspired by the discussion with @derrabus in #39776.

This PR allows declaring autoconfiguration rules using an attribute on classes/interfaces, eg:
`#[Autoconfigure(bind: ['$foo' => 'bar'], tags: [...], calls: [...])]`

This should typically be added on a base class/interface to tell *how* implementations of such a base type should be autoconfigured. The attribute is parsed when autoconfiguration is enabled, except when a definition has the `container.ignore_attributes` tag, which allows opting out from this behavior.

As usual, the corresponding rules are applied only to services that have autoconfiguration enabled.

In practice, this means that this enables auto-tagging of all implementations of this interface:
```php
#[Autoconfigure(tags: ['my_tag'])]
interface MyInterface {...}
```

Of course, all auto-configurable settings are handled (calls, bindings, etc.)

This PR adds another attribute: `#[AutoconfigureTag()]`.

It extends `#[Autoconfigure]` and allows for specifically defining tags to attach by autoconfiguration.

The name of the tag is optional and defaults to the name of the tagged type (typically the FQCN of an interface). This should ease with writing locators/iterators of tagged services.

```php
#[AutoconfigureTag()]
interface MyInterface {...}
```

Commits
-------

64ab6a2850 [DependencyInjection] Add `#[Autoconfigure]` to help define autoconfiguration rules
2021-02-16 11:14:56 +01:00
Nicolas Grekas
857cf336a1 Merge branch '5.2' into 5.x
* 5.2:
  Ignore indirect deprecation triggered by doctrine/orm
  Symfony Armenian Translations
  [Translation] Allow using dashes in locale when linting Xliff files
  use the right context for properties defined in traits
2021-02-16 11:14:08 +01:00
Nicolas Grekas
00b4b76460 Merge branch '4.4' into 5.2
* 4.4:
  Ignore indirect deprecation triggered by doctrine/orm
  Symfony Armenian Translations
  [Translation] Allow using dashes in locale when linting Xliff files
  use the right context for properties defined in traits
2021-02-16 11:13:48 +01:00
Nicolas Grekas
64ab6a2850 [DependencyInjection] Add #[Autoconfigure] to help define autoconfiguration rules 2021-02-16 11:05:17 +01:00
Nicolas Grekas
08c789c97b minor #40206 Ignore indirect deprecation triggered by doctrine/orm (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

Ignore indirect deprecation triggered by doctrine/orm

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

Commits
-------

8530ada94d Ignore indirect deprecation triggered by doctrine/orm
2021-02-16 10:46:56 +01:00
Nicolas Grekas
8530ada94d Ignore indirect deprecation triggered by doctrine/orm 2021-02-16 10:34:45 +01:00
Fabien Potencier
c54bfb779c feature #40174 [Mailer] AWS SES transport Source ARN header support (chekalsky)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[Mailer] AWS SES transport Source ARN header support

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        | need help (this part was never mentioned in docs)

AWS SES API has [FromEmailAddressIdentityArn](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html#SES-SendEmail-request-FromEmailAddressIdentityArn) field which is necessary for using identities verified by different AWS account.

With this PR I am adding ability to set this field via setting `X-SES-SOURCE-ARN` header.

I've added support for this API field in the same way as it was done before for `X-SES-CONFIGURATION-SET`. It was never documented, but you can use header `X-SES-CONFIGURATION-SET` to set `ConfigurationSetName` API param.

Commits
-------

d7225db7d5 [Mailer] AWS SES transport Source ARN header support
2021-02-16 08:13:33 +01:00
Ilya Chekalsky
d7225db7d5 [Mailer] AWS SES transport Source ARN header support 2021-02-16 08:13:27 +01:00
Fabien Potencier
89d70970a9 minor #39809 Symfony Armenian Translations (azatyan, Nyholm)
This PR was submitted for the 5.x branch but it was squashed and merged into the 4.4 branch instead.

Discussion
----------

Symfony Armenian Translations

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #38724
| License       | MIT
| Doc PR        |  -

Commits
-------

93fe4a213e Symfony Armenian Translations
2021-02-16 08:10:23 +01:00
Tigran Azatyan
93fe4a213e Symfony Armenian Translations 2021-02-16 08:10:14 +01:00
Fabien Potencier
1262b060e7 feature #38473 [Framework] Add tag assets.package to register asset packages (GromNaN)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Framework] Add tag assets.package to register asset packages

Replaces #38366

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | symfony/symfony-docs#14962

To configure asset packages in an application, we have to declare it in the `framework` configuration ([doc for assets config](https://symfony.com/doc/current/reference/configuration/framework.html#assets)). In some case we cannot use this configuration:
- To use a custom class as package
- To register an asset package in a shared bundle (my use-case).

This PR adds the `assets.package` tag. This tag is use to collect and inject package services into the `assets.packages` service, that is the registry for all packages. Since every package needs a name, the `package` attribute of the tag is used (same naming convention that the `console.command` tag).

Main changes:
- the packages defined in the `framework.assets` configuration are injected into the `assets.packages` using the tag instead of being directly injected in service declaration.
- changed signature of `Symfony\Components\Assets\Packages` constructor to accept an iterator (backward compatible).
- a new alias `assets._default_package` is defined even if assets are not configured.

### Example in `symfony/demo` ([commit](e5e5a8fff0...GromNaN:assets-package-tag)):

In `config/services.yaml`:
```yaml
    avatar.strategy:
        class: Symfony\Component\Asset\VersionStrategy\JsonManifestVersionStrategy
        arguments:
            - '%kernel.project_dir%/public/build/manifest.json'

    avatar.package:
        class:  Symfony\Component\Asset\Package
        arguments:
            - '@avatar.strategy'
            - '@assets.context'
        tags:
            - { name: assets.package, package: avatars }
```

Then we can use the package anywhere
```twig
<img src="{{ asset('anna.jpg', 'avatars') }}">
```

### Alternative using autoconfiguration with a custom class:

With a custom class implementing the `PackageInterface`, the package name can be provided by a the static method `getDefaultPackageName`. Autowiring and autoconfiguration will import the package.

```php
namespace App\Asset;

use Symfony\Component\Asset\PackageInterface;

class AvatarPackage implements PackageInterface
{
    public static function getDefaultPackageName(): string
    {
        return 'avatars';
    }

    // ... Implements the interface
}
```

Commits
-------

6217ff7b6f [Asset] Add tag assets.package to register asset packages
2021-02-16 08:00:54 +01:00
Fabien Potencier
e2b1d9cd5a feature #39399 [Serializer] Allow to provide (de)normalization context in mapping (ogizanagi)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[Serializer] Allow to provide (de)normalization context in mapping

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #39039 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | TODO <!-- required for new features -->

As explained in the linked feature request, this brings the ability to configure context on a per-property basis, using Serializer mapping.

Considering:

```php
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;

class Foo
{
    /**
     * @Serializer\Context({ DateTimeNormalizer::FORMAT_KEY = 'Y-m-d' })
     */
    public \DateTime $date;

    public \DateTime $anotherDate;
}
```

`$date` will be formatted with a specific format, while `$anotherDate` will use the default configured one (or the one provided in the context while calling `->serialize()` / `->normalize()`).

It can also differentiate normalization and denormalization contexts:

```php
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;

class Foo
{
    /**
     * @Serializer\Context(
     *   normalizationContext = { DateTimeNormalizer::FORMAT_KEY = 'Y-m-d' },
     *   denormalizationContext = { DateTimeNormalizer::FORMAT_KEY = \DateTime::COOKIE },
     * )
     */
    public \DateTime $date;
}
```

As well as act differently depending on groups:

```php
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;

class Foo
{
    /**
     * @Serializer\Groups({ "extended" })
     * @Serializer\Context({ DateTimeNormalizer::FORMAT_KEY = \DateTime::RFC3339 })
     * @Serializer\Context(
     *   context = { DateTimeNormalizer::FORMAT_KEY = \DateTime::RFC3339_EXTENDED },
     *   groups = {"extended"},
     * )
     */
    public \DateTime $date;
}
```

The annotation can be repeated as much as you want to handle the different cases.
Context without groups is always applied first, then context for groups are merged in the provided order.
Context provided when calling `->serialize()` / `->normalize()` acts as the defaults for the properties without context provided in the metadata.

XML mapping (see tests) is a lot verbose due to the required structure to handle groups.

Such metadata contexts are also forwarded to name converters, max depth handlers, callbacks, ...

Of course, PHP 8 attributes are also supported:

```php
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;

class Foo
{
    #[Serializer\Groups(["extended"])]
    #[Serializer\Context([DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339])]
    #[Serializer\Context(
      context: [DateTimeNormalizer::FORMAT_KEY => \DateTime::RFC3339_EXTENDED],
      groups: ["extended"],
    )]
    public \DateTime $date;
}
```

The PR should be ready for first batch of reviews / discussions.

- [x] Make Fabbot happy in 5.2
- [x] Missing `@Context` unit tests
- [x] rework xml & phpize values
- [x] Fix lowest build issue with annotations => bumped doctrine annotations to 1.7, as for other components

Commits
-------

7229fa1d8f [Serializer] Allow to provide (de)normalization context in mapping
2021-02-16 07:56:07 +01:00
Maxime Steinhausser
7229fa1d8f [Serializer] Allow to provide (de)normalization context in mapping 2021-02-16 07:56:01 +01:00
Fabien Potencier
1b358fef04 bug #40175 [PropertyInfo]  use the right context for properties defined in traits (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[PropertyInfo]  use the right context for properties defined in traits

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #28732, #34191
| License       | MIT
| Doc PR        |

Commits
-------

1572491a8a use the right context for properties defined in traits
2021-02-16 07:44:52 +01:00
Fabien Potencier
aa21944d37 bug #40172 [Translation] Allow using dashes in locale when linting Xliff files (localheinz)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Translation] Allow using dashes in locale when linting Xliff files

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | fixes #40170
| License       | MIT
| Doc PR        | n/a

This pull request

* [x] asserts that the `XliffLintCommand` succeeds linting an Xliff file where both the the target language and the locale in the file name use dashes as separators
* [x] adjusts the `XliffLintCommand` to allow using the same value for target language and locale in the corresponding file name

Commits
-------

d106aa3f2d [Translation] Allow using dashes in locale when linting Xliff files
2021-02-16 07:36:55 +01:00
Andreas Möller
d106aa3f2d [Translation] Allow using dashes in locale when linting Xliff files 2021-02-16 07:36:48 +01:00
Robin Chalas
a4c5edc5ff Merge branch '5.2' into 5.x
* 5.2:
  [Workflow] Re-add InvalidTokenConfigurationException for BC
  Fix PHP 8.1 null values
  [Console] Fix PHP 8.1 null error for preg_match flag
  Fix: Article
  Definition::removeMethodCall should remove all matching calls
  [HttpFoundation] Fix typo in exception message
  mark the LazyIterator class as internal
  fix extracting mixed type-hinted property types
  [Worflow] Fixed GuardListener when using the new Security system
  keep valid submitted choices when additional choices are submitted
2021-02-15 19:57:44 +01:00
Robin Chalas
4365af6ce8 Merge branch '4.4' into 5.2
* 4.4:
  Fix PHP 8.1 null values
  [Console] Fix PHP 8.1 null error for preg_match flag
  Fix: Article
  Definition::removeMethodCall should remove all matching calls
  mark the LazyIterator class as internal
  fix extracting mixed type-hinted property types
  keep valid submitted choices when additional choices are submitted
2021-02-15 19:55:04 +01:00
Robin Chalas
70783821db minor #40201 [Workflow] Re-add InvalidTokenConfigurationException for BC (chalasr)
This PR was merged into the 5.2 branch.

Discussion
----------

[Workflow] Re-add InvalidTokenConfigurationException for BC

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

Reverts the BC breaking part of #39671

Commits
-------

b596568db9 [Workflow] Re-add InvalidTokenConfigurationException for BC
2021-02-15 19:16:51 +01:00
Fabien Potencier
1b94d88a28 feature #40202 [Workflow] Deprecate InvalidTokenConfigurationException (chalasr)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Workflow] Deprecate InvalidTokenConfigurationException

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

Commits
-------

6ed759189d [Workflow] Deprecate InvalidTokenConfigurationException
2021-02-15 18:16:52 +01:00
Robin Chalas
6ed759189d [Workflow] Deprecate InvalidTokenConfigurationException 2021-02-15 15:47:12 +01:00
Robin Chalas
b596568db9 [Workflow] Re-add InvalidTokenConfigurationException for BC 2021-02-15 15:36:09 +01:00
Grégoire Pineau
b15bfc45d6 bug #39671 [Worflow] Fixed GuardListener when using the new Security system (lyrixx)
This PR was merged into the 5.2 branch.

Discussion
----------

[Worflow] Fixed GuardListener when using the new Security system

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

Commits
-------

bd26a79461 [Worflow] Fixed GuardListener when using the new Security system
2021-02-15 15:23:01 +01:00
Christian Flothmann
4ee48c44e5 minor #40180 Fix: Article (localheinz)
This PR was merged into the 4.4 branch.

Discussion
----------

Fix: Article

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

This pull request

* [x] fixes usages of the indefinite article `a` where `an` should be used instead

Commits
-------

34b320ba97 Fix: Article
2021-02-15 12:26:08 +01:00
Christian Flothmann
e62ef2adb7 bug #40187 [Console] Fix PHP 8.1 null error for preg_match flag (kylekatarnls)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Fix PHP 8.1 null error for preg_match flag

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

Since PHP 8.1, `null` is no longer accepted as `$flags` in `preg_match`, default integer `0` value should be used instead.

Commits
-------

52f02e529a [Console] Fix PHP 8.1 null error for preg_match flag
2021-02-15 12:24:13 +01:00
Christian Flothmann
0574c1586a bug #39659 [Form] keep valid submitted choices when additional choices are submitted (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Form] keep valid submitted choices when additional choices are submitted

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

Commits
-------

85989c3678 keep valid submitted choices when additional choices are submitted
2021-02-15 12:22:00 +01:00
Alexander M. Turek
eab91556a6 bug #40188 [HttpFoundation] Fix PHP 8.1 null values (kylekatarnls)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Fix PHP 8.1 null values

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

Both `stripos` and `preg_match` will no longer accept `null` on PHP >= 8.1

Commits
-------

419e2206f4 Fix PHP 8.1 null values
2021-02-15 10:10:23 +01:00
Christian Flothmann
1572491a8a use the right context for properties defined in traits 2021-02-15 10:02:53 +01:00
Kyle
419e2206f4
Fix PHP 8.1 null values
Both `stripos` and `preg_match` will no longer accept `null` on PHP >= 8.1
2021-02-14 19:51:53 +01:00
Kyle
52f02e529a
[Console] Fix PHP 8.1 null error for preg_match flag
Since PHP 8.1, null is no longer accepted as $flags, default integer `0` value should be used instead.
2021-02-14 19:19:55 +01:00
Fabien Potencier
35a155863c bug #40186 Fix package name (fabpot)
This PR was merged into the 5.3-dev branch.

Discussion
----------

Fix package name

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - 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 5.x.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
-->

Fix Package name as the Bridge is named `SpotHit` and not `Spothit`.

Commits
-------

5f8c736303 Fix package name
2021-02-14 18:36:15 +01:00