This PR was merged into the 5.2 branch.
Discussion
----------
[Mailer] use correct spelling when accessing the SMTP php.ini value
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#40899
| License | MIT
| Doc PR |
Commits
-------
b6f8ed69ec use correct spelling when accessing the SMTP php.ini value
This PR was merged into the 4.4 branch.
Discussion
----------
[Yaml] Allow tabs as separators between tokens
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix#40507
| License | MIT
| Doc PR | None
As described in #40507, the Yaml spec allows tabs as whitespace characters between tokens. However, the Yaml parser crashes on this as it only expects spaces after the colon. https://yaml.org/spec/1.2/spec.html#id2778241
While I'm not a huge fan of it personally, it's an issue when a different linter tells us that a given YAML file with content that we have little control over has valid syntax in an unrelated check, and then our app crashes because it cannot be parsed after all.
Commits
-------
9a130ae93e Fix issue 40507: Tabs as separators between tokens
This PR was squashed before being merged into the 4.4 branch.
Discussion
----------
[Cache] phpredis: Added full TLS support for RedisCluster
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | n/a
This Pr bridges the gap for full TLS support when using phpredis driver implementation of TLS.
Adds the 'ssl' options array for cache configuration when using RedisCluster
https://www.php.net/manual/en/context.ssl.php
Switches directed node commands from using individual \Redis connections to using the recommended implementation from the phpredis documentation:
https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#directed-node-commands
This pr will enable compatibility with Amazon ElastiCache redis cluster mode using In Transit encryption (TLS) using the phpredis driver, Supports tagging & binary data types.
Commits
-------
a1e0408d08 [Cache] phpredis: Added full TLS support for RedisCluster
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Translation] The tests for the Loco bridge require symfony/config
| Q | A
| ------------- | ---
| Branch? | 5.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
The Loco bridge test suite currently fails with the following error message:
```
Loading translations from the Xliff format requires the Symfony Config component.
```
Let's add the config component then.
Commits
-------
f58285d8e7 [Translation] The tests for the Loco bridge require symfony/config
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Translation] Move ProviderFactoryTestCase out of the Tests namespace
| Q | A
| ------------- | ---
| Branch? | 5.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Same as #40911, different class. Sorry, I missed the seconds abstract class. 🙈
Commits
-------
e01499d0b8 [Translation] Move ProviderFactoryTestCase out of the Tests namespace
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Translation] Move ProviderTestCase out of the Tests namespace
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Because the `Tests` namespace is stripped from our distribution packages, the new Loco translation bridge cannot use the abstract `ProviderTestCase` class. This PR suggests to move it into a dedicated `Test` namespace to make it reusable for the Loco bridge and potential future bridges.
Commits
-------
c1ec38fdb8 [Translation] Move ProviderTestCase out of the Tests namespace
This PR was merged into the 5.3-dev branch.
Discussion
----------
[FrameworkBundle] Bump symfony/translation
| Q | A
| ------------- | ---
| Branch? | 5.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Our Travis build is currently red because FrameworkBundle tries to use recently added classes from `symfony/translation` that are not present in 5.0 of the translation component.
This PR attempts to fix that problem.
Commits
-------
7b8aa215df [FrameworkBundle] Bump symfony/translation
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Config] Improve exception messages when extension could not be found
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
The error message we currently get if we are using some `AcmeSocialConifg` (bundle is not installed) is currently not perfect. Here are the suggested changes
```diff
In FileLoader.php line 174:
- Could not resolve argument "Symfony\Config\AcmeSocialConfig acmeSocial" for
+ Could not resolve argument "Symfony\Config\AcmeSocialConfig $acmeSocial" for
"app/config/packages/acme_social.php" in app/config/packages/acme_social.php
(which is loaded in resource "app/config/p ackages/acme_social.php").
In PhpFileLoader.php line 124:
- Could not resolve argument "Symfony\Config\AcmeSocialConfig acmeSocial" for
+ Could not resolve argument "Symfony\Config\AcmeSocialConfig $acmeSocial" for
"app/config/packages/acme_social.php".
In PhpFileLoader.php line 167:
There is no extension able to load the configuration for "Symfony\Config\AcmeSocialConfig".
- Looked for namespace "Symfony\Config\AcmeSocialConfig", found "framework",
+ Looked for namespace "acme_social", found "framework",
"sensio_framework_extra","twig", "web_profiler", "monolog ", "debug", "maker", "doctrine",
"doctrine_migrations", "security", "twig_extra", "mercure", "webpack_encore".
```
Commits
-------
187562f385 [Config] Improve exception messages
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Translation] Adding Translation Providers
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#36543
| License | MIT
| Doc PR | todo
> Follow up of https://github.com/symfony/symfony/pull/37462
This PR refers to the early opened RFC #36543 about adding third party translation SaaS into Symfony.
I worked in collaboration with `@odolbeau` on this first draft.
We have implemented only Loco Provider for now, to validate the main workflow of the feature.
~~We are not very sure about some naming convention, such as Remote Storage, it might be renamed in Transport, to correspond to the naming of third party services in Mailer and Notifier Components.~~ We use Provider name.
This PR brings 2 new commands in Translation component: `translation:push` and `translation:pull`
It adds also new configuration entry:
```yaml
framework:
default_locale: fr
translator:
default_path: '%kernel.project_dir%/translations'
enabled_locales: '%locales%'
fallbacks:
- en
- it
providers:
loco:
dsn: '%env(LOCO_DSN)%'
domains: ['messages']
locales: '%locales%'
```
## To do
- [x] Implement Provider into Translation component
- [x] Plug it into FrameworkBundle
- [x] Implement pull and push commands
- [x] Implement Loco adapter
- [x] Tests
- [ ] Documentation
- [x] Update CHANGELOG.md files in FrameworkBundle and Translation Component
Docs:
Adapt language settings in Lokalise to be sure that Symfony locales match with Lokalise languages
![language-setting-lokalise](https://user-images.githubusercontent.com/773875/102089496-997c5200-3e1c-11eb-8bff-bd2f9a5fe100.png)
Todo:
- [x] Implement POEditor Provider (⚠️ there is a trick to do in POEditor Dashboard in order to make XLF export works, it will have to be documented explicitly in the symfony/symfony-docs PR)
- [x] Implement Lokalise Provider
- [x] Implement Crowdin Provider
These 3 providers are implemented separately. They are not fully tested yet, it is planned to make it done by the end of April 2021.
Commits
-------
6e55fa84b7 Added Translation Providers
This PR was merged into the 5.3-dev branch.
Discussion
----------
[FrameworkBundle] Deprecate creating public workflow services
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | yes
| Tickets | -
| License | MIT
| Doc PR | -
AFAIK, workflow services don't need to be public. friendly ping to @lyrixx as a reviewer.
Commits
-------
79cbf005da [FrameworkBundle] Deprecate creating public workflow services
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Config] Make sure one can build cache on Windows and then run in (Docker) Linux
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR |
The generated ConfigBuilders should use the `\DirectorySeparator` constant. The resulting string will look like this:
```php
<?php
namespace Symfony\Config;
require_once __DIR__.\DIRECTORY_SEPARATOR.'Twig'.\DIRECTORY_SEPARATOR.'GlobalConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'Twig'.\DIRECTORY_SEPARATOR.'DateConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'Twig'.\DIRECTORY_SEPARATOR.'NumberFormatConfig.php';
/**
* This class is automatically generated to help creating config.
*
* @experimental in 5.3
*/
class TwigConfig implements \Symfony\Component\Config\Builder\ConfigBuilderInterface
{
private $formThemes;
```
Commits
-------
555c7dda48 [Config] Make sure one can build cache on Windows and then run in (Docker) Linux
This PR was squashed before being merged into the 5.3-dev branch.
Discussion
----------
[Config] Use plural name on array values
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets |
| License | MIT
| Doc PR | Related: https://github.com/symfony/symfony-docs/pull/15264
If we have a PrototypedArrayNode and the prototype is does not have a key (`->useAttributeAsKey('name')`). Then we know for sure that the value should be an array.
See this example from `$framework->assets()`
```diff
/**
+ * @param list<mixed>
* @return $this
*/
- public function baseUrl($value): self
+ public function baseUrls(array $value): self
{
$this->baseUrls = $value;
return $this;
}
```
Commits
-------
f564a7a11a [Config] Use plural name on array values
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Semaphore] Inline lua scripts used by semaphore
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | Fix#40820
| License | MIT
| Doc PR | -
Having Redis scripts in separate files might helps IDE and syntax highlight, but has also several drawbacks:
- I/O performance => file is read every time a semaphore is attempted to be acquired
- Readability: Needs to search and open a second file to understand what the method do
- Inconsistent with the rest of the codebase: ie. SQL queries are not store in separate file
Commits
-------
0d6666aac2 Inline lua scripts used by semaphore
This PR was merged into the 5.3-dev branch.
Discussion
----------
[DependencyInjection] Improve autowiring errors when named autowiring aliases exist
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Before:
`Cannot autowire service "App\Controller\HelloController": argument "$workflow" of method "__construct()" references interface "Symfony\Component\Workflow\WorkflowInterface" but no such service exists. You should maybe alias this interface to one of these existing services: "state_machine.pull_request", "state_machine.comment".`
After:
`Cannot autowire service "App\Controller\HelloController": argument "$workflow" of method "__construct()" references interface "Symfony\Component\Workflow\WorkflowInterface" but no such service exists. Available autowiring aliases for this interface are: "$pullRequestStateMachine", "$commentStateMachine".`
/cc `@lyrixx` `@weaverryan`
Commits
-------
88eb0b57c1 [DependencyInjection] Improve autowiring errors when named autowiring aliases exist
This PR was merged into the 5.2 branch.
Discussion
----------
[DependencyInjection] [AliasDeprecatedPublicServicesPass] Noop when the service is private
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
If the service is already private, I think we can just ignore the tag and do nothing.
Moreover, when we deprecate a public service, if an user already sets its definition to private, it will be transparent instead of throwing.
Commits
-------
00048a9c73 [DependencyInjection][AliasDeprecatedPublicServicesPass] Noop when the service is private
This PR was merged into the 5.3-dev branch.
Discussion
----------
[DependencyInjection] Add conflict rules for incompatible ext-psr versions
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
This PR adds conflict rules for outdated versions of the PECL extension `psr` which are known to cause compatibility issues with DependencyInjection 5.3 and ServiceContracts 2.4.
Commits
-------
a02f062149 [DependencyInjection] Add conflict rules for incompatible ext-psr versions
This PR was merged into the 5.3-dev branch.
Discussion
----------
[DependencyInjection] Add `#[Target]` to tell how a dependency is used and hint named autowiring aliases
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Right now, when one wants to target a specific service in a list of candidates, we rely on the name of the argument in addition to the type-hint, eg:
`function foo(WorkflowInterface $reviewStateMachine)`
The deal is that by giving the argument a name that matches the target use case of the required dependency, we make autowiring more useful.
But sometimes, being able to de-correlate the name of the argument and the purpose is desired.
This PR introduces a new `#[Target]` attribute on PHP8 that allows doing so. The previous example could be written as such thanks to it:
`function foo(#[Target('review.state_machine')] WorkflowInterface $workflow)`
That's all folks :)
Commits
-------
cc76eab795 [DependencyInjection] Add `#[Target]` to tell how a dependency is used and hint named autowiring aliases
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Config] Support extensions without configuration in ConfigBuilder warmup
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
`ConfigurationExtensionInterface::getConfiguration()` is nullable.
As a real use-case: A small internal bundle in my company just uses `array_merge` to manage a very limited set of configuration. We don't have these fancy Configuration classes.
Commits
-------
0a6f5e50b7 [Config] Support extensions without configuration
This PR was merged into the 5.3-dev branch.
Discussion
----------
[Notifier] Add missing entries in scheme to package map
| Q | A
| ------------- | ---
| Branch? | 5.x
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets | - <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | - <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.
Additionally (see https://symfony.com/releases):
- Always add tests and ensure they pass.
- Never break backward compatibility (see https://symfony.com/bc).
- Bug fixes must be submitted against the lowest maintained 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 branch 5.x.
- Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
-->
Commits
-------
8cf605062b Add missing entries in scheme to package map