This PR was merged into the 2.7 branch.
Discussion
----------
Don't assume that file binary exists on *nix OS
| 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
Certain lightweight distributions such as Alpine Linux (popular for smaller Docker images) do not include it by default.
Commits
-------
e2c1f24fbd Don't assume that file binary exists on *nix OS
This PR was merged into the 3.4 branch.
Discussion
----------
[Routing] Fix loading multiple class annotations for invokable classes
| 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 | -
The support for full route definition for invokable controllers as class annotation was introduced by
https://github.com/symfony/symfony/pull/2172, but that works with one route only, which is inconsistent with how `@Route` works at other places. This PR adds support for multiple class annotations for invokable controllers and fixes the inconsistency.
<!--
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
-------
2a9c668ad7 [Routing] Fix loading multiple class annotations for invokable classes
This PR was squashed before being merged into the 2.7 branch (closes#26643).
Discussion
----------
Fix that ESI/SSI processing can turn a "private" response "public"
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Under the condition that
* we are merging in at least one *embedded* response,
* all *embedded* responses are `public`,
* the *main* response is `private` and
* all responses use expiration-based caching (note: no `s-maxage` on the *main* response)
... the resulting response will turn to `Cache-Control: public`.
The real issue is that when all responses use expiration-based caching, a combined max age is computed. This is set on the *main* response using `Response::setSharedMaxAge()`, which implicitly sets `Cache-Control: public`.
The fix provided in this PR solves the problem by applying the same logic to the *main* response that is applied for *embedded* responses, namely that responses with `!Response::isCacheable()` will make the resulting response have `Cache-Control: private, no-cache, must-revalidate` and have `(s)max-age` removed.
This makes the change easy to understand, but makes responses uncacheable too often. This is because the `Response::isCacheable()` method was written to determine whether it is safe for a shared cache to keep the response, which is not the case as soon as a `private` response is involved. This might be improved upon in another PR.
Commits
-------
3d27b5946d Fix that ESI/SSI processing can turn a \"private\" response \"public\"
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Config] Fixes the valid placeholder types for variable node
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| 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? | we will see... <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26894
| License | MIT
This is a proposition, still in discussion.
<!--
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
-------
9fbdcdbeb9 Fixes the valid placeholder types for variable node
This PR was squashed before being merged into the 4.1-dev branch (closes#26909).
Discussion
----------
[Messenger][DX] Uses the adapter name instead of the service name
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ø
| License | MIT
| Doc PR | ø
As a developer, I don't get why I would need to use the service name while I give a name to the adapters. This is basically what this PR means for me in terms of configuration:
```patch
framework:
messenger:
routing:
# We want the command below to be handled async with the "messenger.default_sender" (AMQP producer).
- 'App\Message\Command\CreateNumber': messenger.sender.amqp
+ 'App\Message\Command\CreateNumber': amqp
adapters:
amqp: "%env(AMQP_DSN)%"
```
And in terms of pulling the messages:
```patch
- bin/console messenger:consume-messages messenger.receiver.amqp
+ bin/console messenger:consume-messages amqp
```
Commits
-------
b5afb40441 [Messenger][DX] Uses the adapter name instead of the service name
* 4.0:
[HttpKernel] Make ServiceValueResolver work if controller namespace starts with a backslash in routing
Add d-block to bootstrap 4 alerts
[Console] Don't go past exact matches when autocompleting
[DI] Improve error message for non-autowirable scalar argument
Disable autoloader call on interface_exists check
[Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't an existing class
[HttpKernel] Dont create mock cookie for new sessions in tests
* 3.4:
[HttpKernel] Make ServiceValueResolver work if controller namespace starts with a backslash in routing
Add d-block to bootstrap 4 alerts
[Console] Don't go past exact matches when autocompleting
[DI] Improve error message for non-autowirable scalar argument
Disable autoloader call on interface_exists check
[Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't an existing class
[HttpKernel] Dont create mock cookie for new sessions in tests
* 2.8:
[Console] Don't go past exact matches when autocompleting
Disable autoloader call on interface_exists check
[Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't an existing class
* 2.7:
[Console] Don't go past exact matches when autocompleting
Disable autoloader call on interface_exists check
[Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't an existing class
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes#26870).
Discussion
----------
Add d-block to bootstrap 4 alerts
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26869
| License | MIT
| Doc PR | N/A
Commits
-------
40bd8bd Add d-block to bootstrap 4 alerts
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Messenger] Add tests for ChainHandler class
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
More tests, the last one for now ;)
Commits
-------
2d3ce1d Add tests for ChainHandler class
This PR was merged into the 4.1-dev branch.
Discussion
----------
[PhpUnit Bridge] Fixes a non-initialized variable
| Q | A
| ------------- | ---
| Branch? | to be updated
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
If you are ok with this, I will rebase on the best branch.
Commits
-------
fa5f5b3 Fixes a non-initialized variable in phpunit bridge
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Dont create mock cookie for new sessions in tests
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26493
| License | MIT
| Doc PR | -
@romainneutron can you please check if this fixes your issue?
Commits
-------
86b850e [HttpKernel] Dont create mock cookie for new sessions in tests
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Messenger] Minor improvements and cleanup
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
- enable some of opcode optimizations
- add missing typehints
- cleanup
Commits
-------
d8cc7a4715 Minor improvements and cleanup
This PR was squashed before being merged into the 4.1-dev branch (closes#26632).
Discussion
----------
[Messenger] Add AMQP adapter
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | ø
| License | MIT
- [x] Depends on the Messenger component #24411
- [x] Add tests once we are all happy about the structure
---
In order to give a great DX for simple needs such as sending messages through an AMQP broker such as RabbitMq, we should ship an AMQP adapter for the Messenger component within Symfony Core. It should be as simple as this proposal. We don't need to handle more specific use-cases nor brokers as other adapters such as the [enqueue adapter](https://github.com/sroze/enqueue-bridge) can also be used.
Configuring the adapter is as simple as the following configuration:
```yaml
# config/packages/messenger_adapters.yaml
framework:
messenger:
adapter: "%env(MESSENGER_DSN)%"
```
With the given `.env` for example:
```
MESSENGER_DSN=amqp://guest:guest@localhost:5672/%2f/messages
```
Keep in mind that after having configured the adapter, developers have to route their messages to the given adapter.
```yaml
# config/packages/messenger_routes.yaml
framework:
messenger:
routing:
producer).
'App\Message\Command\CreateNumber': messenger.default_sender
```
---
Additionally, multiple adapters can be created and messages routed to these ones.
```yaml
# config/packages/messenger_routes.yaml
framework:
messenger:
adapters:
commands: "amqp://guest:guest@localhost:5672/%2f/commands"
maintenance: "amqp://guest:guest@localhost:5672/%2f/maintenance"
routing:
producer).
'App\Message\Command\CreateNumber': messenger.commands_sender
'App\Message\Command\MaintenanceSpecificCommand': messenger.maintenance_sender
```
Commits
-------
798c230ad5 [Messenger] Add AMQP adapter
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Don't go past exact matches when autocompleting
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21789
| License | MIT
| Doc PR | -
Commits
-------
adba79a [Console] Don't go past exact matches when autocompleting
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Messenger] Rename the middleware tag
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ø
| License | MIT
| Doc PR | symfony/symfony-docs#9437
After a using it for a bit of time, it's weird to have the `messenger.message_handler` tag while using the `message_bus_middleware` tag for the middlewares.
I propose to rename the tag from `message_bus_middleware` to `messenger.bus_middleware` to keep some consistency.
Commits
-------
dd18445482 Rename the middleware tag from `message_bus_middleware` to `messenger.bus_middleware`
* 4.0:
[Translation] Use unix-style EOL for xliff-core-1.2-strict.xsd
bumped Symfony version to 4.0.9
updated VERSION for 4.0.8
updated CHANGELOG for 4.0.8
bumped Symfony version to 3.4.9
updated VERSION for 3.4.8
updated CHANGELOG for 3.4.8
bumped Symfony version to 2.8.39
updated VERSION for 2.8.38
updated CHANGELOG for 2.8.38
bumped Symfony version to 2.7.46
updated VERSION for 2.7.45
update CONTRIBUTORS for 2.7.45
updated CHANGELOG for 2.7.45
[Yaml] Throw parse error on unfinished inline map
* 3.4:
[Translation] Use unix-style EOL for xliff-core-1.2-strict.xsd
bumped Symfony version to 3.4.9
updated VERSION for 3.4.8
updated CHANGELOG for 3.4.8
bumped Symfony version to 2.8.39
updated VERSION for 2.8.38
updated CHANGELOG for 2.8.38
bumped Symfony version to 2.7.46
updated VERSION for 2.7.45
update CONTRIBUTORS for 2.7.45
updated CHANGELOG for 2.7.45
[Yaml] Throw parse error on unfinished inline map
* 2.8:
bumped Symfony version to 2.8.39
updated VERSION for 2.8.38
updated CHANGELOG for 2.8.38
bumped Symfony version to 2.7.46
updated VERSION for 2.7.45
update CONTRIBUTORS for 2.7.45
updated CHANGELOG for 2.7.45
[Yaml] Throw parse error on unfinished inline map
* 2.7:
bumped Symfony version to 2.7.46
updated VERSION for 2.7.45
update CONTRIBUTORS for 2.7.45
updated CHANGELOG for 2.7.45
[Yaml] Throw parse error on unfinished inline map
* 4.0:
[Form] Fix typo in Upgrade 3.4/4.0
[EventDispatcher] Dispatcher in stopEventPropagation test now registers correct listener
Update da translations
Fix Typo in Guard Factory
* 3.4:
[Form] Fix typo in Upgrade 3.4/4.0
[EventDispatcher] Dispatcher in stopEventPropagation test now registers correct listener
Update da translations
Fix Typo in Guard Factory
This PR was merged into the 4.1-dev branch.
Discussion
----------
[SecurityBundle] allow using custom function inside allow_if expressions
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | no
| Fixed tickets | https://github.com/symfony/symfony/issues/23208
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/9552
This is a follow-up for https://github.com/symfony/symfony/pull/26263
As discussed there I propose to allow using custom functions as a new feature only and thus targeting `master` here.
If we agree to move forward with this there are some todos:
- [x] fix tests
- [x] add cache warmer for allow_if expressions
- [x] update documentation to mention this new feature
- [x] update UPGRADE files
ping @nicolas-grekas @stof
Commits
-------
41552cd896 [SecurityBundle] allow using custom function inside allow_if expressions
This PR was squashed before being merged into the 4.1-dev branch (closes#26096).
Discussion
----------
[HttpFoundation] Added a migrating session handler
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/9496
- [x] gather feedback for my changes
- [x] submit changes to the documentation
- [x] update the changelog
When migrating to a new session handler on a live system, it's useful to be able to do it with no loss of session data. This migrating handler allows the sessions to be written to an additional handler to enable a migration workflow like:
* Switch to migrating handler, with your new handler as the 'write only' one. The old handler behaves as usual and sessions get written to the new one.
* After verifying the data in the new handler (and after the session gc period), switch the migrating handler to use your old handler as the 'write only' one instead, so the sessions will now be read from the new handler. This step allows easier rollbacks.
* After verifying everything, switch from the migrating handler to the new handler
Commits
-------
3acd548349 [HttpFoundation] Added a migrating session handler
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Debug] Support any Throwable object in FlattenException
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #26429
| License | MIT
| Doc PR | N/A
Alternative to #26447 without BC breaks, follows #26028.
This PR removes the need to convert `Throwable` objects into exceptions when working with `FlattenException`.
ping @instabledesign @ostrolucky @nicolas-grekas
Commits
-------
96c1a6fa71 Support any Throwable object in FlattenException.
This PR was merged into the 4.1-dev branch.
Discussion
----------
[DI][Config] Fix empty env validation
| Q | A
| ------------- | ---
| Branch? | master
| 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 | #26747
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
<!--
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
-------
d40a4f409d [DI][Config] Fix empty env validation
This PR was squashed before being merged into the 4.1-dev branch (closes#26816).
Discussion
----------
[Messenger][FrameworkBundle] Move collector, command into the component & minor tweaks
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| 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 -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
Some suggestions more aligned with most of the core practices, mainly:
- Move the command & collector to the component itself. They are not dependent of the Fwb in any way and are useful out of the fwb usage.
- Add an exception in FrameworkExtension if the `framework.messenger` key is enabled, but the component isn't installed.
Commits
-------
6aec62bad3 [FrameworkBundle] Minor messenger component tweaks
f9c9ca0514 [Messenger] Move data collector & command into the component
This PR was squashed before being merged into the 4.1-dev branch (closes#26804).
Discussion
----------
[Messenger] Fix handles tag attribute
| Q | A
| ------------- | ---
| Branch? | master
| 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 -->
<!--
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
-------
92f7e37a27 [Messenger] Fix handles tag attribute
This PR was merged into the 4.1-dev branch.
Discussion
----------
[PhpUnitBridge] Search for SYMFONY_PHPUNIT_REMOVE env var in phpunit.xml then phpunit.xml.dist
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
---
using the env var could be a bit annoying + not everyone may know this. So adding it to the `phpunit.xml.dist` file make sens IHMO
Commits
-------
5e2d43e322 [PhpUnitBridge] Search for SYMFONY_PHPUNIT_REMOVE env var in phpunit.xml then phpunit.xml.dist
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Messenger] Remove the Doctrine middleware configuration from the FrameworkBundle
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26647
| License | MIT
| Doc PR | ø
As per @fabpot's request, remove the enabling feature of the DoctrineMiddleware from the FramworkBundle.
/cc @Nyholm
Commits
-------
27a8b1dc96 Remove the Doctrine middleware configuration from the FrameworkBundle
This PR was merged into the 4.1-dev branch.
Discussion
----------
[LDAP] Allow adding and removing values to/from multi-valued attributes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
`EntryManagerInterface::update(Entry $entry)` is extremely slow in some specific cases such as adding or removing members to or from huge groupOfNames if you also enable the memberOf overlay in OpenLDAP. Disabling memberOf does make things a lot better, but it is still slow compared to inserting/removing only the elements you want.
This PR adds two methods to Symfony\Component\Ldap\Adapter\ExtLdap\EntryManager taking advantage of ldap_mod_add and ldap_mod_del.
I thought about using them directly in the update method, but since you need to know what values to add and remove, it would be necessary to retrieve the old values from LDAP.
I'm also unsure whether these two methods should be in an interface. I think that adding them to EntryManagerInterface would break BC, but I could create another interface, similarly to RenameEntryInterface.
Commits
-------
fa9db29064 Allow adding and removing values to/from multi-valued attributes
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Form] ability to set rounding strategy for MoneyType
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | no
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/9543
Added `rounding_mode` to the `MoneyType` to be possible to change rounding strategy for money values. For now it's just `ROUND_HALF_UP` but it's good to have `ROUND_DOWN` as well. E.g. to transform `15.999` to `15.99` instead of `15.1`.
Commits
-------
f3b142420f rounding_mode for money type
This PR was merged into the 2.7 branch.
Discussion
----------
Update da translations
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The Danish translations have several serious errors. This PR adjusts to official Danish orthography, and updates some texts for internal consistency and to better reflect the original English text.
Commits
-------
d0ea26bd15 Update da translations
This PR was squashed before being merged into the 3.4 branch (closes#26794).
Discussion
----------
[PhpUnitBridge] Catch deprecation error handler
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26476
| License | MIT
This fix `DeprecationErrorHandler` to catch deprecation triggered by `SymfonyTestListenerTrait`. `$trace[$i]['class']` points to `Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerForV6`, not the aliased version. The condition has been refactored to handle future version `SymfonyTestsListenerForV{x}`
Commits
-------
f40f181 [PhpUnitBridge] Catch deprecation error handler
* 4.0:
[Routing] Fix throwing NoConfigurationException instead of 405
[Security] Load the user before pre/post auth checks when needed
[SecurityBundle] Add test for simple authentication config
[WebProfilerBundle] fix version check
[SecurityBundle] Add missing argument to security.authentication.provider.simple
[Finder] fix tests
* 3.4:
[Routing] Fix throwing NoConfigurationException instead of 405
[Security] Load the user before pre/post auth checks when needed
[SecurityBundle] Add test for simple authentication config
[WebProfilerBundle] fix version check
[SecurityBundle] Add missing argument to security.authentication.provider.simple
[Finder] fix tests
* 2.8:
[Security] Load the user before pre/post auth checks when needed
[SecurityBundle] Add test for simple authentication config
[SecurityBundle] Add missing argument to security.authentication.provider.simple
[Finder] fix tests
This PR was merged into the 2.8 branch.
Discussion
----------
[Security] Load the user before pre/post auth checks when needed
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | n/a
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26775
| License | MIT
| Doc PR | n/a
Commits
-------
c318306 [Security] Load the user before pre/post auth checks when needed
* 4.0:
fixed tests
[Finder] Remove duplicate slashes in filenames
[VarDumper] Skip some tests on custom xdebug.file_link_format
[WebProfilerBundle][HttpKernel] Make FileLinkFormatter URL format generation lazy
bumped Symfony version to 4.0.8
updated VERSION for 4.0.7
updated CHANGELOG for 4.0.7
bumped Symfony version to 3.4.8
updated VERSION for 3.4.7
updated CHANGELOG for 3.4.7
* 3.4:
fixed tests
[Finder] Remove duplicate slashes in filenames
[VarDumper] Skip some tests on custom xdebug.file_link_format
[WebProfilerBundle][HttpKernel] Make FileLinkFormatter URL format generation lazy
bumped Symfony version to 3.4.8
updated VERSION for 3.4.7
updated CHANGELOG for 3.4.7
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] Skip some tests on custom xdebug.file_link_format
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see below -->
| 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 -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- required for new features -->
Those tests are failing locally if a custom `xdebug.file_link_format` value is set.
Let's skip them as for `FrameworkExtensionTest::testFileLinkFormat`.
This will prevent some WTF moments and any actual error on these tests will be reported by the CI (IMHO isn't worth the hassle of updating the tests to handle both cases).
Commits
-------
f9216ed [VarDumper] Skip some tests on custom xdebug.file_link_format
This PR was squashed before being merged into the 4.1-dev branch (closes#26685).
Discussion
----------
[Messenger] Add a `MessageHandlerInterface` (multiple messages + auto-configuration)
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ø
| License | MIT
| Doc PR | ø
Based on @chalasr's PR: https://github.com/symfony/symfony/pull/26672.
This reduces the hassle of registering handlers: it allows the auto-configuration with a new interface `HandlerInterface`. At the same time, it allows a handler to handle multiple messages.
Commits
-------
07e6bc73a3 [Messenger] Add a `MessageHandlerInterface` (multiple messages + auto-configuration)
This PR was squashed before being merged into the 4.1-dev branch (closes#26648).
Discussion
----------
[Messenger] Added a middleware that validates messages
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | coming
This is inspired by [Fervo](https://github.com/fervo/ValidatedMessage). It runs the validator over messages implementing the `ValidatedMessageInterface`.
Commits
-------
43a51714d4 [Messenger] Added a middleware that validates messages
This PR was merged into the 4.1-dev branch.
Discussion
----------
[DependencyInjection] fix expected exception message
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Updates a test that was introduced in #25631 to match the changes made in #26595.
Commits
-------
042eb4f fix expected exception message
* 4.0:
[Yaml] Fix regression when trying to parse multiline
Add PHPDbg support to HTTP components
bumped Symfony version to 2.8.38
updated VERSION for 2.8.37
updated CHANGELOG for 2.8.37
bumped Symfony version to 2.7.45
updated VERSION for 2.7.44
update CONTRIBUTORS for 2.7.44
updated CHANGELOG for 2.7.44
Fix check of color support on Windows
* 3.4:
[Yaml] Fix regression when trying to parse multiline
Add PHPDbg support to HTTP components
bumped Symfony version to 2.8.38
updated VERSION for 2.8.37
updated CHANGELOG for 2.8.37
bumped Symfony version to 2.7.45
updated VERSION for 2.7.44
update CONTRIBUTORS for 2.7.44
updated CHANGELOG for 2.7.44
Fix check of color support on Windows
* 2.8:
Add PHPDbg support to HTTP components
bumped Symfony version to 2.8.38
updated VERSION for 2.8.37
updated CHANGELOG for 2.8.37
bumped Symfony version to 2.7.45
updated VERSION for 2.7.44
update CONTRIBUTORS for 2.7.44
updated CHANGELOG for 2.7.44
Fix check of color support on Windows
* 2.7:
Add PHPDbg support to HTTP components
bumped Symfony version to 2.7.45
updated VERSION for 2.7.44
update CONTRIBUTORS for 2.7.44
updated CHANGELOG for 2.7.44
Fix check of color support on Windows
This PR was merged into the 4.1-dev branch.
Discussion
----------
Mark ExceptionInterfaces throwable
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This interface is meant to be catched, but currently it doesn't guarantee class extending it is an instance of Throwable or Exception.
Commits
-------
b2d8792908 Mark ExceptionInterfaces throwable
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Fix check of color support on Windows
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
If the stream is redirected, `StreamOutput::hasColorSupport()` returns `false` on POSIX systems.
On Windows, this is not always true. Before PHP 7.2 we can't say if the stream is redirected, but since PHP 7.2 we have the `stream_isatty` function that works on Windows too: let's use it.
Sure, `sapi_windows_vt100_support` should return `false` if the stream is redirected, but it's in `or` with the other conditions, so the logic was flawed.
Commits
-------
f7f81892a0 Fix check of color support on Windows
* 4.0: (24 commits)
moved Twig runtime to proper class
fixed deprecated messages in tests
add PHP errors options to XML schema definition
[HttpCache] Unlink tmp file on error
Added LB translation for #26327 (Errors sign for people that do not see colors)
[TwigBridge] Fix rendering of currency by MoneyType
Import InvalidArgumentException in PdoAdapter
[DI] Do not suggest writing an implementation when multiple exist
[Intl] Update ICU data to 61.1
Use 3rd person verb form in command description
[Validator] Add Japanese translation
Support phpdbg SAPI in Debug::enable()
[HttpKernel] DumpDataCollector: do not flush when a dumper is provided
[DI] Fix hardcoded cache dir for warmups
[Routing] fix tests
[Routing] Fixed the importing of files using glob patterns that match multiple resources
[Ldap] cast to string when checking empty passwords
[Validator] sync validator translation id
[WebProfilerBundle] use the router to resolve file links
no type errors with invalid submitted data types
...
* 3.4: (24 commits)
moved Twig runtime to proper class
fixed deprecated messages in tests
add PHP errors options to XML schema definition
[HttpCache] Unlink tmp file on error
Added LB translation for #26327 (Errors sign for people that do not see colors)
[TwigBridge] Fix rendering of currency by MoneyType
Import InvalidArgumentException in PdoAdapter
[DI] Do not suggest writing an implementation when multiple exist
[Intl] Update ICU data to 61.1
Use 3rd person verb form in command description
[Validator] Add Japanese translation
Support phpdbg SAPI in Debug::enable()
[HttpKernel] DumpDataCollector: do not flush when a dumper is provided
[DI] Fix hardcoded cache dir for warmups
[Routing] fix tests
[Routing] Fixed the importing of files using glob patterns that match multiple resources
[Ldap] cast to string when checking empty passwords
[Validator] sync validator translation id
[WebProfilerBundle] use the router to resolve file links
no type errors with invalid submitted data types
...
* 2.8:
fixed deprecated messages in tests
[HttpCache] Unlink tmp file on error
Added LB translation for #26327 (Errors sign for people that do not see colors)
[TwigBridge] Fix rendering of currency by MoneyType
[HttpKernel] DumpDataCollector: do not flush when a dumper is provided
* 2.7:
[HttpCache] Unlink tmp file on error
Added LB translation for #26327 (Errors sign for people that do not see colors)
[TwigBridge] Fix rendering of currency by MoneyType
[HttpKernel] DumpDataCollector: do not flush when a dumper is provided
This PR was squashed before being merged into the 4.1-dev branch (closes#26728).
Discussion
----------
[VarDumper] Server dumper feature tweaks
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| 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 -->
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
This contains the following fixes & enhancements:
- Remove the `ServerDumper::isServerListening()` method which is not required anymore by core (forgotten on original PR after fixing reviews). Unless this is shown really useful for someone, we probably don't want to support it now that the core doesn't use it anymore.
- Provide the unserialize `allowed_classes` option for security reasons
- Add ServerDumper HTML output max-width (value chosen based on bootstrap 4 container `max-width` for reference)
Commits
-------
c148e06b12 [VarDumper] Add ServerDumper HTML output max-width
4e98fc4cf0 [VarDumper] DumpServer: provide the unserialize "allowed_classes" options
4611314a49 [VarDumper] Remove ServerDumper::isServerListening
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Translation] XLIFF2: Make sure to trim source if it is too long for "name"
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
This PR is a follow-up on @javiereguiluz's comment here: https://github.com/symfony/symfony-docs/pull/9302
This feature was introduced in https://github.com/symfony/symfony/pull/26149
Commits
-------
ca41fecfd9 Make sure to trim source if it is too long
This PR was squashed before being merged into the 4.1-dev branch (closes#26682).
Discussion
----------
Improved the lint:xliff command
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26537
| License | MIT
| Doc PR | -
This is how it looks:
![lint-xliff-output](https://user-images.githubusercontent.com/73419/37958502-fd8732e0-31b0-11e8-8688-8644ca930daf.png)
Commits
-------
6bbcc45d96 Improved the lint:xliff command
This PR was squashed before being merged into the 4.1-dev branch (closes#26681).
Discussion
----------
Allow to easily ask Symfony not to set a response to private automatically
| 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 PR is related to the many discussions going on about the latest (Symfony 3.4+) changes regarding the way Symfony handles the session. I think we're almost there now, Symfony 4.1 automatically turns responses into `private` responses once the session is started and it's all done in the `AbstractSessionListener` where the session is also saved.
In other issues/PRs (https://github.com/symfony/symfony/pull/25583, https://github.com/symfony/symfony/pull/25699, https://github.com/symfony/symfony/issues/24988) it was agreed that setting the response to `private` if the session is started is a good default for Symfony. It was also agreed that setting it to `private` does not always make sense because you **can share a response** across sessions, it just requires a more complex caching setup with shared user context etc.
So there must be an easy way to disable this behaviour. Right now it's very hard to do so because what you end up doing is basically decorating the `session_listener` which is very hard because you have to keep track on that over different Symfony versions as the base listener might get additional features etc.
The [FOSCacheBundle](https://github.com/FriendsOfSymfony/FOSHttpCacheBundle/pull/438) is already having this problem, [Contao](https://github.com/contao/core-bundle/pull/1388) has the same issue and there will be probably more. Basically everyone that wants to share a response cache across the session will have to decorate the default listener. That's just too hard, so I came up with this solution. The header is easy. Every project can add that easily. It does not require any extension, configuration or adjustment of any service. It's clean, transparent and has absolutely no impact on "default" Symfony setups.
Would be happy to have some feedback before 4.1 freeze.
Commits
-------
0f36710708 Allow to easily ask Symfony not to set a response to private automatically
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Messenger] Make NoHandlerForMessageException a logic exception
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| 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 -->
| Fixed tickets | https://github.com/symfony/symfony/pull/26648#discussion_r178049882 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- required for new features -->
To me, a missing handler for a message is a program logic exception (or misconfiguration). Even if it's only detected at runtime here.
It's the same as `ServiceNotFoundException` which even is an `\InvalidArgumentException`. Could eventually also be the case here.
Commits
-------
0489bbd948 [Messenger] Make NoHandlerForMessageException a logic exception
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpKernel] DumpDataCollector: do not flush when a dumper is provided
| Q | A
| ------------- | ---
| Branch? | 2.7 <!-- see below -->
| Bug fix? | yes
| 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 -->
| Fixed tickets | 3db14045d4/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php (L208-L209) <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
This explains [the workaround I initially used](3db14045d4/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php (L208-L209)) in the server dumper PR original code.
I might be wrong on the intent, but as soon as a dumper is provided (e.g by setting `debug.dump_destination: php://stderr`), I think there is no need to set the `DumpDataCollector::$isCollected` flag to `false` as we explicitly ask for the dump to be output directly somewhere. So ne need to output again on `__destruct`.
Spotted by running tests on the `symfony/demo` with the server dumper enabled: dumps were output twice. Once on the server, once at the end of the tests.
But this can be easily seen as well by using `debug.dump_destination: php://stderr` on `test` env:
```diff
diff --git a/src/Controller/BlogController.php b/src/Controller/BlogController.php
index e3e30aa..bf9744e 100644
--- a/src/Controller/BlogController.php
+++ b/src/Controller/BlogController.php
@@ -50,6 +50,7 @@ class BlogController extends AbstractController
*/
public function index(int $page, string $_format, PostRepository $posts): Response
{
+ dump(get_class($posts));
$latestPosts = $posts->findLatest($page);
// Every template name also has two extensions that specify the format and
```
### Before
```sh
vendor/bin/simple-phpunit --filter=BlogControllerTest::testIndex
PHPUnit 6.5.7 by Sebastian Bergmann and contributors.
Testing Project Test Suite
BlogController.php on line 53:
"App\Repository\PostRepository"
. 1 / 1 (100%)
Time: 3.34 seconds, Memory: 44.25MB
OK (1 test, 1 assertion)
BlogController.php on line 53:
"App\Repository\PostRepository"
```
### After
```sh
vendor/bin/simple-phpunit --filter=BlogControllerTest::testIndex
PHPUnit 6.5.7 by Sebastian Bergmann and contributors.
Testing Project Test Suite
BlogController.php on line 53:
"App\Repository\PostRepository"
. 1 / 1 (100%)
Time: 731 ms, Memory: 28.00MB
OK (1 test, 1 assertion)
```
Commits
-------
11a0392516 [HttpKernel] DumpDataCollector: do not flush when a dumper is provided
This PR was squashed before being merged into the 2.7 branch (closes#26663).
Discussion
----------
[TwigBridge] Fix rendering of currency by MoneyType
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | todo
| Fixed tickets | #25135
| License | MIT
| Doc PR | -
Split from #25167 as suggested by @nicolas-grekas to see if this can be reasonably fixed on 2.7, the right way using this itsy-bitsy new feature.
#25167 still contains some valuable changes regarding tests. Ill continue either one PR depending on the target branch / proposed fix.
Commits
-------
a3a2ff0c74 [TwigBridge] Fix rendering of currency by MoneyType
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Messenger] Fix messenger profiler name
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26674
| License | MIT
| Doc PR | ø
In #26674, the profiler name was not renamed properly, which means it wasn't displayed anymore.
Commits
-------
bd234ff Fix messenger profiler name
* 2.8:
[Intl] Update ICU data to 61.1
[Validator] Add Japanese translation
Support phpdbg SAPI in Debug::enable()
[Ldap] cast to string when checking empty passwords
[Validator] sync validator translation id
no type errors with invalid submitted data types
[FrameworkBundle] Partially revert HttpCache is not longer abstract (4d075da)
[Finder] Fixed leading/trailing / in filename
allow html5 compatible rendering of forms with null names
Change datetime input to datetime-local
* 2.7:
[Intl] Update ICU data to 61.1
[Validator] Add Japanese translation
Support phpdbg SAPI in Debug::enable()
[Validator] sync validator translation id
no type errors with invalid submitted data types
[FrameworkBundle] Partially revert HttpCache is not longer abstract (4d075da)
[Finder] Fixed leading/trailing / in filename
allow html5 compatible rendering of forms with null names
Change datetime input to datetime-local
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FrameworkBundle] Remove double cache generation by detecting fresh kernels on cache:clear
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
The `cache:clear` command currently runs non-optional cache warmers twice or more.
It also clears + warms up just created caches (when var/cache/dev doens't exist yet, eg on 1st `composer install`.)
This PR fixes both behaviors. To run only what's needed once.
Best reviewed [ignoring whitespaces](https://github.com/symfony/symfony/pull/26670/files?w=1).
Commits
-------
9d8eac213a [FrameworkBundle] Remove double cache generation by detecting fresh kernels on cache:clear
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FrameworkBundle] framework.php_errors.log now accept a log level
| 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 files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26267 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | todo <!-- required for new features -->
We are testing that `framework.php_errors.log` is either a bool or an int (set the value of the log level you want).
This fixes#26267, so it gives a way to not log some level on production.
Commits
-------
664f821895 [FrameworkBundle] framework.php_errors.log now accept a log level
This PR was merged into the 4.1-dev branch.
Discussion
----------
Allow "json:" env var processor to accept null value
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | Currently no docs for this feature
Edits the EnvVarProcessor so that it allows any type of variable in JSON encoded vars.
Previously it was only possible to use `%env(json:ENV)%` for array types, but this seems to be an arbitrary restriction, when I could have any other data type in that JSON.
Valid JSON that was previously rejected:
- `1`
- `null`
- `"string"`
Commits
-------
abc7480828 Allow "json:" env var processor to parse null values
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
----------
Improved the Ajax profiler panel when there are exceptions
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26646
| License | MIT
| Doc PR | -
This makes the following changes in the Ajax panel:
* The `Profiler` column is now the first one.
* When the response status code is `400` or higher, the profiler link points to the exception panel instead of the default request/response panel
![ajax-panel](https://user-images.githubusercontent.com/73419/37874477-52cf3888-3030-11e8-8042-23351f2e7a0f.png)
Commits
-------
074d68d67f Improved the Ajax profiler panel when there are exceptions
This PR was merged into the 4.1-dev branch.
Discussion
----------
[VarDumper] Provide binary, allowing to start a server at any time
as soon as the "symfony/var-dumper" & "symfony/console" components are available.
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| 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 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | TODO https://github.com/symfony/symfony-docs/issues/9474
Now that https://github.com/symfony/symfony/pull/23831 is merged, there is still room for improvements we can bring during the stabilization months.
Here is a first one: providing a simple CLI binary allows to easily start a server from any project (or even globally), just by having the var dumper & console packages in your deps.
Commits
-------
eef10b19c6 [VarDumper] Provide binary, allowing to start a server at any time
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
----------
[Messenger] Uses the `messenger.message_handler` tag instead of `message.handler`
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no (technically, it's not even in 4.1)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ø
| License | MIT
After a few days using it, it feels weird to have the `messenger.receiver` and `messenger.sender` tags while the one for message handlers is `message_handler`. I believe that for consistency, this would make sense to rename this tag `messenger.message_handler`.
As we don't have tests for this pass yet (will be added in https://github.com/symfony/symfony/pull/26672) there is nothing else to change (but the documentation).
Commits
-------
bddebc47b8 Uses the `messenger.message_handler` tag instead of `message.handler`
This PR was squashed before being merged into the 4.1-dev branch (closes#26502).
Discussion
----------
[Form] Add Bootstrap 4 style for field FileType
| Q | A
| ------------- | ---
| Branch? | master<!-- see below -->
| 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 | #26464 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
<!--
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
-------
df577180e7 [Form] Add Bootstrap 4 style for field FileType
This PR was squashed before being merged into the 4.1-dev branch (closes#23888).
Discussion
----------
[DI] Validate env vars in config
| Q | A
| ------------- | ---
| Branch? | 4.1/master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22151, #25868
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/issues/8382
This PR registers the env placeholders in `Config\BaseNode` with its default value or an empty string. It doesnt request real env vars during compilation,
What it does is if a config value exactly matches a env placeholder, we validate/normalize the default value/empty string but we keep returning the env placeholder as usual. If a placeholder occurs in the middle of a string it also proceeds as usual.
The latter to me is OK as you need to expect any string value during runtime anyway, including the empty string.
Commits
-------
2c74fbc [DI] Validate env vars in config
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Messenger] Remove the default transport if no `serializer` service
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ø
| License | MIT
If the `serializer` service does not exist, we remove the default transport services as they rely on it.
Commits
-------
2bcf93db2d Remove the default transport if no serializer
This PR was merged into the 4.1-dev branch.
Discussion
----------
Adding support to bind scalar values to controller arguments
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25960
| License | MIT
| Doc PR | symfony/symfony-docs#9477
Hi guys!
This fixes (I think) the last rough edge with autowiring & error messages. 100% credit to @nicolas-grekas for this implementation - he has generously allowed me to steal his code in return for writing the test. I did test this on a real project.
Cheers!
Commits
-------
2c7198cdd0 Adding support to bind scalar values to controller arguments
This PR was merged into the 4.1-dev branch.
Discussion
----------
[VarDumper] Introduce a new way to collect dumps through a server dumper
| Q | A
| ------------- | ---
| Branch? | 4.1 <!-- see comment below -->
| Bug fix? | no
| New feature? | yes <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | #22987 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | todo <!--highly recommended for new features-->
Could also be interesting as alternate solution for #23442.
Inspired by the [`ServerLogHandler`](https://github.com/symfony/symfony/pull/21080) and @nicolas-grekas's [comment](https://github.com/symfony/symfony/pull/22987#issuecomment-305791102) in #22987.
---
## Description
This PR introduces a new `server:dump` command available in the `VarDumper` component.
Conjointly with a new `ServerDumper` data dumper, it allows to send serialized `Data` clones to a single centralized server, in charge of dumping them on CLI output, or in an file in HTML format.
## Showcase
### HTTP calls
For instance, when working on an API and dumping something, you might end up with a mix of your response and the CLI dumped version of the data you asked:
```php
class HelloController extends AbstractController
{
/**
* @Route("/hello")
*/
public function hello(Request $request, UserInterface $user)
{
dump($request->attributes, $user);
return JsonResponse::create([
'status' => 'OK',
'message' => "Hello {$user->getUsername()}"
]);
}
}
```
<img width="732" alt="screenshot 2017-08-08 a 16 44 24" src="https://user-images.githubusercontent.com/2211145/29077731-0b2152d6-7c59-11e7-99dd-2d060a906d48.PNG">
You might even get the HTML dump version [under some conditions](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php#L146-L157).
Dumping to a server allows collecting dumps in a separate place:
<!--![server-dumper-http-to-cli-output](https://user-images.githubusercontent.com/2211145/29077977-8ace19ce-7c59-11e7-998e-ee9c49e67958.gif)-->
![server-dump-http-to-cli](https://user-images.githubusercontent.com/2211145/29226044-dcc95f12-7ed0-11e7-8343-40aeb7b18dd5.gif)
~⚠️ By swallowing the previous dumpers output, the dump data collector is not active when running the dump server. Disable swallowing if you want both.~ ➜ Dumps are still collected in the profiler thanks to f24712effc9fab1163c0053e2a0a0d5cc4f6473e
### CLI calls
The best probably is (to me) that you can also debug CLI applications...
![server-dump-cli](https://user-images.githubusercontent.com/2211145/29225951-84e29098-7ed0-11e7-8067-abaa9c50d169.gif)
<!--![server-dumper-cli-to-cli-output](https://user-images.githubusercontent.com/2211145/29078261-1eb950ea-7c5a-11e7-94ee-aa3ae3bf7fb0.gif)-->
...and get HTML formatted dumps:
![server-dumper-cli-to-html-output](https://user-images.githubusercontent.com/2211145/30784609-d7dc19b8-a158-11e7-9b11-88ae819cfcca.gif)
<!--![server-dump-cli-to-html](https://user-images.githubusercontent.com/2211145/29225866-2b5675e4-7ed0-11e7-98eb-339611bd94a7.gif)-->
<!--![server-dumper-cli-to-html-output](https://user-images.githubusercontent.com/2211145/29078247-17e33e5c-7c5a-11e7-94f7-47de6774e0e8.gif)-->
hence, benefit from all the features of this format (collapse, search, ...)
### HTML output at a glance
<img width="831" alt="screenshot 2017-08-11 a 19 28 25" src="https://user-images.githubusercontent.com/2211145/29225513-eae349f2-7ece-11e7-9861-8cda9e80ba7f.PNG">
The HTML output benefits from all the `HtmlDumper` features and contains extra informations about the context (sources, requests, command line, ...). It doesn't aim to replace the profiler for HTTP calls with the framework, but is really handy for CLI apps or by wiring it in your own web app, out of the framework usage.
### CLI output at a glance
<img width="829" alt="screenshot 2017-08-11 a 19 52 57" src="https://user-images.githubusercontent.com/2211145/29225482-c24afe18-7ece-11e7-8e83-d019b0d8303e.PNG">
## Usage within the framework
### Config
For instance, in your `config_dev.yml`:
```yml
#config_dev.yml
debug:
server_dump: true
```
or in your `config.yml`:
```yml
#config.yml
debug:
server_dump: '%kernel.debug%'
```
~~The configuration also allows to set a `host` option, but there is already a sensible default value (`tcp://0.0.0.0:9912`) so you don't have to deal with it.~~ Since b002175, in case you want to change the default host value used, simply use the `VAR_DUMPER_SERVER` env var.
When the server is running, all dumps are collected by the server and previous dumpers ones are "swallowed" ~~by default. If you want both to collect dumps on the server AND keep previous dumpers on regular outputs, you can disable swallowing:~~
<!--
```yml
debug:
server_dump:
swallow: false
```
-->
When the server isn't running or in case of failure to send the data clones to the server, the server dumper will delegates to the configured wrapped dumper, so dumps are displayed and collected as usual.
### Running the server
```bash
bin/console server:dump [--format=cli|html]
```
#### Options
- ~~The `output` option defaults to `null` which will display dumps on CLI. It accepts a file path in which dumps will be collected in HTML format.~~
- The `format` option allows to switch format to use. For instance, use the `html` format and redirect the output to a file in order to open it in your browser and inspect dumps in HTML format.
- ~~The default `host` value is the same as the one configured under the `debug.server_dump.host` config option, so you don't have to deal with it in most cases.~~
Since b002175, in case you want to change the default host value used, simply use the `VAR_DUMPER_SERVER` env var:
```bash
VAR_DUMPER_SERVER=0.0.0.0:9204 bin/console server:dump
```
## Manual wiring
If you want to wire it yourself in your own project or using it to inspect dumps as html before the kernel is even boot for instance:
```php
$host = 'tcp://0.0.0.0:9912'; // use null to read from the VAR_DUMPER_SERVER env var
$cloner = new VarCloner();
$dumper = new ServerDumper($host, new CliDumper());
VarDumper::setHandler(function ($var) use ($dumper, $cloner) {
$dumper->dump($cloner->cloneVar($var));
});
```
## Create your own server app
The component already provides a default server app by means of the `ServerDumpCommand`, but
you could also build your own by using the `DumpServer`:
```php
$host = 'tcp://0.0.0.0:9912'; // use null to read from the VAR_DUMPER_SERVER env var
$server = new DumpServer($host);
$server->start();
$server->listen(function (Data $data, array $context, $clientId) {
// do something
});
```
Commits
-------
138dad6440 [VarDumper] Some tweaks after Nicolas' commit & ServerDumperPlaceholderCommand
088c52ed70 [VarDumper] Review config to use debug.dump_destination & tweak data collector
3db14045d4 [VarDumper] Introduce a new way to collect dumps through a server dumper
This PR was merged into the 4.1-dev branch.
Discussion
----------
[HttpFoundation] Use parse_str() for query strings normalization
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Follow up of #26214 and #26202
The current normalization logic is both too loose and too broad: it changes the order of recursive data structures, while not normalizing keys.
Since the normalization logic varies by query string parser, I'd like to propose a logic that exactly matches the native PHP one, which is exposed to userland via `parse_str()`. Using this, we accurately remove all useless information, while preserving all the meaningful one.
(The change in `overrideGlobals()` is a bug fix to me btw, the current logic breaks the interpretation of legitimate query strings.)
Commits
-------
513353644b [HttpFoundation] Use parse_str() for query strings normalization
This PR was merged into the 4.1-dev branch.
Discussion
----------
[SecurityBundle] Added an alias from RoleHierarchyInterface to security.role_hierarchy
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | I don't know
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
It's needed for autowirering
---
Note: I'm not sure if this is a bug fix or a new feature.
Commits
-------
886b8a6 [SecurityBundle] Added an alias from RoleHierarchyInterface to security.role_hierarchy
This PR was squashed before being merged into the 3.4 branch (closes#26600).
Discussion
----------
[Routing] Fixed the importing of files using glob patterns that match multiple resources
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22160
| License | MIT
| Doc PR | n/a
This fixes the import of resources specified using glob patterns in `XmlFileLoader` and `YamlFileLoader`.
@nicolas-grekas This supersedes #25633 that's been in limbo since December despite your comments, so I decided to take care of it as I need this to work. I took care of the two loaders that are affected, and added tests.
Commits
-------
948b4cf [Routing] Fixed the importing of files using glob patterns that match multiple resources
This PR was merged into the 3.4 branch.
Discussion
----------
[WebProfilerBundle] use the router to resolve file links
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22290, #25886
| License | MIT
| Doc PR | -
Commits
-------
2cfc573 [WebProfilerBundle] use the router to resolve file links
* 4.0:
[DI] Dont tell about autoregistration in strict autowiring mode
[DI] Cleanup remainings from autoregistration
[Process] Remove a useless cast
[PHPunit] suite variable should be used
This PR was squashed before being merged into the 4.1-dev branch (closes#26445).
Discussion
----------
[Serializer] Ignore comments when decoding XML
| 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 | N/A
Previously, if the first line of XML was a comment, that would be used as the root node of the decoded XML. This work strips comments from decoded XML by default, but also allows for customizing which XML node types are ignored during decoding. The first two commits in this PR contain tests only to prove the existence of this "bug".
Commits
-------
f6760d3899 [Serializer] Ignore comments when decoding XML
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Routing] allow no-slash root on imported routes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12141
| License | MIT
| Doc PR | -
With this change, a collection is imported, its root can have no slash appended. e.g.:
```yaml
import:
resource: ...
trailing_slash_on_root: false
```
Works also for XML and PHP-DSL.
Commits
-------
5a98515242 [Routing] allow no-slash root on imported routes
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] no type errors with invalid submitted data types
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26557
| License | MIT
| Doc PR |
Commits
-------
4217cc1348 no type errors with invalid submitted data types
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
----------
[Routing] use American English
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
2004092dae [Routing] use American English
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
This PR was squashed before being merged into the 4.1-dev branch (closes#25631).
Discussion
----------
[DI] Service decoration: autowire the inner service
| 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 | n/a
Try to automatically inject the decorated service.
Before:
```yaml
services:
_defaults:
autowire: true
App\Foo: ~
App\FooDecorator:
decorates: App\Foo
arguments: {$decorated: @App\FooDecorator.inner}
```
After:
```yaml
services:
_defaults:
autowire: true
App\Foo: ~
App\FooDecorator:
decorates: App\Foo
```
To trigger the autowiring, the following conditions must be met:
* the decorator is autowired
* there is only one argument in the constructor of the type of the decorated service
Commits
-------
24876f2adc [DI] Service decoration: autowire the inner service
This PR was squashed before being merged into the 4.1-dev branch (closes#24363).
Discussion
----------
[Console] Modify console output and print multiple modifyable sections
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | TBD
| Fixed tickets |
| License | MIT
| Doc PR | symfony/symfony-docs#9304
Add support to create different output sections for the console output.
Each section is it's own 'stream' of output, where the output can be modified (even if there are other output after it). This allows you to modify previous output in the console, either by appending new lines, modifying previous lines or clearing the output. Modifying a sections output doesn't affect the output after that or in other sections.
Some examples of what can be done:
**Overwriting content in a previous section:**
Code:
```php
$section1 = $output->section();
$section2 = $output->section();
$section1->writeln("<comment>Doing something</comment>\n");
usleep(500000);
$section2->writeln('<info>Result of first operation</info>');
usleep(500000);
$section1->overwrite("<comment>Doing something else</comment>\n");
usleep(500000);
$section2->writeln('<info>Result of second operation</info>');
usleep(500000);
$section1->overwrite("<comment>Finishing</comment>\n");
usleep(500000);
$section2->writeln('<info>Last Result</info>');
```
Result:
![overwrite-append](https://user-images.githubusercontent.com/144858/30975030-769f2c46-a471-11e7-819f-c3698b43f0af.gif)
**Multiple Progress Bars:**
Code:
```php
$section1 = $output->section();
$section2 = $output->section();
$progress = new ProgressBar($section1);
$progress2 = new ProgressBar($section2);
$progress->start(100);
$progress2->start(100);
$c = 0;
while (++$c < 100) {
$progress->advance();
if ($c % 2 === 0) {
$progress2->advance(4);
}
usleep(500000);
}
```
Result:
![multiple-progress](https://user-images.githubusercontent.com/144858/30975119-b63222be-a471-11e7-89aa-a555cdf3d2e0.gif)
**Modifying content of a table & updating a progress bar:**
Code:
```php
$section1 = $output->section();
$section2 = $output->section();
$progress = new ProgressBar($section1);
$table = new Table($section2);
$table->addRow(['Row 1']);
$table->render();
$progress->start(5);
$c = 0;
while (++$c < 5) {
$table->appendRow(['Row '.($c + 1)]);
$progress->advance();
usleep(500000);
}
$progress->finish();
$section1->clear();
```
Result:
![progress-table](https://user-images.githubusercontent.com/144858/30975176-e332499c-a471-11e7-9d4f-f58b464a53c2.gif)
**Example with Symfony Installer:***
Before:
![sf-installer-old](https://user-images.githubusercontent.com/144858/30975291-40f22106-a472-11e7-8836-bc39139c2d30.gif)
After:
![sf-installer](https://user-images.githubusercontent.com/144858/30975302-4a00acf4-a472-11e7-83ba-88ea9d0f0f3f.gif)
TODO:
- [x] Add unit tests
Commits
-------
9ec51a1797 [Console] Modify console output and print multiple modifyable sections
This PR was merged into the 4.1-dev branch.
Discussion
----------
Transform both switchToXHR() and removeXhr() to xmlHttpRequest()
| 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 | none <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | Will do.
See https://github.com/symfony/symfony/pull/24778#issuecomment-369879079 for more information about this.
We are switching from a possible global estate change to just only one request affected.
Commits
-------
4ed08896fa feature: transform both switchToXHR and removeXhr to a xhrRequest
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Change datetime to datetime-local for HTML5 datetime input
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | Unknown
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24307
| License | MIT
| Doc PR | N/A
Change the input type from datetime to datetime-local for HTML5 date input (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime)
Commits
-------
802c67c324 Change datetime input to datetime-local
* 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
...
This PR was merged into the 4.1-dev branch.
Discussion
----------
Make ProgressBar::setMaxSteps public
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24100
| License | MIT
| Doc PR | -
This is useful in cases when target of tracking changes its size during progress advancement. My exact use case is showing progress of file upload for file which is still being downloading.
Commits
-------
2b3c37a2d8 Make ProgressBar::setMaxSteps public
This PR was squashed before being merged into the 3.4 branch (closes#26513).
Discussion
----------
[FrameworkBundle] Respect debug mode when warm up annotations
| 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 |
Propagate current debug mode to the annotations reader. Without thi, warmup is useless with debug mode, because timetsamps are not written to cache.
Commits
-------
f3ec39616c [FrameworkBundle] Respect debug mode when warm up annotations
* 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 squashed before being merged into the 2.7 branch (closes#26335).
Discussion
----------
[Config] Handle nullable node name + fix inheritdocs
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no-ish
| 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 -->
Small split from #26297 that can be merged until master/4.1. Whereas the doc fixes only apply until 3.4, hence the split.
Small change regarding `getName/Path()` for not returning a `null` value anymore which violates `NodeInterface::getName/Path()`
Remainng issue left at
cd5f4105a4/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php (L381-L383)
which i tend to leave untouched across all branches for now.
Commits
-------
5c3e6a9 [Config] Handle nullable node name + fix inheritdocs
This PR was merged into the 2.7 branch.
Discussion
----------
[BrowserKit] Fix cookie path handling when $domain is null
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| 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 files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
The bug is highlighted by the new test: there is an inconsistency in the path handling regarding if a domain is set or not. If it is set, and the cookie is set to a subpath of the passed path, the cookie is returned. However if no domain is set, it is not. This PR fixes this bug.
Commits
-------
acc20fc [BrowserKit] Fix cookie path handling when $domain is null
This PR was merged into the 2.7 branch.
Discussion
----------
[Config] Backport string|null api for node names
| Q | A
| ------------- | ---
| Branch? | 2.7
| 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 -->
Commits
-------
fe586ac [Config] Backport string|null api for node names
* 4.0: (28 commits)
[DI] Add tests for EnvVarProcessor
typo
[Bridge\PhpUnit] Fix#26430 Cannot autoload listeners
Make sure we always render errors. Eventhough labels are disabled
Make sure form errors is valid HTML
[HttpKernel] Allow generators in registerBundle
[TwigBundle] document TwigRenderer BC break in UPGRADE-3.4
Extra line to bootstrap 3 horizontal layout
[Serializer] Remove const override
Update Client.php
[PhpUnitBridge] Ability to use different composer.json file
[DomCrawler] FormField: remove an useless return statement
[Config] ReflectionClassResource check abstract ServiceSubscriberInterface and EventSubscriberInterface
Display the Welcome Page when there is no homepage defined
[DI] Remove dead dumper check
Make KernelInterface docblock more fit for bundle-less environment
fix regression when extending the Container class without a constructor
fix the updating of timestamp in the MemcachedSessionHandler
[SecurityBundle] Make extra character non mandatory in regex
[Config] Add characters to the regex
...
* 3.4: (22 commits)
[DI] Add tests for EnvVarProcessor
[Bridge\PhpUnit] Fix#26430 Cannot autoload listeners
Make sure we always render errors. Eventhough labels are disabled
Make sure form errors is valid HTML
[HttpKernel] Allow generators in registerBundle
[TwigBundle] document TwigRenderer BC break in UPGRADE-3.4
Extra line to bootstrap 3 horizontal layout
[Serializer] Remove const override
Update Client.php
[PhpUnitBridge] Ability to use different composer.json file
[DomCrawler] FormField: remove an useless return statement
[Config] ReflectionClassResource check abstract ServiceSubscriberInterface and EventSubscriberInterface
Display the Welcome Page when there is no homepage defined
fix regression when extending the Container class without a constructor
fix the updating of timestamp in the MemcachedSessionHandler
[SecurityBundle] Make extra character non mandatory in regex
[Config] Add characters to the regex
bumped Symfony version to 3.4.7
updated VERSION for 3.4.6
updated CHANGELOG for 3.4.6
...
This PR was squashed before being merged into the 4.1-dev branch (closes#26308).
Discussion
----------
[Config] Introduce BuilderAwareInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| 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 -->
Split `ParentNodeDefinitionInterface` into `BuilderAwareInterface`.
Use case is custom node definition (extended from VariableNodeDef) with a corresponding prototyped array node.
To set the actual prototype i need the builder at definition level, provided by `ParentNodeDefinitionInterface`. However i don't implement `children()` + `append()`, i solely need the builder scope.
To go after #26297
Commits
-------
1353694 [Config] Introduce BuilderAwareInterface
This PR was merged into the 3.4 branch.
Discussion
----------
[DependencyInjection] fix regression when extending the Container class without a constructor
| Q | A
| ------------- | ---
| Branch? | 3.4+
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/26397
| License | MIT
| Doc PR | -
fix regression introduced in c026ec63e3 (diff-f7b23d463cba27ac5e4cb677f2be7623R985)
Commits
-------
0beb64a fix regression when extending the Container class without a constructor
This PR was squashed before being merged into the 3.4 branch (closes#26542).
Discussion
----------
[DI] Add tests for EnvVarProcessor
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | n/a
Add tests for the `EnvVarProcessor` as it doesn't have any at the moment.
Originally from this PR against master, https://github.com/symfony/symfony/pull/26498
Commits
-------
2992bb3 [DI] Add tests for EnvVarProcessor
This PR was merged into the 3.4 branch.
Discussion
----------
[Bridge\PhpUnit] Cannot autoload class "\Symfony\Bridge\PhpUnit\SymfonyTestsListener"
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see below -->
| Bug fix? | yes
| 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 files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26430
| License | MIT
| Doc PR | - <!-- required for new features -->
Allows composer to discover the class for autoloading when using `composer install --classmap-authoritative`
Commits
-------
6b6fdab [Bridge\PhpUnit] Fix#26430 Cannot autoload listeners
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Allow generators in registerBundle
| 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 |
Flex recipe [utilizes generator in Kernel.php](a067bebf03/symfony/framework-bundle/3.3/src/Kernel.php (L33)). This needs to be explicitly allowed in interface.
Commits
-------
f36cfd4 [HttpKernel] Allow generators in registerBundle
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] Fix docblock of ClassMetadata#members
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Structure of this array is in reality array<string, array<int, PropertyMetadata>>, so MemberMetadata is 2 levels deep in this array, instead of one
Commits
-------
44008c4 [Validator] Fix docblock of ClassMetadata#members
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FrameworkBundle] Use `a::b` notation in ControllerTrait docblock
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26085
| License | MIT
| Doc PR | already documented
<!--
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.
-->
Replaced the deprecated the bundle notation with the new `a::b` notation in the docblock of `ControllerTrait::forward`
Commits
-------
973c5ec [FrameworkBundle] Use `a::b` notation in ControllerTrait docblock
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Routing] remove capturing groups from requirements, they break the merged regex
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Group positions are now used to extract variables. Capturing groups in requirements break them for now.
Commits
-------
8444022 [Routing] remove capturing groups from requirements, they break the merged regex
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Routing] Allow inline definition of requirements and defaults
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26481
| License | MIT
| Doc PR | -
```
{bar} -- no requirement, no default value
{bar<.*>} -- with requirement, no default value
{bar?default_value} -- no requirement, with default value
{bar<.*>?default_value} -- with requirement and default value
{bar?} -- no requirement, with default value of null
{bar<.*>?} -- with requirement and default value of null
```
Details:
* Requirements and default values are not escaped in any way. This is valid -> `@Route("/foo/{bar<>>?<>}")` (requirements = `>` and default value = `<>`)
* Because of the lack of escaping, you can't use a closing brace (`}`) inside the default value (wrong -> `@Route("/foo/{bar<\d+>?aa}bb}")`) but you can use it inside requirements (correct -> `@Route("/foo/{bar<\d{3}>}")`).
* PHP constants are not supported (use the traditional `defaults` syntax for that)
* ...
Commits
-------
67559e1 [Routing] Allow inline definition of requirements and defaults
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Routing] Implement i18n routing
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? |no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
This PR introduces support for I18N routing into core. This is a port from a bundle I've made recently, now merged into the default implementation. While it's ok to have this as a bundle, it was suggested by @nicolas-grekas to create a PR for this so it can be included into the core.
## New usages
### YAML
```yaml
contact:
controller: ContactController::formAction
path:
en: /send-us-an-email
nl: /stuur-ons-een-email
```
Will be effectively the same as declaring:
```yaml
contact.en:
controller: ContactController::formAction
path: /send-us-an-email
defaults:
_locale: en
contact.nl:
controller: ContactController::formAction
path: /stuur-ons-een-email
defaults:
_locale: nl
```
### Annotation usage:
```php
<?php
use Symfony\Component\Routing\Annotation\Route;
class ContactController
{
/**
* @Route({"en": "/send-us-an-email", "nl": "/stuur-ons-een-email"}, name="contact")
*/
public function formAction()
{
}
}
/**
* @Route("/contact")
*/
class PrefixedContactController
{
/**
* @Route({"en": "/send-us-an-email", "nl": "/stuur-ons-een-email"}, name="contact")
*/
public function formAction()
{
}
}
```
### Route generation
```php
<?php
/** @var UrlGeneratorInterface $urlGenerator */
$urlWithCurrentLocale = $urlGenerator->generate('contact');
$urlWithSpecifiedLocale = $urlGenerator->generate('contact', ['_locale' => 'nl']);
```
Route generation is based on your request locale. When not available it falls back on a configured default. This way of route generation means you have a "route locale switcher" out of the box, but generate the current route with another locale for most cases.
## Advantages
Having i18n routes defined like this has some advantages:
* Less error prone.
* No need to keep `requirements` or `defaults` in sync with other definitions.
* No need to `{_locale}` in the path (bad for route matching performance).
* Better developer experience.
### Next steps
I've ported all the things the bundle supported, before moving on I'd like to discuss this first in order not to waste our collective time. This initial PR should give a clear enough picture to see what/how/why this is done.
If and when accepted I/we can move forward to implement the XML loader and @nicolas-grekas mentioned there should be a `Configurator` implemented for this as well. He opted to help with this (for which I'm very thankful).
- [x] Yaml Loader
- [x] Annotation Loader
- [x] XML Loader
- [x] PHP Loader?
- [ ] Documentation
Commits
-------
4ae66dc [Routing] Handle "_canonical_route"
e32c414 [Routing] Implement i18n routing
This PR was merged into the 3.4 branch.
Discussion
----------
Make sure form errors is valid HTML
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26461
| License | MIT
| Doc PR |
Using `<div>` and `<ul>` in a `<label>` is not valid HTML. This PR uses `<span>`s instead and some Bootstrap 4 classes to make it look just like before.
Commits
-------
5dcaaadb5e Make sure form errors is valid HTML
This PR was merged into the 2.7 branch.
Discussion
----------
[DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/26543
| License | MIT
| Doc PR | -
Discussion and explanations in the linked issue https://github.com/symfony/symfony/issues/26543
Commits
-------
f656dc2082 [DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore
This PR was merged into the 3.4 branch.
Discussion
----------
Readd 'form_label_errors' block to disable errors on form labels
| Q | A
| ------------- | ---
| Branch? | 3.4
| 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 -->
| License | MIT
Re-added **form_label_errors** block on bootstrap 4 form themes.
You can disable errors shown on form labels by simply extend bootstrap4 layout and empty **form_label_errors** block. See below:
```
{% use "bootstrap_4_layout.html.twig" %}
{# Disable errors shown on form labels #}
{% block form_label_errors %}{% endblock form_label_errors %}
```
Block previously removed [here](b375957c8b (diff-62cb2a10f5a37db0e87e3bd81609b17dR186)) by @nicolas-grekas.
cc @Nyholm
Commits
-------
5b4354f46c Readd 'form_label_errors' block to disable errors on form labels
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Console] Make pretty the `box` style 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 | /
The console component is the 2nd most popular Symfony component with 70M of downloads. I think such composant has to provide faultless tables, with perfect management of borders, especially since the new `box` style table has been merged (cf https://github.com/symfony/symfony/pull/25301).
![screenshot from 2017-12-12 18-47-34](https://user-images.githubusercontent.com/4578773/33876488-6e1dc81c-df71-11e7-924f-d5e8078d957f.png)
Commits
-------
41f52b3a09 Make pretty the `box` style table
This PR was merged into the 2.7 branch.
Discussion
----------
[BrowserKit] Improves CookieJar::get
| 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? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
* change a call to `substr` + `strlen` to a single `strpos`
Commits
-------
57993143a9 [BrowserKit] Improves CookieJar::get
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle] HttpCache is not longer abstract
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
---
I don't really know why this class was abstract in the first place.
But it's not needed. A fresh symfony 4 application can use this class
directly without extending it.
Commits
-------
4d075da [FrameworkBundle] HttpCache is not longer abstract
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#26490).
Discussion
----------
[DomCrawler] Improve the sprintf() call in selectButton()
| 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? |no <!-- don't forget to update UPGRADE-*.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
Code cleanup and minor performance improvement. Similar to #26485.
Commits
-------
a00cce6 [DomCrawler] Improve the sprintf() call in selectButton()
This PR was merged into the 3.4 branch.
Discussion
----------
[Serializer] Remove const override
| Q | A
| ------------- | ---
| Branch? | 3.4
| 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 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
This public const was moved to parent class in https://github.com/symfony/symfony/pull/24816
Commits
-------
25312c4 [Serializer] Remove const override
This PR was merged into the 4.1-dev branch.
Discussion
----------
[BrowserKit] Avoid nullable values in some Client's methods
| Q | A
| ------------- | ---
| Branch? | master | Bug fix? | yes/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 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.
-->
I suggest the some methods in `Client` should not return `null` for simplify usage.
If you are trying to get response from client when `request` method was not called, it seems an exception should be throwed.
Commits
-------
c2c285355b Avoid nullable values in some Client's methods
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FrameworkBundle] show the unregistered command warning at the end of the list command
| 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 | #26203 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | I don't think we need one.
This PR modify the warning error when you have unregistered command on the list command, it shows it at the end.
Commits
-------
99b104ab5c [FrameworkBundle] show the unregistered command warning at the end of the list command
This PR was squashed before being merged into the 4.1-dev branch (closes#26417).
Discussion
----------
[Console] Improved rendering of optional arguments in command synopsis
Current rendering:
```
build [options] [--] [<file>] [<output-dir>] [<packages>]...
```
Fixed (and actually correct) rendering:
```
build [options] [--] [<file> [<output-dir> [<packages>...]]]
```
Also dropped duplicating required array-type argument. There's just no need for that, it only confuses the reader.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes and no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | --
| License | MIT
| Doc PR | --
Optional arguments can not be independent, in general. Neither the argument parser allows that.
Commits
-------
938012f0ea [Console] Improved rendering of optional arguments in command synopsis
This PR was squashed before being merged into the 4.1-dev branch (closes#26423).
Discussion
----------
[DomCrawler] minor performance improvement
| 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? |no <!-- don't forget to update UPGRADE-*.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
Commits
-------
eead301 [DomCrawler] minor performance improvement
This PR was merged into the 3.4 branch.
Discussion
----------
[Fix][3.4][HttpFoundation] Fix the updating of timestamp in the MemcachedSessionHandler
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Conditions: Symfony 3.4, PHP7 and sessions handled over memcache.
Apparently `memcached::touch()` returns `false` on a subsequent call with the same parameters. Since `updateTimestamp` is used in `AbstractSessionHandler::write()`
```
public function write($sessionId, $data)
{
if (\PHP_VERSION_ID < 70000 && $this->prefetchData) {
$readData = $this->prefetchData;
$this->prefetchData = null;
if ($readData === $data) {
return $this->updateTimestamp($sessionId, $data);
}
}
...
```
the result is that `write()` will return `false` on **any subsequent request within the same second** causing the following error:
```
HP Fatal error: Uncaught Symfony\Component\Debug\Exception\ContextErrorException: Warning: session_write_close(): Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/var/lib/php/sessions) in Unknown:0
Stack trace:
#0 [internal function]: Symfony\Component\Debug\ErrorHandler->handleError(2, 'session_write_c...', 'Unknown', 0, NULL)
#1 [internal function]: session_write_close()
#2 {main}
thrown in Unknown on line 0
```
Can be reproduced on `symfony/skeleton:3.4` adding the following code to `public/index.php` and performing two consecutive requests:
```
$session = $kernel->getContainer()->get('session');
$session->set("foo", "bar");
```
Commits
-------
d007469877 fix the updating of timestamp in the MemcachedSessionHandler
This PR was merged into the 3.4 branch.
Discussion
----------
[Config] Add characters to the regex
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Commits
-------
dff88d44be [Config] Add characters to the regex
This PR was merged into the 3.4 branch.
Discussion
----------
[Config] ReflectionClassResource check abstract class
generate Signature
update hash methods `ServiceSubscriberInterface::getSubscribedServices` and `EventSubscriberInterface::getSubscribedEvents` if the class is not abstract
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26459, #26501
| License | MIT
Commits
-------
e85151483c [Config] ReflectionClassResource check abstract ServiceSubscriberInterface and EventSubscriberInterface
This PR was merged into the 2.7 branch.
Discussion
----------
[DomCrawler] extract(): fix a bug when the attribute list is empty
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| 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 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
Commits
-------
028c9f2366 [DomCrawler] extract(): fix a bug when the attribute list is empty
This PR was merged into the 4.1-dev branch.
Discussion
----------
Default deleteFileAfterSend() to true
This should default to true when called since there is only one option.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | N/A
| Fixed tickets | N/A
| License | MIT
| Doc PR |
<!--
* Defaults deleteFileAfterSend() to true
-->
Commits
-------
1de6f738ef Default deleteFileAfterSend() to true
This PR was squashed before being merged into the 3.4 branch (closes#26041).
Discussion
----------
Display the Welcome Page when there is no homepage defined
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony-docs/issues/9178
| License | MIT
| Doc PR | -
In 3.4 we added a trick to display the Welcome Page when the user browses `/` and there are no routes defined. However, when using the `website-skeleton` (which is what most newcomers use ... and they are the ones that mostly need the "Welcome Page") the premise about *"no routes are defined"* is never true and the Welcome Page is never shown (see https://github.com/symfony/symfony-docs/issues/9178 for one of the multiple error reports we've received).
So, I propose to make this change to always define the "Welcome Page" as the fallback:
* If no routes are defined for `/`, the Welcome Page is displayed.
* If there is a route defined for `/`, this code will never be executed because it's the last condition of the routing matcher.
Commits
-------
5b0d9340d7 Display the Welcome Page when there is no homepage defined
This PR was squashed before being merged into the 4.1-dev branch (closes#26398).
Discussion
----------
[WebProfilerBundle] Display the missing translation panel by default
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Display the "Missing Translations" panel by default ... except if there are no missing translations.
Commits
-------
15fe686a58 [WebProfilerBundle] Display the missing translation panel by default
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Security] AuthenticationUtils::getLastUsername() return type inconsistency
Always return `string`, never `null` according to the `@return` annotation tag.
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Alternatively, string return might be nullable:
```php
return null === $session ? null : $session->get(Security::LAST_USERNAME);
```
Is test needed for this change?
Commits
-------
743692c3fd AuthenticationUtils::getLastUsername()` now always returns a string.
This PR was squashed before being merged into the 4.1-dev branch (closes#26467).
Discussion
----------
Add UsernameNotFoundException declaration to refreshUser().
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | maybe
| New feature? | maybe
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Symfony\Component\Security\Core\User\UserProviderInterface::refreshUser() does not declare that implementations may throw a UsernameNotFoundException, although a) it makes sense, as the user could have been deleted since the last load, and b) the ContextListener already handles the UsernameNotFoundException. So it looks like someone thought of this, but simply forgot the annotation.
Unsure if this is a bugfix or a feature, but as it doesn't change executed code, master should be soon enough.
Commits
-------
f7a0c46338 Add UsernameNotFoundException declaration to refreshUser().
* 2.7:
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
This PR was squashed before being merged into the 2.7 branch (closes#26452).
Discussion
----------
[Intl] Load locale aliases to support alias fallbacks
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #21457
| License | MIT
| Doc PR | -
For example, `zh_TW` is an alias to `zh_Hant_TW`. Without aliases,` zh_TW` would fall back to `zh` (which is incorrect). With aliases loaded, `zh_TW` will fall back properly to `zh_Hant_TW`.
Judging by git history this has never worked.
```php
\Locale::setDefault('zh'); dump(Intl::getRegionBundle()->getCountryName('AD'));
\Locale::setDefault('zh_TW'); dump(Intl::getRegionBundle()->getCountryName('AD'));
\Locale::setDefault('zh_Hant_TW'); dump(Intl::getRegionBundle()->getCountryName('AD'));
```
Before:
```
"安道尔"
"安道尔"
"安道爾"
```
After:
```
"安道尔"
"安道爾"
"安道爾"
```
All tests are passing, including those from the `intl-data` group.
Commits
-------
1debf79430 [Intl] Load locale aliases to support alias fallbacks
* 4.0:
fix the handling of timestamp in the MongoDBSessionHandler
Improve the documentation of `Finder::exclude()`
[DI] Skip resource tracking if disabled
[WebProfilerBundle] fix wrong variable for profiler counting ajax requests
This PR was merged into the 4.1-dev branch.
Discussion
----------
Revert "feature #24763 [Process] Allow writing portable "prepared" command lines (Simperfit)"
| 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 reverts commit 136408937b, reversing
changes made to e043478ba5.
As discussed in #24763 and #26344
This doens't revert the possibility to use prepared command lines. They just won't be *portable* anymore, unless special care is taken by "userland".
Ie the placeholders need to be shell-dependent: use eg `echo "$FOO"` on *nix (the double quotes *are* important), and `echo !FOO!` on Windows (no double quotes there).
Commits
-------
6a98bfa8d7 Revert "feature #24763 [Process] Allow writing portable "prepared" command lines (Simperfit)"
* 4.0:
[DI] Fix missing "id" normalization when dumping the container
Add entry for `container.dumper.inline_class_loader` param at `UPGRADE-3.4.md` and `UPGRADE-4.0.md`
* 3.4:
[DI] Fix missing "id" normalization when dumping the container
Add entry for `container.dumper.inline_class_loader` param at `UPGRADE-3.4.md` and `UPGRADE-4.0.md`
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
* 2.8:
[WebProfilerBundle] Fix Debug toolbar breaks app
bumped Symfony version to 2.8.36
updated VERSION for 2.8.35
updated CHANGELOG for 2.8.35
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
* 2.7:
[WebProfilerBundle] Fix Debug toolbar breaks app
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
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Silence "Failed to remove directory" on cache:clear
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #2600
| License | MIT
| Doc PR | -
Let's improve the experience of ppl (see old linked issue). This warning is just noise to most.
Commits
-------
3ba624af9f [FrameworkBundle] Silence "Failed to remove directory" on cache:clear
This PR was squashed before being merged into the 3.4 branch (closes#26327).
Discussion
----------
[Form][WCAG] Errors sign for people that do not see colors
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
According to my friend and WCAG2 expect [Sandra](https://twitter.com/sandrability):
> The form errors is correctly encoded and works great. But visually they may be hard to see for people that do not see colors very well. Try to improve errors with an icon to make it more visual clear that an error has occurred.
![screen shot 2018-02-26 at 17 42 01](https://user-images.githubusercontent.com/1275206/36802282-c81357c6-1cb4-11e8-843c-4592e3d597f9.png)
Commits
-------
3f8cd05 [Form][WCAG] Errors sign for people that do not see colors
This PR was squashed before being merged into the 3.4 branch (closes#26326).
Discussion
----------
[Form][WCAG] Added role="presentation" on tables & removed bootstrap4 table
| 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 |
According to my friend and WCAG2 expect [Sandra](https://twitter.com/sandrability):
> Tables works best for table data, it should not be used for doing layouts. If you really really want to use the label add `role="presentation"`. This will make screen readers to ignore the table structure which will make it easier to navigate. It will also prevent screen readers to read "row 1, column 1".
> But we should consider not using a table here.
Commits
-------
635220a [Form][WCAG] Added role=\"presentation\" on tables & removed bootstrap4 table
* 4.0:
[Form][WCAG] Add hidden labels on date and time fields
Pass on previous exception in FatalThrowableError
[Routing] remove dead code
[Routing] fix typo
[Form][WCAG] Fixed HTML errors
fix merge
[FrameworkBundle] [Console] add a warning when command is not found
[WebProfilerBundle] limit ajax request to 100 and remove the last one
* 3.4:
[Form][WCAG] Add hidden labels on date and time fields
Pass on previous exception in FatalThrowableError
[Routing] remove dead code
[Routing] fix typo
[Form][WCAG] Fixed HTML errors
fix merge
[FrameworkBundle] [Console] add a warning when command is not found
[WebProfilerBundle] limit ajax request to 100 and remove the last one
This PR was squashed before being merged into the 3.4 branch (closes#26325).
Discussion
----------
[Form][WCAG] Add hidden labels on date and time fields
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License | MIT
| Doc PR |
According to my friend and WCAG2 expect [Sandra](https://twitter.com/sandrability):
> "Guidance texts" (my translation) on DateType and DateTimeType etc are missing. It is great that they are grouped with a "fieldset" but it will be more clear if there was a label on each select. Especially since different countries have different time and date formats. The time form is read like "00 00" and you have no idea if it is seconds, minutes or hours. You may do "guidance texts" visually hidden if you do not want to change the looks of the form. But since "month" is shorten to "Jan" instead of "January" you may want to have clear and visual guidance texts.
Commits
-------
14978e905c [Form][WCAG] Add hidden labels on date and time fields
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FORM] Fix HTML errors.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
As mentioned in #26328.
Range and color do not support "required" attribute
Commits
-------
f75d8c1985 Fix HTML errors.
This PR was merged into the 3.4 branch.
Discussion
----------
[WebProfilerBundle] limit ajax request to 100 and remove the last one
| Q | A
| ------------- | ---
| Branch? | 3.4
| 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 | none fix merge
| License | MIT
Merging back the bugfix to 3.4.
Commits
-------
33bace4 [WebProfilerBundle] limit ajax request to 100 and remove the last one
This PR was squashed before being merged into the 3.4 branch (closes#26328).
Discussion
----------
[Form][WCAG] Fixed HTML errors
| 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 |
According to my friend and WCAG2 expect [Sandra](https://twitter.com/sandrability):
> Fix your HTML errors.
Should I fix the same issues on other forms as well? Or could someone claim that is a BC break?
Commits
-------
fe668190c8 [Form][WCAG] Fixed HTML errors
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] [Console][DX] add a warning when command is not found
| Q | A
| ------------- | ---
| Branch? | 3.4
| 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 files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | none
| License | MIT
| Doc PR |
This PR add DX on the the console `find()` and `get()` methods when a command is not found because it has not been registered properly.
Commits
-------
efd8f7fa3a [FrameworkBundle] [Console] add a warning when command is not found
* 4.0:
Fix typos
[Routing] remove useless failing mocks
[appveyor] Workaround GitHub disabling of low versions of TLS
Use long array syntax
[Routing] Fix GC control of PHP-DSL
[Routing] Don't throw 405 when scheme requirement doesn't match
[Routing] Revert throwing 405 on missed slash/scheme redirections
[WebProfilerBundle] fix test after ajax path updated
Fix ArrayInput::toString() for InputArgument::IS_ARRAY args
Update excluded_ajax_paths for sf4
Add missing use for RoleInterface
Add missing use of Role
[Routing] fix CS
add container.autowiring.strict_mode to 3.4 docs
Set controller without __invoke method from invokable class
[VarDumper] Fixed PHPDoc
* 3.4:
[Routing] remove useless failing mocks
[appveyor] Workaround GitHub disabling of low versions of TLS
Use long array syntax
[Routing] Fix GC control of PHP-DSL
[Routing] Don't throw 405 when scheme requirement doesn't match
[Routing] Revert throwing 405 on missed slash/scheme redirections
[WebProfilerBundle] fix test after ajax path updated
Fix ArrayInput::toString() for InputArgument::IS_ARRAY args
Update excluded_ajax_paths for sf4
Add missing use for RoleInterface
[Routing] fix CS
add container.autowiring.strict_mode to 3.4 docs
Set controller without __invoke method from invokable class
[VarDumper] Fixed PHPDoc
This PR was merged into the 3.4 branch.
Discussion
----------
[Routing] Fix GC control of PHP-DSL
| 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 | -
Adding fluently in a collection is broken currently.
Commits
-------
239f2e2 [Routing] Fix GC control of PHP-DSL
This PR was merged into the 3.4 branch.
Discussion
----------
Use long array syntax
| Q | A
| ------------- | ---
| Branch? | 3.4
| 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 -->
<!--
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
-------
2abb8a4 Use long array syntax
This PR was merged into the 3.4 branch.
Discussion
----------
Set controller without __invoke method from invokable class
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| 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 |
| License | MIT
| Doc PR |
Fixes one part of #25103
Commits
-------
cc68c5074e Set controller without __invoke method from invokable class
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Routing] Redirect from trailing slash to no-slash when possible
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26207
| License | MIT
| Doc PR | -
Implemented as suggest by @Tobion in https://github.com/symfony/symfony/pull/26059#issuecomment-365071281
When a route for `/foo` exists but the request is for `/foo/`, we now redirect.
(this complements the flipped side redirection, which already exists.)
Commits
-------
69a4e94130 [Routing] Redirect from trailing slash to no-slash when possible
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FrameworkBundle] fix lowest supported Serializer version
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The `AbstractObjectNormalizer::setMaxDepthHandler()` method does not
exist before `symfony/serializer` 4.1.
Commits
-------
3b092a08ea fix lowest supported Serializer version
This PR was merged into the 3.4 branch.
Discussion
----------
[PropertyInfo] throw exception if docblock factory does not exist
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26259
| License | MIT
| Doc PR |
Commits
-------
5cfceed throw exception if docblock factory does not exist
* 4.0:
[Translation] Process multiple segments within a single unit.
Document the container.autowiring.strict_mode option
fix custom radios/inputs for checkbox/radio type
Another PR template tweak
[FrameworkBundle] Add missing XML config for circular_reference_handler. Add tests.
fix CS
[PropertyInfo] ReflectionExtractor: give a chance to other extractors if no properties
Clean calls to http_build_query()
[WebProfilerBundle] limit ajax request to 100 and remove the last one
Add support for URL-like DSNs for the PdoSessionHandler
removed version in @final @internal for version < 4.0
[HttpFoundation] Fix missing "throw" in JsonResponse
Improve the documentation of
Suppress warning from sapi_windows_vt100_support on stream other than STDIO
removed extra-verbose comments
Fixes#26136: Avoid emitting warning in hasParameterOption()
Added a README entry to the PR template
[HttpFoundation] Add x-zip-compressed to MimeTypeExtensionGuesser.
[DI] Add null check for removeChild
* 3.4:
[Translation] Process multiple segments within a single unit.
Document the container.autowiring.strict_mode option
fix custom radios/inputs for checkbox/radio type
Another PR template tweak
[FrameworkBundle] Add missing XML config for circular_reference_handler. Add tests.
fix CS
[PropertyInfo] ReflectionExtractor: give a chance to other extractors if no properties
Clean calls to http_build_query()
[WebProfilerBundle] limit ajax request to 100 and remove the last one
Add support for URL-like DSNs for the PdoSessionHandler
[HttpFoundation] Fix missing "throw" in JsonResponse
Improve the documentation of
Suppress warning from sapi_windows_vt100_support on stream other than STDIO
removed extra-verbose comments
Fixes#26136: Avoid emitting warning in hasParameterOption()
Added a README entry to the PR template
[HttpFoundation] Add x-zip-compressed to MimeTypeExtensionGuesser.
[DI] Add null check for removeChild
* 2.8:
Another PR template tweak
[PropertyInfo] ReflectionExtractor: give a chance to other extractors if no properties
Clean calls to http_build_query()
[WebProfilerBundle] limit ajax request to 100 and remove the last one
[HttpFoundation] Fix missing "throw" in JsonResponse
Improve the documentation of
Suppress warning from sapi_windows_vt100_support on stream other than STDIO
removed extra-verbose comments
Fixes#26136: Avoid emitting warning in hasParameterOption()
Added a README entry to the PR template
[HttpFoundation] Add x-zip-compressed to MimeTypeExtensionGuesser.
[DI] Add null check for removeChild
This PR was squashed before being merged into the 4.1-dev branch (closes#25732).
Discussion
----------
[Console] Add option to automatically run suggested command if there is only 1 alternative
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When mistyping a console command, you get an error giving suggested commands.
If there is only 1 alternative suggestion, this PR will give you the option to run that command instead. This makes it easier to run the correct command without having to re-type/copy-paste/update the previous run command
![console](https://user-images.githubusercontent.com/144858/34724377-4b46c726-f556-11e7-94a3-a9d7c9d75e74.gif)
Commits
-------
83d52f02f9 [Console] Add option to automatically run suggested command if there is only 1 alternative
This PR was squashed before being merged into the 4.1-dev branch (closes#26085).
Discussion
----------
Deprecate bundle:controller:action and service:method notation
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #25910
| License | MIT
| Doc PR |
The `a::b` notation had some awkward limitations. It supported `MyControllerClass::method` where `MyControllerClass` is either plain class or a service with the same name but the class must exists. This meant it did NOT support `my_service_controller_id::method` because the `class_exists` check would fail at the wrong point in time. But it did support services where class name == id, i.e. the new auto registration based psr naming. This made it very confusing.
I enhanced the `a::b` notation to be very straight forward:
- if `a` exists as a service then use `a` as a service
- otherwise try to use `a` as a class, i.e. `new $a()`
- otherwise check if a::b is a static method (only relevant when the class is abstract or has private contructor). this was potentially supported when using array controller syntax. it now works the same when using the `::` string syntax, like in php itself. since it only happens when nothing else works, it does not have any performance impact.
The old `a:b` syntax is deprecated and just forwards to `a::b` now internally, just as bundle:controller:action.
In general I was able to refactor the logic quite a bit because it always goes through `instantiateController` now.
Spotting deprecated usages is very easy as all outdated routing configs will trigger a deprecation with the DelegatingLoader and it will be normalized in the dumped routes. So you don't get a deprecation again in the ControllerResolver. But if the controller does not come from routing, e.g. twigs render controller function, then it will still be triggered there.
- [x] deprecate `a🅱️c`
- [x] deprecate `a:b`
- [x] update existing references to `a::b`
- [x] fix tests
- [x] fix/add support for static controllers
- [x] add support for closures as controllers
- [x] update Symfony\Component\Routing\Loader\ObjectRouteLoader
- [x] deprecate \Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser but we still need to use it in several places for BC.
- [x] add changelog/upgrade
- [x] update controller.service_arguments logic for double colon controller syntax
Commits
-------
f8a609cdbd Deprecate bundle:controller:action and service:method notation
This PR was merged into the 4.1-dev branch.
Discussion
----------
[MonologBridge] Allow to change level format in ConsoleFormatter
| 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 want to use this format `%datetime% <comment>[%level_name%]</comment> %start_tag%%message%%end_tag%`, but ConsoleFormatter formats in a way message looks like this:
![screenshot from 2018-02-19 01-54-21](https://user-images.githubusercontent.com/496233/36359102-d6c20e4c-1517-11e8-9988-8a49efc4cacb.png)
As you see, unnecessary padding looks like anomaly here and there is currently no way to remove it without making own formatter.
This option allows me to replace default padding format with `%s`.
Commits
-------
fbd257c25d [MonologBridge] Allow to change level format
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Lock] Add a TTL to refresh lock
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | see LockInterface's comment
| Tests pass? | yes
| Fixed tickets | NA
| License | MIT
| Doc PR | NA
Using remote locks in long processes needs to defines a fined grain refresh TTL. For instance, when looping over a long list of jobs we can extends the live of the lock by few seconds before processing each item.
But when the the jobs is splitted and each part to take the same time, we can not define the best TTL
Exemple
```
$lock->acquire();
$this->2minutesJob();
$lock->refresh();
$this->5minutesJob();
$lock->refresh();
$this->1minutesJob();
```
The purpose of this PR is to be able to override the default TTL
```
$lock->acquire();
$lock->refresh(120);
$this->2minutesJob();
$lock->refresh(300);
$this->5minutesJob();
$lock->refresh(60);
$this->1minutesJob();
```
Commits
-------
3b1f3286d8 Add a TTL to refresh lock
This PR was merged into the 2.8 branch.
Discussion
----------
[PropertyInfo] ReflectionExtractor: give a chance to other extractors if no properties
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no <!-- 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 | #25803 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | n/a
For instance when using `__call()`, see #25803.
<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->
Commits
-------
270147b04f [PropertyInfo] ReflectionExtractor: give a chance to other extractors if no properties
This PR was squashed before being merged into the 4.1-dev branch (closes#26108).
Discussion
----------
[Serializer] Add a MaxDepth handler
| 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 | api-platform/core#1130, api-platform/core#1528, api-platform/core#1528 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | todo <!--highly recommended for new features-->
Sometimes, instead of just stopping the serialization process when the configured max depth is reached, it can be interesting to let the user return something (like returning the identifier of the entity to stop manually the serialization process).
This PR also makes the max depth handling more similar to circular references handling (that already has the possibility to set a handler).
Commits
-------
ed975c764b [Serializer] Add a MaxDepth handler
This PR was merged into the 3.4 branch.
Discussion
----------
Add support for URL-like DSNs for the PdoSessionHandler
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25186
| License | MIT
| Doc PR |
This allows migrating away from the deprecated DbalSessionHandler when DBAL was used for its ability to be configured through a URL (which is what is provided on Heroku and some other PaaS).
I know that this is technically a new feature (and so may target master instead), but we currently have no way to configure a database session storage on Heroku in 4.0 (and in 3.4, it requires using a deprecated class).
I decided to add support for the URL-like configuration directly rather than adding support for passing a DBAL connection, to minimize the code changes.
I also left out the support for OCI in this feature, as the PDO DSN for the Oracle driver is totally crazy (it has nothing in common with other drivers). If someone wants to use a Oracle DB, they should pass the PDO DSN directly instead of a URL.
Differences with the URL handling in Doctrine DBAL:
- schemeless URLs are not supported (DBAL allows configuring the driver separately in case you don't have it in the URL)
- the query string is ignored (DBAL allows to use the query string to configure any supported DBAL params, which are driver-specific. Just use a DSN directly if you need them. PaaS are unlikely to provide such params anyway and they are the main motivation for this PR)
Commits
-------
14c35ad13c Add support for URL-like DSNs for the PdoSessionHandler
This PR was merged into the 4.1-dev branch.
Discussion
----------
Make deprecation notices less verbose
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
I think there is no need to say that deprecated features will be removed in the next major version. That makes messages more verbose for no real reasons.
Commits
-------
0c6ec3fec0 made deprecation notices less verbose
This PR was merged into the 2.7 branch.
Discussion
----------
[WebProfilerBundle] add a way to limit ajax request
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| 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 | #22688
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
I need to add the doc entry and the reproducer to test that everything is ok.
Commits
-------
9ff86d6181 [WebProfilerBundle] limit ajax request to 100 and remove the last one
This PR was merged into the 4.1-dev branch.
Discussion
----------
[BrowserKit] add a way to switch to ajax for one request
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #20306
| License | MIT
| Doc PR | will do
Follow the work on #20306.
/cc @fabpot is it the right implementation ?
Commits
-------
a10eae7d9e [BrowserKit] add a way to switch to ajax for one request
This PR was merged into the 4.0 branch.
Discussion
----------
removed version in @final @internal for version < 4.0
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
On 4.0+, I think we can removed the "since version 3.x" from `@final` and `@internal` annotations. I've kept them for things that reference version 4.x.
Commits
-------
ed27b12d2c removed version in @final @internal for version < 4.0
This PR was merged into the 4.1-dev branch.
Discussion
----------
[PropertyInfo] Added support for extracting type from constructor
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
adcb25ec01 [PropertyInfo] Added support for extracting type from constructor
* 4.0:
[Bridge/Twig] fix composer.json
bug #26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider
[WebProfilerBundle] Fix anchor CSS
[HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation
[WebProfilerBundle] Tweak default route name
updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7fb6a
Retro-fit proxy code to make it deterministic for older proxy manager implementations
[Serializer] remove unneeded php doc line
Yaml parser regression with comments and non-strings
Fixed broken tests
[TwigBridge] Apply some changes to support Bootstrap4-stable
* 3.4:
[Bridge/Twig] fix composer.json
bug #26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider
[WebProfilerBundle] Fix anchor CSS
[HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation
[WebProfilerBundle] Tweak default route name
updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7fb6a
Retro-fit proxy code to make it deterministic for older proxy manager implementations
Yaml parser regression with comments and non-strings
Fix undiscoverablility of SymfonyTestsListenerForV7
Fixed broken tests
[TwigBridge] Apply some changes to support Bootstrap4-stable
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26086
| License | MIT
| Doc PR | -
The compilation pass of AddAnnotationsCachedReaderPass relies on already removed definition `annotations.cached_reader` due to an alias to `annotation_reader`.
Since the definition is being removed because of alias, configured annotation cache provider is not injected and will default back to ArrayCache.
This PR replaces the use of `annotations.cached_reader` to `annotation_reader` to complete the injection of configured cache provider.
Commits
-------
dfd93da bug #26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation
When we call `\Symfony\Component\HttpFoundation\Session\Session::invalidate` the session will be emptied and given a new ID, however, since it is empty this `AbstractTestSessionListener` will not send a new cookie to the user, so the user is not caught up to the latest session ID and will re-generate a session with the old session ID on a new visit.
Thus, we the sessionID has changed during a request we must always send a new cookie with the new sessionID, even though the session is empty.
This behaviour is also what is shown in production (non-test) mode.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
Commits
-------
98f5d53 [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation
This PR was merged into the 3.4 branch.
Discussion
----------
[Stopwatch] updated phpdoc due to the addition of optional float precision
| Q | A
| ------------- | ---
| Branch? | 3.4/4.0
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/26204
| License | MIT
| Doc PR | -
Commits
-------
8278a47 updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7fb6a
* 2.7:
Clean calls to http_build_query()
[HttpFoundation] Fix missing "throw" in JsonResponse
Improve the documentation of
Suppress warning from sapi_windows_vt100_support on stream other than STDIO
removed extra-verbose comments
Fixes#26136: Avoid emitting warning in hasParameterOption()
Added a README entry to the PR template
[HttpFoundation] Add x-zip-compressed to MimeTypeExtensionGuesser.
[DI] Add null check for removeChild
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Process] Allow writing portable "prepared" command lines
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23778
| License | MIT
| Doc PR | symfony/symfony-docs#9295
This give the opportunity to create process commands that allow to changes only the values instead of changing the code.
Commits
-------
d1e4f489d1 [Process] Allow writing portable "prepared" command lines
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Serializer] add a constructor arguement to return csv always as collection
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no <!-- 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 | #21616
| License | MIT
| Doc PR | TODO create a doc PR for the 3 ways of getting csv collection, or a single
Coding in the train again ;).
![img_9980](https://user-images.githubusercontent.com/3451634/33417042-f13063e4-d59f-11e7-8f30-143da768b1d7.JPG)
This is to be able to add a new behaviour to the csv encoder when passing the alwaysAsCollection context key, this will return a collection even if there is only one element.
Commits
-------
d19d05dc5d [Serializer] add a context key to return csv always as collection
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Serializer] add a context key to return always as collection for XmlEncoder
| 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 | #25227
| License | MIT
| Doc PR |
This PR add a new `as_collection` context key in order to return always as a collection instead of returning a single elements when there are only one array.
there are only one PR for the CsvEncoder don't wanted to have only One PR containing the two changes. It feel better to have two PR that fix the behaviour on two different things. it's easy to review and to revert if it break something (which should not since we are testing the behaviour).
Commits
-------
adb428d314 [Serializer] add a context key to return always as collection for XmlEncoder
This allows migrating away from the deprecated DbalSessionHandler when
DBAL was used for its ability to be configured through a URL (which is
what is provided on Heroku and some other PaaS).
This PR was squashed before being merged into the 4.1-dev branch (closes#26140).
Discussion
----------
[Serializer] deserialize as a null when inner object cannot be created and type hint allows null
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
```php
class ObjectConstructorDummy
{
protected $foo;
public $bar;
private $baz;
public function __construct($foo, $bar, $baz)
{
$this->foo = $foo;
$this->bar = $bar;
$this->baz = $baz;
}
}
class DummyWithNullableConstructorObject
{
private $id;
private $inner;
public function __construct($id, ?ObjectConstructorDummy $inner)
{
$this->id = $id;
$this->inner = $inner;
}
public function getId()
{
return $this->id;
}
public function getInner()
{
return $this->inner;
}
}
```
Trying to deserialize to `DummyWithNullableConstructorObject` with the following data currently fails:
```php
[
'id' => 10,
'inner' => null
]
```
With this PR `DummyWithNullableConstructorObject ` would be constructed with `null` passed as `$inner` because of the type hint.
Commits
-------
2fe9eb1aba [Serializer] deserialize as a null when inner object cannot be created and type hint allows null
This PR was squashed before being merged into the 4.1-dev branch (closes#26213).
Discussion
----------
[FrameworkBundle] Add support to 307/308 HTTP status codes in RedirectController
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26171
| License | MIT
| Doc PR |
With this PR `RedirectController` will allow to create redirections with use of 307/308 HTTP status codes together with 301/302. Related RFC documents:
* https://tools.ietf.org/html/rfc7231
* https://tools.ietf.org/html/rfc7538
Commits
-------
64fb5a5663 [FrameworkBundle] Add support to 307/308 HTTP status codes in RedirectController
This PR was merged into the 3.4 branch.
Discussion
----------
Retro-fit proxy code to make it deterministic for older proxy manager implementations
Follow up on https://github.com/symfony/symfony/issues/25958#issuecomment-365543535
ProxyManager >= 7.2 already implements a deterministic identifier naming strategy which is critical for reproducible builds (https://github.com/symfony/symfony/issues/25958). but versions below that don’t. This is what this PR fixes. Here is more context: https://github.com/Ocramius/ProxyManager/pull/411
| 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 | -
Commits
-------
0f16056 Retro-fit proxy code to make it deterministic for older proxy manager implementations
This PR was squashed before being merged into the 3.4 branch (closes#25787).
Discussion
----------
Yaml parser regression with comments and non-strings
| Q | A
| ------------- | ---
| Branch? | 3.3 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | no
| Fixed tickets | #25786
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->
Commits
-------
a7e2a49 Yaml parser regression with comments and non-strings
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] Add x-zip-compressed to MimeTypeExtensionGuesser.
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | yes (kinda)
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
Zip files uploaded on Windows often have a mime type of `x-zip-compressed`. This patch adds support for this mime type to `MimeTypeExtensionGuesser`.
The mime type seems to be a valid mime type for zip files according to http://filext.com/file-extension/ZIP
Commits
-------
ba3e19ae21 [HttpFoundation] Add x-zip-compressed to MimeTypeExtensionGuesser.
This PR was squashed before being merged into the 2.7 branch (closes#26156).
Discussion
----------
Fixes#26136: Avoid emitting warning in hasParameterOption()
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26136
| License | MIT
| Doc PR | n/a
When hasParameterOption / getParameterOption is passed invalid parameters, a warning may be emitted. While the root cause of the warning is an invalid parameter supplied by the caller, earlier versions of Symfony accepted these parameters, which were effectively ignored.
In the context of these methods, what I mean by "invalid parameter" is an empty string, which is the correct datatype, but is not ever a useful thing to provide to these methods. Since empty strings here did not cause a problem in previous versions, and since Symfony is used by all sorts of projects for all sorts of purposes, it seems best to continue to be flexible about the parameters accepted by Symfony APIs.
Commits
-------
b32fdf1ca3Fixes#26136: Avoid emitting warning in hasParameterOption()
Zip files uploaded on Windows often have a mime type of `x-zip-compressed`. This patch adds support for this mime type to `MimeTypeExtensionGuesser`.
The mime type seems to be a valid mime type for zip files according to http://filext.com/file-extension/ZIP
This PR was merged into the 3.4 branch.
Discussion
----------
Fix undiscoverablility of SymfonyTestsListenerForV7
| Q | A
| ------------- | ---
| Branch? | `3.4@dev` (and `4@dev`)
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | n/a
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
As class is in wrong namespace, it's not discoverable by autoloader and during execution of aliasing we face following crash:
```
ker@dus:~/github/PHP-CS-Fixer λ vendor/bin/phpunit
Class 'Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerForV7' not found
```
-----------------
replaces #26180, which was wrongly sent (and merged) for `master` branch instead of `3.4`, sorry for mistake.
Commits
-------
538b257 Fix undiscoverablility of SymfonyTestsListenerForV7
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBridge] Apply some changes to support Bootstrap4-stable
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25655#25635#24435
| License | MIT
| Doc PR | -
Follow up of https://github.com/symfony/symfony/pull/25715, see discussion there.
This fixes the following errors:
- Delete form-control-label, don't used in Bootstrap 4
- Replace col-form-legend by col-form-label
- Separate the label and input (before the input was in the label)
- Use form-check-inline to put radio and/or checkboxes inline
- Add support of custom form for radio and checkboxes
- Fix input-group: MoneyType (Issue #25655), PercentType
- Remove form-control duplication (Issue #25635)
- Fix Errors in label (#24435)
Commits
-------
14e2282 Fixed broken tests
cf4e956 [TwigBridge] Apply some changes to support Bootstrap4-stable
This PR was merged into the 4.1-dev branch.
Discussion
----------
Fix undiscoverablility of SymfonyTestsListenerForV7
| Q | A
| ------------- | ---
| Branch? | `3.4@dev` (and `4@dev`)
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | n/a
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
As class is in wrong namespace, it's not discoverable by autoloader and during execution of aliasing we face following crash:
```
ker@dus:~/github/PHP-CS-Fixer λ vendor/bin/phpunit
Class 'Symfony\Bridge\PhpUnit\Legacy\SymfonyTestsListenerForV7' not found
```
Commits
-------
538b257 Fix undiscoverablility of SymfonyTestsListenerForV7
* 4.0:
[Serializer] optims and cleanup
do not mock the container builder in tests
[PhpUnitBridge] Added support for PHPUnit 7 in Coverage Listener
fix accessing request values
Avoid running the remove command without any packages
[Form] Add translations for Tagalog
* 3.4:
[Serializer] optims and cleanup
do not mock the container builder in tests
[PhpUnitBridge] Added support for PHPUnit 7 in Coverage Listener
fix accessing request values
Avoid running the remove command without any packages
[Form] Add translations for Tagalog
This PR was squashed before being merged into the 2.7 branch (closes#26141).
Discussion
----------
[Serializer] optims and cleanup
| Q | A
| ------------- | ---
| Branch? | 2.7 <!-- see below -->
| Bug fix? | no
| New feature? | no <!-- 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 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | n/a
Tiny optimizations and small code cleanup. The opcode triggering is especially useful in the hot path (normalizers and encoders) because it's a recursive process.
Commits
-------
8ee8387 [Serializer] optims and cleanup
This PR was merged into the 3.4 branch.
Discussion
----------
do not mock the container builder in tests
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
777acfb do not mock the container builder in tests
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpUnitBridge] Added support for PHPUnit 7 in Coverage Listener
| 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 |
Commits
-------
6c0e6af [PhpUnitBridge] Added support for PHPUnit 7 in Coverage Listener
* 4.0:
[Routing] Throw 405 instead of 404 when redirect is not possible
[Process] fix test case
Add security.tl.xlf to legacy directory
[Security][Validator] Add translations for Tagalog
fixed typo
Typo fix in security component lithuanian translation.
[TwigBundle][WebProfilerBundle] Fix JS collision
[Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
* 3.4:
[Routing] Throw 405 instead of 404 when redirect is not possible
[Process] fix test case
Add security.tl.xlf to legacy directory
[Security][Validator] Add translations for Tagalog
fixed typo
Typo fix in security component lithuanian translation.
[TwigBundle][WebProfilerBundle] Fix JS collision
[Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
* 2.8:
[Routing] Throw 405 instead of 404 when redirect is not possible
[Process] fix test case
Add security.tl.xlf to legacy directory
[Security][Validator] Add translations for Tagalog
fixed typo
Typo fix in security component lithuanian translation.
[Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
* 2.7:
[Routing] Throw 405 instead of 404 when redirect is not possible
[Process] fix test case
Add security.tl.xlf to legacy directory
[Security][Validator] Add translations for Tagalog
fixed typo
Typo fix in security component lithuanian translation.
[Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
This PR was squashed before being merged into the 4.1-dev branch (closes#22447).
Discussion
----------
[WebProfilerBundle] Imply forward request by a new X-Previous-Debug-Token header
| Q | A
| ------------- | ---
| Branch? | 4.1
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
TLDR; imply a "forwarded" request in the profiler if one _returns_ a response with a x-debug-token set. Otherwise dont.
____
Currently a forward request is implied by the WDT/profiler based on the latest sub-request made, however the main request can return it's own response, or one from a non-latest sub-request. The current behavior is a bit misleading imo.
```php
public function indexAction(Request $request)
{
$bar1 = $this->forward(__CLASS__.'::barAction');
$bar2 = $this->forward(__CLASS__.'::bar2Action');
return $bar1;
}
```
It shows the request was forwarded to `bar2Action`. This changes that, so that `barAction` is shown instead. No forward is implied if a new response was returned by `indexAction`.
![image](https://cloud.githubusercontent.com/assets/1047696/25064022/e24d999e-21f1-11e7-8f94-afa3fad7462f.png)
~~Note we dont really need the collector in the framework bundle anymore with this approach.~~ deprecated it.
Commits
-------
07dd09db59 [WebProfilerBundle] Imply forward request by a new X-Previous-Debug-Token header
This PR was merged into the 2.7 branch.
Discussion
----------
[Routing] Throw 405 instead of 404 when redirect is not possible
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Finishes #25962.
Commits
-------
92842814f6 [Routing] Throw 405 instead of 404 when redirect is not possible
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBundle][WebProfilerBundle] Fix JS collision
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes/no
| Fixed tickets | #25894
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->
Commits
-------
da39e01eb9 [TwigBundle][WebProfilerBundle] Fix JS collision
This PR was merged into the 4.1-dev branch.
Discussion
----------
[DoctrineBridge] Add support for datetime immutable types in doctrine type guesser
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Add support for datetime immutable types in doctrine type guesser now that we support `DateTimeImmutable` input in the form component.
Commits
-------
8c94fef7f2 Add support for immutable types in doctrine type guesser
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Workflow] Drop nofooter option in PlantUmlDumper (dead code)
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
---
I also update the test suite: Dumping a worklow with a state machine
dumper does not make sense.
Commits
-------
9b946471e0 [Workflow] Drop nofooter option in PlantUmlDumper (dead code)
* 4.0:
[YAML] Issue #26065: leading spaces in YAML multi-line string literals
[Bridge\PhpUnit] Exit as late as possible
[Bridge\PhpUnit] Cleanup BC layer
[PhpBridge] add PHPUnit 7 support to SymfonyTestsListener
[Lock] Log already-locked errors as "notice" instead of "warning"
add context to serialize and deserialize
Update Repository Symlink Helper
isCsrfTokenValid() replace string by ?string
Document explicitly that dotfiles and vcs files are ignored by default
[HttpKernel] don't try to wire Request argument with controller.service_arguments
Make kernel build time optionally deterministic
Use 0 for unlimited expiry
[Routing] fix typo
Bump default PHPUnit version from 6.3 to 6.5
do not mock the container builder in tests
[Cache][WebProfiler] fix collecting cache stats with sub-requests + allow clearing calls
* 3.4:
[YAML] Issue #26065: leading spaces in YAML multi-line string literals
[Bridge\PhpUnit] Exit as late as possible
[Bridge\PhpUnit] Cleanup BC layer
[PhpBridge] add PHPUnit 7 support to SymfonyTestsListener
[Lock] Log already-locked errors as "notice" instead of "warning"
add context to serialize and deserialize
Update Repository Symlink Helper
Document explicitly that dotfiles and vcs files are ignored by default
[HttpKernel] don't try to wire Request argument with controller.service_arguments
Make kernel build time optionally deterministic
Use 0 for unlimited expiry
[Routing] fix typo
Bump default PHPUnit version from 6.3 to 6.5
do not mock the container builder in tests
[Cache][WebProfiler] fix collecting cache stats with sub-requests + allow clearing calls
* 2.8:
[Bridge\PhpUnit] Exit as late as possible
Update Repository Symlink Helper
Document explicitly that dotfiles and vcs files are ignored by default
do not mock the container builder in tests
* 2.7:
[Bridge\PhpUnit] Exit as late as possible
Update Repository Symlink Helper
Document explicitly that dotfiles and vcs files are ignored by default
do not mock the container builder in tests
This PR was merged into the 3.4 branch.
Discussion
----------
[Bridge\PhpUnit] Cleanup BC layer
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Follow up of #26024
Commits
-------
c41681c [Bridge\PhpUnit] Cleanup BC layer
This PR was squashed before being merged into the 3.4 branch (closes#26067).
Discussion
----------
[YAML] Issue #26065: leading spaces in YAML multi-line string literals
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26065
| License | MIT
| Doc PR | no
Doing this:
Yaml::dump(
["text" => " leading space in first line\nno leading space in last line\n"],
2,
4,
Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK
);
Will produce this:
text: |
leading space in first line
no leading space in last line
Which is invalid YAML because when the first line has leading spaces it needs a [block indentation indicator](http://www.yaml.org/spec/1.2/spec.html#id2793979) like this:
text: |4
leading space in first line
no leading space in last line
This pull requests contains a test and a patch.
Commits
-------
aa95663 [YAML] Issue #26065: leading spaces in YAML multi-line string literals
This PR was merged into the 2.7 branch.
Discussion
----------
Exit as late as possible
People might want to register other shutdown functions that should be
able to control the exit code themselves, without the deprecation error
handler taking over. The php manual says:
> If you call exit() within one registered shutdown function, processing
> will stop completely and no other registered shutdown functions will be
> called.
See https://secure.php.net/manual/en/function.register-shutdown-function.php
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->
Commits
-------
97370a3 [Bridge\PhpUnit] Exit as late as possible
People might want to register other shutdown functions that should be
able to control the exit code themselves, without the deprecation error
handler taking over. The php manual says:
> If you call exit() within one registered shutdown function, processing
> will stop completely and no other registered shutdown functions will be
> called.
See https://secure.php.net/manual/en/function.register-shutdown-function.php
This PR was merged into the 3.4 branch.
Discussion
----------
[Cache][WebProfiler][3.4] fix collecting cache stats with sub-requests + allow clearing calls
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/23820
| License | MIT
| Doc PR | -
This is a follow-up PR for https://github.com/symfony/symfony/pull/26080. It additionally adds the reset behavior for the `TraceableAdapter` back.
Commits
-------
132bba6 [Cache][WebProfiler] fix collecting cache stats with sub-requests + allow clearing calls
This PR was squashed before being merged into the 3.4 branch (closes#26024).
Discussion
----------
[PhpBridge] add PHPUnit 7 support to SymfonyTestsListener
| Q | A
| ------------- | ---
| Branch? | 3.4 up to 4.0 for bug fixes <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- 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 | #26017 <!-- #-prefixed issue number(s), if any -->
| License | MIT
Add support for the new PHPUnit 7 major release to the PHP Bridge for PHPUnit.
I wasn't sure about making a second legacy class here, or the naming of that class - but it seems like something like this would be required. Can re-name if there's a better suggested approach.
Commits
-------
a175a25 [PhpBridge] add PHPUnit 7 support to SymfonyTestsListener
This PR was merged into the 3.4 branch.
Discussion
----------
[Lock] Log already-locked errors as "notice" instead of "warning"
| 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 | #25887 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | todo
We add the ability to specify the log level we want in the lock component. That could be useful when parsing the logs.
![img_3186 heic](https://user-images.githubusercontent.com/3451634/35733664-8ed991dc-081e-11e8-89dd-9efff253e492.jpeg)
Commits
-------
2a74edb [Lock] Log already-locked errors as "notice" instead of "warning"
This PR was merged into the 3.4 branch.
Discussion
----------
Bump default PHPUnit version from 6.3 to 6.5
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no, but unrelated
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
This PR bumps the default PHPUnit version for php ≥ 7.2 from the outdated 6.3 to the currently maintained version 6.5.
Commits
-------
aeffc5f Bump default PHPUnit version from 6.3 to 6.5
This PR was merged into the 3.4 branch.
Discussion
----------
Deterministic time in cache items for reproducible builds
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Allows setting a deterministic time for cache entries. This can be used to seed builds with a deterministic timestamp for reproducibility.
Parent issue is symfony/symfony#25958
Commits
-------
b4259a6 Use 0 for unlimited expiry
This PR was merged into the 3.4 branch.
Discussion
----------
Make kernel build time optionally deterministic
| Q | A
| ------------- | ---
| Branch? | master for features / 2.7 up to 4.0 for bug fixes <!-- see below -->
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
As part of the effort to enable reproducible builds, this PR allows setting a deterministic build time for the dumped kernel. Parent issue is symfony/symfony#25958.
Commits
-------
48e8249 Make kernel build time optionally deterministic
This PR was merged into the 2.7 branch.
Discussion
----------
do not mock the container builder in tests
| 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 |
Commits
-------
dab4222 do not mock the container builder in tests
This PR was merged into the 4.1-dev branch.
Discussion
----------
Revert "[Workflow] Added the symfony/phpunit-bridge"
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
---
This PR revert #26090. I chatted with @stof and @nicolas-grekas and for now they think the best is to revert this PR.
---
About the previous PR: I made that in ordre to increase the quality via the code coverage of the component.
One thing to know: If the listener is defined in the phpunit.xml.dist the classe has to exist.
If not, phpunit fails.
So if we add the listener in the component, then the deps should be here.
Anyway, people seems to agree that is a bad idea to add the bridge in each component.
So what could we do to enable this listener everywhere in ordre to increase the right computing of the code covarage?
Commits
-------
71c2ecf Revert "[Workflow] Added the symfony/phpunit-bridge"
* 4.0:
fix merge
Env var maps to undefined constant.
[SecurityBundle] Backport test
[Security] fix merge of 2.7 into 2.8 + add test case
backport regression test from 3.4
do not mock the container builder or definitions
fixed CS
[TwigBundle] Register TwigBridge extensions first
[WebProfilerBundle] Fix sub request link
PhpDocExtractor::getTypes() throws fatal error when type omitted
Fix misspelling variable
use libsodium to run Argon2i related tests
[DI] minor: use a strict comparision in setDecoratedService
[HttpKernel] fix FC
Follow-on to #25825: Fix edge case in getParameterOption.
keep the context when validating forms
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Workflow] Remove constraints on transition/place name + Updated Dumper
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
(ping @Plopix : I changed a bit the puml dumper)
Commits
-------
55a5a7a [Workflow] Remove constraints on transition/place name + Updated Dumper
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Workflow] Added the symfony/phpunit-bridge
| 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
-------
c32177a [Workflow] Added the symfony/phpunit-bridge
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Workflow] Fixed the dump command
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets |
| License | MIT
| Doc PR |
---
* The 'label' option had a wrong mode
* Simplified the code
Commits
-------
3d01404 [Workflow] Fixed the dump command
* 3.4:
Env var maps to undefined constant.
[SecurityBundle] Backport test
[Security] fix merge of 2.7 into 2.8 + add test case
backport regression test from 3.4
do not mock the container builder or definitions
fixed CS
[TwigBundle] Register TwigBridge extensions first
[WebProfilerBundle] Fix sub request link
PhpDocExtractor::getTypes() throws fatal error when type omitted
Fix misspelling variable
use libsodium to run Argon2i related tests
[DI] minor: use a strict comparision in setDecoratedService
[HttpKernel] fix FC
Follow-on to #25825: Fix edge case in getParameterOption.
keep the context when validating forms
* 2.8:
[SecurityBundle] Backport test
[Security] fix merge of 2.7 into 2.8 + add test case
backport regression test from 3.4
Fix misspelling variable
[DI] minor: use a strict comparision in setDecoratedService
Follow-on to #25825: Fix edge case in getParameterOption.
keep the context when validating forms
* 2.7:
[SecurityBundle] Backport test
Fix misspelling variable
[DI] minor: use a strict comparision in setDecoratedService
Follow-on to #25825: Fix edge case in getParameterOption.
keep the context when validating forms
This PR was merged into the 2.8 branch.
Discussion
----------
[PropertyInfo] backport regression test from 3.4
| 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
-------
a9ab167 backport regression test from 3.4
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes#26112).
Discussion
----------
Env var maps to undefined constant.
When I try to use a constant as an environment variable, as described in the blog item,
I run into the following problem.
Env var "SOME_CONST" maps to undefined constant "App\\Util\\SomeClass::SOME_CONST".
The proposed solution works for me, however, I'm not sure if this is the best and conform Symfony standards.
Blog:
https://symfony.com/blog/new-in-symfony-3-4-advanced-environment-variables
| Q | A
| ------------- | ---
| Branch? | master for features / 2.7 up to 4.0 for bug fixes <!-- see below -->
| Bug fix? | yes/no
| New feature? | yes/no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | yes/no
| Deprecations? | yes/no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->
Commits
-------
bdf9efc Env var maps to undefined constant.
When I try to use a constant as an environment variable, as described in the blog item,
I run into the following problem.
Env var "SOME_CONST" maps to undefined constant "App\\Util\\SomeClass::SOME_CONST".
The proposed solution works for me, however, I'm not sure if this is the best and conform Symfony standards.
Blog:
https://symfony.com/blog/new-in-symfony-3-4-advanced-environment-variables
In 2c9922e8af the code was optimised but
the order of method calls was incorrect, leading to several errors in
the test suite.
Not all the tests related to table generation got fixed, but at least
the component is not broken anymore.
Fixes https://github.com/symfony/symfony/issues/26081
This PR was merged into the 4.1-dev branch.
Discussion
----------
[LocaleValidator] Use `Symfony\Component\Intl\Locale` instead of `\Locale` + read aliases from bundle only if it is required
|Q |A |
|--- |--- |
|Branch |master|
|Bug fix? |no |
|New feature? |no |
|BC breaks? |no |
|Deprecations?|no |
|Tests pass? |yes |
|Fixed tickets|n/a |
|License |MIT |
|Doc PR |n/a |
Commits
-------
63497e1761 Use `Symfony\Component\Intl\Locale` instead of `\Locale` + read aliases from bundle only if it is required
This PR was merged into the 4.1-dev branch.
Discussion
----------
Always show all deprecations except legacy ones when not weak
When using any mode but the weak mode, you want your build to fail on some or
all deprecations, but it is still nice to be able to see what you could
fix without having to change modes.
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->
Commits
-------
9e37873860 Always show all deprecations except legacy ones
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Fix hasParameterOption / getParameterOption when used with multiple flags
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no (Fixes BC break in #24987)
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25825
| License | MIT
| Doc PR | n/a
Proposed resolution to #25825:
- Back out #24987
- Fix getParameterOption for short options with values, e.g. `-edev`
Commits
-------
35f98e2089 Follow-on to #25825: Fix edge case in getParameterOption.
This PR was squashed before being merged into the 4.1-dev branch (closes#25582).
Discussion
----------
[Form] Support \DateTimeImmutable
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #9508
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/8920
This PR implements `input=datetime_immutable`. Replaces #25273.
Commits
-------
034f8b2f23 [Form] Support \DateTimeImmutable
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Workflow] Add PlantUML dumper to workflow:dump command
| Q | A
| ------------- | ---
| Branch | 4.1
| Bug fix | no
| New feature | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
| Doc PR | Will do depending on the comments about that PR
Hello,
`workflow:dump` exports workflows in `dot` format. To me, this format is not the easiest and not the simplest to use. Styles and logic are mixed together which makes it hard to read.
[PlantUML](http://plantuml.com/) is a tool based on Graphviz like Dot but that
generates nicer diagrams, more readable and most of all easier to adapt to your
documentation. Just copy and paste the PUML on the website you will see the rendering live.
Also, there is a [PHPStorm Plugin](https://plugins.jetbrains.com/plugin/7017-plantuml-integration) and [plenty of integration](http://plantuml.com/running) of this format.
This PR adds 2 options
* a `--dump-format=puml` option to the `workflow:dump` command to generate the workflows in PlantUML.
* a `--puml-transition-format=square|arrow` option to the `workflow:dump` command to generate the workflows in PlantUML using a square shape or arrow for the transition. (see below)
The conversion requires the PlantUML JAR, and can be used like that:
```bash
php bin/console workflow:dump pull_request --dump-format=puml | java -jar plantuml.jar -p > workflow.png
```
> don't forget the `-p` to enable the "piping"
Here is an example with `pull_request` workflow of the documentation (with no style and no marking):
```
@startuml
title pull_request
state start <<initial>>
state coding
state travis
state review
state merged
state closed
start --> travis: submit
coding --> travis: update
travis --> travis: update
review --> travis: update
travis --> review: wait_for_review
review --> coding: request_change
review --> merged: accept
review --> closed: reject
closed --> review: reopen
@enduml
```
As PlantUML let us define styles, I have provided some by default that the user can override.
Adding some marking:
```bash
php bin/console workflow:dump pull_request travis review --dump-format=puml
```
will give us:
```
@startuml
sprite $sf_logo [81x20/16z] {
hPNRaYiX24K1xwBo_tyx6-qaCtDEJ-KXLYMTLbp0HWcHZr3KRDJ8z94HG3jZn4_mijbQ2ryJoFePtXLWA_qxyGy19DpdY_10z11ZAbGjFHRwcEbcKx5-wqsV
yIMo8StMCHKh8ZUxnEwrZiwRAUOvy1lLcPQF4lEFAjhzMd5WOAqvKflS0Enx8PbihiSYXM8ClGVAseIWTAjCgVSAcnYbQG79xKFsZ0VnDCNc7AVBoPSMcTsX
UnrujbYjjz0NnsObkTgnmolqJD4QgGUYTQiNe8eIjtx4b6Vv8nPGpncn3NJ8Geo9W9VW2wGACm_JzgIO8A8KXr2jUBCVGEAAJSZ6JUlsNnmOzmIYti9G7bjL
8InaHM9G40NkwTG7OxrggvNIejA8AZuqyWjOzTIKi-wwYvjeHYesSWuPiTGDN5THzkYLU4MD5r2_0PDhG7LIUG33z5HtM6CP3icyWEVOS61sD_2ZsBfJdbVA
qM53XHDUwhY0TAwPug3OG9NonRFhO8ynF3I4unuAMDHmSrXH57V1RGvl9jafuZF9ZhqjWOEh98y0tUYGsUxkBSllIyBdT2oM5Fn2-ut-fzsq_cQNuL6Uvwqr
knh4RrvOKzxZfLV3s0rs_R_1SdYt3VxeQ1_y2_W2
}
title pull_request
skinparam titleBorderRoundCorner 15
skinparam titleBorderThickness 2
skinparam state {
BackgroundColor<<initial>> #87b741
BackgroundColor<<marked>> #3887C6
BorderColor #3887C6
BorderColor<<marked>> Black
FontColor<<marked>> White
}
state start <<initial>>
state coding
state travis <<marked>>
state review <<marked>>
state merged
state closed
start --> travis: submit
coding --> travis: update
travis --> travis: update
review --> travis: update
travis --> review: wait_for_review
review --> coding: request_change
review --> merged: accept
review --> closed: reject
closed --> review: reopen
footer \nGenerated by <$sf_logo> **Workflow Component** and **PlantUML**
@enduml
```
Which gives you that:
![workflow](https://user-images.githubusercontent.com/313532/32086584-253e39c0-ba8b-11e7-82c7-fa24309dbcd6.png)
With `square` as transition, it gives you that:
![workflow](https://user-images.githubusercontent.com/313532/32533123-a8ea4530-c403-11e7-8f88-4f18d5e23a28.png)
Hope you will find that interesting!
Commits
-------
1497d36cab Add option to the workflow:dump command to allow PlantUML format dump
This PR was squashed before being merged into the 3.4 branch (closes#25756).
Discussion
----------
[TwigBundle] Register TwigBridge extensions first
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/25610
| License | MIT
| Doc PR | -
The only extension that is really needed to display the current exception page is the `CodeExtension` so we could only prepend this one. However, prepending all of them seems safer to me in the long term.
Also I deeply looked into why this problem only appeared in 3.4 and found the reason. Before 3.4 it actually never reaches the `ExceptionController` for this kind of error because it cannot be resolved because it needs a twig instance in its constructor. This instance is directly taken from the container. Before 3.4 when an exception is thrown when you try to get a service from the container, the instance stored in the `$services` array is unset which is not the case in further versions. So in 3.4+, the `ExceptionController` can be resolved because the instance of twig is still in the container even after the initial exception.
It also means these kind of exceptions are displayed with bugs on all versions before 3.4 I guess. Actually it shows the message 2 times : one for the initial exception and the other one when it tries to resolve the `ExceptionController`.
Maybe another solution might be to use a dedicated twig instance with the right settings just for the exception page ?
Commits
-------
c8465ed97f [TwigBundle] Register TwigBridge extensions first
This PR was squashed before being merged into the 3.4 branch (closes#25947).
Discussion
----------
PhpDocExtractor::getTypes() throws fatal error when type omitted
| 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 |
When omitting a type in a `DocBlock` `Tag`, it will throw a fatal error due to the type being null with a call to `$tag->getType()`.
Commits
-------
54253ecfff PhpDocExtractor::getTypes() throws fatal error when type omitted
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Serializer] Fix security issue on CsvEncoder about CSV injection
| Q | A
| ------------- | ---
| Branch? | master (4.1)
| Bug fix? | no
| New feature? | yes
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| License | MIT
I read [this article](http://georgemauer.net/2017/10/07/csv-injection.html) about CSV injection and I thought it best to update the `CsvEncoder` so that it does not generate potentially malicious CSV files by default.
Commits
-------
a1b0bdbbac Fix security issue on CsvEncoder
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] keep the context when validating forms
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25542
| License | MIT
| Doc PR |
Commits
-------
317da3bdf8 keep the context when validating forms
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Security] The AuthenticationException should implements Security's ExceptionInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25770
| License | MIT
| Doc PR | ø
Dunno why this is the case right now but this probably should not. Was reported by @paq85.
Commits
-------
0ee4cf1019 The Security Component's exceptions should implements Security's ExceptionInterface
This PR was merged into the 4.1-dev branch.
Discussion
----------
[WebProfilerBundle] Improve controller linking
| 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-->
I propose to remove the `Controller class` entry from the request toolbar panel, IMHO it's confusing/useless compared to the linked `Controller` entry above. They represent the same.
To preserve its value it's now used as title attribute instead, favored over controller file currently being used here. We can read that from the statusbar anyway :-)
Before: (hovering ontroller link)
![image](https://user-images.githubusercontent.com/1047696/35796142-ce6cdff4-0a5b-11e8-9fa3-91897516c9fc.png)
After: (hovering ontroller link)
![image](https://user-images.githubusercontent.com/1047696/35796237-2855e556-0a5c-11e8-8dca-853c3eabd2e9.png)
Commits
-------
f6c0dc64e6 [WebProfilerBundle] Improve controller linking
This PR was squashed before being merged into the 4.1-dev branch (closes#26036).
Discussion
----------
Added support for getting default values in Accept headers
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25877
| License | MIT
| Doc PR | -
Commits
-------
7e31fd94df Added support for getting default values in Accept headers
This PR was merged into the 2.7 branch.
Discussion
----------
[DI] minor: use a strict comparison in setDecoratedService
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no <!-- 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 | n/a
Commits
-------
f167b50 [DI] minor: use a strict comparision in setDecoratedService
* 4.0:
Use the PCRE_DOLLAR_ENDONLY modifier in route regexes
[Form] Make sure errors are a part of the label on bootstrap 4 - this is a requirement for WCAG2
[Config] Only using filemtime to check file freshness
* 3.4:
Use the PCRE_DOLLAR_ENDONLY modifier in route regexes
[Form] Make sure errors are a part of the label on bootstrap 4 - this is a requirement for WCAG2
[Config] Only using filemtime to check file freshness
This PR was merged into the 4.1-dev branch.
Discussion
----------
[HttpFoundation] we should not pass size on FileBag removing the contruct parameter
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25466 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | none
We may have forgotten this one, thanks to @craue for seeing it !
Commits
-------
0db65b5 fix tests
820186f [HttpFoundation] we should not pass size on FileBag
This PR was squashed before being merged into the 2.7 branch (closes#25373).
Discussion
----------
Use the PCRE_DOLLAR_ENDONLY modifier in route regexes
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
`UrlMatcher::match($pathinfo)` applies `rawurldecode()` to the `$pathinfo` before trying to match it against the routes.
If the URL contains a percent-encoded trailing newline (like in `/foo%0a`), the default PHP PCRE will still consider `#^/foo$#` a match, as the `$` metacharacter will also match *immediately before* the final character *if it is a newline*. This behavior can be changed by applying the [`PCRE_DOLLAR_ENDONLY` modifier](http://php.net/manual/en/reference.pcre.pattern.modifiers.php).
Without this change, URLs with trailing `%0a` lead to weird notices further down the road, for example when the `RedirectableUrlMatcher` or its equivalent in `PhpMatcherDumper` kick in, look at the last character (this time actually the newline), append a `/` and try to redirect to the resulting URL. Ultimately, PHP will complain with `Warning: Header may not contain more than a single header, new line detected` when sending the `Location` header.
Commits
-------
f713a3e Use the PCRE_DOLLAR_ENDONLY modifier in route regexes
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Make sure errors are a part of the label on bootstrap 4 - this is a requirement for WCAG2
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
I recently let Europe's leading accessibility experts (Funkanu.se) review a site of mine, they gave me (among other) the feedback that errors should be a part of the label.
They said that it makes no sense for blind users to read label, read input and then read errors.
I know the implementation might look strange. But I wish something like this would be merged. That would be great for accessibility for all apps using Symfony.
We *could* also make sure it prints something like:
```
<label for=”name”>Name: <span class=”hidden”>Error message</span></label>
<input id=”name” type=”text”>
<span aria-hidden=”true”>Error message</span>
```
Commits
-------
a0b40f5 [Form] Make sure errors are a part of the label on bootstrap 4 - this is a requirement for WCAG2
This PR was merged into the 4.1-dev branch.
Discussion
----------
Unwrap errors in FlattenException
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | maybe
| Deprecations? | no
| Tests pass? | no (but probably unrelated?)
| Fixed tickets | #26025
| License | MIT
| Doc PR | N/A
This is probably the most straightforward way to solve #26025. `FlattenException` is now unwrapping `FatalThrowableError` instances and logs the wrapped error instead. The consequence of this change is that the real error class is displayend on TwigBundle's exception page and the profiler.
Regarding BC: If we assume that `FlattenException` is used for rendering and logging, everything should be fine. But this PR changes `FlattenException`'s internal behavior. If a piece of code relied on errors appearing `FatalThrowableError` inside a `FlattenException`, that code would break.
<img width="402" alt="bildschirmfoto 2018-02-02 um 20 08 42" src="https://user-images.githubusercontent.com/1506493/35760077-0b202940-087e-11e8-9b98-8e4ba269780c.png">
Commits
-------
f14d7d6 Unwrap errors in FlattenException.
This PR was merged into the 3.4 branch.
Discussion
----------
[Config] Only using filemtime to check file freshness
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25999
| License | MIT
Commits
-------
52c9cb4 [Config] Only using filemtime to check file freshness
This PR was merged into the 4.1-dev branch.
Discussion
----------
[DI] Put non-shared service factories in closures
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
With this change, non-shared services are moved to dedicated files (unless they are on the hot path).
Previously, they were always dumped as methods.
The goal of this change is to dump factories as methods *if and only if* the services they build are on the hot-path. By doing so, it will become very easy to figure out which services are on the hot path, vs the rest. And then people will be able to optimize their configurations: if too many things are dumped as methods, it will trivially mean some laziness is missing in definitions.
I spotted this while reviewing the dumped container of Blackfire, where we sometimes have long chains of dependencies that are on the hot path for no real reason - mixed with big non-shared factories (Sonata admin blocks in our case.)
Commits
-------
22c5325 [DI] Put non-shared service factories in closures
This PR was merged into the 3.4 branch.
Discussion
----------
[Config] Handle Service/EventSubscriberInterface in ReflectionClassResource
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25906
| License | MIT
| Doc PR | -
@weaverryan that should fix an issue you reported.
Commits
-------
67e821b [Config] Handle Service/EventSubscriberInterface in ReflectionClassResource
This PR was merged into the 3.4 branch.
Discussion
----------
[DI][Routing] Fix tracking of globbed resources
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25904
| License | MIT
| Doc PR | -
The current `GlobFileLoader` in `Config` misses resource tracking, so we can't use it and have to use a per-component one instead.
(deps=high failures will be fixed after merging up to master.)
Commits
-------
945c753 Add tests for glob loaders
ad98c1fa [DI][Routing] Fix tracking of globbed resources
This PR was merged into the 3.4 branch.
Discussion
----------
[SecurityBundle] Allow remember-me factory creation when multiple user providers are configured.
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | none
When more than one user provider is configured, and `remember_me` is enabled on a firewall, this avoids the deprecation notice in 3.4 and thrown `InvalidConfigurationException` in 4.0 ("Not configuring explicitly the provider for the "remember_me" listener on "foo" firewall is ambiguous as there is more than one registered provider."). The `RememberMeFactory` ignores the `$userProvider` argument and uses the secret configured for the firewall. (If no secret is configured, it throws its own exception.)
The added test passes in 3.4 with a deprecation notice without the change, so would expect it to fail in 4.0 without the change.
Other tests in the `SecurityBundle` already included two errors and one failure, not related to this change.
Commits
-------
6ab8dd9 Allow remember-me factory creation when multiple user providers are configured.
* 4.0:
[CssSelector] For AND operator, the left operand should have parentheses, not only right operand
Removed unused parameter from flattenDataProvider().
Update MongoDB extension on travis to make the builds green again.
* 3.4:
[CssSelector] For AND operator, the left operand should have parentheses, not only right operand
Removed unused parameter from flattenDataProvider().
Update MongoDB extension on travis to make the builds green again.
* 2.8:
[CssSelector] For AND operator, the left operand should have parentheses, not only right operand
Removed unused parameter from flattenDataProvider().
Update MongoDB extension on travis to make the builds green again.
* 2.7:
[CssSelector] For AND operator, the left operand should have parentheses, not only right operand
Removed unused parameter from flattenDataProvider().
Update MongoDB extension on travis to make the builds green again.
This PR was merged into the 2.7 branch.
Discussion
----------
[CssSelector] For AND operator, the left operand should have parentheses, not only right operand
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
From https://github.com/symfony/css-selector/pull/3
Commits
-------
76b40dc [CssSelector] For AND operator, the left operand should have parentheses, not only right operand
* 4.0:
[Intl] Fixed the broken link
Fix typo
Fix typo
Fixed issue #25985
Don't show wanna-be-private services as public in debug:container
[Routing] Fix trailing slash redirection for non-safe verbs
[DI] Fix tracking of source class changes for lazy-proxies
Proxy class names should be deterministic and independent of spl_object_hash() which is somewhat random
[Debug] Fix bad registration of exception handler, leading to mem leak
[Form] Fixed empty data on expanded ChoiceType and FileType
collect extension information as late as possible
* 3.4:
[Intl] Fixed the broken link
Fix typo
Fix typo
Fixed issue #25985
Don't show wanna-be-private services as public in debug:container
[Routing] Fix trailing slash redirection for non-safe verbs
[DI] Fix tracking of source class changes for lazy-proxies
Proxy class names should be deterministic and independent of spl_object_hash() which is somewhat random
[Debug] Fix bad registration of exception handler, leading to mem leak
[Form] Fixed empty data on expanded ChoiceType and FileType
collect extension information as late as possible
* 2.8:
[Intl] Fixed the broken link
[Routing] Fix trailing slash redirection for non-safe verbs
[Debug] Fix bad registration of exception handler, leading to mem leak
[Form] Fixed empty data on expanded ChoiceType and FileType
* 2.7:
[Intl] Fixed the broken link
[Routing] Fix trailing slash redirection for non-safe verbs
[Debug] Fix bad registration of exception handler, leading to mem leak
[Form] Fixed empty data on expanded ChoiceType and FileType
This PR was merged into the 2.7 branch.
Discussion
----------
[Intl] Fixed the broken link
| 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 | -
From https://github.com/symfony/intl/pull/6
Commits
-------
5733e02960 [Intl] Fixed the broken link
This PR was merged into the 3.4 branch.
Discussion
----------
Don't show wanna-be-private services as public in debug:container
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25987
| License | MIT
| Doc PR | n/a
Commits
-------
31f43e5226 Don't show wanna-be-private services as public in debug:container
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] collect extension information as late as possible
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25660
| License | MIT
| Doc PR |
Commits
-------
58cdbd03e1 collect extension information as late as possible
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Fix tracking of source class changes for lazy-proxies
| 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 | -
Commits
-------
4f18e4b0dc [DI] Fix tracking of source class changes for lazy-proxies
This PR was merged into the 2.7 branch.
Discussion
----------
[Debug] Fix bad registration of exception handler, leading to mem leak
| Q | A
| ------------- | ---
| Branch? | 27
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25965
| License | MIT
| Doc PR | -
Commits
-------
926b1bee18 [Debug] Fix bad registration of exception handler, leading to mem leak
This PR was merged into the 2.7 branch.
Discussion
----------
[Routing] Fix trailing slash redirection for non-safe verbs
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This test dumped matchers using the existing test cases for (Redirectable)UrlMatcher so that we are sure they behave the same. Fixes the differences found while doing so.
Commits
-------
ad593aef2f [Routing] Fix trailing slash redirection for non-safe verbs
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Fixed empty data on expanded ChoiceType and FileType
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25896
| License | MIT
| Doc PR | ~
Alternative of https://github.com/symfony/symfony/pull/25924.
I don't think we have to do this by adding overhead in master and getting it properly fixed in 2 years.
This is bug I've introduced while fixing another bug #17822. Which then has been replicated in #20418 and #24993.
I propose instead to clean up the code for all LTS, since this is a wrong behaviour that has never been documented, and most of all unreliable.
The `empty_data` can by anything in the view format as long as the reverse view transformation supports it. Even an object derived from the data class could be invokable.
I think we should remain consistent with https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Form/Form.php#L615.
Commits
-------
9722c063fb [Form] Fixed empty data on expanded ChoiceType and FileType
When using any mode but the weak mode, you want your build to fail on
some or all deprecations, but it is still nice to be able to see what
you could fix without having to change modes.
This PR was merged into the 4.1-dev branch.
Discussion
----------
Adding an array adapter
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | symfony/symfony-docs#9110
There's no simple way to *disable* caching (e.g. in the dev) environment. Setting up an array adapter is a very simple way to allow this :).
Commits
-------
f92e03d adding an array adapter
This PR was merged into the 3.4 branch.
Discussion
----------
Deterministic proxy names
Proxy class names should be deterministic and independent of spl_object_hash() which is somewhat random to better support reproducible builds. See #25958
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
b173b81f46 Proxy class names should be deterministic and independent of spl_object_hash() which is somewhat random
* 4.0:
update test for Twig performance optimizations
[WebProfilerBundle] Increase retry delays between toolbarAction ajax calls
support sapi_windows_vt100_support for php 7.2+
bumped Symfony version to 4.0.5
updated VERSION for 4.0.4
updated CHANGELOG for 4.0.4
bumped Symfony version to 3.4.5
updated VERSION for 3.4.4
updated CHANGELOG for 3.4.4
bumped Symfony version to 2.8.35
updated VERSION for 2.8.34
updated CHANGELOG for 2.8.34
bumped Symfony version to 2.7.42
updated VERSION for 2.7.41
update CONTRIBUTORS for 2.7.41
updated CHANGELOG for 2.7.41
[HttpFoundation] Added "null" type on Request::create docblock
Don't stop PSR-4 service discovery if a parent class is missing.
Allow trans filter to be safe
* 3.4:
update test for Twig performance optimizations
[WebProfilerBundle] Increase retry delays between toolbarAction ajax calls
support sapi_windows_vt100_support for php 7.2+
bumped Symfony version to 3.4.5
updated VERSION for 3.4.4
updated CHANGELOG for 3.4.4
bumped Symfony version to 2.8.35
updated VERSION for 2.8.34
updated CHANGELOG for 2.8.34
bumped Symfony version to 2.7.42
updated VERSION for 2.7.41
update CONTRIBUTORS for 2.7.41
updated CHANGELOG for 2.7.41
[HttpFoundation] Added "null" type on Request::create docblock
Don't stop PSR-4 service discovery if a parent class is missing.
Allow trans filter to be safe
* 2.8:
update test for Twig performance optimizations
[WebProfilerBundle] Increase retry delays between toolbarAction ajax calls
support sapi_windows_vt100_support for php 7.2+
bumped Symfony version to 2.8.35
updated VERSION for 2.8.34
updated CHANGELOG for 2.8.34
bumped Symfony version to 2.7.42
updated VERSION for 2.7.41
update CONTRIBUTORS for 2.7.41
updated CHANGELOG for 2.7.41
[HttpFoundation] Added "null" type on Request::create docblock
Allow trans filter to be safe
* 2.7:
update test for Twig performance optimizations
[WebProfilerBundle] Increase retry delays between toolbarAction ajax calls
support sapi_windows_vt100_support for php 7.2+
bumped Symfony version to 2.7.42
updated VERSION for 2.7.41
update CONTRIBUTORS for 2.7.41
updated CHANGELOG for 2.7.41
[HttpFoundation] Added "null" type on Request::create docblock
Allow trans filter to be safe
This PR was merged into the 2.7 branch.
Discussion
----------
[TwigBridge] update test for Twig performance optimizations
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | twigphp/Twig#2617
| License | MIT
| Doc PR |
Commits
-------
21bbad9 update test for Twig performance optimizations
This PR was merged into the 2.7 branch.
Discussion
----------
support sapi_windows_vt100_support for php 7.2+
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | See below
| License | MIT
| Doc PR | N/A
php 7.2 enabled color support on windows(>=10.0.10586) and introduced a new function called `sapi_windows_vt100_support` to get and set the state. this PR add the support for this new function, so users on windows can see the colorful world again with php 7.2+.
Commits
-------
5bbb77b support sapi_windows_vt100_support for php 7.2+
This PR was merged into the 2.7 branch.
Discussion
----------
[TwigBridge] Allow label translation to be safe
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | ~
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
After overriding `TranslationExtension`'s `trans` filter to make it safe I noticed form labels were still escaped because of `label` in
```twig
{{ translation_domain is same as(false) ? label : label|trans({}, translation_domain) }}
```
Replacing this ternary with `if`/`else` allows `trans` return to be safe.
WDYT?
Commits
-------
041c42db6a Allow trans filter to be safe
This PR was squashed before being merged into the 2.7 branch (closes#25878).
Discussion
----------
[HttpFoundation] Added "null" type on Request::create docblock
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | n/a
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Continuation of #24902 and #25875
Commits
-------
b18f9e76a5 [HttpFoundation] Added "null" type on Request::create docblock
This PR was merged into the 3.4 branch.
Discussion
----------
Don't stop PSR-4 service discovery if a parent class is missing
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25929
| License | MIT
| Doc PR | N/A
Commits
-------
3d6c3ba836 Don't stop PSR-4 service discovery if a parent class is missing.
* 4.0:
[HttpFoundation] Use the correct syntax for session gc based on Pdo driver
Removed assertDateTimeEquals() methods.
Revert "bug #24987 [Console] Fix global console flag when used in chain (Simperfit)"
Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"
Disable CSP header on exception pages only in debug
Fixed submitting disabled buttons
Fixed Button::setParent() when already submitted
Improve assertions
Restore RoleInterface import
[Console] Provide a bugfix where an array could be passed
Improve assertions
SCA: get rid of repetitive calls
allow null values for root nodes in YAML configs
revert useless tests fixtures changes
[VarDumper] Fix docblock
Improve phpdoc to make it more explicit
[DI] Fix initialization of legacy containers by delaying include_once
* 3.4:
[HttpFoundation] Use the correct syntax for session gc based on Pdo driver
Removed assertDateTimeEquals() methods.
Revert "bug #24987 [Console] Fix global console flag when used in chain (Simperfit)"
Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"
Disable CSP header on exception pages only in debug
Fixed submitting disabled buttons
Fixed Button::setParent() when already submitted
Improve assertions
Restore RoleInterface import
[Console] Provide a bugfix where an array could be passed
Improve assertions
SCA: get rid of repetitive calls
allow null values for root nodes in YAML configs
revert useless tests fixtures changes
[VarDumper] Fix docblock
Improve phpdoc to make it more explicit
[DI] Fix initialization of legacy containers by delaying include_once
* 3.3:
[HttpFoundation] Use the correct syntax for session gc based on Pdo driver
Removed assertDateTimeEquals() methods.
Revert "bug #24987 [Console] Fix global console flag when used in chain (Simperfit)"
Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"
Disable CSP header on exception pages only in debug
Fixed submitting disabled buttons
Fixed Button::setParent() when already submitted
Improve assertions
Restore RoleInterface import
Improve assertions
SCA: get rid of repetitive calls
allow null values for root nodes in YAML configs
revert useless tests fixtures changes
[VarDumper] Fix docblock
Improve phpdoc to make it more explicit
* 2.8:
[HttpFoundation] Use the correct syntax for session gc based on Pdo driver
Removed assertDateTimeEquals() methods.
Revert "bug #24987 [Console] Fix global console flag when used in chain (Simperfit)"
Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"
Disable CSP header on exception pages only in debug
Fixed submitting disabled buttons
Fixed Button::setParent() when already submitted
Improve assertions
Improve assertions
SCA: get rid of repetitive calls
allow null values for root nodes in YAML configs
[VarDumper] Fix docblock
Improve phpdoc to make it more explicit
This PR was merged into the 2.7 branch.
Discussion
----------
Removed assertDateTimeEquals() methods
| 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
All PHPUnit versions that we use on Travis support comparing `DateTime` objects via `assertEquals()`. Yet, we have our own code in place to check for equality of `DateTime` objects. This PR removes that code.
Commits
-------
5b73d1c1e6 Removed assertDateTimeEquals() methods.
* 2.7:
[HttpFoundation] Use the correct syntax for session gc based on Pdo driver
Revert "bug #24987 [Console] Fix global console flag when used in chain (Simperfit)"
Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"
Disable CSP header on exception pages only in debug
Fixed submitting disabled buttons
Fixed Button::setParent() when already submitted
Improve assertions
SCA: get rid of repetitive calls
allow null values for root nodes in YAML configs
[VarDumper] Fix docblock
Improve phpdoc to make it more explicit
This PR was merged into the 2.7 branch.
Discussion
----------
Improve assertions
| 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 | -
Following #25420 before start other branches.
Btw, the other branches are 2.8, 3.3, 3.4, 4.0 and master?
Commits
-------
3d90a2217d Improve assertions
This PR was merged into the 2.7 branch.
Discussion
----------
Disable CSP header on exception pages only in debug
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24772
| License | MIT
| Doc PR |
Based on a feedback we received, there are situations on production when it's desired to have CSP header in place even if exception occurred.
This uses now same condition that is used by ExceptionController in TwigBridge to evaluate if styled exception template is going to be shown, minus `showException` request attribute which don't make sense in this context, because it's used by PreviewController only and in such case this listener isn't triggered.
Overriding CSP header via HTML meta tag unfortunately, but not surprisingly, doesn't work.
Commits
-------
b77538c2fe Disable CSP header on exception pages only in debug
This PR was merged into the 2.7 branch.
Discussion
----------
[Form] Fixed Button::setParent() when already submitted
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
The `Button` does not respect the [FormInterface](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/FormInterface.php#L28), by extension the `SubmitButton` neither.
Commits
-------
9f0c7bf549 Fixed Button::setParent() when already submitted
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Provide a DX where an array could be passed
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no <!-- 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 | #25394
| License | MIT
| Doc PR | none
![img_2941](https://user-images.githubusercontent.com/3451634/33766610-977f77ce-dc1e-11e7-93c1-38dd0038d7f5.jpeg)
I think that this is not fixing the root causes that does not appears in 4.1, so maybe there is something better to do. I did not find the root cause So I think it can bo good to fix the problem too.
Commits
-------
de502f7 [Console] Provide a bugfix where an array could be passed
This PR was merged into the 3.3 branch.
Discussion
----------
Restore RoleInterface import
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | yes
| License | MIT
The import is use on PHPDoc but was accidentally removed. Maybe because PHPStorm does not match with the import when you use parenthesis.
Not really a bug as it is concerning only PHPDoc, but it make some analysis tools like PHPStan yelling:
```
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Line src/AppBundle/Security/Authentication/ApiKeyAuthenticator.php
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
64 Parameter #4 $roles of class Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken constructor expects array<string|Symfony\Component\Security\Core\Authentication\Token\RoleInterface>, array<string|Symfony\Component\Security\Core\Role\Role>
given.
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Line tests/AppBundle/Controller/WebTestCase.php
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
59 Parameter #4 $roles of class Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken constructor expects array<string|Symfony\Component\Security\Core\Authentication\Token\RoleInterface>, array<string|Symfony\Component\Security\Core\Role\Role>
given.
------ -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
```
Commits
-------
8ecfeb1e31 Restore RoleInterface import
This PR was merged into the 2.7 branch.
Discussion
----------
[minor] SCA: reduce repetitive method calls (sequential and in loop)
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
609372252f SCA: get rid of repetitive calls
This PR was merged into the 4.1-dev branch.
Discussion
----------
[DependencyInjection] Anonymous services in PHP DSL
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | enhancement for fluent PHP configs
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24493
| License | MIT
| Doc PR | not yet
See #24493:
```php
$s->anonymous(SendEmailForRegisteredUser::class)->tag('listener');
```
Commits
-------
ee4227683d [DI] Add way to register service with implicit name using the PHP DSL
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Fix initialization of legacy containers by delaying include_once
| 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 | -
Best reviewed ignoring whitespaces:
https://github.com/symfony/symfony/pull/25858/files?w=1
Noticed while removing a package: silencing the failing `include_once` as introduced in #25255 is not working for the `$oldContainer` in `Kernel`, and fails with a fatal error when an include succeeds but the class inside misses a parent.
Delaying the calls to `include_once` to the moment where the fresh container is actually used first, when setting the "kernel" service, works around the situation.
Commits
-------
5e750ec4b5 [DI] Fix initialization of legacy containers by delaying include_once
This PR was merged into the 4.1-dev branch.
Discussion
----------
Introduce signaled process specific exception class
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25768
| License | MIT
| Doc PR | N/A
Introduced the `ProcessSignaledException` class to properly catch signaled process errors.
I took benefit to refactor process exception with a new `ProcessRuntimeException` class.
Commits
-------
68adb3b903 Introduce signaled process specific exception class
This will revert #25847. Basically, the changes done in #25847 were not
wrong per se. However, those changes were not necessary as the tests
were not failing because of the missing "assets" config, but due to an
issue introduced in the Config component. Furthermore, removing this
part of the config fixtures gives us the benefit that our before
normalization logic that enables assets support when the templating
integration is enabled is properly tested.
It confused me a lot that the method took an array and that the phpdoc said we should pass a string instead of an array. This small change should clear up the confusion.
* 4.0:
Have weak_vendors ignore deprecations from outside
[HttpFoundation] fixed return type of method HeaderBag::get
[HttpFoundation] Added "resource" type on Request::create docblock
[Console] Fix using finally where the catch can also fail
[Process] Skip environment variables with false value in Process
Revert "bug #25789 Enableable ArrayNodeDefinition is disabled for empty configuration (kejwmen)"
Formatting fix in upgrade 3.0 document
don't split lines on carriage returns when dumping
trim spaces from unquoted scalar values
Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
[DI] compilation perf tweak
[Validator] Conflict with egulias/email-validator 2.0
[Validator] add missing parent isset and add test
* 3.4:
Have weak_vendors ignore deprecations from outside
[HttpFoundation] fixed return type of method HeaderBag::get
[HttpFoundation] Added "resource" type on Request::create docblock
[Process] Skip environment variables with false value in Process
Revert "bug #25789 Enableable ArrayNodeDefinition is disabled for empty configuration (kejwmen)"
Formatting fix in upgrade 3.0 document
don't split lines on carriage returns when dumping
Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
[DI] compilation perf tweak
[Validator] Conflict with egulias/email-validator 2.0
[Validator] add missing parent isset and add test
* 3.3:
Have weak_vendors ignore deprecations from outside
[HttpFoundation] fixed return type of method HeaderBag::get
[HttpFoundation] Added "resource" type on Request::create docblock
[Process] Skip environment variables with false value in Process
Revert "bug #25789 Enableable ArrayNodeDefinition is disabled for empty configuration (kejwmen)"
Formatting fix in upgrade 3.0 document
don't split lines on carriage returns when dumping
Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
[DI] compilation perf tweak
[Validator] Conflict with egulias/email-validator 2.0
[Validator] add missing parent isset and add test
* 2.8:
[HttpFoundation] fixed return type of method HeaderBag::get
[HttpFoundation] Added "resource" type on Request::create docblock
Revert "bug #25789 Enableable ArrayNodeDefinition is disabled for empty configuration (kejwmen)"
Formatting fix in upgrade 3.0 document
Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
[Validator] add missing parent isset and add test
* 2.7:
[HttpFoundation] fixed return type of method HeaderBag::get
[HttpFoundation] Added "resource" type on Request::create docblock
Revert "bug #25789 Enableable ArrayNodeDefinition is disabled for empty configuration (kejwmen)"
Revert "bug #25851 [Validator] Conflict with egulias/email-validator 2.0 (emodric)"
[Validator] add missing parent isset and add test
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] fixed return type of method HeaderBag::get
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
<!--
- 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.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->
Commits
-------
6b608e8 [HttpFoundation] fixed return type of method HeaderBag::get
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] Added "resource" type on Request::create docblock
| 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 | -
Replaces #24902
Commits
-------
d1a96ca [HttpFoundation] Added "resource" type on Request::create docblock
This PR was merged into the 4.0 branch.
Discussion
----------
[Console] Fix using finally where the catch can also fail
| Q | A
| ------------- | ---
| Branch? | 4.0
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25872
| License | MIT
| Doc PR | -
Restores code to 3.4 state, which is free from the issue.
Commits
-------
763a914 [Console] Fix using finally where the catch can also fail
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] add missing parent isset and add test
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no <!-- 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 | #25843 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
This is a little PR to fix the error and to add the parent::__isset to the Constraints class, I'm adding a test too to be sure that this is not possible again.
Btw, since this is instagihub, I'm coding at home and then I see a squirrel :
![img_3187 heic](https://user-images.githubusercontent.com/3451634/35149517-a9ddc0ba-fd16-11e7-9e22-cdba0b677071.jpeg)
Commits
-------
bcb79a3 [Validator] add missing parent isset and add test
This PR was merged into the 3.3 branch.
Discussion
----------
[Process] Skip environment variables with false value in Process
| Q | A
| ------------- | ---
| Branch? | master, 4.0, 3.3, 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
With the commit 03adce239d, all env variables are injecting in the process, and the env variable with the `false` value are converted in empty string.
For example, it's problematic with the bundle SymfonyWebServerBundle and the last version of the [symfony/framework-bundle recipe](https://github.com/symfony/recipes/blob/master/symfony/framework-bundle/3.3/public/index.php#L11), because the WebServer override the value of `APP_ENV` with `false` to override previously loaded variables (c5a1218555), and with the commit 03adce239d, the `APP_ENV` variable is injected with a empty string value, instead of not being injected, as was the case before.
This PR not use the same logic as the [getDefaultEnv()](https://github.com/symfony/symfony/blob/4.0/src/Symfony/Component/Process/Process.php#L1553) method.
Commits
-------
2daf4f9 [Process] Skip environment variables with false value in Process
This PR was squashed before being merged into the 4.1-dev branch (closes#25493).
Discussion
----------
[Serializer] `default_constructor_arguments` context option for denormalization
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | (there is no RFC for this)
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/8914
## Problems
In the case you want to deserialize value-objects, if all the data required by its constructor are **not** given as input, the serializer will throw a simple `RuntimeException` exception. This makes impossible to catch it. (as current fix on my projects I use exception message to be sure to catch the good one X.x")
The second problem is a missing feature to fill the required object with an empty one. This needs to be defined by the user because the serializer can't guess how to build it.
Here is a project that exposes the problem of the current behavior. https://github.com/Nek-/api-platform-value-object
## Solutions suggested
I suggest a solution in 2 parts because the second part is more touchy.
1. Replace the current exception by a new specific one
2. Add a new `empty_data` option to the context of deserialization so you can specify data for objects impossible to instantiate, this is great because the serializer no more throw exception and the validator can then work as expected and send violations to the user. This solution is inspired by forms solutions to fix the issue with value objects
Here is what you can do with this feature:
```php
class DummyValueObject
{
public function __construct($foo, $bar) { $this->foo = $foo; $this->bar = $bar; }
}
$empty = new DummyValueObject('', '');
$result = $normalizer->denormalize(['foo' => 'Hello'], DummyValueObject::class, 'json', [
'empty_data' => [
DummyValueObject::class => $empty,
],
]);
// It's impossible to construct a DummyValueObject with only "foo" value. So the serializer
// will replace it with the given empty data
```
There are 2 commits so I can quickly provide you only the first point if you want. Hope you'll like this.
## Solution after discussion
1. New exception `MissingConstructorArgumentsException`
2. New context option `default_constructor_arguments`
```php
class DummyValueObject
{
public function __construct($foo, $bar) { $this->foo = $foo; $this->bar = $bar; }
}
$result = $normalizer->denormalize(['foo' => 'Hello'], DummyValueObject::class, 'json', [
'default_constructor_arguments' => [
DummyValueObject::class => ['foo' => '', 'bar' => ''],
],
]);
// DummyValueObject is contructed with the given `foo` and empty `bar`
```
Commits
-------
1523a85542 [Serializer] context option for denormalization
This PR was merged into the 3.3 branch.
Discussion
----------
[FrameworkBundle] fix DI extension tests
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The failing tests relied on the assets integration being enabled. Since
we never did enable this explicitly, the assets related definitions are
removed now that #25789 was merged which fixed#25760.
Commits
-------
1cb8f69 [FrameworkBundle] fix DI extension tests
The failing tests relied on the assets integration being enabled. Since
we never did enable this explicitly, the assets related definitions are
removed now that #25789 was merged which fixed#25760.
This PR was squashed before being merged into the 4.1-dev branch (closes#25627).
Discussion
----------
[DI] Add a simple CSV env var processor
| 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 | n/a
Add a new environment variable processor to parse the very popular comma separated array format like `foo,bar`. As it uses the `str_getcsv`, it also support escaping and enclosure.
I'm not sure about the name, maybe `array` or `simple_array` would be better.
Commits
-------
d730209d87 [DI] Add a simple CSV env var processor
* 4.0:
[HttpKernel] DebugHandlersListener should always replace the existing exception handler
fix the Composer API being used
[Security] Notify that symfony/expression-language is not installed if ExpressionLanguage and ExpressionLanguagePrivider are used
[Debug] Always decorate existing exception handlers to deal with fatal errors
Enableable ArrayNodeDefinition is disabled for empty configuration
Fixing a bug where the dump() function depended on bundle ordering
[Cache] Fix handling of apcu_fetch() edgy behavior
Add nn (Norwegian Nynorsk) translation files, and improve existing file
Problem in phar see mergerequest #25579
[Form] Disallow transform dates beyond the year 9999
Avoid button label translation when it's set to false
Copied NO language files to the new NB locale.
[Serializer] DateTimeNormalizer handling of null and empty values (returning null or empty instead of new object)
Fix options resolver with array allowed types
[Console] Improve phpdoc on StyleInterface::ask()
[TwigBridge][WIP] Pass the form-check-inline in parent
* 3.4:
[HttpKernel] DebugHandlersListener should always replace the existing exception handler
fix the Composer API being used
[Security] Notify that symfony/expression-language is not installed if ExpressionLanguage and ExpressionLanguagePrivider are used
[Debug] Always decorate existing exception handlers to deal with fatal errors
Enableable ArrayNodeDefinition is disabled for empty configuration
Fixing a bug where the dump() function depended on bundle ordering
[Cache] Fix handling of apcu_fetch() edgy behavior
Add nn (Norwegian Nynorsk) translation files, and improve existing file
Problem in phar see mergerequest #25579
[Form] Disallow transform dates beyond the year 9999
Avoid button label translation when it's set to false
Copied NO language files to the new NB locale.
[Serializer] DateTimeNormalizer handling of null and empty values (returning null or empty instead of new object)
Fix options resolver with array allowed types
[Console] Improve phpdoc on StyleInterface::ask()
[TwigBridge][WIP] Pass the form-check-inline in parent
* 3.3:
[HttpKernel] DebugHandlersListener should always replace the existing exception handler
fix the Composer API being used
[Debug] Always decorate existing exception handlers to deal with fatal errors
Enableable ArrayNodeDefinition is disabled for empty configuration
Fixing a bug where the dump() function depended on bundle ordering
[Cache] Fix handling of apcu_fetch() edgy behavior
Add nn (Norwegian Nynorsk) translation files, and improve existing file
Problem in phar see mergerequest #25579
[Form] Disallow transform dates beyond the year 9999
Copied NO language files to the new NB locale.
[Serializer] DateTimeNormalizer handling of null and empty values (returning null or empty instead of new object)
[Console] Improve phpdoc on StyleInterface::ask()
* 2.8:
fix the Composer API being used
[Debug] Always decorate existing exception handlers to deal with fatal errors
Enableable ArrayNodeDefinition is disabled for empty configuration
Fixing a bug where the dump() function depended on bundle ordering
Add nn (Norwegian Nynorsk) translation files, and improve existing file
Problem in phar see mergerequest #25579
[Form] Disallow transform dates beyond the year 9999
Copied NO language files to the new NB locale.
[Console] Improve phpdoc on StyleInterface::ask()
* 2.7:
fix the Composer API being used
[Debug] Always decorate existing exception handlers to deal with fatal errors
Enableable ArrayNodeDefinition is disabled for empty configuration
Fixing a bug where the dump() function depended on bundle ordering
Add nn (Norwegian Nynorsk) translation files, and improve existing file
Problem in phar see mergerequest #25579
[Form] Disallow transform dates beyond the year 9999
Copied NO language files to the new NB locale.
[Console] Improve phpdoc on StyleInterface::ask()
This PR was squashed before being merged into the 4.1-dev branch (closes#25092).
Discussion
----------
[Security] #25091 add target user to SwitchUserListener
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25091
| License | MIT
| Doc PR |
This patch provides the target user to the SwitchUserListener's
accessDecisionManager->decide() call as the $object parameter to
give any registered voters extra information.
Commits
-------
5cb6f2a [Security] #25091 add target user to SwitchUserListener
This PR was merged into the 2.7 branch.
Discussion
----------
[Debug] Always decorate existing exception handlers to deal with fatal errors
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25827
| License | MIT
| Doc PR | -
Decorating the exception is seamless, let's always do it and fix handling of fatal errors.
Related to #25408 also.
Commits
-------
205d7ae3f7 [Debug] Always decorate existing exception handlers to deal with fatal errors
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Notify that symfony/expression-language is not installed if ExpressionLanguage is used
| Q | A
| ------------- | ---
| Branch? | master for features / 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25742
| License | MIT
| Doc PR | not requested
Commits
-------
6aa2b7cce0 [Security] Notify that symfony/expression-language is not installed if ExpressionLanguage and ExpressionLanguagePrivider are used
This PR was squashed before being merged into the 4.1-dev branch (closes#24777).
Discussion
----------
[TwigBundle] Added priority to twig extensions
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | Don't merge before the docs
Added priority to twig extensions in the `TwigEnvironmentPass` to control the order in which they're registered, similar to the `TwigLoaderPass`
Though, unsure on what priority to use as a default, and will PR docs when finalised.
Commits
-------
d87af719fd [TwigBundle] Added priority to twig extensions
This PR was merged into the 2.7 branch.
Discussion
----------
Fixing a bug where the dump() function depended on bundle ordering
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | not needed
If DebugBundle is registered *before* TwigBundle, then the simpler `dump()` function wins over the fancy, var-dumper one from DebugBundle. In other words, you get different functionality based on the *order* in which you install libraries. To get the "bad" way, you can:
```
composer create-project symfony/skeleton show_bad_dump
cd show_bad_dump
composer require symfony/debug-bundle
composer require twig
```
Then create a Twig template with a `dump()` inside. It will use the less-fancy XDebug version.
I'm not sure if there's a more elegant fix for this or not... I have verified locally that this DOES fix the issue.
Thanks!
Commits
-------
717663aac1 Fixing a bug where the dump() function depended on bundle ordering
This PR was merged into the 3.4 branch.
Discussion
----------
[OptionsResolver] Fix options resolver with array allowed types
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | none
When playing a simple test:
```php
use Symfony\Component\OptionsResolver\Options;
$resolver = new OptionsResolver();
$resolver->setDefined('foo');
$resolver->setAllowedTypes('foo', 'string[]');
$options = $resolver->resolve(['foo' => ['bar', 'baz']]);
```
I get this error:
```
Symfony\Component\OptionsResolver\Exception\InvalidOptionsException: The option "foo" with value array is expected to be of type "string[]", but is of type "string[]"
```
This PR should fix this.
Commits
-------
cc215f7347 Fix options resolver with array allowed types
This PR was squashed before being merged into the 2.7 branch (closes#25789).
Discussion
----------
Enableable ArrayNodeDefinition is disabled for empty configuration
| Q | A
| ------------- | ---
| Branch? | 2.7+
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25760
| License | MIT
Fixes#25760.
Currently, documented behavior is not true:
70c8c2d47b/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php (L207-L208)
Commits
-------
a6a330dcd9 Enableable ArrayNodeDefinition is disabled for empty configuration
This PR was squashed before being merged into the 4.1-dev branch (closes#25741).
Discussion
----------
[Form] issue-13589: adding custom false-values to BooleanToString transformer
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #13589
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/9031
As suggested in #13589 , this PR adds the option to specify custom false-values, so we can use the CheckBoxType to handle strings '1' / '0' and eval them to true / false. While HTTP defines that checkbox types are either submitted=true or not-submitted=false, no matter of what value was submitted, it would be nice to have this option.
Also refs (which read like "the basic idea of the feature was accepted, PR almost done, then something-happend so PR wasnt merged"..?)
https://github.com/symfony/symfony/pull/15054https://github.com/symfony/symfony/pull/18005
Commits
-------
a3e5ac496f [Form] issue-13589: adding custom false-values to BooleanToString transformer
This PR was squashed before being merged into the 2.7 branch (closes#25816).
Discussion
----------
Problem in phar see mergerequest #25579
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
If packed into phar the old version creates path like 'file:///phar%3A/'. see https://github.com/symfony/symfony/pull/25579
Commits
-------
3e0c8ffb43 Problem in phar see mergerequest #25579
This PR was squashed before being merged into the 2.7 branch (closes#25781).
Discussion
----------
[Form] Disallow transform dates beyond the year 9999
Fixes#14727
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | not really
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14727
| License | MIT
Explicitly locked out submission of dates beyond December 31st 9999 in forms as PHP is highly incapable of consistently handling such dates. Before this patch dates were randomly transformed or mangled.
Technically there is a BC break as this will now cause validation to fail on input that was *accepted* before, but it was mangled. Not my call but I prefer the rejection over data corruption:
```
// Old behavior
$transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC', null, null, \IntlDateFormatter::GREGORIAN, 'yyyy-MM-dd');
$result = $transformer->reverseTransform('20107-03-21');
// $result is now 2007-03-21
```
Commits
-------
70cc969537 [Form] Disallow transform dates beyond the year 9999
This PR was merged into the 3.3 branch.
Discussion
----------
[Serializer] DateTimeNormalizer handling of null and empty values (returning it instead of new object)
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | no
| Fixed tickets | #23964
| License | MIT
| Doc PR |
I'm openning the disucussion on this as I think that should be returning null and not a new object.
WDYT ?
Working at home ;)
![img_2914](https://user-images.githubusercontent.com/3451634/33526107-ec2a6ce8-d83b-11e7-8949-f8d360ebb4b9.JPG)
Commits
-------
74726f3896 [Serializer] DateTimeNormalizer handling of null and empty values (returning null or empty instead of new object)
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBridge] Pass the form-check-inline in parent
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | no
| Fixed tickets | #25099 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | none
I'm trying to find a way to be able to handle this. Will add a reproducer soon.
Commits
-------
02b7edb825 [TwigBridge][WIP] Pass the form-check-inline in parent
This PR was merged into the 2.7 branch.
Discussion
----------
Copied NO language files to the new NB locale
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25792
| License | MIT
| Doc PR | N/A
This PR copies all `NO` language files to a new locale `NB`. It also adds unit tests to ensure that `NB` and `NO` will always contain the same translations. This way, we allow application developers to either use the generic `NO` language code or the more precise `NB` (e.g. if they need to distinguish between the `NB` and `NN` variants of the Norwegian language).
For further details, please have a look at the discussion in #25792.
Commits
-------
aee9b1ea3e Copied NO language files to the new NB locale.
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Improve phpdoc on StyleInterface::ask()
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
In a CLI command i keep asking an optional question until i get an answer. So interactively it's a required question. It looks like..
```php
do {
$value = $io->ask('Value', null, function ($value) { return $value; });
} while (null === $value);
```
Which works nice.. but SA is complaining about
```
Strict comparison using === between null and string will always evaluate to false.
```
This should fix it. The mixed API goes back to https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Console/Helper/QuestionHelper.php#L38
Commits
-------
499d04f [Console] Improve phpdoc on StyleInterface::ask()
* 4.0:
[appveyor] set memory_limit=-1
[Console] Keep the modified exception handler
[Console] Fix restoring exception handler
[Router] Skip anonymous classes when loading annotated routes
allow dashes in cwd pathname when running the tests
Fixed Request::__toString ignoring cookies
Make sure we only build once and have one time the prefix when importing routes
[Security] Fix fatal error on non string username
[FrameworkBundle] Automatically enable the CSRF if component *+ session* are loaded
* 3.4:
[appveyor] set memory_limit=-1
[Console] Keep the modified exception handler
[Console] Fix restoring exception handler
[Router] Skip anonymous classes when loading annotated routes
allow dashes in cwd pathname when running the tests
Fixed Request::__toString ignoring cookies
Make sure we only build once and have one time the prefix when importing routes
[Security] Fix fatal error on non string username
[FrameworkBundle] Automatically enable the CSRF if component *+ session* are loaded
* 3.3:
[appveyor] set memory_limit=-1
[Router] Skip anonymous classes when loading annotated routes
Fixed Request::__toString ignoring cookies
Make sure we only build once and have one time the prefix when importing routes
[Security] Fix fatal error on non string username
* 2.8:
[appveyor] set memory_limit=-1
[Router] Skip anonymous classes when loading annotated routes
Fixed Request::__toString ignoring cookies
[Security] Fix fatal error on non string username
* 2.7:
[appveyor] set memory_limit=-1
[Router] Skip anonymous classes when loading annotated routes
Fixed Request::__toString ignoring cookies
[Security] Fix fatal error on non string username
This PR was merged into the 2.7 branch.
Discussion
----------
[appveyor] set memory_limit=-1
| 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 | -
Commits
-------
10e33ac [appveyor] set memory_limit=-1
This PR was squashed before being merged into the 2.7 branch (closes#25801).
Discussion
----------
[Router] Skip anonymous classes when loading annotated routes
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25796
| License | MIT
| Doc PR |
Skip any usage of anonymous classes when parsing files in `AnnotationFileLoader`
Commits
-------
d76a545 [Router] Skip anonymous classes when loading annotated routes
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Auto-enable CSRF if the component *+ session* are loaded
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/recipes/issues/262
| License | MIT
| Doc PR | -
By binding CSRF and session default state, we provide better DX, but we also provide a way for bundles to enable session on its own: they just need to require "symfony/security-csrf".
Yes, that's a side effect, but I think that's a nice one for 3.4/4.0.
Of course, we might do better in 4.1, but for bug fix only releases, LGTM.
Commits
-------
9e8231f [FrameworkBundle] Automatically enable the CSRF if component *+ session* are loaded
This PR was merged into the 2.7 branch.
Discussion
----------
[Security] Fix fatal error on non string username
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/25612
| License | MIT
| Doc PR | n/a
That's consistent with what #22569 did for the `json_login` listener.
Commits
-------
8f095683d0 [Security] Fix fatal error on non string username
This PR was merged into the 3.3 branch.
Discussion
----------
[Routing] Make sure we only build routes once
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25746
| License | MIT
| Doc PR | ø
We need to build the collection(s) only once, else the prefix would be duplicated.
Commits
-------
927a75ac3e Make sure we only build once and have one time the prefix when importing routes
* 4.0:
[Console] Add placeholder for line number in console exception fixtures
fix HHVM tests
minor #25752 Don't right trim the deprecation message (alexpott)
* 3.4:
[Console] Add placeholder for line number in console exception fixtures
fix HHVM tests
minor #25752 Don't right trim the deprecation message (alexpott)
This PR was merged into the 3.3 branch.
Discussion
----------
Remove polyfill-util dependency from fullstack and security
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | kinda
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Applies #22709 to the two higher-level packages. I've applied it to 3.3 as that's where that change was merged (though it was `master` as the time); these may actually apply earlier though?
(#16382 was mentioned and applied to 2.8, though is for the serializer which is unrelated? Should have been 3.0 when `StringUtils` was removed?)
Commits
-------
939efd59b9 Remove polyfill-util dependency from fullstack and security
This PR was submitted for the 3.4 branch but it was squashed and merged into the 3.3 branch instead (closes#25752).
Discussion
----------
Don't right trim the deprecation message
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | maybe yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->
The PhpUnit bridge lists deprecation messages after a test. In order to do this it outputs the message but it right trims the message - removing any fullstops. This is unexpected. It does this to add the number of time the message appears but this is not really necessary because the number of the times a deprecation message is triggered and from where is added below.
Commits
-------
0b03631 Don't right trim the deprecation message
* 4.0:
fix merge
fixed wrong description in a phpdoc
19 digits VISA card numbers are valid
Add missing @ in phpdoc return statement
Don't right trim the deprecation message
[HttpKernel] Fixed test name
[Debug] prevent infinite loop with faulty exception handlers
[FrameworkBundle] fix tests
Prefer composer install instead for using Symfony Installer
Add the missing `enabled` session attribute
[HttpKernel] Turn bad hosts into 400 instead of 500
* 3.4:
fix merge
fixed wrong description in a phpdoc
19 digits VISA card numbers are valid
Add missing @ in phpdoc return statement
Don't right trim the deprecation message
[HttpKernel] Fixed test name
[Debug] prevent infinite loop with faulty exception handlers
[FrameworkBundle] fix tests
Prefer composer install instead for using Symfony Installer
Add the missing `enabled` session attribute
[HttpKernel] Turn bad hosts into 400 instead of 500
* 3.3:
fix merge
fixed wrong description in a phpdoc
19 digits VISA card numbers are valid
Add missing @ in phpdoc return statement
Don't right trim the deprecation message
[HttpKernel] Fixed test name
[Debug] prevent infinite loop with faulty exception handlers
Add the missing `enabled` session attribute
[HttpKernel] Turn bad hosts into 400 instead of 500
* 2.8:
fixed wrong description in a phpdoc
19 digits VISA card numbers are valid
[HttpKernel] Fixed test name
[Debug] prevent infinite loop with faulty exception handlers
Add the missing `enabled` session attribute
[HttpKernel] Turn bad hosts into 400 instead of 500
* 2.7:
fixed wrong description in a phpdoc
19 digits VISA card numbers are valid
[HttpKernel] Fixed test name
[Debug] prevent infinite loop with faulty exception handlers
Add the missing `enabled` session attribute
[HttpKernel] Turn bad hosts into 400 instead of 500
* 4.0: (30 commits)
[FrameworkBundle] fix tests
[Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
[HttpKernel] Fix session handling: decouple "save" from setting response "private"
swap filter/function and package names
[HttpFoundation] Always call proxied handler::destroy() in StrictSessionHandler
[HttpKernel] Fix compile error when a legacy container is fresh again
Add tests for the HttpKernel request collector and redirection via cookies
Uses cookies to track the requests redirection
Tweaked some styles in the profiler tables
Add type string to docblock for Process::setInput()
[Security] Fail gracefully if the security token cannot be unserialized from the session
[Form] AbstractLayoutTest - fix DOMDocument casing
Run simple-phpunit with --no-suggest option
[FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes
bumped Symfony version to 4.0.4
updated VERSION for 4.0.3
updated CHANGELOG for 4.0.3
bumped Symfony version to 3.4.4
updated VERSION for 3.4.3
updated CHANGELOG for 3.4.3
...
* 3.4: (26 commits)
[Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
[HttpKernel] Fix session handling: decouple "save" from setting response "private"
swap filter/function and package names
[HttpFoundation] Always call proxied handler::destroy() in StrictSessionHandler
[HttpKernel] Fix compile error when a legacy container is fresh again
Add tests for the HttpKernel request collector and redirection via cookies
Uses cookies to track the requests redirection
Tweaked some styles in the profiler tables
Add type string to docblock for Process::setInput()
[Security] Fail gracefully if the security token cannot be unserialized from the session
[Form] AbstractLayoutTest - fix DOMDocument casing
Run simple-phpunit with --no-suggest option
[FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes
bumped Symfony version to 3.4.4
updated VERSION for 3.4.3
updated CHANGELOG for 3.4.3
bumped Symfony version to 3.3.16
updated VERSION for 3.3.15
updated CHANGELOG for 3.3.15
bumped Symfony version to 2.8.34
...
* 3.3:
[Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
Tweaked some styles in the profiler tables
Add type string to docblock for Process::setInput()
[Security] Fail gracefully if the security token cannot be unserialized from the session
[Form] AbstractLayoutTest - fix DOMDocument casing
Run simple-phpunit with --no-suggest option
[FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes
bumped Symfony version to 3.3.16
updated VERSION for 3.3.15
updated CHANGELOG for 3.3.15
bumped Symfony version to 2.8.34
updated VERSION for 2.8.33
updated CHANGELOG for 2.8.33
bumped Symfony version to 2.7.41
updated VERSION for 2.7.40
update CONTRIBUTORS for 2.7.40
updated CHANGELOG for 2.7.40
* 2.8:
[Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
Tweaked some styles in the profiler tables
[Security] Fail gracefully if the security token cannot be unserialized from the session
[Form] AbstractLayoutTest - fix DOMDocument casing
bumped Symfony version to 2.8.34
updated VERSION for 2.8.33
updated CHANGELOG for 2.8.33
bumped Symfony version to 2.7.41
updated VERSION for 2.7.40
update CONTRIBUTORS for 2.7.40
updated CHANGELOG for 2.7.40
* 2.7:
[Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
[Security] Fail gracefully if the security token cannot be unserialized from the session
[Form] AbstractLayoutTest - fix DOMDocument casing
bumped Symfony version to 2.7.41
updated VERSION for 2.7.40
update CONTRIBUTORS for 2.7.40
updated CHANGELOG for 2.7.40
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Fix session handling: decouple "save" from setting response "private"
| 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 | -
Fixes https://github.com/symfony/symfony/pull/25583#issuecomment-355717344 from @Tobion, and provides extra laziness for the "session" service, related to https://github.com/symfony/recipes/pull/333.
(deps=high failure will be fixed by merging to upper branches.)
Commits
-------
f8727b8827 [HttpKernel] Fix session handling: decouple "save" from setting response "private"
This PR was merged into the 2.7 branch.
Discussion
----------
[Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no <!-- 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 | no
| License | MIT
| Doc PR | no
<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->
Php function json_encode/decode with option JSON_PARTIAL_OUTPUT_ON_ERROR return result on error, but if have is error json_last_error() always return error code even if there is a result and it is not false. Because of this is impossible set JSON_PARTIAL_OUTPUT_ON_ERROR option across variable $context.
Current fix solves this problem.
Verification on the false is completely correct, since json_encode / decode returns false only on error if not set JSON_PARTIAL_OUTPUT_ON_ERROR option.
Such have a problem e.g when encoding data is not utf-8 (emoji from facebook).
Commits
-------
e7e410b [Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBridge] swap filter/function and package names
| 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 |
Error message was `Did you forget to run "composer require symfony/csrf_token"? Unknown function "form" in "Security/Pages/login.html".` and will now be `Did you forget to run "composer require symfony/form"? Unknown function "csrf_token" in "Security/Pages/login.html".`
Commits
-------
9db699bd8d swap filter/function and package names
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Add tests for request collector and cookie redirection
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes (#25719)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | ø
Not that I felt bad doing a PR without tests (#25719) but this one adds tests to be sure we stabilize this cookie-based redirection.
Commits
-------
7b4f5a15e7 Add tests for the HttpKernel request collector and redirection via cookies
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Always call proxied handler::destroy() in StrictSessionHandler
| 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 | -
Noticed by @jpauli: the native file session handler needs a call to `destroy()` to remove session files, even for new empty sessions.
Commits
-------
e5e2d5ddd2 [HttpFoundation] Always call proxied handler::destroy() in StrictSessionHandler
This PR was merged into the 3.3 branch.
Discussion
----------
[FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25695
| License | MIT
| Doc PR | -
When `annotation_reader` is instantiated in an after-removing pass, it gets the real cache provider, instead of the dummy one that should be provided during compilation of the container.
This situation is found in e.g. `JMS\AopBundle\DependencyInjection\Compiler\PointcutMatchingPass`.
A workaround before next release could be to "get" the `annotation_reader` service somewhere before (like in a regular compiler pass of your own.)
Commits
-------
f66f9a7b37 [FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes
This PR was squashed before being merged into the 4.1-dev branch (closes#25710).
Discussion
----------
[FrameworkBundle] add cache.app.simple psr simple cache
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25708
| License | MIT
| Doc PR | TODO?
This adds a PSR SimpleCache version of the `cache.app` service.
Should I also update the documentation somewhere? 😊
Commits
-------
1b6ec8b0ae [FrameworkBundle] add cache.app.simple psr simple cache
This PR was merged into the 2.7 branch.
Discussion
----------
[Security] Fail gracefully if the security token cannot be unserialized from the session
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
If the security token in the session can't be unserialized, an `E_NOTICE` is issued. This prevents it (and provides a better log message if it's not even a `__PHP_Incomplete_Class`).
This is similar to #24731, but I saw it triggered when changing OAuth library (https://github.com/elifesciences/journal/pull/824), so the token class itself no longer exists. (I want to avoid having to manually invalidate all sessions, as not all sessions use that token class.)
Commits
-------
053fa43add [Security] Fail gracefully if the security token cannot be unserialized from the session
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Validator] Add option to pass custom values to Expression validator
| 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 needed this in a Form. I had no way to pass things from `$options` into Expression validator.
Maybe can aid in https://github.com/symfony/symfony/pull/23134
Commits
-------
ba0565e3e8 [Validator] Add option to pass custom values to Expression validator
This PR was submitted for the 3.4 branch but it was squashed and merged into the 3.3 branch instead (closes#25585).
Discussion
----------
Add type string to docblock for Process::setInput()
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | none
Add `string` as valid `$input` for `Process::setInput()`. Since `getInput()` will also return as string and the internal method `ProcessUtils::validateInput()` will accept a string, this should be a viable input type.
Commits
-------
e3de68f2 Add type string to docblock for Process::setInput()
This PR was squashed before being merged into the 3.4 branch (closes#25685).
Discussion
----------
Use triggering file to determine weak vendors if when the test is run in a separate process
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | I think so
| Fixed tickets | #25684
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->
Commits
-------
3830577 Use triggering file to determine weak vendors if when the test is run in a separate process
* 4.0:
[DI] fix param name cast
Remove randomness from dumped containers
fixed messages to be explicit about the package needed to be installed
[FrameworkBundle] Fix recommended composer command (add vendor)
[WebProfilerBundle] set the var in the right scope
[TwigBundle] fix lowest dep
[HttpKernel] Disable CSP header on exception pages
Use the default host even if context is empty and fallback to relative URL if empty host
Proposing Flex-specific error messages in the controller shortcuts
* 3.4:
Remove randomness from dumped containers
fixed messages to be explicit about the package needed to be installed
[FrameworkBundle] Fix recommended composer command (add vendor)
[WebProfilerBundle] set the var in the right scope
[TwigBundle] fix lowest dep
[HttpKernel] Disable CSP header on exception pages
Use the default host even if context is empty and fallback to relative URL if empty host
Proposing Flex-specific error messages in the controller shortcuts
This PR was merged into the 3.4 branch.
Discussion
----------
Remove randomness from dumped containers
| 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 | -
With this PR, the generated container is immutable by cache clearing: it doesn't contain any random string anymore (well, third party bundles can add random things back, but at least core doesn't).
Since the class+file name of the container is based on a hash of its content, it means that they are now stable also. This should help fix some edge cases/race conditions during cache clears/rebuilds.
(fabbot failure is false positive)
Commits
-------
14dd5d1dbd Remove randomness from dumped containers
This PR was merged into the 3.4 branch.
Discussion
----------
Fix fixed messages to be explicit about the package needed to be installed
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->
Commits
-------
e8bc099 fixed messages to be explicit about the package needed to be installed
This PR was squashed before being merged into the 3.4 branch (closes#25678).
Discussion
----------
[WebProfilerBundle] set the var in the right scope
| 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 | -
![2018-01-04 um 09 29 54](https://user-images.githubusercontent.com/1322118/34555989-de6fd11c-f134-11e7-81f7-9b840a946073.png)
This PR fixes the bug when displaying the toolbar. The variable "has_time_events" was not created in the scope of the toolbar.
Commits
-------
3e9780df59 [WebProfilerBundle] set the var in the right scope
This PR was merged into the 2.7 branch.
Discussion
----------
[Routing] Use the default host even if context is empty
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25464
| License | MIT
| Doc PR | ø
When the host in the context is empty... we should still use the default host.
**Note:** it seems like a lot of changes but all I did was to remove the `if` and de-indent the code that was inside.
Commits
-------
8f357df75b Use the default host even if context is empty and fallback to relative URL if empty host
This PR was merged into the 3.4 branch.
Discussion
----------
Backport Flex-specific error messages in controller shortcuts to 3.4
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/25133#issuecomment-354551079
| License | MIT
| Doc PR | n/a
Commits
-------
419e93465f Proposing Flex-specific error messages in the controller shortcuts
* 4.0:
PHP CS Fixer: clean up repo and adjust config
use interface_exists instead of class_exists
[DX] [DI] Improve exception for invalid setter injection arguments
Dumper shouldn't use html format for phpdbg
[Validator] Fix access to root object when using composite constraint
* 3.4:
PHP CS Fixer: clean up repo and adjust config
use interface_exists instead of class_exists
[DX] [DI] Improve exception for invalid setter injection arguments
Dumper shouldn't use html format for phpdbg
[Validator] Fix access to root object when using composite constraint
* 3.3:
PHP CS Fixer: clean up repo and adjust config
use interface_exists instead of class_exists
Dumper shouldn't use html format for phpdbg
[Validator] Fix access to root object when using composite constraint
* 2.8:
PHP CS Fixer: clean up repo and adjust config
Dumper shouldn't use html format for phpdbg
[Validator] Fix access to root object when using composite constraint
* 2.7:
PHP CS Fixer: clean up repo and adjust config
Dumper shouldn't use html format for phpdbg
[Validator] Fix access to root object when using composite constraint
This PR was squashed before being merged into the 2.7 branch (closes#25653).
Discussion
----------
PHP CS Fixer: clean up repo and adjust config
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | n/a
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Reason for this PR is that one want to have `php-cs-fixer fix -v` command executed without changes that shall not be applied for this repo. To achieve that, we need to groom config to exclude files that violate CS willingly, fix files that are violating CS unwillingly, and deliver missing case handling at PHP CS Fixer itself (https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3359) (already merged!).
Commits
-------
b14cbc1 PHP CS Fixer: clean up repo and adjust config
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] Fix access to root object when using composite constraint
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #12315, #20477, #21706
| License | MIT
| Doc PR |
Commits
-------
b18cdcf417 [Validator] Fix access to root object when using composite constraint
* 4.0: (23 commits)
Clean up
Update return type in docblock.
PHP CS Fixer: no need to exclude xml and yml files
PHP CS Fixer: no need to exclude json file
[#22749] fix version in changelog
Update LICENSE year... forever
fixed some deprecation messages
fixed CS
Fixes for Oracle in PdoSessionHandler
fixed some deprecation messages
fixed some deprecation messages
fixed some deprecation messages
fixed some deprecation messages
Remove dead code
[TwigBundle/Brige] catch missing requirements to throw meaningful exceptions
[DI] fix CS
[HttpKernel] Call Response->setPrivate() instead of sending raw header() when session is started
[FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup
Suggest to write an implementation if the interface cannot be autowired
[Debug] Skip DebugClassLoader checks for already parsed files
...
* 3.4:
Clean up
Update return type in docblock.
PHP CS Fixer: no need to exclude xml and yml files
PHP CS Fixer: no need to exclude json file
Update LICENSE year... forever
fixed some deprecation messages
fixed CS
Fixes for Oracle in PdoSessionHandler
fixed some deprecation messages
fixed some deprecation messages
fixed some deprecation messages
fixed some deprecation messages
[TwigBundle/Brige] catch missing requirements to throw meaningful exceptions
[HttpKernel] Call Response->setPrivate() instead of sending raw header() when session is started
[FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup
Suggest to write an implementation if the interface cannot be autowired
[Debug] Skip DebugClassLoader checks for already parsed files
[2.7][DX] Use constant message contextualisation for deprecations
Remove group options without data and fix normalization
Remove redundant translation path
* 3.3:
Clean up
Update return type in docblock.
PHP CS Fixer: no need to exclude xml and yml files
PHP CS Fixer: no need to exclude json file
Update LICENSE year... forever
This PR was merged into the 2.7 branch.
Discussion
----------
Update LICENSE year... forever
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no <!-- 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 | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | n/a
By using the same trick than Facebook: https://github.com/facebook/react/blob/master/LICENSE
Commits
-------
8ce8bd5 Update LICENSE year... forever
This PR was squashed before being merged into the 2.7 branch (closes#25652).
Discussion
----------
Clean up
| 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 | -
I've removed all white spaces and extra lines from our `markdown` files. Recently [I did it in our documentation](https://github.com/symfony/symfony-docs/pull/8944), and thought would be interesting to replicate here 😄
Commits
-------
acd0d7c Clean up
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Remove group options without data on debug:form command
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25394
| License | MIT
| Doc PR | -
This also fix the normalization of the options column for text descriptor, regardless of changes in `collectOptions()` method (which is enough to fix the related bug).
@maidmaid could you confirm if these changes solve the problem?
Commits
-------
083c8af706 Remove group options without data and fix normalization
* 3.3:
fixed some deprecation messages
fixed some deprecation messages
fixed some deprecation messages
fixed some deprecation messages
[2.7][DX] Use constant message contextualisation for deprecations
This PR was squashed before being merged into the 2.7 branch (closes#25430).
Discussion
----------
Fixes for Oracle in PdoSessionHandler
| Q | A
| ------------- | ---
| Branch? | 2.7 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- 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 | #18305 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | <!--highly recommended for new features-->
<!--
Fixes missing session data for Oracle in PdoSessionHandler
-->
Commits
-------
e7a4002b4f Fixes for Oracle in PdoSessionHandler
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Remove redundant translation path
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This is only dead code, nothing change because all files are loaded from the `translations/` directory recursively and they override the ones from the bundle.
> http://symfony.com/doc/3.4/bundles/override.html#translations
> Translations are not related to bundles, but to domains. That means that you can override the translations from any translation file, as long as it is in the correct domain.
Commits
-------
16af89045a Remove redundant translation path
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes/no
| Fixed tickets | -
| License | MIT
| Doc PR | -
Here's what happens before/after this PR on `cache:clear` and `cache:clear --no-warmup`.
### Before PR
**`cache:clear`**
1. `rm var/cache_old`
1. Clearing cache in `var/cache` <i><--- This is not in line and not atomic</i>
1. `rm var/cache_warmup`
1. Warming up cache in `var/cache_warmup`
1. `mv var/cache var/cache_old`
1. `mv var/cache_warmup var/cache`
1. `rm var/cache_old`
**`cache:clear --no-warmup`**
1. `rm var/cache_old`
1. Clearing cache in `var/cache` <i><--- This is not in line and not atomic</i>
1. `mv var/cache var/cache_old` <i><--- The old cache dir is completely obsolete in this workflow</i>
1. `rm var/cache_old`
---
### After PR
**`cache:clear`**
1. `rm var/cache_old`
1. `rm var/cache_new`
1. Clearing cache in `var/cache_new`
1. Warming up cache in `var/cache_new`
1. `mv var/cache var/cache_old`
1. `mv var/cache_new var/cache`
1. `rm var/cache_old`
**`cache:clear --no-warmup`**
1. `rm var/cache_old`
1. `rm var/cache_new`
1. Clearing cache in `var/cache_new`
1. `mv var/cache var/cache_old`
1. `mv var/cache_new var/cache`
1. `rm var/cache_old`
---
The main differences:
- Unify the flows and have each distinct operation only once in the code
- Clear the cache in the new cache directory and then switch to it atomically instead of clearing in the current one.
- Always have the cache directory present in the end. It was missing after `cache:clear --no-warmup` before.
I think this brings more consistency and is aligned with the present goals of the command as well.
However, I'm not really familiar with the Symfony framework and I might have wrong assumptions.
Commits
-------
8b88d9fc36 [FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug] Skip DebugClassLoader checks for already parsed files
| 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 | -
Perf. fix for the dev mode only: I propose to run the checks done by DebugClassLoader only once, when the file is changed/parsed.
This should improve DX much, by making the dev env faster. Here is a bench on the hello world of the standard edition (class inlining by the DIC disabled, but still):
![image](https://user-images.githubusercontent.com/243674/34224242-8852ee9a-e5c2-11e7-94ae-6edc6ab41de5.png)
https://blackfire.io/profiles/compare/31ff0792-9992-4658-9707-cac87a320d1f/graph
Commits
-------
f0c12234b9 [Debug] Skip DebugClassLoader checks for already parsed files
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7][DX] Use constant message contextualisation for deprecations
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
Since many projects are using this mechanism for deprecating feature, it is sometimes difficult to understand which vendor triggers a deprecation.
Sometimes we're using `since Symfony x.y` format, sometimes we are using `since x.y`. I propose to always use `since Symfony x.y` format.
Commits
-------
c2338cbd7a [2.7][DX] Use constant message contextualisation for deprecations
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Process] Make `PhpExecutableFinder` look for the `PHP_BINARY` env var
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22101
| License | MIT
| Doc PR | -
I think this is enough to fix the linked issue and thus replace #23721.
ping @tomasfejfar FYI
Commits
-------
4bd01f252f [Process] Make `PhpExecutableFinder` look for the `PHP_BINARY` env var
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Call Response->setPrivate() instead of sending raw header() when session is started
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/24988
| License | MIT
| Doc PR | -
As described in #24988 I think the current handling of the `Cache-Control` header set by the `NativeSessionStorage` causes inconsistent behaviour.
In #24988 @nicolas-grekas states that if you start a session a response should be considered to be private. I do agree with this but up until now, nobody takes care of this on `kernel.response`.
I think we must always suppress the `NativeSessionStorage` from generating any headers by default. Otherwise the `Cache-Control` header never makes it to the `Response` instance and is thus missed by `kernel.response` listeners and for example the Symfony HttpCache. So depending on whether you use Symfony's HttpCache or Varnish as a reverse proxy, caching would be handled differently. Varnish would consider the response to be private if you set the php.ini setting `session.cache_limiter` to `nocache` (which is default) because it will receive the header. HttpCache would not because the `Cache-Control` header is not present on the `Response`. That's inconsistent and may cause confusion or problems when switching proxies.
Commits
-------
dbc1c1c4b6 [HttpKernel] Call Response->setPrivate() instead of sending raw header() when session is started
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBundle/Brige] catch missing requirements to throw meaningful exceptions
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25256, https://github.com/symfony/webpack-encore/issues/173
| License | MIT
| Doc PR | -
It is possible to register a handler for undefined twig functions/filters.
IMHO, this is the hook point we should leverage to throw meaningful exception messages.
This works well on its own. We now just need to list the functions/filters with appropriate messages.
There is one case we could enhance: at warmup time, Twig exceptions are swallowed, thus not visible.
Shouldn't we make these visible instead?
ping @weaverryan since this is related to two issues of yours.
Commits
-------
ac891ac881 [TwigBundle/Brige] catch missing requirements to throw meaningful exceptions
This PR was merged into the 3.4 branch.
Discussion
----------
[DX][DependencyInjection] Suggest to write an implementation if the interface cannot be autowired
| 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 | ø
This would add a hint for the developers when the interface cannot be wired. This suggests creating the implementation of the interface.
**Note:** this is 3.4 because I believe DX should be treated as bugs.
**Note 2:** fabbot issue is false positive
Commits
-------
961e3e7 Suggest to write an implementation if the interface cannot be autowired
* 4.0: (23 commits)
Add application/ld+json format associated to json
[HttpFoundation] Fix false-positive ConflictingHeadersException
remove flex-specific suggestion on 3.4
Add check for SecurityBundle in createAccessDeniedException
[WebServerBundle] Fix escaping of php binary with arguments
Error handlers' $context should be optional as it's deprecated
[Serializer] Correct typing mistake in DocBlock
[HttpKernel] fix cleaning legacy containers
Display n/a for sub-requests time when Stopwatch component is not installed
Updating message to inform the user how to install the component
[Config] Fix closure CS
[Console] Simplify parameters in DI
PHP CS Fixer: use PHPUnit Migration ruleset
[Process] Skip false-positive test on Windows/appveyor
Update MemcachedTrait.php
[Bridge/PhpUnit] thank phpunit/phpunit
allow auto_wire for SessionAuthenticationStrategy class
[Process] Fix setting empty env vars
Fixed 'RouterInteface' typo
[Process] Dont use getenv(), it returns arrays and can introduce subtle breaks accros PHP versions
...
* 3.4: (22 commits)
Add application/ld+json format associated to json
[HttpFoundation] Fix false-positive ConflictingHeadersException
remove flex-specific suggestion on 3.4
Add check for SecurityBundle in createAccessDeniedException
[WebServerBundle] Fix escaping of php binary with arguments
Error handlers' $context should be optional as it's deprecated
[Serializer] Correct typing mistake in DocBlock
[HttpKernel] fix cleaning legacy containers
Display n/a for sub-requests time when Stopwatch component is not installed
Updating message to inform the user how to install the component
[Config] Fix closure CS
PHP CS Fixer: use PHPUnit Migration ruleset
[Process] Skip false-positive test on Windows/appveyor
Update MemcachedTrait.php
[Bridge/PhpUnit] thank phpunit/phpunit
allow auto_wire for SessionAuthenticationStrategy class
[Process] Fix setting empty env vars
Fixed 'RouterInteface' typo
[Process] Dont use getenv(), it returns arrays and can introduce subtle breaks accros PHP versions
[WebServerBundle] fix a bug where require would not require the good file because of env
...
* 3.3:
Add application/ld+json format associated to json
[HttpFoundation] Fix false-positive ConflictingHeadersException
[WebServerBundle] Fix escaping of php binary with arguments
Error handlers' $context should be optional as it's deprecated
[Serializer] Correct typing mistake in DocBlock
[Config] Fix closure CS
PHP CS Fixer: use PHPUnit Migration ruleset
Update MemcachedTrait.php
[Bridge/PhpUnit] thank phpunit/phpunit
[Process] Fix setting empty env vars
[Process] Dont use getenv(), it returns arrays and can introduce subtle breaks accros PHP versions
[WebServerBundle] fix a bug where require would not require the good file because of env
[Console] Commands with an alias should not be recognized as ambiguous
This PR was squashed before being merged into the 2.7 branch (closes#25599).
Discussion
----------
Add application/ld+json format associated to json
| Q | A
| ------------- | ---
| Branch? | 2.7 up to 4.0
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Add `application/ld+json` Content-Type as json format in Request.
Commits
-------
0917c4c Add application/ld+json format associated to json
This PR was merged into the 3.3 branch.
Discussion
----------
Error handlers' $context should be optional as it's deprecated
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
f4fcbcd Error handlers' $context should be optional as it's deprecated
This PR was merged into the 3.3 branch.
Discussion
----------
[WebServerBundle] Fix escaping of php binary with arguments
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Not really needed in practice, yet more correct, and will open some improvements in PhpExecutableFinder for master.
Commits
-------
6629ae5 [WebServerBundle] Fix escaping of php binary with arguments
* 2.8:
[Serializer] Correct typing mistake in DocBlock
[Config] Fix closure CS
PHP CS Fixer: use PHPUnit Migration ruleset
[Console] Commands with an alias should not be recognized as ambiguous
* 2.7:
[Serializer] Correct typing mistake in DocBlock
[Config] Fix closure CS
PHP CS Fixer: use PHPUnit Migration ruleset
[Console] Commands with an alias should not be recognized as ambiguous
| Q | A
| ------------- | ---
| Branch? | 2.1 to 4.0
| Bug fix? | yes (comment only)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | na
| Fixed tickets | na
| License | MIT
| Doc PR |
DocBlock comment referred to `NormalizableInterface` but code was using `DenormalizableInterface`
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] fix cleaning legacy containers
| 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 | -
The suffix used to be `.legacyContainer` (length=16) but we forgot to update the length when it was changed to `.legacy` (length=7).
Commits
-------
324821d [HttpKernel] fix cleaning legacy containers
This PR was merged into the 3.4 branch.
Discussion
----------
[WebProfilerBundle] Fix panel break when stopwatch component is not installed.
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25350
| License | MIT
| Doc PR | -
Fixes a crash in the time profiler panel when the stopwatch is not installed. This avoids a hard dependency like the ticket author requested, as the rest of the component can already deal with that case.
I think this is an issue in 3.4+, but I only tested against 4.0.2 locally (code in the affected file only differs in whitespace between 3.4 and 4.0).
Commits
-------
e9577cb207 Display n/a for sub-requests time when Stopwatch component is not installed
410b597393 Fix panel break when stopwatch component is not installed.
This PR was merged into the 3.4 branch.
Discussion
----------
[SecurityBundle] allow auto_wire for SessionAuthenticationStrategy class
| Q | A
| ------------- | ---
| Branch? | 3.4 up to 4.0 for deprecation fixe
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
b36154e allow auto_wire for SessionAuthenticationStrategy class
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Commands with an alias should not be recognized as ambiguous
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | no
| Fixed tickets | no <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
When having two commands with the same starting name and an alias equal to the starting name, we should not have an ambiguous error because we are setting the alias.
Commits
-------
863f632 [Console] Commands with an alias should not be recognized as ambiguous
This PR was merged into the 3.3 branch.
Discussion
----------
[WebServerBundle] fix a bug where require would not require the good file because of env
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no <!-- 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 | #25515
| License | MIT
| Doc PR |
This fixes a bug with putenv that could be not working on certain version of php. (>=7.0.0).
Commits
-------
bfeee1f [WebServerBundle] fix a bug where require would not require the good file because of env
* 4.0:
[2.7] Fix issues found by PHPStan
[Command] Fix upgrade guide example
Add php_unit_dedicate_assert to PHPCS
[WebProfilerBundle] Let fetch() cast URL to string
improve FormType::getType exception message details
[Intl] Update ICU data to 60.2
[Console] fix a bug when you are passing a default value and passing -n would ouput the index
[FrameworkBundle] fix merge of 3.3 into 3.4
bumped Symfony version to 4.0.3
updated VERSION for 4.0.2
updated CHANGELOG for 4.0.2
bumped Symfony version to 3.4.3
updated VERSION for 3.4.2
updated CHANGELOG for 3.4.2
* 3.4:
[2.7] Fix issues found by PHPStan
[Command] Fix upgrade guide example
Add php_unit_dedicate_assert to PHPCS
[WebProfilerBundle] Let fetch() cast URL to string
improve FormType::getType exception message details
[Intl] Update ICU data to 60.2
[Console] fix a bug when you are passing a default value and passing -n would ouput the index
[FrameworkBundle] fix merge of 3.3 into 3.4
bumped Symfony version to 3.4.3
updated VERSION for 3.4.2
updated CHANGELOG for 3.4.2
* 3.3:
[2.7] Fix issues found by PHPStan
Add php_unit_dedicate_assert to PHPCS
[WebProfilerBundle] Let fetch() cast URL to string
improve FormType::getType exception message details
[Intl] Update ICU data to 60.2
[Console] fix a bug when you are passing a default value and passing -n would ouput the index
* 2.8:
[2.7] Fix issues found by PHPStan
Add php_unit_dedicate_assert to PHPCS
improve FormType::getType exception message details
[Intl] Update ICU data to 60.2
[Console] fix a bug when you are passing a default value and passing -n would ouput the index
* 2.7:
[2.7] Fix issues found by PHPStan
Add php_unit_dedicate_assert to PHPCS
[Intl] Update ICU data to 60.2
[Console] fix a bug when you are passing a default value and passing -n would ouput the index
This PR was merged into the 2.7 branch.
Discussion
----------
Add php_unit_dedicate_assert to PHPCS
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25420
| License | MIT
| Doc PR | -
Forgot to add this in #25420😅
Commits
-------
e913b68 Add php_unit_dedicate_assert to PHPCS
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] fix a bug when you are passing a default value and passing -n would output the index
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no <!-- 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 | #25470
| License | MIT
| Doc PR |
We are fixing a bug when you are using a default value with -n, it would output the index instead of the value.
Simple reproducer 5079dd19d5 (diff-77efcc28bc5309e1af9ac07a1e073009R40)
Commits
-------
41ffc69 [Console] fix a bug when you are passing a default value and passing -n would ouput the index
This PR was submitted for the master branch but it was squashed and merged into the 2.8 branch instead (closes#25492).
Discussion
----------
improve FormType::getType exception message details
| 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 pull request improves the exception thrown when a Type is requested from Symfony\Component\Form\FormRegistry.
The same exception message was thrown if either the Type class wasn't found or the Type class did not implement the Symfony\Component\Form\FormTypeInterface.
This pull request adds some explaination of the reason why a type could not be found and helps application developpers to find the source of the Symfony\Component\Form\Exception\InvalidArgumentException thrown when getting a Type.
Commits
-------
945f236 improve FormType::getType exception message details
Not much has changed in data we actually use in Symfony.
However, the extension compiled for ICU 60.2 behaves slightly differently in some cases.
This can be observed on one assertion that had to be disabled. There's no point in keeping it since the Symfony implementation does not support the behaviour.
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Intl] Update ICU data to 60.2
| 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 | -
Not much has changed in data we actually use in Symfony.
However, the extension compiled for ICU 60.2 behaves slightly differently in some cases.
This can be observed on one assertion that had to be disabled. There's no point in keeping it since the Symfony implementation does not support the behaviour.
Commits
-------
9e6df740f3 [Intl] Update ICU data to 60.2
Not much has changed in data we actually use in Symfony.
However, the extension compiled for ICU 60.2 behaves slightly differently in some cases.
This can be observed on one assertion that had to be disabled. There's no point in keeping it since the Symfony implementation does not support the behaviour.
The removed test is not needed anymore as it is already covered by the
`testEnabledStrictEmailOptionIsMappedToStrictEmailValidationMode` and
`testDisabledStrictEmailOptionIsMappedToLooseEmailValidationMode` tests.
This PR was merged into the 2.7 branch.
Discussion
----------
[FrameworkBundle] remove esi/ssi renderers if inactive
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? |no
| Tests pass? | yes
| Fixed tickets | #25246
| License | MIT
| Doc PR | -
As found out within #25246 the esi/ssi fragment renderer services were registered for < 3.4 even when the framework config for it was disabled.
On 3.4+ this has been fixed already and the service definitions are removed.
With this fix the usual exception message appears when `framework.esi` or `framework.ssi` are disabled and using `render_esi(...)` or `render_ssi(...)`:
```
An exception has been thrown during the rendering of a template ("The "esi" renderer does not exist.").
```
**Note: Some people may see this exception when updating to this patch but this just means they are using esi/ssi without enabling it.**
Commits
-------
e1c36525fd [FrameworkBundle] remove esi/ssi renderers if inactive
* 4.0:
fixed wrong merge
Tweak message to be Flex friendly
[Routing] fixed tests
Fixing wrong class_exists on interface
Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
removed FIXME
[Console] Fix a bug when passing a letter that could be an alias
add missing validation options to XSD file
Take advantage of AnnotationRegistry::registerUniqueLoader
[DI] Optimize Container::get() for perf
fix merge
Fix tests
Refactoring tests.
* 3.4:
fixed wrong merge
Tweak message to be Flex friendly
[Routing] fixed tests
Fixing wrong class_exists on interface
Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
[Console] Fix a bug when passing a letter that could be an alias
add missing validation options to XSD file
Take advantage of AnnotationRegistry::registerUniqueLoader
[DI] Optimize Container::get() for perf
fix merge
Fix tests
Refactoring tests.
This PR was merged into the 3.4 branch.
Discussion
----------
Fixing wrong class_exists on interface
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | symfony/symfony-docs#8873 already does not mention changing anything in the config
This was a bug introduced in #25151 on the 3.4 branch. It's... pretty self-explanatory I hope :).
Cheers!
Commits
-------
be75bd994b Fixing wrong class_exists on interface
* 2.8:
Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
[Console] Fix a bug when passing a letter that could be an alias
add missing validation options to XSD file
* 2.7:
Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
[Console] Fix a bug when passing a letter that could be an alias
add missing validation options to XSD file
This PR was squashed before being merged into the 2.7 branch (closes#25427).
Discussion
----------
Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
While investigating #25373, I found that when the *dumped* `UrlMatcher` performs redirections due to missing trailing slashes on URLs, it does so using an url*de*coded URL.
This is wrong, as it may lead to wrong interpretations of URLs upon the next request. For example, think of an URL that contains `%23` in the middle of the path info. Upon redirection, this will be turned into `#` with an obvious effect.
Commits
-------
8146510304 Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
This PR was merged into the 4.1-dev branch.
Discussion
----------
[HttpKernel] Decouple exception logging from rendering
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25266
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
Given your controller throws an exception and a custom exception listener sets a response.
Before
![image](https://user-images.githubusercontent.com/1047696/33676886-46e90e0a-dab7-11e7-9a3a-24c70b23d4e0.png)
After
![image](https://user-images.githubusercontent.com/1047696/33676832-1ac4f0aa-dab7-11e7-9ac4-483fcbdc06ee.png)
;-)
edit: raising the priority for the profiler listener fixes the exception panel also.
Commits
-------
a203d31838 [HttpKernel] Decouple exception logging from rendering
This PR was merged into the 4.1-dev branch.
Discussion
----------
[PropertyAccess] add more information to NoSuchPropertyException Message
| Q | A
| ------------- | ---
| Branch? | 4.1
| 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? | no
| Fixed tickets | #24742
| License | MIT
| Doc PR |
Add more context to NoSuchPropertyException as discussed in the issue.
Commits
-------
dee00f8393 [PropertyAccess] add more information to NoSuchPropertyException Message
This method will only add 'class_exists' as an autoloader if it has not
already been added. This helps alleviate a performance issue when the
same loader is added many times in tests.
This PR was merged into the 3.3 branch.
Discussion
----------
[HttpFoundation] Fix tests
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | not yet
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Remains filesystem ones due to #25420, going to have a look in this PR in the next hour if nobody does before.
Commits
-------
ef6adb8 Fix tests
This PR was merged into the 4.1-dev branch.
Discussion
----------
[TwigBridge] Fix workflow test with deps=low
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- 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 | none
| License | MIT
| Doc PR | none
In the original PR the tests were not failling but we should not use the new feature with deps=low until it fetch the branch with the new feature. So this fix the test for the WorkflowExtension in TwigBridge.
Commits
-------
e5c6b92 [TwigBridge] Fix workflow test with deps=low
* 4.0: (25 commits)
[Form] fix how form type is referenced in test
fix merge
[Console] Fix console tests by adding the missing condition
[Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files
Fixed exit code with non-integer throwable code
[HttpFoundation] Support 0 bit netmask in IPv6 ()
[DI] Impossible to set an environment variable and then an array as container parameter
[Process] remove false-positive BC breaking exception on Windows
Tweaking class not found autowiring error
[LDAP] added missing dots at the end of some exception messages.
[TwigBridge] Add missing dev requirement for workflow
fixed#25440
empty lines don't count for indent detection
Set `width: auto` on WebProfiler toolbar's reset.
[Lock] Fix incorrect phpdoc
[Process] Dont rely on putenv(), it fails on ZTS PHP
[HttpKernel] detect deprecations thrown by container initialization during tests
[HttpKernel] Fix logging of post-terminate errors/exceptions
[DI] Add context to service-not-found exceptions thrown by service locators
[Debug] Fix catching fatal errors in case of nested error handlers
...
This PR was merged into the 3.3 branch.
Discussion
----------
[Console] Fix console tests by adding the missing condition
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no <!-- 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 | none
| License | MIT
| Doc PR |
The old conditions was testing that the exit code is different than 0. I just add this tests back since it is needed.
![resized_20171211_192030_2217](https://user-images.githubusercontent.com/3451634/33872253-5db07958-df16-11e7-85e9-4fc0cb5002ce.jpeg)
Commits
-------
57f8129 [Console] Fix console tests by adding the missing condition
* 3.4: (22 commits)
fix merge
[Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files
Fixed exit code with non-integer throwable code
[HttpFoundation] Support 0 bit netmask in IPv6 ()
[DI] Impossible to set an environment variable and then an array as container parameter
[Process] remove false-positive BC breaking exception on Windows
Tweaking class not found autowiring error
[LDAP] added missing dots at the end of some exception messages.
[TwigBridge] Add missing dev requirement for workflow
fixed#25440
empty lines don't count for indent detection
Set `width: auto` on WebProfiler toolbar's reset.
[Lock] Fix incorrect phpdoc
[Process] Dont rely on putenv(), it fails on ZTS PHP
[HttpKernel] detect deprecations thrown by container initialization during tests
[HttpKernel] Fix logging of post-terminate errors/exceptions
[DI] Add context to service-not-found exceptions thrown by service locators
[Debug] Fix catching fatal errors in case of nested error handlers
[VarDumper] Fixed file links leave blank pages when ide is configured
Fix hidden currency element with Bootstrap 3 theme
...
* 3.3:
fix merge
[Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files
Fixed exit code with non-integer throwable code
Add suggestions
Added instructions to upgrade Symfony applications to 4.x
This PR was merged into the 3.3 branch.
Discussion
----------
[MonologBridge][WebServerBundle] Add suggestions for using the log server
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | /
| License | MIT
| Doc PR | /
If you want launch `server:log`, you need the monolog bridge and the VarDumper. Optionally, you need EL if you want use `server:log --filter`.
Commits
-------
aca0ddd Add suggestions
This PR was squashed before being merged into the 3.3 branch (closes#24594).
Discussion
----------
[Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24593
| License | MIT
This PR fixes the bug in #24593. It's not the absolutely ideal way to address the issue, but I don't see how else to handle it without either dropping support for pips in translation strings, or rearchitecting the code that feeds translations to the MessageSelector as pipe separated in the first place.
Commits
-------
fea815b2f5 [Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Console] Fixed exit code with non-integer throwable code
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
The exception/error code in PHP doesn't have to be an integer:
> Returns the exception code as integer in Exception but possibly as other type in Exception descendants (for example as string in PDOException).
> http://php.net/manual/en/exception.getcode.php#refsect1-exception.getcode-returnvalues
This means that a "Return value of Symfony\Component\Console\Event\ConsoleErrorEvent::getExitCode() must be of the type integer, string returned" error is shown when e.g. an uncatched PDOException is handled by the console error event.
Commits
-------
ca86e65da4 Fixed exit code with non-integer throwable code
This PR was merged into the 4.1-dev branch.
Discussion
----------
[HttpFoundation] Incorrect documentation and method name for UploadedFile::getClientSize()
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | yes <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | #23791
| License | MIT
| Doc PR | none
Replace the wrong named and documented method by another with better doc and better naming
Commits
-------
b1363202ed [HttpFoundation] Incorrect documentation and method name for UploadedFile::getClientSize()
* 3.3:
[HttpFoundation] Support 0 bit netmask in IPv6 ()
[DI] Impossible to set an environment variable and then an array as container parameter
[LDAP] added missing dots at the end of some exception messages.
Set `width: auto` on WebProfiler toolbar's reset.
[Process] Dont rely on putenv(), it fails on ZTS PHP
[HttpKernel] detect deprecations thrown by container initialization during tests
[HttpKernel] Fix logging of post-terminate errors/exceptions
[Debug] Fix catching fatal errors in case of nested error handlers
[VarDumper] Fixed file links leave blank pages when ide is configured
Fix hidden currency element with Bootstrap 3 theme
* 2.8:
[HttpFoundation] Support 0 bit netmask in IPv6 ()
Set `width: auto` on WebProfiler toolbar's reset.
[HttpKernel] Fix logging of post-terminate errors/exceptions
[Debug] Fix catching fatal errors in case of nested error handlers
Fix hidden currency element with Bootstrap 3 theme
* 2.7:
[HttpFoundation] Support 0 bit netmask in IPv6 ()
Set `width: auto` on WebProfiler toolbar's reset.
[HttpKernel] Fix logging of post-terminate errors/exceptions
[Debug] Fix catching fatal errors in case of nested error handlers
Fix hidden currency element with Bootstrap 3 theme
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FrameworkBundle][Routing] Use a PSR-11 container in FrameworkBundle Router
| Q | A
| ------------- | ---
| Branch? | 4.1 <!-- see comment below -->
| Bug fix? | no
| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | not yet <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
~3.4 because~ it allows to make the `routing.loader` service private and add sense into implementing the `ServiceSubscriberInterface` in the `Router` by injecting a ServiceLocator instead of the DI container.
Should we deprecate passing a DI `ContainerInterface` instance without providing the `$paramFetcher` argument?
Move the whole `Router::resolve()` method into a dedicated `callable $paramResolver` ?
Commits
-------
5a2f2954ae [FrameworkBundle][Routing] Use a PSR-11 container & parameter bag in FrameworkBundle Router
This PR was merged into the 2.7 branch.
Discussion
----------
[TwigBridge][Form] Fix hidden currency element with Bootstrap 3 theme
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
When using a `MoneyType` field, one can pass `currency=false` option to hide the currency symbol. This does not work well when using the Bootstrap 3 theme: the symbol is not displayed but HTML elements that are supposed to contain it are still rendered.
Commits
-------
c5af7fd938 Fix hidden currency element with Bootstrap 3 theme
This PR was merged into the 4.1-dev branch.
Discussion
----------
[VarDumper] Allow VarDumperTestTrait expectation to be non-scalar
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
At the moment, when using the `VarDumperTestTrait` in unit test, expecting data object is as follow:
```php
class Toto
{
private $foo;
public function __construct($foo)
{
$this->foo = $foo;
}
}
class MyTest extends \PHPUnit_Framework_TestCase
{
use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
public function dummyTest()
{
$expected = <<<EOEXPECTED
Profiler\Tests\Model\CallGraph\Toto {
-foo: "baz"
}
EOEXPECTED;
$this->assertDumpEquals($expected, new Toto('baz'));
}
}
```
The same test could be easily written like this with this change:
```php
public function dummyTest()
{
$this->assertDumpEquals(new Toto('baz'), new Toto('baz'));
}
```
Commits
-------
6b5ab90b5b [VarDumper] Allow VarDumperTestTrait expectation to be non-scalar
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Console] Add box style 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 | /
> Box-drawing characters, also known as line-drawing characters, are a form of semigraphics widely used in text user interfaces to draw various geometric frames and boxes. https://en.wikipedia.org/wiki/Box-drawing_character
Box-drawing characters are done for the `TableStyle`; use them!
Result:
![screenshot from 2017-12-04 17-09-56](https://user-images.githubusercontent.com/4578773/33540267-0e4052fe-d916-11e7-8401-eb3be59e8025.png)
Commits
-------
360a984b0c Add box style table
This PR was merged into the 2.7 branch.
Discussion
----------
[Debug] Fix catching fatal errors in case of nested error handlers
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8703, #16980
| License | MIT
| Doc PR | -
Fixing a bug from 2013 :)
Commits
-------
27dc9a6c7c [Debug] Fix catching fatal errors in case of nested error handlers
This PR was squashed before being merged into the 2.7 branch (closes#25330).
Discussion
----------
[HttpFoundation] Support 0 bit netmask in IPv6 (`::/0`)
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | —
| License | MIT
| Doc PR | —
Proxy settings allow `0.0.0.0/0` but not `::/0`. This PR adds IpUtils support for 0 masked bits in IPv6.
Tests pass in the sense that results before and after are unchanged on my local PHP 7.2 / macOS setup. The IpUtils test cases were extended for the changes in this PR.
I've rebased on 2.7, but the issue is present up to 4.0 and master.
Commits
-------
9f1c9bd964 [HttpFoundation] Support 0 bit netmask in IPv6 ()
This PR was merged into the 3.3 branch.
Discussion
----------
[VarDumper] Fixed file links leave blank pages when ide is configured
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25377
| License | MIT
| Doc PR | n/a
Commits
-------
138cd09948 [VarDumper] Fixed file links leave blank pages when ide is configured
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpKernel] Fix logging of post-terminate errors/exceptions
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19078
| License | MIT
| Doc PR | -
After terminate, the request stack is empty, thus `terminateWithException` currently fails, preventing listeners to know about the failure.
Commits
-------
e85b371d72 [HttpKernel] Fix logging of post-terminate errors/exceptions
This PR was merged into the 4.0 branch.
Discussion
----------
[Bridge/Doctrine] Drop "memcache" type
| Q | A
| ------------- | ---
| Branch? | 4.0
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14629
| License | MIT
| Doc PR | -
There is no "memcache" extension for PHP 7. Only memcached works now.
Commits
-------
ce1c28f59e [Bridge/Doctrine] Drop "memcache" type
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FrameworkBundle] Add atom editor to ide config
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->
Support for uri handler (added [here](https://github.com/atom/atom/pull/15935)) in Atom editor is still in the current beta version. This works only for windows and mac.
Commits
-------
191b837e22 [FrameworkBundle] Add atom editor to ide config
This PR was merged into the 3.3 branch.
Discussion
----------
[Process] Dont rely on putenv(), it fails on ZTS PHP
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24924
| License | MIT
| Doc PR | -
`putenv()` is not thread safe, but ZTS is PHP defaults on Windows.
Commits
-------
ef632ec721 [Process] Dont rely on putenv(), it fails on ZTS PHP
This PR was merged into the 3.3 branch.
Discussion
----------
[LDAP] Add missing dots at the end of some exception messages
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
For consistency sake.
Commits
-------
8d0b7528bc [LDAP] added missing dots at the end of some exception messages.
This PR was squashed before being merged into the 3.3 branch (closes#25333).
Discussion
----------
[DI] Impossible to set an environment variable and then an array as container parameter
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25245
| License | MIT
When an environment variables and then an array is set as container parameters, an error is thrown (Warning: stripos() expects parameter 1 to be string, array given).
You can run my test without the fix in the Container builder to see it.
Commits
-------
484a082eb1 [DI] Impossible to set an environment variable and then an array as container parameter
* 3.3:
Tweaking class not found autowiring error
[TwigBridge] Add missing dev requirement for workflow
fixed#25440
empty lines don't count for indent detection
This PR was merged into the 3.4 branch.
Discussion
----------
[Process] remove false-positive BC breaking exception on Windows
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25446
| License | MIT
| Doc PR | -
Commits
-------
fe41155ea1 [Process] remove false-positive BC breaking exception on Windows
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Add context to service-not-found exceptions thrown by service locators
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes (DX)
| New feature? | yes (...)
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25342, #25196
| License | MIT
| Doc PR | -
Here hopefully is the fully-context aware message you're looking for @weaverryan @curry684.
![image](https://user-images.githubusercontent.com/243674/33726013-1db38a34-db74-11e7-91dd-ca9d53e58891.png)
Commits
-------
9512f268f4 [DI] Add context to service-not-found exceptions thrown by service locators
This PR was merged into the 3.3 branch.
Discussion
----------
[TwigBridge] Add missing dev requirement for workflow
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
63208ad9c4 [TwigBridge] Add missing dev requirement for workflow
This PR was squashed before being merged into the 3.3 branch (closes#24599).
Discussion
----------
Tweaking class not found autowiring error
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | n/a
A trainee in my workshop today hit this error, and it struck me as not as clear as it could be - it's really a "Class Not Found" error.
Commits
-------
48832e640a Tweaking class not found autowiring error
Currently we only support a very loose validation. There is now a
standard HTML5 element with matching regex. This will add the ability
to set a `mode` on the email validator. The mode will change the
validation that is applied to the field as a whole.
These modes are:
* loose: The pattern from previous Symfony versions (default)
* strict: Strictly matching the RFC
* html5: The regex used for the HTML5 Element
Deprecates the `strict=true` parameter in favour of `mode='strict'`
This PR was merged into the 4.1-dev branch.
Discussion
----------
grammar typo in docs
| Q | A
| ------------- | ---
| Branch? | master for features / 2.7 up to 4.0 for bug fixes <!-- see below -->
| Bug fix? | yes/no
| New feature? | yes/no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | yes/no
| Deprecations? | yes/no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->
Commits
-------
d53c889 grammar typo in docs
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Process] add type hint and changelog entry
| 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
-------
5a1dc67 add type hint and changelog entry
* 4.0: (42 commits)
fix merge
Remove some unused variables and properties
[appveyor] disable memory limit on composer up
[HttpFoundation] don't prefix cookies with "Set-Cookie:"
Remove some unused variables and properties
[HttpFoundation] Fixed default user-agent (3.X -> 4.X)
Fix debug:form definition
Remove some unused variables, properties and methods
fix some edge cases with indented blocks
[ExpressionLanguage] Fix parse error on 5.3
[HttpKernel] remove noisy frame in controller stack traces
[DI] Force root-namespace for function calls in the dumper container
[DI] Fix circular-aliases message
register system cache clearer only if it's used
doc : Namespace prefix must end with a "\"
[ExpressionLanguage] throw an SyntaxError instead of letting a undefined index notice
Prevent a loop in aliases within the `findDefinition` method
[HttpKernel] Disable inlining on PHP 5
Ensure that inlined services with parameterized class name can be dumped
[DI] Fix non-string class handling in PhpDumper
...
* 3.4: (37 commits)
Remove some unused variables and properties
[appveyor] disable memory limit on composer up
[HttpFoundation] don't prefix cookies with "Set-Cookie:"
Remove some unused variables and properties
Fix debug:form definition
Remove some unused variables, properties and methods
fix some edge cases with indented blocks
[ExpressionLanguage] Fix parse error on 5.3
[HttpKernel] remove noisy frame in controller stack traces
[DI] Force root-namespace for function calls in the dumper container
[DI] Fix circular-aliases message
register system cache clearer only if it's used
doc : Namespace prefix must end with a "\"
[ExpressionLanguage] throw an SyntaxError instead of letting a undefined index notice
Prevent a loop in aliases within the `findDefinition` method
[HttpKernel] Disable inlining on PHP 5
Ensure that inlined services with parameterized class name can be dumped
[DI] Fix non-string class handling in PhpDumper
Throw a sensible exception when controller has been removed
Remove LOCK_EX That Breaks Cache Usage on NFS
...
This PR was merged into the 3.4 branch.
Discussion
----------
Remove some unused variables and properties
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
Analyzing symfony/symfony using https://insight.sensiolabs.com, I found several chunks of dead code. This PR removes them in the 3.4 branch.
Commits
-------
ec92d9b Remove some unused variables and properties
* 3.3: (21 commits)
[appveyor] disable memory limit on composer up
Remove some unused variables and properties
Remove some unused variables, properties and methods
fix some edge cases with indented blocks
[ExpressionLanguage] Fix parse error on 5.3
[HttpKernel] remove noisy frame in controller stack traces
[DI] Fix circular-aliases message
[ExpressionLanguage] throw an SyntaxError instead of letting a undefined index notice
Prevent a loop in aliases within the `findDefinition` method
Fix php doc in Table class
bumped Symfony version to 3.3.15
updated VERSION for 3.3.14
updated CHANGELOG for 3.3.14
bumped Symfony version to 2.8.33
updated VERSION for 2.8.32
updated CHANGELOG for 2.8.32
bumped Symfony version to 2.7.40
updated VERSION for 2.7.39
update CONTRIBUTORS for 2.7.39
updated CHANGELOG for 2.7.39
...
This PR was merged into the 3.3 branch.
Discussion
----------
[Yaml] fix some edge cases with indented blocks
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25329, #25341
| License | MIT
| Doc PR |
Now that comment-like lines are no longer ignored when subparsers are
created, we need to ignore them in some functions (e.g. when detecting
the indentation depth of the next block).
Commits
-------
b201c22 fix some edge cases with indented blocks
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] Fix debug:form command definition
| 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 | -
Sadly these changes were forgotten in https://github.com/symfony/symfony/pull/25011 and the `debug:form` command does not work properly right now :(
Commits
-------
97fdf31 Fix debug:form definition
* 2.8:
Remove some unused variables, properties and methods
[ExpressionLanguage] Fix parse error on 5.3
[HttpKernel] remove noisy frame in controller stack traces
[ExpressionLanguage] throw an SyntaxError instead of letting a undefined index notice
Fix php doc in Table class
bumped Symfony version to 2.8.33
updated VERSION for 2.8.32
updated CHANGELOG for 2.8.32
bumped Symfony version to 2.7.40
updated VERSION for 2.7.39
update CONTRIBUTORS for 2.7.39
updated CHANGELOG for 2.7.39
This PR was merged into the 4.1-dev branch.
Discussion
----------
[DI][FrameworkBundle] Add PSR-11 "ContainerBag" to access parameters as-a-service
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17160
| License | MIT
| Doc PR | -
There is one thing that prevents us from not injecting the container: access to the parameter bag.
This PR fixes this limitation by providing a PSR-11 `ContainerBagInterface` + related implementation, and wiring it as a service that ppl can then also autowire using the new interface as a type hint, or `ParameterBagInterface`.
Needed to complete e.g. #24738
Commits
-------
561cd7e Add tests on the ContainerBag
0e18d3e [DI][FrameworkBundle] Add PSR-11 "ContainerBag" to access parameters as-a-service
* 2.7:
Remove some unused variables, properties and methods
[ExpressionLanguage] Fix parse error on 5.3
[HttpKernel] remove noisy frame in controller stack traces
[ExpressionLanguage] throw an SyntaxError instead of letting a undefined index notice
Fix php doc in Table class
bumped Symfony version to 2.7.40
updated VERSION for 2.7.39
update CONTRIBUTORS for 2.7.39
updated CHANGELOG for 2.7.39
Now that comment-like lines are no longer ignored when subparsers are
created, we need to ignore them in some functions (e.g. when detecting
the indentation depth of the next block).
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FrameworkBundle] debug:autowiring: don't list FQCN when they are aliased
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
In order to favor type-hinting for interfaces, I propose to not list the class as explicitly autowireable when an alias exists for it.
Which means displaying only
```
App\FooInterface
alias to App\Foo
```
instead of
```
App\Foo
App\FooInterface
alias to App\Foo
```
ping @weaverryan
Commits
-------
8cbfa1eaf3 [FrameworkBundle] debug:autowiring: don't list FQCN when they are aliased
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Fix non-string class handling in PhpDumper
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25353
| License | MIT
| Doc PR | -
Commits
-------
28f00866b1 Ensure that inlined services with parameterized class name can be dumped
730b156f35 [DI] Fix non-string class handling in PhpDumper
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Force root-namespace for function calls in the dumper container
| 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 | -
Was not needed before 3.4, but now that the dumped container is namespaced, it is required.
Commits
-------
f87380c22a [DI] Force root-namespace for function calls in the dumper container
This PR was merged into the 3.3 branch.
Discussion
----------
[Serializer] Unset attributes when creating child context
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
In some cases, the `attributes` key isn't overrode when creating the context passed to nested normalizers.
It's definitely a bug, but an attacker cannot access to non public data (ignored attributes are checked before the `attributes` key). However some data that must be public may be missing as highlighted by the test.
I've introduced the initial bug here: https://github.com/symfony/symfony/pull/18834
Commits
-------
4ff9d99f23 [Serializer] Unset attributes when creating child context
This PR was merged into the 3.4 branch.
Discussion
----------
[Yaml] do not evaluate PHP constant names
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25307
| License | MIT
| Doc PR |
PHP constant identifiers must be strings anyway. Thus, we only need to
parse quoted strings, but do not have to evaluate the data types.
Commits
-------
956287be72 do not evaluate PHP constant names
This PR was merged into the 3.4 branch.
Discussion
----------
[Serializer] improved CsvEncoder::decode performance
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Improved CsvEncoder::decode performance by caching duplicate count calls.
Blackfire profiles before and after change tested on collection of 10000 elements:
[before] https://blackfire.io/profiles/9c08f789-cd29-4eae-92c8-046e3849a2b8/graph
[after] https://blackfire.io/profiles/a17bfb6b-ef82-41ee-9edd-9403f829d6ab/graph
Commits
-------
3b910a9fad [Serializer] improved CsvEncoder::decode performance by caching duplicate count calls
This PR was squashed before being merged into the 4.1-dev branch (closes#24375).
Discussion
----------
[Serializer] Serialize and deserialize from abstract classes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ø
| License | MIT
| Doc PR | Not yet
This PR adds a feature in the Serializer: allow to serialize and de-serialize abstract classes. Such feature is especially useful when dealing with domain objects.
# Example
Let's take the example of the following objects:
- `CodeRepository` defines a set of properties like `name` and `url`
- `GitHubCodeRepository` and `BitBucketCodeRepository` extends from the abstract `CodeRepository` class and adds a few properties.
- `Project` has a relation with a `codeRepository`, which has a type `CodeRepository`.
At the moment, the serializer can't serialize/deserialize correctly this `Project` object has it doesn't know how to deal with this `CodeRepository` abstract object.
This feature allows the serializer to deal with such situation. The `ObjectNormalizer` has now access to a `ClassDiscriminatorResolver` that knows, for a given abstract class:
- Is the "type" property it needs to read/write to uniquely identify each sub-class
- What's the name of the "type" for each sub-class mapping
# Usage without Framework Bundle
```php
$discriminatorResolver = new ClassDiscriminatorResolver();
$discriminatorResolver->addClassMapping(CodeRepository::class, new ClassDiscriminatorMapping('type', [
'github' => GitHubCodeRepository::class,
'bitbucket' => BitBucketCodeRepository::class,
]));
$serializer = new Serializer(array(new ObjectNormalizer(null, null, null, null, $discriminatorResolver)), array('json' => new JsonEncoder()));
$serialized = $serializer->serialize(new GitHubCodeRepository());
// {"type": "github"}
$repository = $serializer->unserialize($serialized, CodeRepository::class, 'json');
// GitHubCodeRepository
```
# Usage with the Framework Bundle
```yaml
framework:
serializer:
discriminator_class_mapping:
App\CodeRepository:
type_property: type
mapping:
github: App\GitHubCodeRepository
bitbucket: App\BitBucketCodeRepository
```
# Usage with Annotations/XML/YAML
```php
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
/**
* @DiscriminatorMap(typeProperty="type", mapping={
* "first"="Symfony\Component\Serializer\Tests\Fixtures\AbstractDummyFirstChild",
* "second"="Symfony\Component\Serializer\Tests\Fixtures\AbstractDummySecondChild"
* })
*/
abstract class AbstractDummy
{
public $foo;
public function __construct($foo = null)
{
$this->foo = $foo;
}
}
```
# TODO
- [x] Working as standalone
- [x] Working with the framework bundle
- [x] Tests on mapping classes
Commits
-------
4c6e05b7ee [Serializer] Serialize and deserialize from abstract classes
This PR was merged into the 4.1-dev branch.
Discussion
----------
[DoctrineBridge] DoctrineDataCollector comments the non runnable part of the query
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no <!-- 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 | #24782
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
![img_2932](https://user-images.githubusercontent.com/3451634/33648180-f6c7a5ac-da58-11e7-8bf8-95fc943d16ff.jpeg)
I think the idea in this ticket is good and it should be implemented. Could we go further by adding more things to this feature, or will it be ok to just comment out the un-needed part to make the kiri
![kiri](https://user-images.githubusercontent.com/3451634/33648278-5eccc830-da59-11e7-8034-a1b9efee7673.png)
(french joke for query) runnable ?
Commits
-------
42760d0d7f [DoctrineBridge] DoctrineDataCollector comments the non runnable part of the query
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle][Cache] register system cache clearer only if it's used
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25326
| License | MIT
| Doc PR |
Commits
-------
093eb3d40d register system cache clearer only if it's used
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Process] Create a "isTtySupported" static method
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | _none_
| License | MIT
| Doc PR | _none_
Currently, there is no way to enable the TTY mode without risking an exception. This PR extracts the code checking for TTY support and provides it in a `isTtySupported` static method.
Now we can enable the TTY mode everywhere it's available without risking an exception:
```php
$process = (new Process)->setTty(Process::isTtySupported());
```
_Old comment_:
> I'm targeting the 2.7 branch since this is not really a new feature, just a little refactoring of the existent code, and it is fully backward compatible.
Commits
-------
a1398f6de4 Create a "isTtySupported" static method
This PR was merged into the 2.7 branch.
Discussion
----------
[ExpressionLanguage] throw an SyntaxError instead of an undefined index notice
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no <!-- 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 | #25214
| License | MIT
| Doc PR | none
I think this is a bug when the components throws a notice instead of an exception.
it's too early and too dark to see something outside so here is my couch :
![img_2915-2](https://user-images.githubusercontent.com/3451634/33592448-6b514050-d98b-11e7-8086-bc6e6b6e6e82.jpg)
Commits
-------
78abc89648 [ExpressionLanguage] throw an SyntaxError instead of letting a undefined index notice
This PR was merged into the 3.4 branch.
Discussion
----------
[DX][HttpKernel] Throw a sensible exception when controller has been removed
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25335
| License | MIT
| Doc PR | ø
Following on #25201, we need to throw the same kind of sensible exception when the controller service is not found.
Commits
-------
458d63fbb9 Throw a sensible exception when controller has been removed
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Workflow] Introduce a Workflow interface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #23910
| License | MIT
| Doc PR | todo
@chalasr I think all the points you made in 23910 has been done. Needs to update the docs too.
Commits
-------
e8351d8 [Workflow] Introduce a Workflow interface
This removes the exclusive lock that was introduced in #24960.
NFS File Systems do not support exclusive locking, and generates a lot
of errors every time you try to do anything with che cache.
* 4.0:
[Bridge/PhpUnit] Prefer ['argv'] over
[SecurityBundle] fix setLogoutOnUserChange calls for context listeners
[SecurityBundle] add note to info text of no-op config option logout_on_user_change
[DI] Register singly-implemented interfaces when doing PSR-4 discovery
Fix for missing whitespace control modifier in form layout
* 3.4:
[SecurityBundle] fix setLogoutOnUserChange calls for context listeners
[DI] Register singly-implemented interfaces when doing PSR-4 discovery
Fix for missing whitespace control modifier in form layout
This PR was squashed before being merged into the 3.4 branch (closes#25272).
Discussion
----------
[SecurityBundle] fix setLogoutOnUserChange calls for context listeners
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25267
| License | MIT
| Doc PR | -
As pointed out in https://github.com/symfony/symfony/issues/25267 the `setLogoutOnUserChange` method calls were added to the parent definition `security.context_listener` instead of the concrete child definitions `security.context_listener.*`.
ping @iltar @chalasr
Commits
-------
4eff146 [SecurityBundle] fix setLogoutOnUserChange calls for context listeners
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Register singly-implemented interfaces when doing PSR-4 discovery
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
I'm feeling bad for not having this idea before 3.4.0 went out, therefore submitting on 3.4, despite this being a new feature, technically. On a DX pov still, this is a bugfix :) I'll let you accept the argument or not...
So, when doing PSR-4-based service registration, we keep only classes as services.
This systematically leads to the question: "But what about interfaces, shouldn't we type-hint against abstractions and not classes?!"
And the answer has invariably been: "Well, just create an alias!"
Which means doing configuration manually.
I fear that if we leave things as is, we're going to grow a "generation" of devs that will hijack autowiring and abuse hinting for classes instead of interfaces.
BUT, here is the idea implemented by this PR: let's create an alias for every singly-implemented interface we discover while looking for classes!
Plain local, simple, and obvious, isn't it?
Votes pending :)
Commits
-------
fcd4aa7807 [DI] Register singly-implemented interfaces when doing PSR-4 discovery
* 4.0:
[Security] Adding a GuardAuthenticatorHandler alias
fixed tests
moved method to function
marked method as being internal
Disallow viewing dot-files in Profiler
* 3.4:
[Security] Adding a GuardAuthenticatorHandler alias
fixed tests
moved method to function
marked method as being internal
Disallow viewing dot-files in Profiler
This PR was merged into the 3.3 branch.
Discussion
----------
[FrameworkBundle] Fix a bug where a color tag will be shown when passing an antislash
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25193
| License | MIT
| Doc PR | none
You can see in the [reproducer](e6509ffcb4) when running `bin/console debug:container` that there an error in the ouput (like in the issue) when using a class with `\` in the service name.
This PR fix this wrong output. (even if that feels more developer thingy when there are xml everywhere ;)
Commits
-------
890edf7c38 [FrameworkBundle] Fix a bug where a color tag will be shown when passing an antislash
* 4.0:
[DI] Fix missing unset leading to false-positive circular ref
[DI] Fix deep-inlining of non-shared refs
parse newlines in quoted multiline strings
Fix collision between view properties and form fields
Fix collision between view properties and form fields
[SecurityBundle] Fix compat with HttpFoundation >=3.4
[DI] turn $private to protected in dumped container, to make cache:clear BC
Fix collision between view properties and form fields
* 3.4:
[DI] Fix missing unset leading to false-positive circular ref
[DI] Fix deep-inlining of non-shared refs
parse newlines in quoted multiline strings
Fix collision between view properties and form fields
Fix collision between view properties and form fields
[SecurityBundle] Fix compat with HttpFoundation >=3.4
Fix collision between view properties and form fields
This PR was merged into the 2.7 branch.
Discussion
----------
Fix for missing whitespace control modifier in form layout
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25252
| License | MIT
| Doc PR | -
That single missing whitespace control modifier results in e.g. new line in `data-prototype` attribute when using CollectionType field type in form.
Commits
-------
369075a282 Fix for missing whitespace control modifier in form layout
This PR was merged into the 3.3 branch.
Discussion
----------
[WebProfiler] Disallow viewing dot-files in Profiler
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
The file viewer in the profiler should not open files that were specifically intended to be hidden, like specifically .env files, but similarly files like .htaccess that might expose server configuration knowledge.
Added tests validating both the new and old behavior.
Commits
-------
6a2f518e74 Disallow viewing dot-files in Profiler
This PR was merged into the 3.4 branch.
Discussion
----------
[Form][TwigBridge] Fix collision between view properties and form fields
| 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 | -
Require https://github.com/symfony/symfony/pull/25236 merged in 3.4
Commits
-------
c330965cfb Fix collision between view properties and form fields
This PR was merged into the 3.3 branch.
Discussion
----------
[Form][TwigBridge] Fix collision between view properties and form fields
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Require https://github.com/symfony/symfony/pull/25236 merged in 3.3
Commits
-------
888b48a89c Fix collision between view properties and form fields
This PR was merged into the 4.0 branch.
Discussion
----------
[DI] turn $private to protected in dumped container, to make cache:clear BC
| Q | A
| ------------- | ---
| Branch? | 4.0
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Turning this property to protected changes nothing to its visibility in practice as the class is final anyway,
but when migrating to SF4.0 from 3.4, the `cache:clear` command chokes with "Compile Error: Access level to srcDevDebugProjectContainer::$privates must be protected".
Let's make it protected to remove this WTF.
Commits
-------
c98d967b0c [DI] turn $private to protected in dumped container, to make cache:clear BC
The file viewer in the profiler should not open files that were meant
to be hidden, like specifically .env files, but similarly files like
.htaccess that might expose server configuration knowledge.
* 4.0:
SCA with Php Inspections (EA Extended)
Add test case for #25264
Fixed the null value exception case.
Remove rc/beta suffix from composer.json files
Ensure services & aliases can be referred to with `__toString`able objects
Throw an exception is expression language is not installed
[DI] Cast ids to string, as done on 3.4
Fail as early and noisily as possible
[Console][DI] Fail gracefully
[FrameworkBundle] Fix visibility of a test helper
[link] clear the cache after linking
[DI] Trigger deprecation when setting a to-be-private synthetic service
[Intl] Correct Typehint
[link] Prevent warnings when running link with 2.7
[Validator] ExpressionValidator should use OBJECT_TO_STRING to allow value in message
do not eagerly filter comment lines
[WebProfilerBundle], [TwigBundle] Fix Profiler breaking XHTML pages (Content-Type: application/xhtml+xml)
* 3.4:
SCA with Php Inspections (EA Extended)
Add test case for #25264
Fixed the null value exception case.
Remove rc/beta suffix from composer.json files
Throw an exception is expression language is not installed
Fail as early and noisily as possible
[Console][DI] Fail gracefully
[FrameworkBundle] Fix visibility of a test helper
[link] clear the cache after linking
[DI] Trigger deprecation when setting a to-be-private synthetic service
[link] Prevent warnings when running link with 2.7
[Validator] ExpressionValidator should use OBJECT_TO_STRING to allow value in message
do not eagerly filter comment lines
[WebProfilerBundle], [TwigBundle] Fix Profiler breaking XHTML pages (Content-Type: application/xhtml+xml)
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Throw an exception if Expression Language is not installed
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25277
| License | MIT
| Doc PR | ø
The [`PhpDumper` already has this check](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php#L1688-L1690) but it is missing here.
Commits
-------
75b21e9 Throw an exception is expression language is not installed
* 3.3:
Fail as early and noisily as possible
[FrameworkBundle] Fix visibility of a test helper
[link] clear the cache after linking
[link] Prevent warnings when running link with 2.7
[Validator] ExpressionValidator should use OBJECT_TO_STRING to allow value in message
do not eagerly filter comment lines
[WebProfilerBundle], [TwigBundle] Fix Profiler breaking XHTML pages (Content-Type: application/xhtml+xml)
* 2.8:
[FrameworkBundle] Fix visibility of a test helper
[link] clear the cache after linking
[link] Prevent warnings when running link with 2.7
[Validator] ExpressionValidator should use OBJECT_TO_STRING to allow value in message
* 2.7:
[FrameworkBundle] Fix visibility of a test helper
[link] clear the cache after linking
[link] Prevent warnings when running link with 2.7
[Validator] ExpressionValidator should use OBJECT_TO_STRING to allow value in message
This PR was merged into the 3.3 branch.
Discussion
----------
[Yaml] do not eagerly filter comment lines
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Trying to be clever by filtering commented lines inside
`getNextEmbedBlock()` does not work as expected. The `#` may as well be
part of a multi-line quoted string where it must not be treated as the
beginning of a comment. Thus, we only must ensure that a comment-like
line does not skip the process of getting the next line of the embed
block.
Commits
-------
d594038 do not eagerly filter comment lines
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Fixed the @Valid(groups={"group"}) against null exception case
| 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 |
When `@Valid(groups={"group"})` has non-empty groups and the value is `null`, validator throws `Cannot validate values of type "NULL" automatically. Please provide a constraint.` at `RecursiveContextualValidator:164`.
I don't really understand, why everything is okay for `@Valid()` without groups, but hope that my fix is correct anyway.
Commits
-------
56f24d0 Fixed the null value exception case.
This PR was merged into the 3.4 branch.
Discussion
----------
Remove rc/beta suffix from composer.json files
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25291
| License | MIT
| Doc PR | -
We don't need that anymore.
Commits
-------
9fb6a88580 Remove rc/beta suffix from composer.json files
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FrameworkBundle] Improve the DX of TemplateController when using SF 4
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Tiny DX improvement when using modern Symfony.
Allow to write:
```yaml
# config/routes.yaml
index:
path: /
defaults:
_controller: 'Symfony\Bundle\FrameworkBundle\Controller\TemplateController'
template: 'homepage.html.twig'
```
Instead of:
```yaml
index:
path: /
defaults:
_controller: 'Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction'
template: 'homepage.html.twig'
```
I was thinking about doing the same for `RedirectController`, but it's not that easy because it contains two methods.
Commits
-------
6d150550cc [FrameworkBundle] Improve the DX of TemplateController when using SF 4
Today, I tried using SYMFONY_PHPUNIT_VERSION=6 because I don't really
care about the minor version. I got lots of warnings, followed by
hard-to-understand error messages. This will silence the first warning
and will throw an exception instead.
This PR was merged into the 3.4 branch.
Discussion
----------
[Console][DI] Fail gracefully
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/flex/issues/212, #25280
| License | MIT
| Doc PR | -
I already experienced this issue a few times without spending time digging it:
sometimes, you call `cache:clear`, and the command quits without any output, and with 255 status code.
The reason is the `@include` in `Kernel`, which makes everything silent, especially fatal errors (thanks PHP...)
So if the to-be-removed container is broken for some fatal reason, the failure is really bad.
To fix that, here are two measures:
- use `include_once` instead of `require_once` in the dumped container: that's OK there to actually not immediately load the file, any hard failure will happen later anyway, and any soft failure will allow the `cache:clear` command to complete (like when you remove a package)
- register `Application::renderException()` as the main PHP exception handler, via `Debug::ErrorHandler` when it's available
End result when it fails:
![image](https://user-images.githubusercontent.com/243674/33494543-e1d07202-d6c3-11e7-9677-bc2ae72fbba9.png)
instead of a blank output.
Commits
-------
4a5a3f52ab [Console][DI] Fail gracefully
This PR was squashed before being merged into the 4.1-dev branch (closes#25178).
Discussion
----------
[Routing] Allow to set name prefixes from the configuration
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19612
| License | MIT
| Doc PR | ø
This allows setting name prefixes to routes while importing them. Typically, we can then import multiple times a similar file. This was originally requested by 🎸 @chrisguitarguy in https://github.com/symfony/symfony/issues/19612
```yaml
app:
resource: ../controller/routing.yml
api:
resource: ../controller/routing.yml
name_prefix: api_
prefix: /api
```
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routinghttp://symfony.com/schema/routing/routing-1.0.xsd">
<import resource="../controller/routing.xml" />
<import resource="../controller/routing.xml" prefix="/api" name-prefix="api_" />
</routes>
```
Commits
-------
880d7e7436 [Routing] Allow to set name prefixes from the configuration
* 4.0:
[DI] Add missing deprecation when fetching private services from ContainerBuilder
[FrameworkBundle] Rename getDotEnvVars to getDotenvVars
[DI] Fix false-positive circular exception
Use a more specific file for detecting the bridge
[HttpKernel] Fix issue when resetting DumpDataCollector
bumped Symfony version to 4.0.1
updated VERSION for 4.0.0
updated CHANGELOG for 4.0.0
bumped Symfony version to 3.4.1
updated VERSION for 3.4.0
updated CHANGELOG for 3.4.0
* 3.4:
[DI] Add missing deprecation when fetching private services from ContainerBuilder
[FrameworkBundle] Rename getDotEnvVars to getDotenvVars
[DI] Fix false-positive circular exception
Use a more specific file for detecting the bridge
[HttpKernel] Fix issue when resetting DumpDataCollector
bumped Symfony version to 3.4.1
updated VERSION for 3.4.0
updated CHANGELOG for 3.4.0
This PR was merged into the 4.1-dev branch.
Discussion
----------
[VarDumper] add a GMP caster in order to cast GMP resources into string or integer
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25222
| License | MIT
| Doc PR | todo
Do you want to dump that kind of resources ? Then it means that the app you are writing is doing some math... why?! :p
It quite nice the little snow that we have in the north of france right now:
![img_2844](https://user-images.githubusercontent.com/3451634/33472917-8b48913e-d674-11e7-923f-ad951f7f2966.JPG)
Commits
-------
ed2c1af26b [VarDumper] add a GMP caster in order to cast GMP resources into string or integer
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Profiler][Translation] Logging false by default and desactivated when using the profiler
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | no
| Fixed tickets | #23146
| License | MIT
| Doc PR | todo.
Commits
-------
0252830755 [Profiler][Translation] Logging false by default and desactivated when using the profiler
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FrameworkBundle] Allow to pass a logger instance to the Router
| Q | A
| ------------- | ---
| Branch? | 4.1 <!-- see comment below -->
| 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 | #24739 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A
As explained in #24739, this will allow the `UrlGenerator` to log invalid calls when `router.strict_requirements` is `false` (so instead of throwing):
<img width="1064" alt="screenshot 2017-10-29 a 09 57 31" src="https://user-images.githubusercontent.com/2211145/32142080-482bc64e-bc90-11e7-8382-b78b507bae48.PNG">
~~This PR must re-introduce the `logger` argument in the definition along with the `monolog.logger` tag removed for cleaning in #24739, once it's merged up into master.~~ Done
Commits
-------
78f4f88cdd [FrameworkBundle] Allow to pass a logger instance to the Router
This PR was squashed before being merged into the 4.1-dev branch (closes#24937).
Discussion
----------
[DependencyInjection] Added support for variadics in named arguments
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24935
| License | MIT
Commits
-------
b5c0e8977c [DependencyInjection] Added support for variadics in named arguments
Trying to be clever by filtering commented lines inside
`getNextEmbedBlock()` does not work as expected. The `#` may as well be
part of a multi-line quoted string where it must not be treated as the
beginning of a comment. Thus, we only must ensure that a comment-like
line does not skip the process of getting the next line of the embed
block.
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Fix issue when resetting DumpDataCollector
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Fixes issue when resetting the collector and no stopwatch was provided in the constructor.
By the way, current workaround is to `composer require symfony/stopwatch`, so this is not a "big blocker".
Commits
-------
159fedc [HttpKernel] Fix issue when resetting DumpDataCollector
When using bin as a Composer bin-dir, this will break because both
composer.json and bin/simple-phpunit will exist relatively to the
current directory. This change checks for a non-binary file specific to
the bridge that will not have this issue.
Fixes#25228
* 4.0:
[HttpFoundation] Add Session::isEmpty(), fix MockFileSessionStorage to behave like the native one
[HttpKernel] Add a better error messages when passing a private or non-tagged controller
Test the suggestion of already registered services
[VarDumper] Dont use empty(), it chokes on eg GMP objects
[Dotenv] Changed preg_match flags from null to 0
remove upgrade instructions for kernel.root_dir
[HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice
[DependencyInjection] Add more information to the message when passing miss matching class.
[HttpKernel] add a test for FilterControllerEvents
* 3.4:
[HttpFoundation] Add Session::isEmpty(), fix MockFileSessionStorage to behave like the native one
[HttpKernel] Add a better error messages when passing a private or non-tagged controller
[VarDumper] Dont use empty(), it chokes on eg GMP objects
[Dotenv] Changed preg_match flags from null to 0
remove upgrade instructions for kernel.root_dir
[HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice
[HttpKernel] add a test for FilterControllerEvents
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Add Session::isEmpty(), fix MockFileSessionStorage to behave like the native one
| 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 | -
MockFileSessionStorage should not create any file when the session is empty. Like the native session storage, it should ignore the metadataBag to decide if the session is empty.
And to prevent AbstractTestSessionListener from registered a wrong cookie, it must have access to this empty state, which is now possible thanks to a new `Session::isEmpty()` method. Implementing is requires access to the internal storage of bags, which is possible via an internal proxy.
Commits
-------
56846ac [HttpFoundation] Add Session::isEmpty(), fix MockFileSessionStorage to behave like the native one
* 3.3:
[VarDumper] Dont use empty(), it chokes on eg GMP objects
[Dotenv] Changed preg_match flags from null to 0
remove upgrade instructions for kernel.root_dir
[HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice
[HttpKernel] add a test for FilterControllerEvents
This PR was merged into the 3.3 branch.
Discussion
----------
[VarDumper] Dont use empty(), it chokes on eg GMP objects
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25198
| License | MIT
| Doc PR | -
Commits
-------
1b14173 [VarDumper] Dont use empty(), it chokes on eg GMP objects
This PR was merged into the 3.3 branch.
Discussion
----------
[HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no <!-- 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 | #25191
| License | MIT
| Doc PR | none
Coding in the train to Paris !
![img_2832](https://user-images.githubusercontent.com/3451634/33361971-8aa17a70-d4da-11e7-90a0-b2f08a60d0e6.JPG)
Commits
-------
d84b47f [HttpKernel] Arrays with scalar values passed to ESI fragment renderer throw deprecation notice
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Add a better error messages when passing a private or non-tagged controller
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- 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 | #25192 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | none
- [x] Add more tests
Commits
-------
b1173f3 [HttpKernel] Add a better error messages when passing a private or non-tagged controller
This PR was merged into the 4.0 branch.
Discussion
----------
[DependencyInjection] Detect case mismatch in autowiring
| Q | A
| ------------- | ---
| Branch? | 4.0
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25122
| License | MIT
| Doc PR | ø
If there is a case-sensitive typo in the service injection, this will suggest the non-typoed version.
Commits
-------
407f132 Test the suggestion of already registered services
decaf23 [DependencyInjection] Add more information to the message when passing miss matching class.
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.
This PR was merged into the 3.3 branch.
Discussion
----------
[HttpKernel] add a test for FilterControllerEvents
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | no
| Fixed tickets | no <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | no
Commits
-------
b746e8a [HttpKernel] add a test for FilterControllerEvents
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Fix circular reference when using setters
| 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 | -
I did not manage to make a reproducing test case, yet @deguif provided me an app that I could play with to debug and fix.
Commits
-------
de5eecc [DI] Fix circular reference when using setters
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Clear service reference graph
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes (memory usage)
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Spotted while playing with the container: we keep this graph in memory even it its stale already.
Clearing it also leave circular refs for the php garbage collector, better clean ourselves.
Commits
-------
2744b41 [DI] Clear service reference graph
* 4.0:
[HttpKernel] Fix race condition when clearing old containers
[DI] Fix infinite loop in InlineServiceDefinitionsPass
[HttpKernel] Keep legacy container files for concurrent requests
Do not cache cache attributes if `attributes` is in the context
Test that it do not remove the new flashes when displaying the existing ones
[HttpFoundation] AutExpireFlashBag should not clear new flashes
[FrameworkBundle][Serializer] Remove YamlEncoder definition if Yaml component isn't installed
[DI] Fix tracking of env vars in exceptions
[Form] Don't rely on if http-foundation isn't in FileType
Fix merge
substitute aliases in inline mappings
added ability for substitute aliases when mapping in YAML is on single line
[Console] Fix global console flag when used in chain
* 3.4:
[HttpKernel] Fix race condition when clearing old containers
[DI] Fix infinite loop in InlineServiceDefinitionsPass
[HttpKernel] Keep legacy container files for concurrent requests
Do not cache cache attributes if `attributes` is in the context
Test that it do not remove the new flashes when displaying the existing ones
[HttpFoundation] AutExpireFlashBag should not clear new flashes
[FrameworkBundle][Serializer] Remove YamlEncoder definition if Yaml component isn't installed
[DI] Fix tracking of env vars in exceptions
[Form] Don't rely on if http-foundation isn't in FileType
Fix merge
substitute aliases in inline mappings
added ability for substitute aliases when mapping in YAML is on single line
[Console] Fix global console flag when used in chain
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Fix race condition when clearing old containers
| 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 | -
Missed in #25190: when two concurrent requests create the new container concurrently, the last one would drop the old container files, because the first one just created the `*.legacyContainer` file.
Commits
-------
9d553f533f [HttpKernel] Fix race condition when clearing old containers
* 3.3:
[DI] Fix infinite loop in InlineServiceDefinitionsPass
Do not cache cache attributes if `attributes` is in the context
Test that it do not remove the new flashes when displaying the existing ones
[HttpFoundation] AutExpireFlashBag should not clear new flashes
[FrameworkBundle][Serializer] Remove YamlEncoder definition if Yaml component isn't installed
[DI] Fix tracking of env vars in exceptions
[Form] Don't rely on if http-foundation isn't in FileType
Fix merge
substitute aliases in inline mappings
added ability for substitute aliases when mapping in YAML is on single line
[Console] Fix global console flag when used in chain
* 2.8:
Test that it do not remove the new flashes when displaying the existing ones
[HttpFoundation] AutExpireFlashBag should not clear new flashes
[Form] Don't rely on if http-foundation isn't in FileType
Fix merge
substitute aliases in inline mappings
added ability for substitute aliases when mapping in YAML is on single line
[Console] Fix global console flag when used in chain
* 2.7:
Test that it do not remove the new flashes when displaying the existing ones
[HttpFoundation] AutExpireFlashBag should not clear new flashes
[Form] Don't rely on if http-foundation isn't in FileType
substitute aliases in inline mappings
added ability for substitute aliases when mapping in YAML is on single line
[Console] Fix global console flag when used in chain
This PR was merged into the 3.3 branch.
Discussion
----------
[DI] Fix infinite loop in InlineServiceDefinitionsPass
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
When a non-shared is involved in a setter-circular loop, the pass enters an infinite loop right now.
Commits
-------
b988aa7 [DI] Fix infinite loop in InlineServiceDefinitionsPass
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Keep legacy container files for concurrent requests
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25177
| License | MIT
| Doc PR | -
Because concurrent requests might still be using them,
old container files should not be removed immediately,
but on a next dump of the container.
Commits
-------
ee3b6fe642 [HttpKernel] Keep legacy container files for concurrent requests
* 4.0:
[HttpKernel] Better handling of legacy cache
modify definitions only if the do exist
[DI] Prevent a ReflectionException during cache:clear when the parent class doesn't exist
[FrameworkBundle] Make MicroKernelTraitTest green
don't override existing verbosity env var
[HttpKernel] Read $_ENV when checking SHELL_VERBOSITY
Remove unreachable code
bumped Symfony version to 4.0.0
Automatically enable the CSRF protection if CSRF manager exists
updated VERSION for 4.0.0-RC2
updated CHANGELOG for 4.0.0-RC2
bumped Symfony version to 3.4.0
adding checks for the expression language
updated VERSION for 3.4.0-RC2
updated CHANGELOG for 3.4.0-RC2
* 3.4:
[HttpKernel] Better handling of legacy cache
modify definitions only if the do exist
[DI] Prevent a ReflectionException during cache:clear when the parent class doesn't exist
[FrameworkBundle] Make MicroKernelTraitTest green
don't override existing verbosity env var
[HttpKernel] Read $_ENV when checking SHELL_VERBOSITY
Remove unreachable code
Automatically enable the CSRF protection if CSRF manager exists
bumped Symfony version to 3.4.0
adding checks for the expression language
updated VERSION for 3.4.0-RC2
updated CHANGELOG for 3.4.0-RC2
This PR was merged into the 3.4 branch.
Discussion
----------
[Translation] modify definitions only if the do exist
| 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 |
If the `TranslatorPass` is used an application without the Console
component, the commands will not be registered. Thus, their service
definitions must not be modified.
Commits
-------
eab90ef1cf modify definitions only if the do exist
If the `TranslatorPass` is used an application without the Console
component, the commands will not be registered. Thus, their service
definitions must not be modified.
This PR was squashed before being merged into the 3.4 branch (closes#25160).
Discussion
----------
[DI] Prevent a ReflectionException during cache:clear when the parent class doesn't exist
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no <!-- 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 | n/a
Currently, if you just run the following commands:
```
composer create-project -s beta symfony/skeleton:^3.4 test
composer req orm
```
You get the following error:
```
In UniqueEntityValidator.php line 27:
[ReflectionException]
Class Symfony\Component\Validator\ConstraintValidator not found
```
`UniqueEntityValidator` is in the bridge, but it's parent class is in the validator (that is not installed by default). The hot path optimization feature (enabled by default) uses reflection, and the reflection API throws an exception in this specific case.
This PR fixes the error.
Commits
-------
6e622c6 [DI] Prevent a ReflectionException during cache:clear when the parent class doesn't exist
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Make MicroKernelTraitTest green
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Fixes the current failure on PHP 5.6:
```
1) Symfony\Bundle\FrameworkBundle\Tests\Kernel\MicroKernelTraitTest::testAsEventSubscriber
filemtime(): stat failed for /tmp/sf_micro_kernel/KernelTestDebugProjectContainer.php
/home/travis/build/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCache.php:91
/home/travis/build/symfony/symfony/src/Symfony/Component/Config/ConfigCache.php:60
/home/travis/build/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:585
/home/travis/build/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:137
/home/travis/build/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/MicroKernelTraitTest.php:35
```
Commits
-------
01edbf7 [FrameworkBundle] Make MicroKernelTraitTest green
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] don't override existing verbosity env var
| 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 |
While playing with the changes from #25162 I noticed that setting the `SHELL_VERBOSITY` env var in `phpunit.xml.dist` did not work as the kernel was setting the variable before the logic in the `Logger` class was executed.
Commits
-------
df4d6d6 don't override existing verbosity env var
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Read $_ENV when checking SHELL_VERBOSITY
| 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 | -
Needed so that we can set the env var from `phpunit.xml.dist`.
Commits
-------
7de1af4d53 [HttpKernel] Read $_ENV when checking SHELL_VERBOSITY
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Remove unreachable code
| 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 |
#24033 added the ability to ignore uninitialized references, but the regex above the conditional would lead to an `InvalidArgumentException` being thrown.
Commits
-------
ced0857560 Remove unreachable code
This PR was squashed before being merged into the 2.7 branch (closes#25152).
Discussion
----------
[Form] Don't rely on `Symfony\Component\HttpFoundation\File\File` if http-foundation isn't in FileType
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | may need discussion
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Currently `FileType` may depend on `Symfony\Component\HttpFoundation\File\File` regardless `http-foundation` has been installed or not.
It leads to occur the class-not-found error.
(Attached the screen capture, please see below and I provided the representation [here](https://github.com/issei-m/form-bug-representation/issues/1) for your information)
So I ensure `Symfony\Component\HttpFoundation\File\File` does exist, and if not, we don't specify any classes for this type.
While setting no specified class to `data_class` means making [property path behavior changed](7234bfd56a/src/Symfony/Component/Form/Form.php (L229-L231)),
[NativeRequestHandler](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/NativeRequestHandler.php) which is usually expected to be used in non-full-stack env handles a pure array like `$_FILES` holds, fully intended behavior AFAIK.
![image](https://user-images.githubusercontent.com/1135118/33216654-14706a56-d178-11e7-8e4b-c38c14ec7532.png)
Commits
-------
a264238e8a [Form] Don't rely on if http-foundation isn't in FileType
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Console] add setInputs to ApplicationTester and share some code
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24784
| License | MIT
| Doc PR | todo
I didn't implemented the tests because I don't know how to write them on ApplicationTester.
Commits
-------
ea86ed8 [Console] add setInputs to ApplicationTest and share some code
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Fix global console flag when used in chain
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no <!-- 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 | #23876
| License | MIT
| Doc PR |
Because SymfonyCon is great we can create pull request in it ! (this was preparer in the plane and I can push it just right now ;))
Finished in the #SymfonyConHackday2017
Commits
-------
1f8db73 [Console] Fix global console flag when used in chain
This PR was merged into the 4.0-dev branch.
Discussion
----------
[SecurityBundle][Security][Translation] trigger some deprecations for legacy methods
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
e3396ea trigger some deprecations for legacy methods
This PR was merged into the 3.4 branch.
Discussion
----------
Adding checks for the expression language
| Q | A
| ------------- | ---
| Branch? | 4.0
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | not needed
If you try to use the expression syntax in DI, this will drastically improve the error message :)
Commits
-------
3502020834 adding checks for the expression language
This PR was merged into the 4.1-dev branch.
Discussion
----------
Proposing Flex-specific error messages in the controller shortcuts
| Q | A
| ------------- | ---
| Branch? | 4.0
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | not needed
This is to help discoverability when you try to use a feature that's not installed. It's opinionated about Flex being installed, which is why this is done on 4.0.
Two of the options relate to configuration. An alternative (if we don't like the short description) is to include a link instead (which could be some short URL - e.g. `http://symfony.com/docs/sessions` would be pretty cool).
Commits
-------
d377b1545b Proposing Flex-specific error messages in the controller shortcuts
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Automatically enable the CSRF protection if CSRF manager exists
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ø
| License | MIT
This will automatically enable the CSRF protection if `CsrfTokenManagerInterface` exists.
Commits
-------
fd4340693c Automatically enable the CSRF protection if CSRF manager exists
* 4.0:
[DI] Dont resolve envs in service ids
Add tests proving it can load annotated files
[WebProfilerBundle] Reset letter-spacing in toolbar
Prefer overflow-wrap to word-break
remove more kernel.root_dir parameter refs
[*Bundle] Replace some kernel.root_dir by kernel.project_dir
removed some phpdocs
[Routing] Fix "config-file-relative" annotation loader resources
Make search in debug:container command case-insensitive
`resolveEnvPlaceholders` will return a mixed value
Remove dead code, add missing test
Update translation commands to work with default paths
[FrameworkBundle] Fix AssetsInstallCommand
* 3.4:
[DI] Dont resolve envs in service ids
Add tests proving it can load annotated files
[WebProfilerBundle] Reset letter-spacing in toolbar
Prefer overflow-wrap to word-break
remove more kernel.root_dir parameter refs
[*Bundle] Replace some kernel.root_dir by kernel.project_dir
removed some phpdocs
[Routing] Fix "config-file-relative" annotation loader resources
Make search in debug:container command case-insensitive
`resolveEnvPlaceholders` will return a mixed value
Update translation commands to work with default paths
[FrameworkBundle] Fix AssetsInstallCommand
* 3.3:
[DI] Dont resolve envs in service ids
Add tests proving it can load annotated files
[WebProfilerBundle] Reset letter-spacing in toolbar
Prefer overflow-wrap to word-break
[Routing] Fix "config-file-relative" annotation loader resources
Make search in debug:container command case-insensitive
`resolveEnvPlaceholders` will return a mixed value
This PR was merged into the 3.3 branch.
Discussion
----------
[DI] Dont resolve envs in service ids
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25123
| License | MIT
| Doc PR | -
Env placeholders should not be forbidden in **private** service identifiers. Instead, they should just be *not* resolved. This is effectively used in many bundle extensions fr good reasons (see eg. SecurityBundle and linked issue).
Commits
-------
7921255faf [DI] Dont resolve envs in service ids
This PR was merged into the 3.4 branch.
Discussion
----------
[*Bundle] Replace some kernel.root_dir by kernel.project_dir
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
92fc2f7 remove more kernel.root_dir parameter refs
4add28b [*Bundle] Replace some kernel.root_dir by kernel.project_dir
This PR was merged into the 3.3 branch.
Discussion
----------
[Routing] Fix "config-file-relative" annotation loader resources
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | slight behavior change
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
By using the locator in its `supports()` method, the `AnnotationDirectoryLoader` breaks config-relative annotation resources. The workaround is to fallback on `kernel.root_dir`-relative paths, as done in https://github.com/symfony/recipes/blob/master/doctrine/annotations/1.0/config/routes/annotations.yaml
But as you can see, this is rather WTF: extra knowledge is required to know what to type there. All the other loader look relatively to the config file first.
This is a bug, but since this is a slight behavior change, I think it's best to merge it on 3.4.
Commits
-------
f4999d8 Add tests proving it can load annotated files
5998e9d [Routing] Fix "config-file-relative" annotation loader resources
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Update translation commands to work with default paths
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/25062
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/8634
This should make translation commands (debug & update) work with `translator.default_path` and `twig.default_path` directories (introduced here in 3.4) and their overridden paths if available.
Would be great to include also the custom paths mapping by the user, either `translator.paths` as `twig.paths`, but I'm not sure about the right way and probably it should be implemented on another branch.
TODO
- [x] Add some tests.
Commits
-------
dc7286625b Update translation commands to work with default paths
This PR was merged into the 3.3 branch.
Discussion
----------
Make debug:container search command case-insensitive
| Q | A
| ------------- | ---
| Branch? | 3.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Fixed tickets | #25107
| License | MIT
| Doc PR |
This bug fixes the #25107 - starts from 3.2 services may be written with uppercase (e.g. FQCN) and search fails to match those services.
Commits
-------
c429c3346a Make search in debug:container command case-insensitive
This PR was merged into the 2.7 branch.
Discussion
----------
[Yaml] added ability for substitute aliases when mapping is on single line
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11569
| License | MIT
| Doc PR |
Commits
-------
dd26c80aa9 substitute aliases in inline mappings
675a3fe7f6 added ability for substitute aliases when mapping in YAML is on single line
This PR was merged into the 4.0 branch.
Discussion
----------
[SecurityBundle][Console] Remove dead code, add missing test
| Q | A
| ------------- | ---
| Branch? | 4.0
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
190df1a Remove dead code, add missing test
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Fix AssetsInstallCommand
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25106
| License | MIT
| Doc PR | -
Fixes a deprecation notice on 3.4, and a failure on 4.0.
Commits
-------
a84efa7 [FrameworkBundle] Fix AssetsInstallCommand
* 4.0:
[Form] Fixed ContextErrorException in FileType
[DI] Fix handling of inlined definitions by ContainerBuilder
[Security] remove unused variable
[DI] Fix infinite loop when analyzing references
[Lock][Process][FrameworkBundle] fix tests
Display a nice error message if the form/serializer component is missing.
[SecurityBundle] providerIds is undefined error when firewall provider is not specified
[SecurityBundle] providerIds is undefined error when firewall provider is not specified
[SecurityBundle] providerIds is undefined error when firewall provider is not specified
Force phpunit-bridge update (bis)
[Bridge/PhpUnit] Fix disabling global state preservation
Incorrect dot on method loadChoices in upgrade doc
This PR was squashed before being merged into the 2.7 branch (closes#25102).
Discussion
----------
[Form] Fixed ContextErrorException in FileType
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25063
| License | MIT
| Doc PR | --
Fixed an issue that ContextErrorException occurs when multiple is enabled.
Commits
-------
1b408e6 [Form] Fixed ContextErrorException in FileType
* 3.4:
[Lock][Process][FrameworkBundle] fix tests
Display a nice error message if the form/serializer component is missing.
[SecurityBundle] providerIds is undefined error when firewall provider is not specified
[SecurityBundle] providerIds is undefined error when firewall provider is not specified
[SecurityBundle] providerIds is undefined error when firewall provider is not specified
Force phpunit-bridge update (bis)
[Bridge/PhpUnit] Fix disabling global state preservation
Incorrect dot on method loadChoices in upgrade doc
This PR was merged into the 3.4 branch.
Discussion
----------
[Lock][Process][FrameworkBundle] fix tests
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
When running tests locally, I have several failures. This fixes them.
Commits
-------
878b08c [Lock][Process][FrameworkBundle] fix tests
* 3.3:
Display a nice error message if the form/serializer component is missing.
Force phpunit-bridge update (bis)
[Bridge/PhpUnit] Fix disabling global state preservation
* 4.0:
[Bridge\PhpUnit] Turn "preserveGlobalState" to false by default, revert "Blacklist" removal
bumped Symfony version to 3.4.0
bumped Symfony version to 4.0.0
updated VERSION for 4.0.0-RC1
updated CHANGELOG for 4.0.0-RC1
updated VERSION for 3.4.0-RC1
updated CHANGELOG for 3.4.0-RC1
* 3.4:
[Bridge\PhpUnit] Turn "preserveGlobalState" to false by default, revert "Blacklist" removal
bumped Symfony version to 3.4.0
updated VERSION for 3.4.0-RC1
updated CHANGELOG for 3.4.0-RC1
* 3.4:
[HttpKernel] Disable container inlining when legacy inlining has been used
Let getFlashes starts the session
Update default translations path
[FrameworkBundle] Ignore failures when removing the old cache dir
This PR was merged into the 3.4 branch.
Discussion
----------
[Bridge/Twig] Let getFlashes starts the session
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? |no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25073
| License | MIT
Commits
-------
a27f9591f5 Let getFlashes starts the session
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Ignore failures when removing the old cache dir
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25066
| License | MIT
| Doc PR | -
ping @phoenixgao can you please check if this improves the situation?
Commits
-------
3c4d168ca9 [FrameworkBundle] Ignore failures when removing the old cache dir
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Disable container inlining when legacy inlining has been used
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25059
| License | MIT
| Doc PR | -
Commits
-------
4a11683548 [HttpKernel] Disable container inlining when legacy inlining has been used
* 3.4:
[Bridge/PhpUnit] Sync the bridge version installed in vendor/ and in phpunit clone
[DI] Analyze setter-circular deps more precisely
fixing that PropertyNormalizer supports parent properties
[SecurityBundle] Don't trigger auto-picking notice if provider is set per listener
[TwigBundle][FrameworkBundle] Remove the internals from debug autowiring
[DI] Skip hot_path tag for deprecated services as their class might also be
[Cache] Memcached options should ignore "lazy"
[FrameworkBundle] Dont create empty bundles directory
This PR was merged into the 3.4 branch.
Discussion
----------
[Serializer] Fixing PropertyNormalizer supports parent properties
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
With 5ecafc5e25 support for parent properties was added to 3.4, but supports method was not updated for child classes without properties.
Commits
-------
a879e4f fixing that PropertyNormalizer supports parent properties
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Analyze setter-circular deps more precisely
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24950
| License | MIT
| Doc PR | -
This PR reverts the effect of #24828 and #24822 on fixtures, except for the new behavior these PRs introduced, which was mostly fine, but missed a few cases.
This PR now uses the reference graph to precisely decide which services need circular dependency care, and does not touch the other ones.
Commits
-------
9cc4a21 [DI] Analyze setter-circular deps more precisely
This PR was merged into the 3.4 branch.
Discussion
----------
[Bridge/PhpUnit] Sync the bridge version installed in vendor/ and in phpunit clone
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Right now, the bridge is installed at least twice: in vendor/ of the tested package, and in phpunit's clone.
By forcing the vendor one to be used for the phpunit clone also, we sync the version of the code, so that things become more manageable and easier to debug.
Applies also to our own CI.
Commits
-------
038c671 [Bridge/PhpUnit] Sync the bridge version installed in vendor/ and in phpunit clone
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBundle][FrameworkBundle] Remove the internals from debug autowiring
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no <!-- 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 | #24986
| License | MIT
| Doc PR |
#SymfonyConHackday2017
@nicolas-grekas @weaverryan @fabpot @stof It should be OK to review and to merge.
Commits
-------
491839b [TwigBundle][FrameworkBundle] Remove the internals from debug autowiring
This PR was merged into the 3.4 branch.
Discussion
----------
[SecurityBundle] Don't trigger auto-picking notice if provider is set per listener
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24980
| License | MIT
| Doc PR | n/a
Commits
-------
19e891a [SecurityBundle] Don't trigger auto-picking notice if provider is set per listener
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Dont create empty bundles directory by default
| Q | A
| ------------- | ---
| Branch? | 3.4 / 4.1?
| Bug fix? | yes?
| New feature? | no
| BC breaks? | no?
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!--highly recommended for new features-->
we still run `assets:install` by default, which in bundle-less apps gives this annoying empty public/bundles dir and some useless cli output, all the time. This fixes it.
Commits
-------
f8e7478583 [FrameworkBundle] Dont create empty bundles directory
This PR was squashed before being merged into the 3.4 branch (closes#25014).
Discussion
----------
Move deprecation under use statements
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | none
| License | MIT
| Doc PR | n/a
Commits
-------
0a5b016 Move deprecation under use statements
* 3.4: (26 commits)
[Bridge\PhpUnit] Disable broken auto-require mechanism of phpunit
[Console] Fix disabling lazy commands
[DI] Remove scalar typehint in class used in test case
Remove the `server:log` command if monolog is not loaded
[SecurityBundle] Fix syntax error in test
[Console] Remove remaining dead code
Throw on service:method factory notation in PHP-based DI configuration
Test that named arguments are prioritized over typehinted
bumped Symfony version to 3.3.14
bumped Symfony version to 2.8.32
bumped Symfony version to 2.7.39
Prove that change is working with tests
updated VERSION for 3.3.13
updated CHANGELOG for 3.3.13
updated VERSION for 2.8.31
updated CHANGELOG for 2.8.31
updated VERSION for 2.7.38
updated CHANGELOG for 2.7.38
Replace array|\Traversable by iterable
[DI] Fix by-type args injection
...