This PR was squashed before being merged into the 2.7 branch (closes#20295).
Discussion
----------
Define a GitHub issue template to avoid support questions
We're getting a lot of issues that are in fact support questions. Should we give a try at defining a GitHub Issue template to try to minimize this problem?
The text contents are temporary. This is how they'd look:
![issue_template](https://cloud.githubusercontent.com/assets/73419/19683472/9be02128-9ab2-11e6-90a7-987ddcb49d97.png)
Commits
-------
eeaca5c Define a GitHub issue template to avoid support questions
* 3.2:
[WebProfilerBundle] Fix AJAX panel with fetch requests
Don’t compile when Opcache is not enabled on CLI
DateIntervalType: 'invert' should not inherit the 'required' option
[Form] DateIntervalType: Do not try to translate choices
[TwigBridge] fix constructor args check
Allow simple-phpunit to be used with an HTTP proxy
Minor fixes for 3.2
Fix a web profiler form issue with fields added to the form after the form was built
do not trigger deprecations for valid YAML
Write an exception message in a one heading line
[Workflow] Added missing docblock
[Finder] Refine phpdoc about argument for NumberComparator
Fixed max width from ajax request url element (td)
Fix unresolved parameters from default bundle configs in debug:config
[github] Tweak PR template
[Serializer] Optimize max depth checking
* 3.1:
Write an exception message in a one heading line
[Finder] Refine phpdoc about argument for NumberComparator
Fixed max width from ajax request url element (td)
Fix unresolved parameters from default bundle configs in debug:config
[github] Tweak PR template
[Serializer] Optimize max depth checking
* 2.8:
Write an exception message in a one heading line
[Finder] Refine phpdoc about argument for NumberComparator
Fix unresolved parameters from default bundle configs in debug:config
[github] Tweak PR template
* 2.7:
Write an exception message in a one heading line
[Finder] Refine phpdoc about argument for NumberComparator
Fix unresolved parameters from default bundle configs in debug:config
[github] Tweak PR template
This PR was squashed before being merged into the 3.3-dev branch (closes#20197).
Discussion
----------
[WebProfilerBundle] Improve Ajax Profiling Performance (javascript)
| Q | A |
| --- | --- |
| Branch? | master |
| Bug fix? | kinda (is bad performance a bug?) |
| New feature? | kinda (is increased performance a feature?) |
| BC breaks? | no (unless performance is a BC break) |
| Deprecations? | no |
| Tests pass? | do we have JS tests? |
| Fixed tickets | #20155 |
| License | MIT |
| Doc PR | n/a |
The old version of this JS re-rendered the entire list of ajax calls which was causing some performance issues when people had high numbers of ajax requests (increasingly common as people create SPAs.
This PR changes the behavior of the ajax profiler to be more smart about the DOM manipulations it makes. Instead of re-rendering the entire list, on any AJAX requests/responses, it instead adds the row to the profiler when an AJAX request is made, adding the DOM node as a property of the request on the requestStack. When the AJAX response comes back, it updates the existing DOM node instead of re-creating it (and all of the others).
I've tested this on my machine using a modern version of chrome. I don't think I'm doing anything fancy, so I think the likelihood that I broke something is minimal.
I've left a couple of the commits separate, because they represent distinct ideas. The first commit is just some consistency/cleanup. The second commit is the meat of the work. Its diff is basically useless since I've added two new functions and modified one function heavily. I tried to make the diff as easy to read as possible, but it's still pretty rough. The third commit removes some functions/calls that I don't think need to be there now that this is re-written, but I wanted to leave them in a separate commit for ease of revert if they are indeed needed.
Commits
-------
65e391c Replace occurances of querySelectorAll with querySelector
fddff26 Put back the indentation
9942edd Remove unnecessary method calls/definitions
2c053ee Rewrite ajax profiling for performance
da621c9 Fix indentation & JS Cleanup
This PR was squashed before being merged into the 3.3-dev branch (closes#20487).
Discussion
----------
[Console] Disallow inheritance from ProgressBar
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20427
| License | MIT
| Doc PR | ~
Changed `ProgressBar` to `final`, fixed tests.
As explained below, this modification doesn't break BC because inheritance from `ProgressBar` was not possible anyway.
See: https://github.com/symfony/symfony/issues/20427
Commits
-------
a2668f6 [Console] Disallow inheritance from ProgressBar
This PR was merged into the 3.1 branch.
Discussion
----------
[Serializer] Optimize max depth checking
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes/no
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Avoid to call the metadata factory for each attribute when max depth checking is enabled.
Prepare the code for the "serialized name" feature (that also requires metadata) in Symfony 3.3.
Commits
-------
bb3ee76 [Serializer] Optimize max depth checking
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DependencyInjection] Added Yaml syntax shortcut for name-only tags
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | todo
This PR adds a little shorcut for tags without any attributes. There are increasingly more name-only tags in Symfony and having to do `{ name: twig.extension }` for these seems way too verbose to me.
**Before**
```yaml
services:
app.twig_extension:
class: AppBundle\Twig\AppExtension
tags:
- { name: twig.extension }
```
**After**
```yaml
services:
app.twig_extension:
class: AppBundle\Twig\AppExtension
tags: [twig.extension]
# or
# - twig.extension
```
This of course means we introduce a new format to achieve the same goal. I believe this isn't a big problem as the decision is distinctive and simple: If you configure tag attributes, use the long format, otherwise use the short format.
Backwards compatibility
---
In this PR, an exception was removed to allow this new shortcut format. The BC promise doesn't cover exceptions and I think removing the exception here should cause anything to break:
* Applications shouldn't rely on exceptions
* If code was triggering this exception before, it would not cause any behaviour change after this PR: The service just retrieves an unused tag, which is simply ignored by the container.
Commits
-------
7fa8c8a Added Yaml syntax shortcut for name-only tags
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DependencyInjection] Added a shortcut method for autowired definitions
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | todo
This is a simple proposal to make adding autowired definitions to the `ContainerBuilder` a little easier. Registering autowired services in PHP code was quite verbose at the moment, while the whole point of autowiring is quick service registration.
**Before**
```php
$container->register('app.twig_extension', AppExtension::class)
->setAutowired(true)
->addTag('twig.extension')
;
```
**After**
```php
$container->autowire('app.twig_extension', AppExtension::class)
->addTag('twig.extension')
;
```
With https://github.com/symfony/symfony/pull/20264, this will be even nicer:
```php
$container->autowire(AppExtension::class)
->addTag('twig.extension')
;
```
Commits
-------
6ef4ce8 Added a shortcut method for autowired definitions
This PR was squashed before being merged into the 3.3-dev branch (closes#20697).
Discussion
----------
Updated the "PHP config" panel in the profiler
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I propose to update this panel taking some of the ideas introduced by @ro0NL in #20126:
* Adding more info that helps debugging problems (like 32/64 bits, the locale and the timezone)
* Removing anything related to PHP acceleration that is not OPcache or APC
### Before
![php-config-before](https://cloud.githubusercontent.com/assets/73419/20751739/b557ca9a-b6fd-11e6-98c4-49e80b16d424.png)
### After
![php-config-after](https://cloud.githubusercontent.com/assets/73419/20751740/b7da5c38-b6fd-11e6-8619-3d3b5f477887.png)
Commits
-------
531053b Updated the "PHP config" panel in the profiler
This PR was merged into the 3.1 branch.
Discussion
----------
[WebProfilerBundle] Fix AJAX panel width for long URLs
| Q | A
| ------------- | ---
| Branch? | 3.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
When the AJAX url path is very long, the **profile ``<td>``** token value is not fully displayed.
### Before
![before](https://cloud.githubusercontent.com/assets/2028198/20801819/16949c88-b7b8-11e6-9186-c350cb0f6868.png)
### After
![after](https://cloud.githubusercontent.com/assets/2028198/20804230/1519a7ec-b7c0-11e6-8ebe-f2ebfa5ab08e.png)
### Other Possible Solutions
1. Fix ``max-width`` from ``.sf-toolbar-block:hover .sf-toolbar-info`` class to ``512px``. (same result but the AJAX panel is a bit longer)
2. Fix ``max-width`` from ``.sf-toolbar-block:hover .sf-toolbar-info`` class to ``none`` or remove it. It would avoid future issues (mainly with third bundles) with children width greater than ``480px``. (Promising) ?
//cc @javiereguiluz
Commits
-------
b0a8f8e Fixed max width from ajax request url element (td)
This PR was merged into the 2.7 branch.
Discussion
----------
[Finder] Refine phpdoc about argument for NumberComparator
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
The most important being the addition of "string" to `Finder::depth()`.
Commits
-------
9b9d339 [Finder] Refine phpdoc about argument for NumberComparator
This PR was merged into the 3.3-dev branch.
Discussion
----------
[FrameworkBundle] Added GlobalVariables::getToken()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony-docs/pull/7191 comments
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/7191
I propose this feature as bug fix in 3.2, since I don't use the PHP templating I forgot to add the method in the `FrameworkBundle`, to keep it align with the `TwigBridge` in https://github.com/symfony/symfony/pull/19991.
Is this acceptable or should it go in master?
Commits
-------
099b848 Added GlobalVariables::getToken()
This PR was merged into the 2.7 branch.
Discussion
----------
Write an exception message in a one heading line
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
It allows quickly `grep`-ing exception messages in console, for example:
```bash
curl localhost/any-path-which-throws-uncaught-exception | grep '<h1>'
```
But it's impossible to use `grep` filter when exception message goes on the next line after `<h1>` tag.
Commits
-------
21925da Write an exception message in a one heading line
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Console] Improve markdown format
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | no
| New feature? | no
| BC breaks? | not sure?
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License | MIT
| Doc PR | reference to the documentation PR, if any
This improves the markdown description for a console application. To make the ouput read more friendly and intuitively (less bloated IMHO).
Before:
Markdown files in https://github.com/symfony/symfony/tree/master/src/Symfony/Component/Console/Tests/Fixtures
After:
Markdown files in https://github.com/ro0NL/symfony/tree/console/markdown/src/Symfony/Component/Console/Tests/Fixtures
Commits
-------
302a19d [Console] Improve markdown format
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Console] Include application name/version in JSON descriptions
| Q | A
| ------------- | ---
| Branch? | "master"
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License | MIT
| Doc PR | reference to the documentation PR, if any
To be consistent with other formats.
Commits
-------
a43e040 [Console] Include application name/version in JSON descriptions
This PR was squashed before being merged into the 3.2 branch (closes#20883).
Discussion
----------
Don’t compile when Opcache is not enabled on CLI
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20878
| License | MIT
This should fix#20878 "Zend OPcache seems to be disabled, can't compile file" when Opcache is enabled, but `opcache.enable_cli` is turned off.
Commits
-------
5222643 Don’t compile when Opcache is not enabled on CLI
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Console] Improve UX on not found namespace/command
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
This improves the DX/UX when you don't remember what a command is called.. Traditionally you get this message saying "command x is ambiguous (Y, Z or 6 more)" and if the one you are looking for is in the 6 more you are out of luck. You then have to run the console without arg again, get 50 commands displayed, then have to scroll up to find which one it is you meant.
With this patch you get all suggestions always, even with description, so you can make an informed decision right away. See before/after on the screenshot below.
![image](https://cloud.githubusercontent.com/assets/183678/21080350/c3d446ea-bfac-11e6-934b-ba3d7c3dd34d.png)
Commits
-------
aae5fb1 Improve UX on not found namespace/command
This PR was squashed before being merged into the 3.2 branch (closes#20877).
Discussion
----------
DateIntervalType: 'invert' should not inherit the 'required' option
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20876
| License | MIT
| Doc PR | -
As explained in #20876,
> In the DateIntervalType, there is a field, called 'invert', that allows for negative intervals. This is outputted as a checkbox. Which is fine, but it shouldn't be required.
Commits
-------
b1597f1 DateIntervalType: 'invert' should not inherit the 'required' option
This PR was merged into the 3.3-dev branch.
Discussion
----------
[Finder] Deprecate ExceptionInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
This interface was missed in https://github.com/symfony/symfony/pull/15805, and should have been removed in 3.0.
Ideally, the component should have such an interface, though, as other components does. But the only domain exception in this component is an `AccessDeniedException` used by the `RecursiveDirectoryIterator`. So it isn't worth it right now.
I think this interface was almost internal actually, but anyway the `\Symfony\Component\Finder\Adapter\AdapterInterface` interface does not exist anymore. So the `ExceptionInterface::getAdapter()` signature cannot be satisfied anyway. I guess anyone relying on this interface in any way should have notice that and removed anything related to Symfony Finder's adapters when upgrading to 3.0.
Should we consider removing it directly in the 3.1 branch instead?
Commits
-------
1b600b0 [Finder] Deprecate ExceptionInterface
This PR was merged into the 3.2 branch.
Discussion
----------
[Form] DateIntervalType: Do not try to translate choices
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
When using choice widgets, the form type should not try to translate each options, otherwise, you'll get something like this:
<img width="150" alt="screenshot 2016-12-12 a 23 37 09" src="https://cloud.githubusercontent.com/assets/2211145/21119721/25411620-c0c4-11e6-9848-95393d1d21c4.PNG">
<img width="1075" alt="screenshot 2016-12-12 a 23 37 23" src="https://cloud.githubusercontent.com/assets/2211145/21119722/2543ccf8-c0c4-11e6-9842-ae84dc895a0b.PNG">
Commits
-------
b6831d2 [Form] DateIntervalType: Do not try to translate choices
This PR was merged into the 3.2 branch.
Discussion
----------
[Yaml] do not trigger deprecations for valid YAML
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19874
| License | MIT
| Doc PR |
Commits
-------
1436349 do not trigger deprecations for valid YAML
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle] Fix unresolved parameters from default configs in debug:config
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
When using the `debug:config` command, if the dumped configuration is explicitly defined by the user, then parameters are properly resolved in the output. If it is not, and values come from the bundle default configuration directly, they are not.
Steps to reproduce:
- Checkout the symfony demo
- Run `debug:config twig`
- Look at the `debug` key, it is the `kernel.debug` parameter properly resolved: `true`
- Look at the `cache` key, it is not resolved: `'%kernel.cache_dir%/twig'`
This fixes it by resolving the configs once again after processing the configuration.
ping @weaverryan
Commits
-------
26f588a Fix unresolved parameters from default bundle configs in debug:config
This PR was merged into the 3.2 branch.
Discussion
----------
Allow simple-phpunit to be used with an HTTP proxy
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | no
The title pretty much sums it up. I had to use the script behind a proxy and it did not work well so here is a little fix to take the `http_proxy` environment variable into account when downloading with fopen.
I don't think there needs to be a doc PR associated since this feature should be transparent for the end-user.
Commits
-------
921b646 Allow simple-phpunit to be used with an HTTP proxy