This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component
Nicolas Grekas 80aa8dfcfd feature #27503 [Serializer] Allow to pass a single value for the groups opt (dunglas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Serializer] Allow to pass a single value for the groups opt

| 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
| License       | MIT
| Doc PR        | todo

Shortcut syntax similar to #20509 but for the context: allows to pass a string instead of an array of string in the serialization context when only one group if used.

Before:

```php
$serializer->serialize($foo, 'json', ['groups' => ['myGroup']];

/** @ApiResource(normalizationContext={"groups"={"myGroup"}}) */
```

After:

```php
$serializer->serialize($foo, 'json', ['groups' => 'myGroup'];

/** @ApiResource(normalizationContext={"groups"="myGroup") */
```

Commits
-------

5b392030f9 [Serializer] Allow to pass a single value for the groups opt
2018-07-01 08:57:58 +02:00
..
Asset Merge branch '4.1' 2018-05-31 12:18:23 +02:00
BrowserKit Merge branch '4.1' 2018-06-06 11:59:09 +02:00
Cache [Cache] ArrayAdapter and NullAdapter don't need stampede protection 2018-06-28 08:41:11 +02:00
Config feature #27476 [Config] deprecate tree builders without root nodes (xabbuh) 2018-06-25 19:06:32 +02:00
Console Merge branch '4.1' 2018-05-31 12:18:23 +02:00
CssSelector Merge branch '4.1' 2018-05-31 12:18:23 +02:00
Debug Merge branch '4.1' 2018-06-27 23:06:44 +02:00
DependencyInjection Merge branch '4.1' 2018-06-27 23:06:44 +02:00
DomCrawler updated version to 4.2 2018-05-07 16:51:25 +02:00
Dotenv Merge branch '4.1' 2018-05-31 12:18:23 +02:00
EventDispatcher updated version to 4.2 2018-05-07 16:51:25 +02:00
ExpressionLanguage Merge branch '4.1' 2018-06-21 13:18:49 +02:00
Filesystem Merge branch '2.8' into 3.4 2018-06-21 13:10:19 +02:00
Finder Merge branch '4.1' 2018-06-19 23:38:29 +02:00
Form Merge branch '4.1' 2018-06-29 18:29:59 +02:00
HttpFoundation Merge branch '4.1' 2018-06-29 18:29:59 +02:00
HttpKernel Merge branch '4.1' 2018-06-28 10:10:58 +02:00
Inflector updated version to 4.2 2018-05-07 16:51:25 +02:00
Intl Merge branch '4.1' 2018-06-25 13:13:38 +02:00
Ldap Merge branch '4.1' 2018-06-19 23:38:29 +02:00
Lock Merge branch '4.1' 2018-06-29 18:29:59 +02:00
Messenger [Messenger] Fixed MessengerPass::guessHandledClasses return type 2018-06-20 12:25:27 +03:00
OptionsResolver Add ability to deprecate options 2018-05-31 07:26:55 -04:00
Process Merge branch '4.1' 2018-05-31 12:18:23 +02:00
PropertyAccess add property path to exception message when error writing property 2018-06-12 16:19:40 +01:00
PropertyInfo [PropertyInfo] Implement \"Collection\" types in PhpDocExtractor 2018-06-26 18:34:11 +02:00
Routing Merge branch '4.1' 2018-06-28 08:35:46 +02:00
Security Merge branch '4.1' 2018-06-22 10:59:57 +02:00
Serializer feature #27503 [Serializer] Allow to pass a single value for the groups opt (dunglas) 2018-07-01 08:57:58 +02:00
Stopwatch updated version to 4.2 2018-05-07 16:51:25 +02:00
Templating updated version to 4.2 2018-05-07 16:51:25 +02:00
Translation feature #27655 [Translation] Added support for translation files with other filename patterns (javiereguiluz) 2018-06-25 12:22:58 +02:00
Validator Merge branch '4.1' 2018-06-29 18:29:59 +02:00
VarDumper feature #27768 [VarDumper] display the signature of callables (nicolas-grekas) 2018-06-30 10:29:06 +02:00
WebLink updated version to 4.2 2018-05-07 16:51:25 +02:00
Workflow Merge branch '4.1' 2018-05-31 12:18:23 +02:00
Yaml Merge branch '4.1' 2018-05-31 12:18:23 +02:00