This PR was merged into the 4.3-dev branch.
Discussion
----------
[FrameworkBundle][Routing] allow boolean container parameters for routes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30366
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/11059
This fixes https://github.com/symfony/symfony/issues/30366 and adds support for boolean container parameters in route conditions, defaults etc.
Commits
-------
21f4e38800 [FrameworkBundle][Routing] allow boolean container parameters for routes
This PR was squashed before being merged into the 4.3-dev branch (closes#29661).
Discussion
----------
[Filesystem] Support resources and deprecate using arrays in dumpFile() and appendToFile()
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Running PHPStan on my project picked up that passing a resource to `Filesystem::dumpFile()` didn't match the documented type.
I found this has been discussed in #20980 and #28019, without a clear result. But, my reading is that only strings should be supported. While I think that not supporting streams makes this a lot less useful (and I'm going to switch away from it), this does need to be resolved. So, I've deprecated using arrays and resources.
Commits
-------
0eaf9d2474 [Filesystem] Support resources and deprecate using arrays in dumpFile() and appendToFile()
* 4.2:
Removed non-existing parameters for LogoutUrlGenerator calls
[WebProfilerBundle] toolbar: invisible route name in Firefox
Drop spurious execution bit
[HttpKernel] Correctly merging cache directives in HttpCache/ResponseCacheStrategy
[Validator] Add the missing translations for the Latvian ("lv") locale
Fixed the DebugClassLoader compatibility with eval()'d code on Darwin
[Validator] Update Serbian translation file
* 3.4:
Removed non-existing parameters for LogoutUrlGenerator calls
[HttpKernel] Correctly merging cache directives in HttpCache/ResponseCacheStrategy
[Validator] Add the missing translations for the Latvian ("lv") locale
Fixed the DebugClassLoader compatibility with eval()'d code on Darwin
[Validator] Update Serbian translation file
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Form] be able to specify the input format for times
| 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 expands the work started in #29887 to also allow to configure the input format for string inputs in the `TimeType`.
Commits
-------
2d9bc18c1b be able to specify the input format for times
This PR was squashed before being merged into the 4.2 branch (closes#30383).
Discussion
----------
[WebProfilerBundle] toolbar: invisible route name in Firefox
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29858
| License | MIT
| Doc PR | -
This fixes#29858, fixing a bug that prevents Route name displaying in debug toolbar on Firefox
Commits
-------
6b6bd453e1 [WebProfilerBundle] toolbar: invisible route name in Firefox
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Security] deprecate the Role and SwitchUserRole classes
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #20824
| License | MIT
| Doc PR | symfony/symfony-docs#11047
In #20801, we deprecated the `RoleInterface`. The next logical step would be to also deprecate the `Role` class. However, we currently have the `SwitchUserRole` class (a sub-class of `Role`) that acts as an indicator to check whether or not the authenticated user switched to another user.
This PR proposes an alternative solution to the usage of the special `SwitchUserRole` class by storing the original token inside the `UsernamePasswordToken`. This PR is not complete, but rather acts as a proof of concept of how we could get rid of the `Role` and the `SwitchUserRole` classes.
Please share your opinions whether you think this is a valid approach and I will be happy to finalise the PR.
Commits
-------
d7aaa615b9 deprecate the Role and SwitchUserRole classes
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Add the missing translations for the Latvian ("lv") locale #30174Fixes#30174
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30174
| License | MIT
| Doc PR | -
Commits
-------
86b8c253c7 [Validator] Add the missing translations for the Latvian ("lv") locale
This PR was squashed before being merged into the 3.4 branch (closes#26532).
Discussion
----------
[HttpKernel] Correctly merging cache directives in HttpCache/ResponseCacheStrategy
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26245, #26352, #28872
| License | MIT
| Doc PR | -
This PR is a first draft to fix the incorrect merging of private and other cache-related headers that are not meant for the shared cache but the browser (see mentioned issues).
The existing implementation of `HttpFoundation\Response` is very much tailored to the `HttpCache`, for example `isCacheable` returns `false` if the response is `private`, which is not true for a browser cache. That is why my implementation does not longer use much of the response methods. They are however still used by the `HttpCache` and we should keep them as-is. FYI, the `ResponseCacheStrategy` does **not** affect the stored data of `HttpCache` but is only applied to the result of multiple merged subrequests/ESI responses.
I did read up a lot on RFC2616 as a reference. [Section 13.4](https://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.4) gives an overall view of when a response MAY be cached. [Section 14.9.1](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.1) has more insight into the `Cache-Control` directives.
Here's a summary of the relevant information I applied to the implementation:
- > Unless specifically constrained by a cache-control (section 14.9) directive, a caching system MAY always store a successful response (see section 13.8) as a cache entry, MAY return it without validation if it is fresh, and MAY return it after successful validation.
A response without cache control headers is totally fine, and it's up to the cache (shared or private) to decide what to do with it. That is why the implementation does not longer set `no-cache` if no `Cache-Control` headers are present.
- > A response received with a status code of 200, 203, 206, 300, 301 or 410 MAY be stored […] unless a cache-control directive prohibits caching.
> A response received with any other status code (e.g. status codes 302 and 307) MUST NOT be returned […] unless there are cache-control directives or another header(s) that explicitly allow it.
This is what `ResponseCacheStrategy::isUncacheable` implements to decide whether a response is not cacheable at all. It differs from `Response::isCacheable` which only returns true if there are actual `Cache-Control` headers.
- > [Section 13.2.3](https://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.2.3): When a response is generated from a cache entry, the cache MUST include a single Age header field in the response with a value equal to the cache entry's current_age.
That's why the implementation **always** adds the `Age` header. It takes the oldest age of any of the responses as common denominator for the content.
- > [Section 14.9.3](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.3): If a response includes an s-maxage directive, then for a shared cache (but not for a private cache), the maximum age specified by this directive overrides the maximum age specified by either the max-age directive or the Expires header.
This effectively means that `max-age`, `s-maxage` and `Expires` must all be kept on the response. My implementation assumes that we can only do that if they exist in **all** of the responses, and then takes the lowest value of any of them. Be aware the implementation might look confusing at first. Due to the fact that the `Age` header might come from another subresponse than the lowest expiration value, the values are stored relative to the current response date and then re-calculated based on the age header.
The Symfony implementation did not and still does not implement the full RFC. As an example, some of the `Cache-Control` headers (like `private` and `no-cache`) MAY actually have a string value, but the implementation only supports boolean. Also, [Custom `Cache-Control` headers](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.6) are currently not merged into the final response.
**ToDo/Questions:**
1. [Section 13.5.2](https://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.5.2) specifies that we must add a [`Warning 214 Transformation applied`](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.46) if we modify the response headers.
2. Should we add an `Expires` headers based on `max-age` if none is explicitly set in the responses? This would essentially provide the same information as `max-age` but with support for HTTP/1.0 proxies/clients.
3. I'm not sure about the implemented handling of the `private` directive. The directive is currently only added to the final response if it is present in all of the subresponses. This can effectively result in no cache-control directive, which does not tell a shared cache that the response must not be cached. However, adding a `private` might also tell a browser to actually cache it, even though non of the other responses asked for that.
4. > [Section 14.9.2](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.2): The purpose of the `no-store` directive is to prevent the inadvertent release or retention of sensitive information […]. The `no-store` directive applies to the entire message, and MAY be sent either in a response or in a request. If sent in a request, a cache MUST NOT store any part of either this request or any response to it. If sent in a response, a cache MUST NOT store any part of either this response or the request that elicited it.
I have not (yet) validated whether the `HttpCache` implementation respects any of this.
5. As far as I understand, the current implementation of [`ResponseHeaderBag::computeCacheControlValue`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php#L313) is incorrect. `no-cache` means a response [must not be cached by a shared or private cache](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.1), which overrides `private` automatically.
5. The unit tests are still very limited and I want to add plenty more to test and sort-of describe the implementation or assumptions on the RFC.
/cc @nicolas-grekas
#SymfonyConHackday2018
Commits
-------
893118f978 [HttpKernel] Correctly merging cache directives in HttpCache/ResponseCacheStrategy
If passing context to getTypes, it checks value of $context['enable_constructor_extraction'] for true/false or the constructor value of enableConstructorExtraction and should then populate fromConstructor if necessary. The missing brackets around the first part of this check mean that fromConstructor is only applied if context is not set.
This fixes the issuse described at [symfony/symfony-docs#10969](https://github.com/symfony/symfony-docs/pull/10969)
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Update Serbian translation file
| 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 | #30189 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | / <!-- 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.
-->
I am not sure about some translations, if someone could check these, I would appreciate it.
Also, I've found that singular/plural translations have 3 translations. I am not sure if that's a mistake or not. I removed the third translation, but if I was wrong, I'll be happy to put it back.
Commits
-------
9e9a57a544 [Validator] Update Serbian translation file
* 4.2: (26 commits)
Apply php-cs-fixer rule for array_key_exists()
[Cache] fix warming up cache.system and apcu
[Security] Change FormAuthenticator if condition
handles multi-byte characters in autocomplete
speed up tests running them without debug flag
[Translations] added missing Croatian validators
Fix getItems() performance issue with RedisCluster (php-redis)
[VarDumper] Keep a ref to objects to ensure their handle cannot be reused while cloning
IntegerType: reject submitted non-integer numbers
be keen to newcomers
[HttpKernel] Fix possible infinite loop of exceptions
fixed CS
[Validator] Added missing translations for Afrikaans
do not validate non-submitted form fields in PATCH requests
Update usage example in ArrayInput doc block.
[Console] Prevent ArgvInput::getFirstArgument() from returning an option value
[Validator] Fixed duplicate UUID
fixed CS
[EventDispatcher] Fix unknown priority
Avoid mutating the Finder when building the iterator
...
* 3.4: (24 commits)
Apply php-cs-fixer rule for array_key_exists()
[Security] Change FormAuthenticator if condition
handles multi-byte characters in autocomplete
speed up tests running them without debug flag
[Translations] added missing Croatian validators
Fix getItems() performance issue with RedisCluster (php-redis)
[VarDumper] Keep a ref to objects to ensure their handle cannot be reused while cloning
IntegerType: reject submitted non-integer numbers
be keen to newcomers
[HttpKernel] Fix possible infinite loop of exceptions
fixed CS
[Validator] Added missing translations for Afrikaans
do not validate non-submitted form fields in PATCH requests
Update usage example in ArrayInput doc block.
[Console] Prevent ArgvInput::getFirstArgument() from returning an option value
[Validator] Fixed duplicate UUID
fixed CS
[EventDispatcher] Fix unknown priority
Avoid mutating the Finder when building the iterator
[Validator] Add the missing translations for the Greek (el) locale
...
This PR was squashed before being merged into the 3.4 branch (closes#30347).
Discussion
----------
[Security] Change FormAuthenticator if condition
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30341
| License | MIT
| Doc PR | -
I changed the if condition in `SimpleFormAuthenticationListener` and `UsernamePasswordFormAuthenticationListener` based on the solution provided by @nikic in issue #30341
#OpenSourceFriday
Commits
-------
67ae121b2e [Security] Change FormAuthenticator if condition
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] handles multi-byte characters in autocomplete
fixes#29966
| 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 and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29966 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | - <!-- required for new features -->
I used the `mb_ord` to detect whether the amount of bytes read is valid before proceeding. I limit the number of bytes read to 4 before giving up because characters can use at most 4 bytes.
The test passes with or without the fix though.
Commits
-------
47320a63e2 handles multi-byte characters in autocomplete
This PR was merged into the 3.4 branch.
Discussion
----------
Fix getItems() performance issue with RedisCluster (php-redis)
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | TBD
| License | MIT
On any kind of multi loads, including tags loading where it's always the case, current code leads to an explosion of Redis lookups affecting performance on RedisCluster _(as it does not support pipeline)_.
This backports the code for mget() usage from 4.x in order to fix it.
It's done with one small improvment which would also be relevant for 4.x, only using pipeline on cluster on predis as mget is more efficient (ref redis doc).
Commits
-------
178506e72c Fix getItems() performance issue with RedisCluster (php-redis)
This PR was merged into the 3.4 branch.
Discussion
----------
[VarDumper] Keep a ref to objects to ensure their handle cannot be reused while cloning
| 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 the root issue that led to https://github.com/symfony/symfony/pull/30311#issuecomment-466457434
Commits
-------
29a0683107 [VarDumper] Keep a ref to objects to ensure their handle cannot be reused while cloning
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Monolog] Added a way to configure the ConsoleFormatter from the ConsoleHandler
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR |
see also https://github.com/symfony/monolog-bundle/pull/297
from that:
![image](https://user-images.githubusercontent.com/408368/53246085-f63ed380-36af-11e9-9bff-2e42f8af141c.png)
to that:
![image](https://user-images.githubusercontent.com/408368/53246115-0787e000-36b0-11e9-93ef-e47ed058adbf.png)
with some configuration:
```yaml
diff --git a/config/packages/dev/monolog.yaml b/config/packages/dev/monolog.yaml
index b1998da..66ae2db 100644
--- a/config/packages/dev/monolog.yaml
+++ b/config/packages/dev/monolog.yaml
@@ -17,3 +17,6 @@ monolog:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"]
+ console_formater_options:
+ format: "%%datetime%% %%start_tag%%%%level_name%%%%end_tag%% <comment>[%%channel%%]</> %%message%%%%context%%\n"
+ multiline: false
```
Commits
-------
5e494db04c [Monolog] Added a way to configure the ConsoleFormatter from the ConsoleHandler
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle][SecurityBundle] speed up tests running them without debug flag
| 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
-------
dfb924f6a9 speed up tests running them without debug flag
This PR was merged into the 4.3-dev branch.
Discussion
----------
[TwigBridge] rename parent_form() to form_parent()
| 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#11049
We got some feedback on the blog post that form_parent() would be better
for consistency with all the existing form_*() functions. I think that
user has a point about that.
Commits
-------
057d177378 rename parent_form() to form_parent()
We got some feedback on the blog post that form_parent() would be better
for consistency with all the existing form_*() functions. I think that
user has a point about that.
On any kind of multi loads, including tags loading, current code leads to
an explosion of Redis lookups slowing down performance.
This backports the code for mget() usage from 4.x in order to fix it.
It's done with one small improvment which would also be relevant for 4.x,
only using pipeline on cluster on predis as mget is more efficient.
This PR was merged into the 4.3-dev branch.
Discussion
----------
[VarDumper] Implement DsCaster
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When dumping the data structures from [Ds extension](http://php.net/manual/en/book.ds.php) Symfony only shows the class name but not the actual data. So in this PR I tried to write a Caster for these data structures.
Map can't be simply casted to array because it can contain objects as keys so I dump the pairs instead.
Commits
-------
eab631fc45 [VarDumper] Implement DsCaster
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Fix possible infinite loop of exceptions
| 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 ran into an [issue](https://github.com/php-enqueue/enqueue-dev/issues/774) in the enqueue library which copied this part of code from Symfony. I'm now starting to understand what the problem is and it should most likely be fixed in Symfony as well.
I didn't actually run into it in Symfony itself but it seems at least hypothetically possible. Imagine if [here](8c3dc8254a/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php (L77)) `$e` is somehow the same (===) as `$exception`. The code [below](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php#L82-L92) will then find the last exception in the `getPrevious()` chain and assigns `$exception` as the previous. However in the off chance that `$exception` is actually `$e` (the first exception in the chain) then it creates an infinite loop of exceptions which is not good for monolog and exception handlers.
What do you think?
Commits
-------
3447222b68 [HttpKernel] Fix possible infinite loop of exceptions
This PR was merged into the 3.4 branch.
Discussion
----------
[Routing] fix URL generation with look-around requirements
| Q | A
| ------------- | ---
| Branch? | 2.8 up to 4.1 for bug fixes
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10548
| License | MIT
| Doc PR |
If you have a non-catchable pattern in requirements like f.e. a positive lookahead (.+(?=/foo/)), the generator will not accept the parameter as the parameter itself cannot fulfil the requirement, but only matches in the context of the entire path.
This fix looks for lookAround in the path and ignores checking the requirements if any lookAround exists.
Commits
-------
c474451176 [Routing] fix URL generation with look-around requirements
This PR was squashed before being merged into the 4.3-dev branch (closes#28919).
Discussion
----------
[DX][WebProfilerBundle] Add Pretty Print functionality for Request Content
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | n/a ?
## Why?
Quite often when attempting to debug issues with JSON requests sent to a Symfony API, I use the Web Profiler to check the request content. More often than not the request content isn't easily readable (99% of the time it's all stuck on a single line and impossible to read). I always find myself copying + pasting the content into a random online tool to have it "pretty-print" the JSON.
Usually this isn't an issue, but can be annoying when offline. There's also the security issue of sending entire JSON payloads to a third-party server just for formatting 😳. Alternatively, maybe developers copy+paste into their chosen editors and this PR is all a waste of time — I hope not 😛.
## How?
This PR adds "Pretty-Print" JSON functionality straight into the profiler.
We can use `collector.requestheaders` to detect if the request was JSON and conditionally show the Pretty Print button.
When the button is clicked, we format the JSON from the "Request Content" card.
## What does it look like?
Before:
![without-pretty-print](https://user-images.githubusercontent.com/573318/47180751-36b0ce00-d319-11e8-86ed-eb0d78ebcbe3.png)
After:
![pretty](https://user-images.githubusercontent.com/573318/47180763-3c0e1880-d319-11e8-995d-eba565aad827.png)
Non-JSON Requests (unchanged):
![non-json-request](https://user-images.githubusercontent.com/573318/47181080-03227380-d31a-11e8-8cf2-e8b2e8c1a21d.png)
## Things to consider
- Is `JSON.stringify(JSON.parse(content));` the safest, most efficient way to do this?
- Should the "Pretty Print" button be in-line next to the "Request Content" header? I couldn't find a pattern for this sort of thing elsewhere in the profiler.
- Do people want JSON formatted with 4 spaces, would 2 spaces be preferred? Should this be a configuration option stored in localStorage (such as the light/dark theme configuration)?
- Should this be a toggle? E.g. click to pretty print, then click to undo
## Future Improvements
Depending on how this is received it could be extended to support formatting different request content-types (e.g. XML formatting) — I assume.
## Progress
- [x] Gather feedback and decide where to perform the pretty-print: [server-side, or client-side](https://github.com/symfony/symfony/pull/28919#issuecomment-431508361).
*It was decided server-side would be better.*
Commits
-------
9f85103151 [DX][WebProfilerBundle] Add Pretty Print functionality for Request Content
This PR was squashed before being merged into the 4.3-dev branch (closes#29865).
Discussion
----------
[Console] Added suggestions for missing packages
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Currently, when someone runs one of the most common commands, e.g. `server:run`, but does not have a required package installed, they will get a general **'There are no commands defined...'** message.
This commit adds a more useful message, informing the user about a package that might be missing and suggesting a command that should be run in order to install it, e.g. `composer require symfony/web-server-bundle --dev`.
Commits
-------
423a54f46e [Console] Added suggestions for missing packages
This PR was merged into the 4.3-dev branch.
Discussion
----------
Additional addons for the ghost
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Following #30236 I've prepared two additional addons for the ghost.
The first one will display a plus on February 29, to indicate it's a leap year.
![ghost-plus](https://user-images.githubusercontent.com/35422131/53133091-3730ce00-3572-11e9-89f7-44568d796f7e.png)
The second one will display a gift on October 18, to indicate it's Symfony's birthday.
![ghost-gift](https://user-images.githubusercontent.com/35422131/53133127-5596c980-3572-11e9-8901-704785e235a8.png)
I would just like to point out that the addons are purely for fun, to amuse every hardcoding Symfony developer and offer a chance to smile on these few selected occasions.
Commits
-------
51ed942ef5 Additional addons for the ghost
This PR was squashed before being merged into the 3.4 branch (closes#30243).
Discussion
----------
[Validator] Added missing translations for Afrikaans
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30148
| License | MIT
Added missing translations for Afrikaans
Commits
-------
8a931576d2 [Validator] Added missing translations for Afrikaans
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Prevent ArgvInput::getFirstArgument() from returning an option value
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23343
| License | MIT
| Doc PR | n/a
Fixes the case where the passed input string contains no command name but one or more global (i.e. application-defined) options accepting values.
Commits
-------
46461e91f9 [Console] Prevent ArgvInput::getFirstArgument() from returning an option value
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] Complain about an empty decision strategy
| 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 an empty string is passed (or objects with a similarly behaving `__toString()` method) to the constructor, the call to `decide` causes infinite recursion.
Commits
-------
3a22cad29b Fix infinite recursion when passed an empty string
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Routing] deprecate some router options
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://github.com/symfony/symfony/pull/28865#issuecomment-463480970
| 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
-------
bf4cd6164d [Routing] deprecate some router options
This PR was merged into the 3.4 branch.
Discussion
----------
[EventDispatcher] Fix unknown priority
| 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 -->
Somehow, after #29411 the profiler actually shows the security firewall `ContextListener`.
This listener removes itself at call time, but at this point it's wrapped reference is already in the call stack; to be displayed in the profiler.
Because the wrapped listener lazily collects its priority - it asks it from the dispatcher - we get null; the listener was already removed.
This causes the profiler to render `-` by default:
![image](https://user-images.githubusercontent.com/1047696/50850320-d5c5ee80-1379-11e9-8516-0c6bc54512ce.png)
This fixes it by always passing the expected priority at call time.
Commits
-------
9fb619ac62 [EventDispatcher] Fix unknown priority
This PR was merged into the 3.4 branch.
Discussion
----------
[Console] Doc Block: More intuitive usage example in ArrayInput.
Make the ArrayInput doc block example more self-explanatory and less misleading. Show the common use case of having `command`, and replace the confusing `name` argument with something more arbitrary.
| 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
The current doc block example for `ArrayInput` seems to imply that the command name goes in as `name`, but this is actually just a random argument, named "name", in this case.
```php
new ArrayInput(['name' => 'foo', '--bar' => 'foobar']);
```
It might be more helpful to provide an example that works with Symfony's `Console` component out of the box, as that is a common use case:
```php
new ArrayInput(['command' => 'foo:bar', 'foo' => 'bar', '--bar' => 'foobar']);
```
Commits
-------
0c8d311657 Update usage example in ArrayInput doc block.
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Form] deprecate using invalid names for buttons
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #28964
| License | MIT
| Doc PR |
Commits
-------
405aa548eb deprecate using invalid names for buttons
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Fixed duplicate UUID
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30285
| License | MIT
| Doc PR | N/A
Fixes the `TOO_HIGH_ERROR` constant had the same value in two different constraints: `LessThan` and `LessThanOrEqual`.
Commits
-------
0bd5dd84ef [Validator] Fixed duplicate UUID
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] do not validate non-submitted form fields in PATCH requests
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #11493, #19788, #20805, #24453, #30011
| License | MIT
| Doc PR |
When a form field is not embedded as part of a HTTP PATCH requests, its
validation constraints configured through the `constraints` option must
not be evaluated. The fix from #10567 achieved this by not mapping their
violations to the underlying form field. This however also means that
constraint violations caused by validating the whole underlying data
object will never cause the form to be invalid. This breaks use cases
where some constraints may, for example, depend on the value of other
properties that were changed by the submitted data.
Commits
-------
a60d802619 do not validate non-submitted form fields in PATCH requests
Make the ArrayInput doc block example more self-explanatory and less misleading. Show the common use case of having `command`, and replace the confusing `name` argument with something more arbitrary.
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Form] Add input_format option to DateType and DateTimeType
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/29883
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10882
Add a new option to specify the date format when using the `string` input type.
Commits
-------
c8240a0423 [Form] Add input_format option to DateType and DateTimeType
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Form] undeprecate date formats in single_text widgets
| 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
-------
1a983d07db undeprecate date formats in single_text widgets
This PR was merged into the 4.2 branch.
Discussion
----------
[FrameworkBundle] Fix Descriptor throwing on non existent parent
| Q | A
| ------------- | ---
| Branch? | 4.2
| 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 | https://github.com/nelmio/NelmioApiDocBundle/issues/1470 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR |
The Descriptor throws an exception when it encounters a class having a non existent parent, see https://github.com/nelmio/NelmioApiDocBundle/issues/1470 for the record.
<!--
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
-------
6b354cc304 Fix Descriptor throwing on non existent parent
* 4.2:
[Console] Fix command testing with missing inputs
[Validator] Sync no/nb translation files
[Translation] Added a script to display the status of translations
[Validator] Added missing translations for Norwegian (\"no\") locale #30179
[Security\Guard] bump lowest version of security-core
[TwigBridge] Fix test
Remove unnecessary ProgressBar stdout writes (fixes flickering)
[Validator] improve translations for albanian ("sq") locale
[VarDumper] fix serializing Stub instances
[Validator] Added missing use statement for UnexpectedTypeException
Don't resolve the Deprecation error handler mode until a deprecation is triggered
bug #30245 fix lost namespace in eval (fizzka)
fix lost namespace in eval
[Twig] removed usage of non-namespaced classes
added missing dot
Update validators.lt.xlf
#30172 Add the missing validation translations for the Luxembourgish …
[Debug][ErrorHandler] Preserve next error handler
* 3.4:
[Console] Fix command testing with missing inputs
[Validator] Sync no/nb translation files
[Translation] Added a script to display the status of translations
[Validator] Added missing translations for Norwegian (\"no\") locale #30179
[Security\Guard] bump lowest version of security-core
This PR was merged into the 4.3-dev branch.
Discussion
----------
[VarDumper] link paths in stack traces to IDE
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | not really
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
`./test.php:8` and `./test.php:11` can now be clicked:
![image](https://user-images.githubusercontent.com/243674/52971041-466b1c80-33b6-11e9-9bc1-0e55dc115f63.png)
Commits
-------
6672ac3f43 [VarDumper] link paths in stack traces to IDE
This PR was squashed before being merged into the 3.4 branch (closes#30237).
Discussion
----------
[Translation] Added a script to display the status of translations
| 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 and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | -
| License | MIT
| Doc PR | -
This is the script I used to get the missing translations for each locale. I think it could come in handy for Symfony to always keep translations in sync.
Commits
-------
5ca7dedaaa [Translation] Added a script to display the status of translations
This PR was merged into the 3.4 branch.
Discussion
----------
[Security\Guard] bump lowest version of security-core
| 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 | -
Forgotten in #30006 so that `PostAuthenticationGuardToken` can call `AbstractToken::doSerialize()`.
Commits
-------
93cfd5b2a0 [Security\Guard] bump lowest version of security-core
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBridge] Fix test
| 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
Commits
-------
ad752b1a48 [TwigBridge] Fix test
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] improve translations for albanian ("sq") locale
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
While reviewing the changes announced in the "A Week of Symfony #633" post I found that there was room for improvement in the Validation component translations as they were defined earlier in 2012 and were never revisited.
All the translations have been reviewed and some of them were updated with the following improvements:
* overall translation message consistency
* fix singular expression messages
* fix grammatical errors
* use albanian form of expression
* restore, as lexical gap, the "locale" translation
Commits
-------
5cac9ad97d [Validator] improve translations for albanian ("sq") locale
* improve overall translation message consistency
* fix singular expression messages
* fix grammatical errors
* use albanian form of expression
* restore as lexical gap the "locale" translation
This PR was merged into the 4.3-dev branch.
Discussion
----------
Add element to ghost in Exception
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
Let's make love (& good code) not war. Sorry for not submitting it at least yesterday, but hopefully you will accept it, and we will be able to merge today. This will allow us to add different addons on other special ocasions.
![zrzut ekranu 2019-02-14 o 09 53 42](https://user-images.githubusercontent.com/35422131/52775440-0582a900-3040-11e9-8d9a-ee4959fa6982.png)
On personal side, I dedicate it, with lots of kisses, to my wife Martha.
If you like it, just ❤️
Commits
-------
c8d6dd7c8f Add element to ghost in Exception
This PR was merged into the 3.4 branch.
Discussion
----------
Don't resolve the Deprecation error handler mode until a deprecation is triggered
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30047
| 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.
-->
If an error happens before `.env.test` is loaded the mode is set to 0 and cached so SYMFONY_DEPRECATIONS_HELPER is not read from `.env.test`.
Commits
-------
1090b8cb6e Don't resolve the Deprecation error handler mode until a deprecation is triggered
This PR was merged into the 3.4 branch.
Discussion
----------
[Debug][ErrorHandler] Preserve next error handler
| 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/30140
| License | MIT
| Doc PR | -
Thank you @cuchac
Getting the current error handler in the error handler itself actually works. If you try to see the content of the `$currentErrorHandler` var however, you will always see `null`. That's why I thought it was impossible. Because I did not test from end to end until today.
Commits
-------
a8b34348e7 [Debug][ErrorHandler] Preserve next error handler
This PR was squashed before being merged into the 4.2 branch (closes#30245).
Discussion
----------
fix lost namespace in eval
Bugfix:
phpunit8 tearDown() declaration
Commits
-------
8743a1ada8 fix lost namespace in eval
This PR was merged into the 4.3-dev branch.
Discussion
----------
[FrameworkBundle][Translation] Added support for PHP files with trans() in translation commands
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29085
| License | MIT
| Doc PR | -
This PR allows translation commands be able to debug and update translation messages from any PHP file/class defined as service, injecting or wiring the `translator` service, e.g.:
```php
use Symfony\Component\Translation\TranslatorInterface;
class ParallelUniverseController extends AbstractController
{
public function hello(Request $request, TranslatorInterface $translator)
{
// this id 'hello_message' will be extracted from translation:update
$message = $translator->trans('hello_message');
// send message to space...
}
}
```
this supports all ways of wiring (auto or not): via constructor, public property, method calls, service subscriber and controller argument.
Commits
-------
9f9b828832 Added support for PHP files with translation in translation commands
This PR was squashed before being merged into the 4.2 branch (closes#30245).
Discussion
----------
fix lost namespace in eval
Bugfix:
phpunit8 tearDown() declaration
Commits
-------
8743a1ada8 fix lost namespace in eval
This PR was merged into the 3.4 branch.
Discussion
----------
[Twig] removed usage of non-namespaced classes
| 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 and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
<!--
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
-------
bd719cd7e1 [Twig] removed usage of non-namespaced classes
This PR was squashed before being merged into the 4.3-dev branch (closes#30239).
Discussion
----------
Add missing Romanian translations for validator
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30183 [Validator] Add the missing translations for the Romanian ("ro") locale
Commits
-------
6674391dd4 Add missing Romanian translations for validator
This PR was squashed before being merged into the 3.4 branch (closes#30251).
Discussion
----------
#30172 Add the missing validation translations for the Luxembourgish …
…locale
| Q | A
| ------------- | ---
| Branch? | master for features / 3.4 up to 4.2 for bug fixes <!-- 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 | #30172 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Add the missing validation translations for the Luxembourgish locale
Commits
-------
b0be36648f#30172 Add the missing validation translations for the Luxembourgish …
* 4.2:
allow to skip tests based on the supported version
Update validators.bg.xlf
Update validators.ca.xlf
fixed CS
Updated validators.eu.xlf with missing translations
fixed typo
backported a translation
[Validator] added missing translation for UK validator
Validator: add the Persian translations
Update validators.sq.xlf
fixed CS
forward valid numeric values to transform()
add constraint validators before optimizations
* 3.4:
allow to skip tests based on the supported version
Update validators.bg.xlf
Update validators.ca.xlf
fixed CS
Updated validators.eu.xlf with missing translations
fixed typo
backported a translation
[Validator] added missing translation for UK validator
Validator: add the Persian translations
Update validators.sq.xlf
fixed CS
forward valid numeric values to transform()
add constraint validators before optimizations
This PR was merged into the 3.4 branch.
Discussion
----------
allow to skip tests based on the supported version
| 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 |
Writing tests for Form related features in the Doctrine and Twig bridges
as well as the FrameworkBundle is a pain as soon as these tests are run
with more recent versions of the Form component. This is due to the fact
that our tests in the bridges and bundle extend test cases from the
component. The tests in the component are expanded with every feature
that gets added there. However, these new features are not present in
the other packages in older version and we thus need to be able to skip
them somehow.
Commits
-------
be23926bf8 allow to skip tests based on the supported version
Writing tests for Form related features in the Doctrine and Twig bridges
as well as the FrameworkBundle is a pain as soon as these tests are run
with more recent versions of the Form component. This is due to the fact
that our tests in the bridges and bundle extend test cases from the
component. The tests in the component are expanded with every feature
that gets added there. However, these new features are not present in
the other packages in older version and we thus need to be able to skip
them somehow.
This PR was merged into the 3.4 branch.
Discussion
----------
Updated validators.eu.xlf
with missing translations
Commits
-------
f496ab638e Updated validators.eu.xlf with missing translations
This PR was squashed before being merged into the 3.4 branch (closes#30224).
Discussion
----------
Update validators.ca.xlf
| 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 | symfony/symfony-docs#... <!-- required for new features -->
Update validators.ca.xlf for Catalan language.
Commits
-------
077df27eca Update validators.ca.xlf
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Form] add a convenience method to get the parent form in Twig templates
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #28686
| License | MIT
| Doc PR |
Commits
-------
cb60642d15 add a convenience method to get the parent form in Twig templates
This PR was merged into the 4.3-dev branch.
Discussion
----------
[FrameworkBundle][Translation] Add support for Translator paths, Twig paths and Translator aware services paths in commands
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29085, #29633, #17739
| License | MIT
| Doc PR | TODO
Add custom (also common) Twig and Translation paths to the translation commands:
* Custom directories configured in `twig.paths`.
* Custom directories configured in `translator.paths`
* The `Resources/translations/` directory of `Validation` component (if installed).
* The `Resources/translations/` directory of `Form` component (if installed).
* The `Resources/translations/` directory of Security Core component (if installed).
Commits
-------
31d7a09bf5 Add support for translator paths and twig paths in translation commands
This PR was squashed before being merged into the 4.3-dev branch (closes#28477).
Discussion
----------
[Validator] Add new json Validator
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10351
Hi,
in so many cases we want to test if a value is a valid json or not, so I propose this new ~~NotJson~~ `Json` constraint for this need.
cordially,
Commits
-------
131febc7be [Validator] Add new json Validator
This PR was squashed before being merged into the 4.3-dev branch (closes#28635).
Discussion
----------
[Form] Add label_translation_parameters, help_translation_parameters and attr_translation_parameters options to base form type
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes. Travis-ci isn't green because it tests the components separately. Fabbot.io requires license headers in files where they were not present before.
| Fixed tickets | #27698
| License | MIT
| Doc PR | https://github.com/symfony/symfony-docs/pull/10065
Hi, this is an alternative to #27775.
`translation_parameters` is separated to `label_translation_parameters`, `help_translation_parameters`, `attr_translation_parameters`.
Commits
-------
b3f3c5361f [Form] Add label_translation_parameters, help_translation_parameters and attr_translation_parameters options to base form type
This PR was merged into the 4.3-dev branch.
Discussion
----------
Nullable environment variable processor
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | todo
Hey there,
Because environment variables are strings by design, empty environment variables are evaluated to `""` by default.
In the same way, `MY_ENV_VAR=null` will be evaluated to `"null"`, as a string.
What I suggest is to allow some environment variables to be evaluated to `null` (the real one) when their strings are _blank_ or equal _null_, _Null_ or _NULL_.
This can be easily done through a new `nullable` processor:
```bash
# .env
API_KEY=
```
```yaml
# config/services.yaml
services:
FooService:
arguments:
$apiKey: %env(nullable:API_KEY)%
```
```php
# src/Services/FooService
namespace App\Services;
final class FooService
{
/**
* @var string|null
*/
private $apiKey;
/**
* FooService constructor.
*/
public function __construct(?string $apiKey)
{
$this->apiKey = $apiKey;
}
public function doSomething()
{
// Free plan
if (null === $this->apiKey) {
// ...
}
}
}
```
That's an example that comes to my mind but there can be many others.
This can also help in using null coalesce operators in constructors instead of checking if a string equals `""` (which is very PHP4 style).
Of course it can be used in conjunction with other types, i.e. `%env(float:nullable:SOME_OPTIONAL_FLOAT_ENV_VAR)%`.
What do you think?
Commits
-------
3a604ac392 Nullable environment variable processor
This PR was merged into the 3.4 branch.
Discussion
----------
Validator: add the Persian translations
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30162
| License | MIT
| Doc PR | -
Add the missing translations for the Persian (fa) validator.
Commits
-------
32306d8795 Validator: add the Persian translations
* 4.2: (25 commits)
Add missing ID_id validators translation
fixed CS
Added missing translations in validators.tr.xlf
Update validators.es.xlf
Update validators.hu.xlf
[Validator] Add the missing translations for the Welsh (cy) locale
[Validator] Add missing DE validator translations
[Validator] Add the missing translations for the Dutch (nl) locale
Add missing PL translation
Add missing translations.
Add missing translations for IT to Validator
minor #30184 [Validator] Add the missing translations for the Russian (ru) locale (antonch1989)
[Validator] Add the missing translations for the Arabic (ar) locale
add_missing_translations_for_portuguese : [Validator] Add the missing translations for the Portuguese ("pt") locale
[Validator] Add the missing translations for the French (fr) locale
[Validator] Add some missing contents to the English translation
use PropertyAccessorInterface instead of PropertyAccessor
Fix KernelTestCase compatibility for PhpUnit 8 (bis)
add xabbuh as code owner of the Form component
[Validator] Added a missing translation
...
* 3.4: (25 commits)
Add missing ID_id validators translation
fixed CS
Added missing translations in validators.tr.xlf
Update validators.es.xlf
Update validators.hu.xlf
[Validator] Add the missing translations for the Welsh (cy) locale
[Validator] Add missing DE validator translations
[Validator] Add the missing translations for the Dutch (nl) locale
Add missing PL translation
Add missing translations.
Add missing translations for IT to Validator
minor #30184 [Validator] Add the missing translations for the Russian (ru) locale (antonch1989)
[Validator] Add the missing translations for the Arabic (ar) locale
add_missing_translations_for_portuguese : [Validator] Add the missing translations for the Portuguese ("pt") locale
[Validator] Add the missing translations for the French (fr) locale
[Validator] Add some missing contents to the English translation
use PropertyAccessorInterface instead of PropertyAccessor
Fix KernelTestCase compatibility for PhpUnit 8 (bis)
add xabbuh as code owner of the Form component
[Validator] Added a missing translation
...
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Add the missing translations for the Dutch (nl) locale
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30177
| License | MIT
This PR addresses the issue #30177, adding the missing translations for the Dutch (nl) locale.
Commits
-------
02662384c3 [Validator] Add the missing translations for the Dutch (nl) locale
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Add the missing translations for the Russian (ru) locale
… (ru) locale (antonch1989)
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30184
| License | MIT
Added missing ru translations for the validator component
Commits
-------
8d84cf916b minor #30184 [Validator] Add the missing translations for the Russian (ru) locale (antonch1989)
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Add some missing contents to the English translation
| Q | A
| ------------- | ---
| Branch? | 3.4
| 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 | -
| License | MIT
| Doc PR | -
To simplify things, translated files contains all the keys of the English file in `master` branch. That's why our translations in 3.4 branch contain the key `id = 85` even if that is not used in 3.4 branch.
I propose to also include that unused key in the English file to make it easier to keep things in sync.
Commits
-------
ce4ff50b41 [Validator] Add some missing contents to the English translation
This PR was squashed before being merged into the 3.4 branch (closes#30204).
Discussion
----------
Add missing ID_id validators translation
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30170
| License | MIT
| Doc PR |
Add the missing translations for the Indonesian ("id") locale
Commits
-------
b645024f5d Add missing ID_id validators translation
This PR was squashed before being merged into the 3.4 branch (closes#30203).
Discussion
----------
Added missing translations in validators.tr.xlf
I referred the same tone and style in the new translations. I did not touch the abbreviation name such as IBAN or BIC. Because they have no counterparts.
| Q | A
| ------------- | ---
| Branch? | master for features / 3.4 up to 4.2 for bug fixes <!-- see below -->
| Bug fix? | yes/no
| New feature? | yes/no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes/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 | #... <!-- #-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
-------
48f1189879 Added missing translations in validators.tr.xlf
This PR was squashed before being merged into the 3.4 branch (closes#30198).
Discussion
----------
Update validators.es.xlf
| Q | A
| ------------- | ---
| Branch? | master for features / 3.4 up to 4.2 for bug fixes <!-- see below -->
| Bug fix? | yes/no
| New feature? | yes/no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | yes/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 | #... <!-- #-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
-------
3197a5ff29 Update validators.es.xlf
This PR was squashed before being merged into the 3.4 branch (closes#30200).
Discussion
----------
Update validators.hu.xlf
Translating message of DivisibleBy constraint.
| Q | A
| ------------- | ---
| Branch? | master for features / 3.4 up to 4.2 for bug fixes
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30168
| License | MIT
Commits
-------
4ab3af0036 Update validators.hu.xlf
This PR was squashed before being merged into the 3.4 branch (closes#30208).
Discussion
----------
[Validator] Add the missing translations for the Welsh (cy) locale
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30154
| License | MIT
Addresses the missing translations listed in #30154
Commits
-------
8f701ce4e5 [Validator] Add the missing translations for the Welsh (cy) locale
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Add the missing translations for the Arabic (ar) locale
| Q | A
| ------------- | ---
| Branch? | 3.4
| 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 | #30149 <!-- #-prefixed issue number(s), if any -->
| License | MIT
This PR addresses the issue #30149, adding the missing translations.
Commits
-------
21b5a27507 [Validator] Add the missing translations for the Arabic (ar) locale
This PR was squashed before being merged into the 3.4 branch (closes#30202).
Discussion
----------
[Validator] Add missing DE validator translations
| Q | A
| ------------- | ---
| Branch | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30156
| License | MIT
Updated the validator translation file with the missing German (DE) translations.
Commits
-------
c489cc8b33 [Validator] Add missing DE validator translations
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Add missing translations for IT to Validator
| 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 and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #30171 <!-- #-prefixed issue number(s), if any -->
| License | MIT
I add missing translations for IT to Validator going to solve the following issue: #30171
Commits
-------
40903335fd Add missing translations for IT to Validator
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Add the missing translations for the Portuguese ("pt") locale
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30181
| License | MIT
This PR addresses the issue https://github.com/symfony/symfony/issues/30181, adding the missing translations.
Commits
-------
95795dc8cd add_missing_translations_for_portuguese : [Validator] Add the missing translations for the Portuguese ("pt") locale
This PR was merged into the 4.3-dev branch.
Discussion
----------
[FrameworkBundle] consolidate the mime types service definition
| 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 wonder if we couldn't simplify things by just initializing the default `MimeTypes` instance once the first one is going to be created.
Commits
-------
ce546f5e5b consolidate the mime types service definition
This PR was squashed before being merged into the 4.3-dev branch (closes#30111).
Discussion
----------
[SecurityBundle] Deprecate the normalization of the cookie names
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This is an alternative solution to #24018 providing a BC layer until Symfony 5.0.
Commits
-------
36c5df4589 [SecurityBundle] Deprecate the normalization of the cookie names
This PR was merged into the 3.4 branch.
Discussion
----------
[Security] fix switch user without having current token
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22729
| License | MIT
Attempting to switch a user cause an error when not having any token in the storage
Commits
-------
15db914984 [Security] fix switch user without having current token
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] add back test after fixing it
| 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/29934#discussion_r250501108
| License | MIT
| Doc PR |
Commits
-------
0daeba8e8a add back test after fixing it
This PR was merged into the 3.4 branch.
Discussion
----------
[PhpunitBridge] dropping ext-zip suggestion as its no longer needed
| 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 and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| License | MIT
The zip requirement was dropped after this pull request: https://github.com/symfony/symfony/pull/29265
Commits
-------
bb4b53bc45 Update composer.json
This PR was merged into the 3.4 branch.
Discussion
----------
[Validator] Added a missing translation
| 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 and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
34698372e4 [Validator] Added a missing translation
This PR was squashed before being merged into the 3.4 branch (closes#30124).
Discussion
----------
Fix KernelTestCase compatibility for PhpUnit 8 (bis)
| 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 | -
Follow up of #30084 and @Tobion's comment there.
Fabbot failure is a false-positive.
Commits
-------
1077df60ab Fix KernelTestCase compatibility for PhpUnit 8 (bis)
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] add missing null return type
| 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 reflects how all our implementations of this interface actually behave.
Commits
-------
03abfc09bd add missing null return type
* 4.2:
New extensions were released supporting PHP 7.3
Remove "internal" annotation from datacollector serialization methods
replace mocks with real objects in tests
[DependencyInjection] fix#29930 add $lazyLoad flag to the generated factory code for lazy non-shared services
escape function does not always take a string
Fix phpunit 8 compatibility
render integer types with grouping as text input
ignore _method forms in NativeRequestHandler
don't lose int precision with not needed type casts
* 3.4:
Remove "internal" annotation from datacollector serialization methods
replace mocks with real objects in tests
Fix phpunit 8 compatibility
render integer types with grouping as text input
ignore _method forms in NativeRequestHandler
don't lose int precision with not needed type casts
This PR was merged into the 3.4 branch.
Discussion
----------
Remove "internal" annotation from datacollector serialization methods
| 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 | -
I've been a bit too aggressively adding `@internal` in #30035.
Commits
-------
3c8fd2072f Remove "internal" annotation from datacollector serialization methods
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29830
| License | MIT
| Doc PR | n/a
this a fix for the issue #29830
After deliberation, we estimate that only `sid_length` and` sid_bits_per_character` session options should be exposed. These options à optional.
For others, we recommend changing your php.ini file
We can now configure the session like this :
```yaml
framwork:
session:
sid_length: 64 //optional, recommended value is 32
sid_bits_per_character: 6 //optional, recommended value is 5
```
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] render integer types with grouping as text input
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29422
| License | MIT
| Doc PR |
Commits
-------
d6a5fde521 render integer types with grouping as text input
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] don't lose int precision with not needed type casts
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26795
| License | MIT
| Doc PR |
Commits
-------
72136f1c04 don't lose int precision with not needed type casts
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] ignore _method forms in NativeRequestHandler
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #19017
| License | MIT
| Doc PR |
Commits
-------
bc4b0913b4 ignore _method forms in NativeRequestHandler
This PR was merged into the 3.4 branch.
Discussion
----------
Fix KernelTestCase compatibility for PhpUnit 8
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? |no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #30071
| License | MIT
| Doc PR |
As the PhpUnit 8 Testcase has different return types as PhpUnit 7 there need to be 2 different classes to support both PhpUnit 8 and PhpUnit 7. With a class alias we can then change which version is used based on the PhpUnit Version constant. The fix is a little bit hacky but to support different major versions I see no other way.
Not sure as we can't upgrade symfony/symfony to PhpUnit 8 how we can create a TestCase for this change.
Commits
-------
83a56a0cbe Fix phpunit 8 compatibility
This PR was merged into the 4.2 branch.
Discussion
----------
[DependencyInjection] add $lazyLoad context to the generated code for lazy non-shared service by PhpDumper
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29930
| License | MIT
| Doc PR | n/a
Fix#29930 by adding $lazyLoad context to the generated code for lazy non-shared service by PhpDumper
Commits
-------
98d4dfdadb [DependencyInjection] fix#29930 add $lazyLoad flag to the generated factory code for lazy non-shared services
This PR was merged into the 4.3-dev branch.
Discussion
----------
[DependencyInjection] Added information about deprecated aliases in debug:autowiring
| 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 | n/a
Fix and improves a bit PR #29968 and #29995
![Screenshot](https://i.imgur.com/GDj2NIY.png)
Commits
-------
3d2378dab5 [DependencyInjection] Added information about deprecated aliases in debug:autowiring
This PR was merged into the 4.2 branch.
Discussion
----------
[Workflow] Graphviz dumper escape not always a string
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
| Doc PR | N/A
The `escape` function takes a string as parameter but it can be a `bool` (see `findTransitions` method in same class). In this PR I allow any type in `escape` and does escaping only for `string`.
Commits
-------
1b17192b0a escape function does not always take a string
* 4.2:
fix merge
[FrameworkBundle] fix xsd
[FrameworkBundle] update xsd to match the 4.2 configuration
[FrameworkBundle] Update the xsd to match the actual session configuration
[Form] CsrfValidationListener marks the token as invalid if it is not a string
[Routing] fix perf issue when dumping large number of routes
Fix wrong value in file id attribute for Xliff 2.0
[VarDumper] Fixed phpDoc
[PhpUnitBridge] fix PHP 5.3 compat
[Messenger] Fix DataCollector template
[Filesystem] Fixed some docblocks and typos
bumped Symfony version to 4.2.4
updated VERSION for 4.2.3
updated CHANGELOG for 4.2.3
bumped Symfony version to 3.4.23
updated VERSION for 3.4.22
update CONTRIBUTORS for 3.4.22
updated CHANGELOG for 3.4.22
fix some minor typos
do not overwrite the constraint being evaluated
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29930
| License | MIT
| Doc PR | n/a
Fix#29930 by adding $lazyLoad context to the generated code for lazy non-shared service by PhpDumper
* 3.4:
[FrameworkBundle] Update the xsd to match the actual session configuration
[Form] CsrfValidationListener marks the token as invalid if it is not a string
[VarDumper] Fixed phpDoc
[PhpUnitBridge] fix PHP 5.3 compat
[Filesystem] Fixed some docblocks and typos
bumped Symfony version to 3.4.23
updated VERSION for 3.4.22
update CONTRIBUTORS for 3.4.22
updated CHANGELOG for 3.4.22
fix some minor typos
do not overwrite the constraint being evaluated
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Update the xsd to match the actual session configuration
| 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
Update the FrameworkBundle xsd to match the actual session configuration
Commits
-------
40bd76c9d4 [FrameworkBundle] Update the xsd to match the actual session configuration
| 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
Update the FrameworkBundle xsd to match the actual session configuration
This PR was squashed before being merged into the 3.4 branch (closes#29884).
Discussion
----------
[Form] CsrfValidationListener marks the token as invalid if it is not a string
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29882
| License | MIT
Commits
-------
deb8e95091 [Form] CsrfValidationListener marks the token as invalid if it is not a string
This PR was squashed before being merged into the 4.3-dev branch (closes#30024).
Discussion
----------
[Debug] Display more details in the simple error page of Debug
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29891
| License | MIT
| Doc PR | -
Note: this only changes the simple error page of Debug component, which is different from the full-featured error page of WebProfilerBundle.
-----
#29891 shows a confusing error page. In #29928 we improved the first error message displayed to the user. In this PR we implement @nicolas-grekas' idea to replace the generic error page title by a better error message. So, this PR + #29928 would fix#29891 to me.
### Before
![error-before](https://user-images.githubusercontent.com/73419/51920135-1519b500-23e5-11e9-99d6-e9b631b97499.png)
### After
![error-after](https://user-images.githubusercontent.com/73419/51920141-1945d280-23e5-11e9-97c3-49b2170dbd15.png)
Commits
-------
75ff151580 [Debug] Display more details in the simple error page of Debug
This PR was merged into the 4.2 branch.
Discussion
----------
[Routing] fix perf issue when dumping large number of routes
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #29918
| License | MIT
| Doc PR | -
In my reproducer, dumping 12k routes goes from 40s to 3s without xdebug, and from 50s to 12s with xdebug.
There is a lower level issue which is that `strpos` is called 16M times, but that's still a lot faster than calling `preg_match` 16M times. Reducing the number of checks is certainly possible, but that would be more involving. This could happen on master if someone is up to dig into it.
Commits
-------
872efe5729 [Routing] fix perf issue when dumping large number of routes
This PR was merged into the 3.4 branch.
Discussion
----------
[Form] do not overwrite the constraint being evaluated
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27362
| License | MIT
| Doc PR |
Commits
-------
345a6329dd do not overwrite the constraint being evaluated
This PR was squashed before being merged into the 4.2 branch (closes#30074).
Discussion
----------
Fix wrong value in file id attribute for Xliff 2.0
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | ?
| Deprecations? | no
| Tests pass? | ?
| Fixed tickets |
| License | MIT
| Doc PR |
Currently using the `XliffFileDumper` for exporting messages from catalogue with domain of the form `xxxx+intl-icu` produces an invalid Xliff version 2.0 file as the file id attribute is of type `xs:NMTOKEN` (cf. https://github.com/symfony/translation/blob/master/Resources/schemas/xliff-core-2.0.xsd#L139) which doesn't accept `+` character (cf. http://www.datypic.com/sc/xsd/t-xsd_NMTOKEN.html).
Exception is thrown when loading the content after.
Commits
-------
8bf12f89a3 Fix wrong value in file id attribute for Xliff 2.0