This PR was squashed before being merged into the 4.1-dev branch (closes#26647).
Discussion
----------
[Messenger] Add a middleware that wraps all handlers in one Doctrine transaction.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | na
| License | MIT
| Doc PR | coming up
This is greatly inspired by SimpleBus. This middleware will rollback a transaction if the message handler throws an exception.
Commits
-------
623dc5fb16 [Messenger] Add a middleware that wraps all handlers in one Doctrine transaction.
This PR was squashed before being merged into the 4.1-dev branch (closes#26650).
Discussion
----------
[Messenger] Clone messages to show in profiler
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | na
| License | MIT
| Doc PR | na
We should make the profiler page more pretty by using the cloner.
![screen shot 2018-03-23 at 11 08 02](https://user-images.githubusercontent.com/1275206/37823687-816a373a-2e8a-11e8-824e-ac7f96a51e3b.png)
Commits
-------
4d1be87b70 [Messenger] Clone messages to show in profiler
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FrameworkBundle] keep query in redirect
| Q | A
| ------------- | ---
| Branch? | 4.1
| 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 files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26256 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | #9314
<!--
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
-------
406bfc9896 [FrameworkBundle] keep query params in redirection
This PR was merged into the 4.1-dev branch.
Discussion
----------
Add a data_help method in Form
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26331
| License | MIT
| Doc PR | symfony/symfony-docs#9361
Add a form_help method in twig to display a help message in form. A `help` keyword is added to all FormType to define the message.
Commits
-------
585ca28b8a Add return type hint
859ee03785 Revert: remove comment line from twig templates
d723756331 Fix some mistakes
c74e0dc2da Use spaceless balises in Twig templates
8b937ff43f Try without try/catch
32bf1f68ad Test the renderHelp method in all Tests about help to skip them if necessary.
437b77e81a Skip renderHelp test as skipped if not override
d84be700b2 Update composer files
075fcfd07c [FrameworkBundle] Add widgetAtt to formTable/form_row
f1d13a860c Fix Fabpot.io
69ded67643 Added form_help on horizontal design and removed special variable
fd53bc579a Enable aria-described in row for all Templates
98065d38b5 fabpot.io fix
edb95f8e44 Use array long syntax
aada72c5d4 Set help option on nul as default
f948147e38 Rename help id (snake_case)
77fa3178bd Fix Test
30deaa9b28 PSR fix
bf4d08c5ae Add aria-describedBy on input
1f3a15e33b Rename id
058489d7df Add an id to the help
6ea7a2054b Remove vars option from form_help
ba798dfdf4 FrameworkBundle Tests
4f2581d7da Use array long syntax
f15bc79df1 Fix coding standards
c934e496d2 Add test without help set
8094804522 Add Tests
067c681580 Template for table, Foundation and Bootstrap 3
d3e3e492df Fix: check translation domain
2c2c04549f Adapt existant tests
831693ad45 Add trans filter
e311838aed Remove raw filter for help
8b97c1b516 Use a shortcut to acces help var in Twig template
1b89f9d9dd Add a template fot div_layout
c8914f591e Add a data_help method in Form
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Workflow] Add a MetadataStore to fetch some metadata
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes (little)
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #23257
| License | MIT
| Doc PR | TODO
---
This is an attempt to fix#23257. I first started to implement
`Ẁorkflow::getMetadata()`, `Transition::getMetadata()` and
`Place::getMetadata()`. **BUT**, there are no `Place` class. For now it's just a
`string`. So dealing with BC is a nightmare.
So I tried to find another way to fix the issue. [This
comment](https://github.com/symfony/symfony/issues/23257#issuecomment-315551397)
summary well the two options. But this PR is (will be) a mix of theses 2
options.
First it will be possible to configure the workflow/metadata like this:
```yaml
blog_publishing:
supports:
- AppBundle\Entity\BlogPost
metada:
label: Blog publishing
description: Manages blog publishing
places:
draft:
metadata:
description: Blog has just been created
color: grey
review:
metadata:
description: Blog is waiting for review
color: blue
transitions:
to_review:
from: draft
to: review
metadata:
label: Submit for review
route: admin.blog.review
```
I think is very good for the DX. Simple to understand.
All metadata will live in a `MetadataStoreInterface`. If metadata are set via
the configuration (workflows.yaml), then we will use the
`InMemoryMetadataStore`.
Having a MetadataStoreInterface allow user to get dynamic value for a place /
transitions. It's really flexible. (But is it a valid use case ?)
Then, to retrieve these data, the end user will have to write this code:
```php
public function onReview(Event $event) {
$metadataStore = $event->getWorkflow()->getMetadataStore();
foreach ($event->getTransition()->getTos() as $place) {
$this->flashbag->add('info', $metadataStore->getPlaceMetadata($place)->get('description'));
}
}
```
Note: I might add some shortcut to the Event class
or in twig:
```jinja
{% for transition in workflow_transitions(post) %}
<a href="{{ workflow_metadata_transition(post, route) }}">
{{ workflow_metadata_transition(post, transition) }}
</a>
{% endfor %}
```
---
WDYT ?
Should I continue this way, or should I introduce a `Place` class (there will be
so many deprecation ...)
Commits
-------
bd1f2c8583 [Workflow] Add a MetadataStore
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FrameworkBundle] feature: add the ability to search a route
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | #26033
| License | MIT
| Doc PR | symfony/symfony-docs#9236
This add the ability to search a route in the debug:router command.
![img_3271](https://user-images.githubusercontent.com/3451634/36034017-e60cbfda-0db2-11e8-841a-60bc75b0b631.jpeg)
Commits
-------
ef0df02afc [FrameworkBundle] feature: add the ability to search a route
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FrameworkBundle][TwigBridge] make csrf_token() usable without forms
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The Twig function `csrf_token()` is currently only registered when the
Form component is installed. However, this function is also useful, for
example, when creating simple login forms for which you do not need the
full Form component.
Commits
-------
709efa30fc make csrf_token() usable without forms
* 4.0: (32 commits)
[Form] fix tests and deps
[Cache] Rely on mock for Doctrine ArrayCache
[FrameworkBundle] Respect debug mode when warm up annotations
[Console] Fix docblock of DescriptorInterface::describe
[Config] Handle nullable node name + fix inheritdocs
[Security] added userChecker to SimpleAuthenticationProvider
[Debug] fix test
Fix typo in test method name
Fixes#26563 (open_basedir restriction in effect)
[Debug] Reset previous exception handler ealier to prevent infinite loop
add hint in Github pull request template
[Validator] Fix docblock of ClassMetadata#members
[BrowserKit] Fix cookie path handling when $domain is null
[DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore
[BrowserKit] Improves CookieJar::get
[BrowserKit] Fix Cookie's PHPDoc
[DomCrawler] Change bad wording in ChoiceFormField::untick
[DomCrawler] Fix the PHPDoc of ChoiceFormField::setValue
[DomCrawler] Avoid a useless call to strtolower
[FrameworkBundle] HttpCache is not longer abstract
...
* 3.4: (32 commits)
[Form] fix tests and deps
[Cache] Rely on mock for Doctrine ArrayCache
[FrameworkBundle] Respect debug mode when warm up annotations
[Console] Fix docblock of DescriptorInterface::describe
[Config] Handle nullable node name + fix inheritdocs
[Security] added userChecker to SimpleAuthenticationProvider
[Debug] fix test
Fix typo in test method name
Fixes#26563 (open_basedir restriction in effect)
[Debug] Reset previous exception handler ealier to prevent infinite loop
add hint in Github pull request template
[Validator] Fix docblock of ClassMetadata#members
[BrowserKit] Fix cookie path handling when $domain is null
[DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore
[BrowserKit] Improves CookieJar::get
[BrowserKit] Fix Cookie's PHPDoc
[DomCrawler] Change bad wording in ChoiceFormField::untick
[DomCrawler] Fix the PHPDoc of ChoiceFormField::setValue
[DomCrawler] Avoid a useless call to strtolower
[FrameworkBundle] HttpCache is not longer abstract
...
* 2.8: (29 commits)
[Console] Fix docblock of DescriptorInterface::describe
[Config] Handle nullable node name + fix inheritdocs
[Security] added userChecker to SimpleAuthenticationProvider
[Debug] fix test
Fix typo in test method name
Fixes#26563 (open_basedir restriction in effect)
[Debug] Reset previous exception handler ealier to prevent infinite loop
add hint in Github pull request template
[Validator] Fix docblock of ClassMetadata#members
[BrowserKit] Fix cookie path handling when $domain is null
[DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore
[BrowserKit] Improves CookieJar::get
[BrowserKit] Fix Cookie's PHPDoc
[DomCrawler] Change bad wording in ChoiceFormField::untick
[DomCrawler] Fix the PHPDoc of ChoiceFormField::setValue
[DomCrawler] Avoid a useless call to strtolower
[FrameworkBundle] HttpCache is not longer abstract
Php Inspections (EA Ultimate): address some of one-time used local variables
[Intl] Load locale aliases to support alias fallbacks
[CssSelector] Fix CSS identifiers parsing - they can start with dash
...
* 2.7:
[Config] Handle nullable node name + fix inheritdocs
[Security] added userChecker to SimpleAuthenticationProvider
[Debug] fix test
Fix typo in test method name
Fixes#26563 (open_basedir restriction in effect)
[Debug] Reset previous exception handler ealier to prevent infinite loop
add hint in Github pull request template
[Validator] Fix docblock of ClassMetadata#members
[BrowserKit] Fix cookie path handling when $domain is null
[DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore
[BrowserKit] Improves CookieJar::get
[BrowserKit] Fix Cookie's PHPDoc
[DomCrawler] Change bad wording in ChoiceFormField::untick
[DomCrawler] Fix the PHPDoc of ChoiceFormField::setValue
[DomCrawler] Avoid a useless call to strtolower
[FrameworkBundle] HttpCache is not longer abstract
[DomCrawler] extract(): fix a bug when the attribute list is empty
[Config] Backport string|null api for node names
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FrameworkBundle] Allow fetching private services from test clients
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25814
| License | MIT
| Doc PR | -
With this PR, `$client->getContainer()` returns a special container that gives access to private services as if they were public.
Tests derived from `WebTestCase` and `KernelTestCase` can access this special container by using the new `static::$container` property.
Commits
-------
a840809 [FrameworkBundle] Allow fetching private services from test clients
This PR was squashed before being merged into the 4.1-dev branch (closes#26223).
Discussion
----------
[FrameworkBundle] Add command to delete an item from a cache pool
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | TBD
Currently there is no way to clear a specific item from a cache pool (except programatically), the entire pool needs to be cleared.
Especially during development, when implementing caching, it is useful to delete a specific key to test functionality. Clearing the entire pool, means that everything will need to be cached again, adding unnecessary execution time.
I propose adding a new command, `cache:pool:delete` to delete a specific item from a cache pool
Commits
-------
fd43e81 [FrameworkBundle] Add command to delete an item from a cache pool
* 4.0:
[WebProfilerBundle] Fix Debug toolbar breaks app
Use fill instead of style for svg colors
bumped Symfony version to 4.0.6
updated VERSION for 4.0.5
updated CHANGELOG for 4.0.5
bumped Symfony version to 3.4.6
updated VERSION for 3.4.5
updated CHANGELOG for 3.4.5
bumped Symfony version to 2.8.36
updated VERSION for 2.8.35
updated CHANGELOG for 2.8.35
[FrameworkBundle] Silence "Failed to remove directory" on cache:clear
bumped Symfony version to 2.7.43
updated VERSION for 2.7.42
update CONTRIBUTORS for 2.7.42
updated CHANGELOG for 2.7.42
* 3.4:
[WebProfilerBundle] Fix Debug toolbar breaks app
Use fill instead of style for svg colors
bumped Symfony version to 3.4.6
updated VERSION for 3.4.5
updated CHANGELOG for 3.4.5
bumped Symfony version to 2.8.36
updated VERSION for 2.8.35
updated CHANGELOG for 2.8.35
[FrameworkBundle] Silence "Failed to remove directory" on cache:clear
bumped Symfony version to 2.7.43
updated VERSION for 2.7.42
update CONTRIBUTORS for 2.7.42
updated CHANGELOG for 2.7.42
This PR was squashed before being merged into the 4.1-dev branch (closes#26341).
Discussion
----------
Autoconfigure service locator tag
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26187
| License | MIT
| Doc PR | —
We will now also autoconfigure the (required) tag `container.service_locator` for all `ServiceLocator`s.
I couldn't find any integration tests for the whole list of autoconfigured core services, so I didn't add any new tests.
Commits
-------
c4b9b42 Autoconfigure service locator tag