Commit Graph

38245 Commits

Author SHA1 Message Date
Nicolas Grekas
545c360453 [FrameworkBundle] fix test when intl is disabled 2018-09-05 11:38:07 +02:00
Nicolas Grekas
5557e38e2d [PropertyInfo] fix BC break in PropertyInfoPass 2018-09-05 11:02:25 +02:00
Fabien Potencier
0bd1f7538e minor #28367 [DI] Forward Container::reset() to services implementing ResetInterface (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[DI] Forward Container::reset() to services implementing ResetInterface

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

Should help the garbage collector during tests.

Commits
-------

5d26ba1fd6 [DI] Forward Container::reset() to services implementing ResetInterface
2018-09-05 10:58:51 +02:00
Fabien Potencier
14fa58e215 minor #28359 [Dotenv] use array instead of variadic in Dotenv::doLoad() (fmata)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Dotenv] use array instead of variadic in Dotenv::doLoad()

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

According to comments done after merge in #26859.

Commits
-------

f3af2421f4 [Dotenv] use array instead of variadic in Dotenv::doLoad()
2018-09-05 10:57:29 +02:00
Nicolas Grekas
5d26ba1fd6 [DI] Forward Container::reset() to services implementing ResetInterface 2018-09-05 10:53:48 +02:00
Fabien Potencier
e54dd4e600 feature #27981 [TwigBridge] Added template "name" argument to debug:twig command to find their paths (yceruto)
This PR was squashed before being merged into the 4.2-dev branch (closes #27981).

Discussion
----------

[TwigBridge] Added template "name" argument to debug:twig command to find their paths

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

Find the template file (to load by Twig) from a given template name (useful to know which file will be loaded exactly and which ones don't):
![debug-twig-loader-overridden](https://user-images.githubusercontent.com/2028198/42849959-81a8c49a-89f3-11e8-8d93-21581fe606a9.png)
This will also show the overridden files if they exist and the paths corresponding to their namespace.

In addition, the command suggests alternatives if you made a typo (this way you can check your template name quickly):

| namespace typo | template name typo |
| --- | --- |
| ![debug-twig-loader-ns-typo-alt](https://user-images.githubusercontent.com/2028198/42850624-81803e3c-89f6-11e8-8a92-11f09c99d13c.png) | ![debug-twig-loader-typo-alt](https://user-images.githubusercontent.com/2028198/42850644-99571238-89f6-11e8-9cf7-ed9b880f3d81.png) |

<details>
<summary><strong>Other outputs</strong></summary>

Discovering more alternatives:
![debug-twig-loader-not-found-many-alt](https://user-images.githubusercontent.com/2028198/42850815-82a30eb0-89f7-11e8-8d23-530f8ff325bc.png)

Unknown template name:
![debug-twig-loader-not-found](https://user-images.githubusercontent.com/2028198/42850882-d647aad0-89f7-11e8-9735-94149895437f.png)
</details>

## Update
The feature was introduced into `debug:twig` command and the `filter` argument was converted to `--filter` option. The `name` argument is now the first one of the command.

Commits
-------

7ef3d39a4c [TwigBridge] Added template \"name\" argument to debug:twig command to find their paths
2018-09-05 10:33:33 +02:00
Yonel Ceruto
7ef3d39a4c [TwigBridge] Added template \"name\" argument to debug:twig command to find their paths 2018-09-05 10:33:27 +02:00
Fabien Potencier
4ad01a95af feature #28207 [DI] leverage Contracts\Service (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[DI] leverage Contracts\Service

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

Embedding #28206 for now.
This deprecates some generic interfaces from the DI component in favor of the similar ones proposed for `Contracts\Service`.

Commits
-------

87392ab30d [DI] leverage Contracts\Service
2018-09-05 10:20:06 +02:00
Robin Chalas
c3fd60df2c feature #22225 [Console] Support formatted text cutting (ro0NL)
This PR was squashed before being merged into the 4.2-dev branch (closes #22225).

Discussion
----------

[Console] Support formatted text cutting

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

allows cutting a formatted text to a certain width. Actually needed if we want to support max. column widths in tables (see #22156)

```php
$text = 'pre <error>foo bar baz</error> post';
dump('BEFORE');
$output->writeln(wordwrap($output->getFormatter()->format($text), 3, "\n", true), OutputInterface::OUTPUT_RAW);
dump('AFTER');
$output->writeln($output->getFormatter()->format($text, 3), OutputInterface::OUTPUT_RAW);
```
![image](https://cloud.githubusercontent.com/assets/1047696/24519346/19c9b0ca-1585-11e7-8437-0bcfb6fab63e.png)

Commits
-------

09f8ad9 [Console] Support formatted text cutting
2018-09-04 22:10:18 +02:00
Roland Franssen
09f8ad935d [Console] Support formatted text cutting 2018-09-04 22:10:01 +02:00
Nicolas Grekas
87392ab30d [DI] leverage Contracts\Service 2018-09-04 19:12:10 +02:00
Fabien Potencier
25ca59d5e7 feature #28206 [Contracts] Add traits+interfaces from the DI component (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Contracts] Add traits+interfaces from the DI component

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

  * added `Service\ServiceSubscriberInterface` to declare the dependencies of a class that consumes a service locator
 * added `Service\ServiceSubscriberTrait` to implement `Service\ServiceSubscriberInterface` using methods' return types
 * added `Service\ServiceLocatorTrait` to help implement PSR-11 service locators

Commits
-------

675abdcfee [Contracts] Add traits+interfaces from the DI component
2018-09-04 19:05:44 +02:00
Fabien Potencier
7c394e3daa minor #28307 Mark ExceptionInterfaces throwable #2 (ostrolucky)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Mark ExceptionInterfaces throwable #2

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

This has been reverted in beta of 4.1 because of lack of support in prophecy, which has been fixed since then (incl. release). Can be merged again.

References:
https://github.com/symfony/symfony/pull/26702
https://github.com/symfony/symfony/pull/27420
https://github.com/symfony/symfony/issues/27419
https://github.com/phpspec/prophecy/pull/412

ping @dunglas @ciaranmcnulty @dkarlovi @Wirone @teohhanhui @stof @nicolas-grekas @ondrejmirtes

Commits
-------

17c3675226 Mark ExceptionInterfaces throwable
2018-09-04 18:55:13 +02:00
Fabien Potencier
b5d4eafa54 fixed CS 2018-09-04 18:54:09 +02:00
Fabien Potencier
78ecaf381d feature #27456 [LOCK] Add a PdoStore (jderusse)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[LOCK] Add a PdoStore

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

This is an alternative to #25578

Commits
-------

46fe1b0712 Add a PdoStore in lock
2018-09-04 18:52:43 +02:00
Fabien Potencier
2ea27cd211 feature #24297 Feature/doctrine type guesser simple json array support (iluuu1994)
This PR was squashed before being merged into the 4.2-dev branch (closes #24297).

Discussion
----------

Feature/doctrine type guesser simple json array support

Symfony currently supports doctrine/dbal ~2.4 which has support for both `simple_array` and `json_array`:

44cd77f022
2d183acdf0

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

There's technically a small BC break since `simple_array` and `json_array` fields would've been displayed as simple text fields. Is this an acceptable BC break for Symfony 3.4?

Commits
-------

524bc4b039 Feature/doctrine type guesser simple json array support
2018-09-04 18:49:00 +02:00
Ilija Tovilo
524bc4b039 Feature/doctrine type guesser simple json array support 2018-09-04 18:48:51 +02:00
Florent Mata
f3af2421f4 [Dotenv] use array instead of variadic in Dotenv::doLoad() 2018-09-04 17:52:49 +02:00
Fabien Potencier
8f5229f768 feature #26859 [Dotenv] add a flag to allow env vars override (fmata)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Dotenv] add a flag to allow env vars override

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

I choose to use a new parameter in the constructor instead of `populate()` to not add boilerplate code to them who want allow overriding in their current setup. It's just a parameter to add in `Dotenv` creation instead of change or customize the loading of different .env files.

I targeted 4.1 despite the feature freeze because it's a small change but if you don't agree I can change to 4.2.

~~If you accept this PR I will do the doc PR then.~~
doc ready

Commits
-------

228b220495 [Dotenv] add Dotenv::overload() to allow env vars override
2018-09-04 17:26:33 +02:00
Fabien Potencier
4401f2f63b feature #26997 [PropertyInfo] Add an extractor to guess if a property is initializable (dunglas)
This PR was squashed before being merged into the 4.2-dev branch (closes #26997).

Discussion
----------

[PropertyInfo] Add an extractor to guess if a property is initializable

| 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   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | todo

When dealing with value objects, being able to detect if a property can be initialized using the constructor is a very valuable information. It's mandatory to add a proper value object support in API Platform and in the Serializer component.

See api-platform/core#1749 and api-platform/core#1843 for the related discussions, extended use cases and proof of concepts.

This PR adds a new interface to guess if a property can be initialized through the constructor, and an implementation using the reflection (in `ReflectionExtractor`).

Commits
-------

9d2ab9e348 [PropertyInfo] Add an extractor to guess if a property is initializable
2018-09-04 17:17:59 +02:00
Kévin Dunglas
9d2ab9e348 [PropertyInfo] Add an extractor to guess if a property is initializable 2018-09-04 17:17:49 +02:00
Fabien Potencier
bc419fa4c8 feature #27667 [Form][OptionsResolver] Show deprecated options definition on debug:form command (yceruto)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Form][OptionsResolver] Show deprecated options definition on 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
| Doc PR        | -

Next move after https://github.com/symfony/symfony/pull/27277.

It will look like this:

Use `--show-deprecated` option to show form types with deprecated options (example):
![debug_types_with_deprecated_options](https://user-images.githubusercontent.com/2028198/41823977-970c7c98-77d6-11e8-9e97-30dcedc316ac.png)

Use `--show-deprecated` option to show deprecated options of the given form type (example):
![debug_deprecated_options_from_type](https://user-images.githubusercontent.com/2028198/41823980-a4d6bd8e-77d6-11e8-95ed-39926ffd6235.png)

Deprecated option (example):
![debug_deprecated_option_text](https://user-images.githubusercontent.com/2028198/41689091-04e6b7dc-74bd-11e8-87d0-90729eac4bb3.png)

![debug_deprecated_option_json](https://user-images.githubusercontent.com/2028198/41689105-142b5c5c-74bd-11e8-9232-1f30237bcf69.png)

Commits
-------

87c209d741 Show deprecated options definition on debug:form command
2018-09-04 17:16:00 +02:00
Yonel Ceruto
87c209d741 Show deprecated options definition on debug:form command 2018-09-04 09:37:57 -04:00
Fabien Potencier
86f54f3359 feature #27021 [Serializer] Allow to access extra infos in name converters (dunglas)
This PR was squashed before being merged into the 4.2-dev branch (closes #27021).

Discussion
----------

[Serializer] Allow to access extra infos in name converters

| 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

Similar to #27017 and #27020 but for name converters.

ping @meyerbaptiste

Commits
-------

57fe0178c4 [Serializer] Allow to access extra infos in name converters
2018-09-04 15:37:00 +02:00
Kévin Dunglas
57fe0178c4 [Serializer] Allow to access extra infos in name converters 2018-09-04 15:36:54 +02:00
Fabien Potencier
9ad492f312 feature #26923 [FrameworkBundle] Allow user to specify folder for flock (MaksSlesarenko)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] Allow user to specify folder for flock

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

In case multiple applications running on same server allow user to specify folder for flock
example:
```

framework:
   lock:` 'flock://var/flock' # var/flock will be provided as path to flock constructor
   lock: 'flock:///var/flock' # /var/flock will be provided as path to flock constructor
   lock: flock # works as usual, null is provided to constructor and system temp folder is used

```

Commits
-------

244d762400 added ability to specify folder for flock
2018-09-04 12:23:36 +02:00
Fabien Potencier
a37bca4417 feature #25125 [VarDumper] New env var to select the dump format (dunglas)
This PR was squashed before being merged into the 4.2-dev branch (closes #25125).

Discussion
----------

[VarDumper] New env var to select the dump format

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      |  no
| New feature?  |  yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | todo

This PR introduces a new environment variable that can be used to force `dump()` to generate HTML even in CLI, or CLI even in a web context.
It allows to dump large objects when debugging a command, to open the resulting HTML in a browser, and to benefit of the nice JS UI (folded by default, search engine...).

Example usage:

    VAR_DUMPER_FORMAT=html vendor/bin/behat > tmp.html; open -a firefox tmp.html
    VAR_DUMPER_FORMAT=cli vendor/bin/behat > tmp.txt

Commits
-------

536125ac3c [VarDumper] New env var to select the dump format
2018-09-04 11:14:51 +02:00
Kévin Dunglas
536125ac3c [VarDumper] New env var to select the dump format 2018-09-04 11:11:07 +02:00
Fabien Potencier
617c56bf27 fixed CS 2018-09-04 10:45:51 +02:00
Fabien Potencier
8cf28e65b2 feature #28117 [FrameworkBundle] add class description to debug:container command (gimler)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] add class description to debug:container command

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

Our developer finds it useful when the `console debug:container <service>` command print out the class description.

![bildschirmfoto vom 2018-08-02 14-22-17](https://user-images.githubusercontent.com/200904/43583449-d4bf74e4-965f-11e8-8e88-0db8017c5a90.png)

* [x] json
* [x] txt
* [x] xml
* [x] md

Commits
-------

5fc6155225 [FrameworkBundle] add class description to debug:container command
2018-09-04 10:44:47 +02:00
Fabien Potencier
5a63f19bad feature #28270 [Messenger] Uses Symfony Serializer by default for envelope items (sroze)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Uses Symfony Serializer by default for envelope items

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

The original approach was to use `serialize`/`unserialize` for envelope items. It turns out it has limitations (see #28247) and reduces the compatibility with 3rd party systems (see #28164). This pull-request changes the existing mechanism by using Symfony Serializer by default.

It keeps the `serialize`/`unserialize` mechanism to allow users of the experimental component to keep using it in 4.2 and allow to have a non-disruptive upgrade to 4.2.

Commits
-------

9b575ab263 Uses Symfony Serializer by default for envelope items
2018-09-04 10:43:45 +02:00
Fabien Potencier
b91effa619 feature #27935 [FrameworkBundle] [Command] TranslationUpdate change default output to xlf (Alexis BOYER)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] [Command] TranslationUpdate change default output to xlf

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

Simple modification on the default output for the translation: update command to XLIFF (xlf)
It's to be in agreement with the documentation

![image](https://user-images.githubusercontent.com/2004449/42637935-a91dcabc-85ec-11e8-86db-9c8bea5e710b.png)

Link to the documentation :
https://symfony.com/doc/master/translation.html#translation-resource-file-names-and-locations

Commits
-------

137593ec80 [FrameworkBundle] Cmd TranslationUpdate change default output to xlf
2018-09-04 10:41:38 +02:00
Fabien Potencier
a27288a598 fixed CS 2018-09-04 10:29:18 +02:00
Fabien Potencier
7be3bb2d8f feature #28168 Add SameSite cookies to FrameWorkBundle (rpkamp)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Add SameSite cookies to FrameWorkBundle

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes, and added to changelog https://github.com/symfony/symfony/pull/28168/files#diff-276f5b13978c2ce3f555b9603f44801aR21
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27631
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/10202

Uses `session.cookie_samesite` for PHP >= 7.3. For PHP < 7.3 it first
does a session_start(), find the emitted header, changes it, and emits
it again with the value for SameSite added.

I also tried it in a minimal Symfony 4.1 app, and works there too:

![screenshot from 2018-08-08 21-39-10](https://user-images.githubusercontent.com/1059790/43864708-b7437978-9b60-11e8-81dd-b41f1a5afb52.png)

Commits
-------

4091feb693 Add SameSite cookies to FrameWorkBundle
2018-09-04 10:27:39 +02:00
Samuel ROZE
9b575ab263 Uses Symfony Serializer by default for envelope items 2018-09-04 09:24:55 +01:00
Fabien Potencier
2738d00e32 feature #28303 [Process] Add relative path support for PHP_BINARY env var of PhpExecutableFinder (maidmaid)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Process] Add relative path support for PHP_BINARY env var of PhpExecutableFinder

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

At the moment, only the absolute path for PHP_BINARY env var works, for instance :

```
$ PHP_BINARY=/usr/bin/php7.2 php bin/console server:run
[OK] Server listening on http://127.0.0.1:8000

$ PHP_BINARY=php7.2 php bin/console server:run
[ERROR] Unable to find the PHP binary.
```

This PR makes possible the second command.

Commits
-------

52ed9889af Add relative path support for PHP_BINARY env var of PhpExecutableFinder
2018-09-04 10:22:54 +02:00
Nicolas Grekas
675abdcfee [Contracts] Add traits+interfaces from the DI component 2018-09-04 10:20:02 +02:00
Nicolas Grekas
a0e21f8d19 minor #28097 [Cache] leverage Contracts\Cache (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Cache] leverage Contracts\Cache

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

Implementing #28096

Commits
-------

0a1220fd96 [Cache] leverage Contracts\Cache
2018-09-04 10:05:30 +02:00
Nicolas Grekas
0a1220fd96 [Cache] leverage Contracts\Cache 2018-09-04 09:24:06 +02:00
Fabien Potencier
09786044c4 feature #28096 [Contracts] Add Cache contract to extend PSR-6 with tag invalidation, callback-based computation and stampede protection (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Contracts] Add Cache contract to extend PSR-6 with tag invalidation, callback-based computation and stampede protection

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

Let's separate the useful interfaces of the Cache component in Contracts.
This does not include `PruneableInterface`, `MarshallerInterface` nor `*AdapterInterface` because they are too specific to the component.

But `CacheInterface`, `TawAwareCacheInterface` and `ItemInterface` form a nice consistent set of features on top of PSR-6.

Updating the Cache component to use these interfaces will be done in a separate PR so that we can focus on the contract itself here.

Commits
-------

ca6478bbbb [Contracts] Add Cache contract to extend PSR-6 with tag invalidation, callback-based computation and stampede protection
2018-09-04 09:22:33 +02:00
Nicolas Grekas
ca6478bbbb [Contracts] Add Cache contract to extend PSR-6 with tag invalidation, callback-based computation and stampede protection 2018-09-04 09:16:03 +02:00
Fabien Potencier
baad3321f4 feature #27399 [Translation] Added intl message formatter. (aitboudad, Nyholm)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Translation] Added intl message formatter.

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

This PR will replace #20007 and continue the work from the original author.

I've have tried to address all comments made in the original PR.

Commits
-------

2a90931e52 cs
fb30c77659 Be more specific with what exception we catch
b1aa0047fd Only use the default translator if intl extension is loaded
f88153fa22 Updates according to feedback
597a15d7f7 Use FallbackFormatter instead of support for multiple formatters
2aa7181e15 Fixes according to feedback
a325a443ed Allow config for different domain specific formatters
b43fe21997 Add support for multiple formatters
c2b3dc0a90 [Translation] Added intl message formatter.
19e8e69979 use error
940d440e87 Make it a warning
2018-09-04 09:03:37 +02:00
Tobias Nyholm
2a90931e52
cs 2018-09-04 08:58:25 +02:00
Tobias Nyholm
fb30c77659
Be more specific with what exception we catch 2018-09-04 08:42:35 +02:00
Fabien Potencier
68a910f528 feature #28315 [DI] Trigger exception when using '@id' name in parent option (Seb33300)
This PR was squashed before being merged into the 4.2-dev branch (closes #28315).

Discussion
----------

[DI] Trigger exception when using '@id' name in parent option

Same exception [already triggered](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php#L505) on the `decorates` option.

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

Note sure if I should submit this change for master or previous branches...

Commits
-------

1f67db626e [DI] Trigger exception when using '@id' name in parent option
2018-09-04 08:40:05 +02:00
Sébastien ALFAIATE
1f67db626e [DI] Trigger exception when using '@id' name in parent option 2018-09-04 08:39:56 +02:00
Fabien Potencier
cabbf51af4 minor #28295 [VarExporter] optimize dumped code in time and space (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarExporter] optimize dumped code in time and space

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

Let's squeeze some more µs when running exported code.
On a simple case run 100k times with a few objects, I go from 1.8s to 1.5s.
The generated exports are also a bit smaller if it matters.

This works by:
- using local variables instead of manually dealing with a stack
- creating more optimized object hydrators for internal classes

This PR also fixes handling of hard references that are bound to external variables.

Commits
-------

07e90d71d8 [VarExporter] optimize dumped code in time and space
2018-09-04 08:34:59 +02:00
Fabien Potencier
a82b2a78c6 Merge branch '4.1'
* 4.1:
  fixed usage of setUp in tests
  fixed usage of setUp in tests
  fixed usage of setUp in tests
  [travis] minor fix (quater)
2018-09-04 08:30:07 +02:00
Fabien Potencier
1c3d3db496 minor #28349 Fix usage of setUp in tests (4.1) (fabpot)
This PR was merged into the 4.1 branch.

Discussion
----------

Fix usage of setUp in tests (4.1)

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| 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 -->
| License       | MIT

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

d8ba2cd703 fixed usage of setUp in tests
2018-09-04 08:29:30 +02:00
Fabien Potencier
525c98b224 Merge branch '3.4' into 4.1
* 3.4:
  fixed usage of setUp in tests
  fixed usage of setUp in tests
  [travis] minor fix (quater)
2018-09-04 08:28:44 +02:00