Commit Graph

37890 Commits

Author SHA1 Message Date
Fabien Potencier
25df3e32cb bug #27919 [Form] Improve rendering of file field in bootstrap 4 (apfelbox)
This PR was squashed before being merged into the 4.1 branch (closes #27919).

Discussion
----------

[Form] Improve rendering of `file` field in bootstrap 4

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

Hi 👋

currently adding a file type to a form looks weird in the bootstrap 4 form themes:

```php
$builder
    ->add("pdfFile", FileType::class, [
        "label" => "PDF",
    ]);
```

## Before

### Vertical Form

![2018-07-10 at 21 36](https://user-images.githubusercontent.com/1032411/42533175-6b88e33a-8489-11e8-927a-8e987f362913.png)

### Horizontal Form

![2018-07-10 at 21 37](https://user-images.githubusercontent.com/1032411/42533197-7d45944c-8489-11e8-970f-79b18a273366.png)

## After

### Vertical Form

![2018-07-10 at 21 38](https://user-images.githubusercontent.com/1032411/42533229-8ebe44a8-8489-11e8-94e0-891403063476.png)

### Horizontal Form

![2018-07-10 at 21 38](https://user-images.githubusercontent.com/1032411/42533247-99782db4-8489-11e8-9f66-30a5dccdaa9d.png)

## Things to consider

There are three labels here:

![2018-07-10 at 21 40](https://user-images.githubusercontent.com/1032411/42533370-ecbaf63c-8489-11e8-9be8-1c8c3342c459.png)

1) the actual field label. Here the `$options["label"]` is used.
2) the placeholder. Here `$options["attr"]["placeholder"] ?? ""` is used **new**
3) the label on the button. This is set in CSS actually, on an `::after` attribute.

There isn't much we can do about 3) because there is no inline HTML-way to overwrite the style of a pseudo element. So if the app developer wants to have localization in this field as well, (s)he has to set it in their CSS file [as described in the bootstrap docs](https://getbootstrap.com/docs/4.0/components/forms/#file-browser)

## Todo

- [x] ~~WIP because I haven't managed to get the test suite to run locally yet, so we will debug with Travis 🙌~~  okay, getting them to work is really, really easy, but you just have to get over yourself and do it 🙄

Commits
-------

32ad5d9f9c [Form] Improve rendering of `file` field in bootstrap 4
2018-07-15 09:26:40 +02:00
Jannik Zschiesche
32ad5d9f9c [Form] Improve rendering of file field in bootstrap 4 2018-07-15 09:26:33 +02:00
Fabien Potencier
13a40033da minor #27954 [Form] Fix PHPDoc for FormConfigBuilder $dataClass argument (emodric)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Fix PHPDoc for FormConfigBuilder $dataClass argument

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

`$dataClass` constructor argument of `FormConfigBuilder` obviously allows `null` as its value and it even has a `?string` typehint in `master` branch, so this fixes the PHPDoc typehint to match.

Commits
-------

9854a26981 [Form] Fix PHPDoc for FormConfigBuilder $dataClass argument
2018-07-15 09:24:14 +02:00
Edi Modrić
9854a26981 [Form] Fix PHPDoc for FormConfigBuilder $dataClass argument 2018-07-14 16:42:20 +02:00
Christian Flothmann
ec795cca78 fix compatibility with older Cache versions
FrameworkBundle 4.2 will be compatible with older versions of the Cache
component. In those versions adapters don't implement `ResetInterface`.
For backwards compatibility they still need to be tagged.
2018-07-14 10:12:57 +02:00
Fabien Potencier
eb112a5288 feature #27829 [DoctrineBridge] Inject the entity manager instead of the class metadata factory in DoctrineExtractor (dunglas)
This PR was squashed before being merged into the 4.2-dev branch (closes #27829).

Discussion
----------

[DoctrineBridge] Inject the entity manager instead of the class metadata factory in DoctrineExtractor

| 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? | yes <!-- 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        | n/a

As explained by @stof in https://github.com/symfony/symfony/pull/27735#discussion_r199797412, injecting the `ClassMetadataFactory` directly can lead to issues when resetting the EntityManager.

This PR deprecates this usage and encourages to inject the entity manager directly.

Commits
-------

3aab4a1270 [DoctrineBridge] Inject the entity manager instead of the class metadata factory in DoctrineExtractor
2018-07-13 22:22:21 +02:00
Kévin Dunglas
3aab4a1270 [DoctrineBridge] Inject the entity manager instead of the class metadata factory in DoctrineExtractor 2018-07-13 22:22:15 +02:00
Fabien Potencier
091f9ff386 minor #27940 [Security] Update user phpdoc on tokens (ro0NL)
This PR was squashed before being merged into the 2.8 branch (closes #27940).

Discussion
----------

[Security] Update user phpdoc on tokens

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

As implemented here:

1e16a8b979/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php (L78-L88)

Note IMHO `string|object` is intended, and used consistently elsewhere, e.g.: f80376217d/src/Symfony/Component/Security/Core/Authentication/Token/PreAuthenticatedToken.php (L27)

Commits
-------

7306018a30 [Security] Update user phpdoc on tokens
2018-07-13 22:20:16 +02:00
Roland Franssen
7306018a30 [Security] Update user phpdoc on tokens 2018-07-13 22:20:03 +02:00
Fabien Potencier
7acf16e206 bug #27941 [WebProfilerBundle] Fixed icon alignment issue using Bootstrap 4.1.2 (jmsche)
This PR was merged into the 2.8 branch.

Discussion
----------

[WebProfilerBundle] Fixed icon alignment issue using Bootstrap 4.1.2

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

Hi,

This PR fixes an issue introduced by Bootstrap 4.1.2: it vertically aligns SVG icons in the middle instead of letting it stay at the baseline.

I'm not sure this PR is relevant but, if I'm not the only Bootstrap user, I guess it will be useful to many and it does not break anything: it enforces what should be default.

[Update] Here is the related PR merged into Bootstrap that causes the issue: https://github.com/twbs/bootstrap/pull/25874

[Update 2] Before the fix:

![fix_before](https://user-images.githubusercontent.com/3929498/42696806-966cfc9e-86b9-11e8-90a9-7a6dc18a1809.png)

After the fix:

![fix_after](https://user-images.githubusercontent.com/3929498/42696821-9df8ef22-86b9-11e8-8c6c-62a4afa752a3.png)

Commits
-------

ecef6f1b9b [WebProfilerBundle] Fixed icon alignment issue using Bootstrap 4.1.2
2018-07-13 21:56:11 +02:00
Fabien Potencier
e379146909 minor #27947 Rename Contract to Contracts (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Rename Contract to Contracts

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

To avoid confusions between the composer name and the namespace.

Commits
-------

682836da9c renamed Contract to Contracts
2018-07-13 19:14:30 +02:00
Fabien Potencier
682836da9c renamed Contract to Contracts 2018-07-13 19:06:58 +02:00
jmsche
ecef6f1b9b [WebProfilerBundle] Fixed icon alignment issue using Bootstrap 4.1.2 2018-07-13 16:00:59 +02:00
Kévin Dunglas
aaf7e889f7
Fix tests 2018-07-13 14:52:14 +02:00
Fabien Potencier
1e16a8b979 feature #27093 Add symfony/contracts: a set of abstractions extracted out of the Symfony components (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Add symfony/contracts: a set of abstractions extracted out of the Symfony components

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

A set of abstractions extracted out of the Symfony components.

This is a topic I've been thinking about for a long time. I feel like the time has come for Symfony to publish some abstractions so that people could build on them in a decoupled way.
I've identified interfaces in some components that would greatly benefit from being moved out from the components where they are for now. E.g. #26929 is something that has a broader scope than the Cache component itself.

By putting them in a new `symfony/abstractions` package, we would allow more innovation in the Symfony community, at the abstraction level.

In order to start small, I propose only one interface that gathers a concept that is shared amongst many components already: `ResetInterface`. It would provide a standard `reset()` method, whose purpose is to set an object back to its initial state, allowing it to be reused many times with no side effects/leaks related to its history. By this definition, it could also be autoconfigured (as done here, see update in FrameworkExtension). See wording in the docblock in the attached source code.

Ideally, I'd like this package to provide not only interfaces, by also generic traits, and reference test suites when possible. We could work on adding more abstractions during the 4.2 cycle. WDYT?

## Here is the attached README:

A set of abstractions extracted out of the Symfony components.

Can be used to build on semantics that the Symfony components proved useful - and
that already have battle tested implementations.

Design Principles
-----------------

 * contracts are split by domain, each into their own sub-namespaces;
 * contracts are small and consistent sets of PHP interfaces, traits, normative
   docblocks and reference test suites when applicable, etc.;
 * all contracts must have a proven implementation to enter this repository;
 * they must be backward compatible with existing Symfony components.

FAQ
---

### How to use this package?

The abstractions in this package are useful to achieve loose coupling and
interoperability. By using the provided interfaces as type hints, you are able
to reuse any implementations that match their contracts. It could be a Symfony
component, or another one provided by the PHP community at large.

Depending on their semantics, some interfaces can be combined with autowiring to
seamlessly inject a service in your classes.

Others might be useful as labeling interfaces, to hint about a specific behavior
that could be enabled when using autoconfiguration or manual service tagging (or
any other means provided by your framework.)

### How is this different from PHP-FIG's PSRs?

When applicable, the provided contracts are built on top of PHP-FIG's PSR. We
encourage relying on them and won't duplicate the effort. Still, the FIG has
different goals and different processes. Here, we don't need to seek universal
standards. Instead, we're providing abstractions that are compatible with the
implementations provided by Symfony. This should actually also contribute
positively to the PHP-FIG (from which Symfony is a member), by hinting the group
at some abstractions the PHP world might like to take inspiration from.

### Why isn't this package split into several packages?

Putting all interfaces in one package eases discoverability and dependency
management. Instead of dealing with a myriad of small packages and the
corresponding matrix of versions, you just need to deal with one package and one
version. Also when using IDE autocompletion or just reading the source code, it
makes it easier to figure out which contracts are provided.

There are two downsides to this approach: you may have unused files in your
`vendor/` directory, and in the future, it will be impossible to use two
different sub-namespaces in different major versions of the package. For the
"unused files" downside, it has no practical consequences: their file sizes are
very small, and there is no performance overhead at all since they are never
loaded. For major versions, this package follows the Symfony BC + deprecation
policies, with an additional restriction to never remove deprecated interfaces.

Resources
---------

  * [Documentation](https://symfony.com/doc/current/components/contracts.html)
  * [Contributing](https://symfony.com/doc/current/contributing/index.html)
  * [Report issues](https://github.com/symfony/symfony/issues) and
    [send Pull Requests](https://github.com/symfony/symfony/pulls)
    in the [main Symfony repository](https://github.com/symfony/symfony)

Commits
-------

898203649f Added symfony/contracts: a set of abstractions extracted out of the components
2018-07-13 13:25:15 +02:00
Fabien Potencier
f80376217d bug #27937 [HttpFoundation] reset callback on StreamedResponse when setNotModified() is called (rubencm)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpFoundation] reset callback on StreamedResponse when setNotModified() is called

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

Commits
-------

51a49c7f78 [HttpFoundation] reset callback on StreamedResponse when setNotModified() is called
2018-07-13 13:22:37 +02:00
Fabien Potencier
e2c0239414 bug #27927 [HttpFoundation] Suppress side effects in 'get' and 'has' methods of NamespacedAttributeBag (webnet-fr)
This PR was submitted for the 3.4 branch but it was merged into the 2.8 branch instead (closes #27927).

Discussion
----------

[HttpFoundation] Suppress side effects in 'get' and 'has' methods of NamespacedAttributeBag

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

As @Gemineye reported there was a bug in `get` and `has` methods of NamespacedAttributeBag. These methods accept composite names as an argument (like 'foo/bar' or 'foo/bar/baz') to reach the elements of stored arrays. Up to now these methods erroneously created entries (`->get('foo/bar')` created `['foo' => null]`, `->get('foo/bar/baz')` created `['foo' => ['bar' => null]]`).

Commits
-------

5f59ad4600 suppress side effects in 'get' or 'has' methods of NamespacedAttributeBag
2018-07-13 13:19:23 +02:00
Webnet team
5f59ad4600 suppress side effects in 'get' or 'has' methods of NamespacedAttributeBag 2018-07-13 13:19:15 +02:00
Rubén Calvo
51a49c7f78 [HttpFoundation] reset callback on StreamedResponse when setNotModified() is called 2018-07-13 08:54:27 +02:00
Fabien Potencier
5e28ac3150 minor #27931 [SecurityBundle] fix tests (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[SecurityBundle] fix tests

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

Commits
-------

e69fac4c89 [SecurityBundle] fix tests
2018-07-12 11:49:17 +02:00
Samuel ROZE
ec4b04b2d5 Supports nested "abstract" object while serializing and de-serializing 2018-07-12 09:11:46 +01:00
Christian Flothmann
e69fac4c89 [SecurityBundle] fix tests 2018-07-12 10:05:19 +02:00
Fabien Potencier
20070b72ac feature #27807 Added new methods submitForm and clickLink to Client class (nowiko)
This PR was squashed before being merged into the 4.2-dev branch (closes #27807).

Discussion
----------

Added new methods submitForm and clickLink to Client class

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

Added new methods to BrowserKit/Client to simplify work with links and forms.
Related to https://github.com/symfony/symfony/issues/27627

Commits
-------

e098eddc96 Added new methods submitForm and clickLink to Client class
2018-07-12 09:05:27 +02:00
Viktor Novikov
e098eddc96 Added new methods submitForm and clickLink to Client class 2018-07-12 09:05:20 +02:00
Fabien Potencier
3f663fdfbb minor #27878 improve deprecation messages (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

improve deprecation messages

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

Commits
-------

1657b82c19 improve deprecation messages
2018-07-12 08:18:35 +02:00
Fabien Potencier
3b90bc71c1 minor #27929 [HttpFoundation] Fixed phpdoc for get method of HeaderBag (JanHort)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #27929).

Discussion
----------

[HttpFoundation] Fixed phpdoc for get method of HeaderBag

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

Method `\Symfony\Component\HttpFoundation\HeaderBag::get` return type was declared only as `string|string[]` but there is also possibility of returning of `null` value since the `null` is the default value for second parameter.

Commits
-------

a72f4ecb3a [HttpFoundation] Fixed phpdoc for get method of HeaderBag
2018-07-12 08:13:53 +02:00
Jan Hort
a72f4ecb3a [HttpFoundation] Fixed phpdoc for get method of HeaderBag 2018-07-12 08:13:47 +02:00
Fabien Potencier
10f7dcc5dc bug #27913 [EventDispatcher] Clear orphaned events on reset (acasademont)
This PR was merged into the 4.1 branch.

Discussion
----------

[EventDispatcher] Clear orphaned events on reset

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

When the Orphaned Events feature was added in #24392 it was forgotten to also clear them when the `reset` method on the `TraceableEventDispatcher` is called. This makes the Orphaned Events tab on the Event profiler an evergrowing list when using PHP-PM (or other event loop implementations).

Commits
-------

d3260dfdcd [EventDispatcher] Clear orphaned events on TraceableEventDispatcher::reset
2018-07-12 08:09:16 +02:00
Fabien Potencier
4f1647e6a5 minor #27915 [DependencyInjection] add missing test for #27710 (xabbuh)
This PR was merged into the 4.1 branch.

Discussion
----------

[DependencyInjection] add missing test for #27710

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

Commits
-------

a265caf041 [DependencyInjection] add missing test for #27710
2018-07-12 08:07:56 +02:00
Fabien Potencier
44ce4dd625 bug #27923 [Form/Profiler] Massively reducing memory footprint of form profiling pages... (VincentChalnot)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form/Profiler] Massively reducing memory footprint of form profiling pages...

… by removing redundant 'form' variable from view variables.

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

## Problem
When trying to profile large forms in web profiler, the page can get so big that the memory footprint of the web browser excedes 1Gb making everything unusable and sometimes crashing the browser.

This is especially true for "deep" forms as every node of the form also contains its children in the debugging infos.

## Solution
When removing the "form" view variable that actually contains duplicated contents of everything already displayed in the page, the memory footprint massively decrease making the page usable again even form very complex and deep forms.

By using CutStub, we keep a necessary level of information by providing the information that the variable is indeed here but not directly accessible in the dump.

Commits
-------

5f5077f4fc [Form/Profiler] Massively reducing memory footprint of form profiling pages by removing redundant 'form' variable from view variables.
2018-07-12 08:05:38 +02:00
Fabien Potencier
137753db66 bug #27918 [Console] correctly return parameter's default value on "--" (seschwar)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] correctly return parameter's default value on "--"

Fixes #27916

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

The tests have been adjusted to use a default value different from the one in `A*Input::getParameterOption()`'s signature. This would have detected the bug in the first place and should prevent future regressions.

Commits
-------

d78dcc0615 [Console] correctly return parameter's default value on "--"
2018-07-12 08:01:07 +02:00
Fabien Potencier
c85134c9c1 feature #27879 [Routing] deprecate non string requirement names (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Routing] deprecate non string requirement names

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

Basically, this will help catching wrong `@Route` annotation configurations like the following which can lead to hard to debug issues:

```php
@Route("/{foo}", requirements={"foo", "bar"})
```

Commits
-------

8bb5266553 deprecate non string requirement names
2018-07-11 17:44:02 +02:00
Fabien Potencier
fc41042008 minor #27922 [DependencyInjection] fix typo in ContainerBuilder docblock (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[DependencyInjection] fix typo in ContainerBuilder docblock

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

Commits
-------

559cdb01bd fix typo in ContainerBuilder docblock
2018-07-11 13:22:56 +02:00
Christian Flothmann
559cdb01bd fix typo in ContainerBuilder docblock 2018-07-11 12:26:22 +02:00
Fabien Potencier
df26feaa22 feature #26933 [Console] Add title table (maidmaid)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Console] Add title table

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

Why not just add a title to console tables? Inspired by the famous file manager [Midnight Commander](https://en.wikipedia.org/wiki/Midnight_Commander).

![screenshot from 2018-04-15 20-16-26](https://user-images.githubusercontent.com/4578773/38777361-eb6aaa72-40e9-11e8-8ae4-055fe80272c3.png)

Commits
-------

6bf9eeb14e Add title table
2018-07-11 11:58:49 +02:00
Dany Maillard
6bf9eeb14e Add title table 2018-07-11 11:50:52 +02:00
Vincent Chalnot
5f5077f4fc [Form/Profiler] Massively reducing memory footprint of form profiling pages by removing redundant 'form' variable from view variables. 2018-07-11 11:08:35 +02:00
Nicolas Grekas
898203649f Added symfony/contracts: a set of abstractions extracted out of the components 2018-07-11 10:17:42 +02:00
Christian Flothmann
039c4d4f6b fix typo 2018-07-11 09:48:45 +02:00
Sebastian Schwarz
d78dcc0615 [Console] correctly return parameter's default value on "--"
Fixes #27916
2018-07-10 16:02:11 +02:00
Christian Flothmann
a265caf041 [DependencyInjection] add missing test for #27710 2018-07-10 15:15:49 +02:00
Albert Casdemont
d3260dfdcd [EventDispatcher] Clear orphaned events on TraceableEventDispatcher::reset 2018-07-10 13:02:47 +02:00
Nicolas Grekas
3cfdc9e9d7 minor fixes 2018-07-09 17:54:21 +02:00
Fabien Potencier
a5709ee9ba feature #27697 [ProxyManagerBridge][DI] allow proxifying interfaces with "lazy: Some\ProxifiedInterface" (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[ProxyManagerBridge][DI] allow proxifying interfaces with "lazy: Some\ProxifiedInterface"

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

By adding `<tag name="proxy" interface="Some\ProxifiedInterface" />` to your service definitions, this PR allows generating interface-based proxies.

This would allow two things:
- generating lazy proxies for final classes
- wrapping a service into such proxy to forbid using the methods that are on a specific implementation but not on some interface - the proxy acting as a safe guard.

The generated proxies are always lazy, so that lazy=true/false makes no difference.

As a shortcut, you can also use `lazy: Some\ProxifiedInterface` to do the same (yaml example this time.)

Commits
-------

1d9f1d1b70 [ProxyManagerBridge][DI] allow proxifying interfaces with "lazy: Some\ProxifiedInterface"
2018-07-09 16:47:21 +02:00
Nicolas Grekas
1d9f1d1b70 [ProxyManagerBridge][DI] allow proxifying interfaces with "lazy: Some\ProxifiedInterface" 2018-07-09 16:45:45 +02:00
Fabien Potencier
f20eaf26c2 feature #27645 [Cache] Add MarshallerInterface allowing to change the serializer, providing a default one that automatically uses igbinary when available (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Cache] Add `MarshallerInterface` allowing to change the serializer, providing a default one that automatically uses igbinary when available

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

With this PR, when igbinary is available, it is automatically used to serialize values.
This provides faster and smaller cache payloads.
The unserializing logic is autoadaptative:
- when an igbinary-serialized value is unserialized but the extension is missing, a cache miss is triggered
- when a natively-serialized value is unserialized and the extension is available, the native `unserialize()` is used

Ping @palex-fpt since you provided very useful comments on the topic and might be interested in reviewing here also.

Commits
-------

9c328c4894 [Cache] Add `MarshallerInterface` allowing to change the serializer, providing a default one that automatically uses igbinary when available
2018-07-09 16:39:33 +02:00
Nicolas Grekas
2345d0c2cf [Cache] update docblock of PdoAdapter/PdoCache 2018-07-09 16:30:01 +02:00
Fabien Potencier
cbda6a3c72 feature #27694 [FrameworkBundle][Cache] Allow configuring PDO-based cache pools, with table auto-creation on first use (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle][Cache] Allow configuring PDO-based cache pools, with table auto-creation on first use

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

* Allowed configuring PDO-based cache pools via a new `cache.adapter.pdo` abstract service
* added automatic table creation when using Doctrine DBAL with PDO-based backends

Commits
-------

1484117430 [FrameworkBundle][Cache] Allow configuring PDO-based cache pools, with table auto-creation on first use
2018-07-09 16:21:08 +02:00
Fabien Potencier
254f4c8f7f feature #27774 [FrameworkBundle] allow turning routes to utf8 mode by default (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] allow turning routes to utf8 mode by default

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

This allows building optimized routers that match in a single regexp instead of an alternate of utf8/non-utf8 set of routes.

Commits
-------

8f359cc047 [FrameworkBundle] allow turning routes to utf8 mode by default
2018-07-09 16:14:24 +02:00
Fabien Potencier
10e15dca66 feature #27821 [Process][Console] deprecated defining commands as strings (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Process][Console] deprecated defining commands as strings

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

 * Added the `Process::fromShellCommandline()` static constructor to define shell command-lines
 * Allowed passing commands as `array($process, 'ENV_VAR' => 'value')` to `ProcessHelper::run()`
 * Deprecated passing commands as strings when creating a `Process` instance.
 * Deprecated the `Process::setCommandline()` and the `PhpProcess::setPhpBinary()` methods.
 * Deprecated passing a command as a string to `ProcessHelper::run()`, pass it the command as an array of arguments instead.
 * Made the `ProcessHelper` class final

Commits
-------

8895bc1b5b [Process][Console] deprecated defining commands as strings
2018-07-09 16:07:29 +02:00