This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#17707).
Discussion
----------
Remove InputOption::VALUE_REQUIRED mode from $default parameter description
Reopening previous PR, providing more information
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Remove InputOption::VALUE_REQUIRED mode from $default parameter description as InputOption::setDefault() throws an exception only when called with InputOption::VALUE_NONE mode.
In practice the $default not null value could be still used in VALUE_REQUIRED mode in case InputOption was never set but accessed from InputDefinition::getOption() method.
There is an important difference between 2 concepts. Not required Option AND not required option Value. When the not required Option is not provided the default value still could be taken from required option Value instance.
Relevant (correct) test case:
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Console/Tests/Input/InputOptionTest.php#L136
Commits
-------
3c06151 Remove InputOption::VALUE_REQUIRED mode from $default parameter description as InputOption::setDefault() throws an exception only when called in InputOption::VALUE_NONE mode. In practice the $default value could still be accessed in InputOption::VALUE_REQUIRED mode in case InputOption was never set but accessed from InputDefinition::getOption() method
In practice the $default value could still be accessed in InputOption::VALUE_REQUIRED mode in case InputOption was never set but accessed from InputDefinition::getOption() method
This PR was merged into the 3.0 branch.
Discussion
----------
[HttpFoundation] [Session] Removed unnecessary PHP version check
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #17805
| License | MIT
Fixes#17805
Commits
-------
c0e41f9 [HttpFoundation] [Session] Removed unnecessary PHP version check as minimum requirement is now 5.5.9
This PR was squashed before being merged into the 2.3 branch (closes#17099).
Discussion
----------
[Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #5656
| License | MIT
| Doc PR |
Commits
-------
f005c80 [Form] Fixed violation mapping if multiple forms are using the same (or part of the same) property path
This PR was merged into the 2.8 branch.
Discussion
----------
[2.8] [DoctrineBridge] fix tests added in EntityType with FQCN
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | needs #17694
| Fixed tickets | -
| License | MIT
| Doc PR | -
- [x] Wait for #17694 to be merged in 2.8
Commits
-------
beb70d9 fix FQCN in tests added by #17694
This PR was merged into the 2.8 branch.
Discussion
----------
[Config] Fix EnumNodeDefinition to allow building enum nodes with one element
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15433, #17774
| License | MIT
| Doc PR | -
Commits
-------
e9111e4 [Config] Fix EnumNodeDefinition to allow building enum nodes with one element
* 2.7:
Fix locale and written standard inconsistencies for Norwegian translations
[Form] [Validator] Fix locale inconsistencies in Norwegian translations
fixed CS
[DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder
[Form] remove useless code in ResizeFormListener
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes#17785).
Discussion
----------
[Form] [Validator] Fix locale inconsistencies for Norwegian translations
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | N/A
| License | MIT
Bokmål is the preferred written standard of Norwegian for 85% to 90% of the population of Norway. It is therefore not entirely correct that the current translation of English in Nynorsk is the default one (`no` locale) for the Validator component.
This also creates inconsistency in Norwegian translations as other translations with the `no` locale are actually in Bokmål in the Form component, meaning that different written standards would be rendered in the same page.
In this PR, the filenames for translations are changed in such a way that Bokmål will be the default translation for the `no` locale, and nynorsk for the `nn` locale.
Renaming of `validators.nb.xlf` to `validators.no.xlf` (in Form component) will, however, lead to missing translations for those who relied on the `nb` locale for Bokmål. One solution is to have 2 exact translation files - validators.no.xlf and validators.nb.xlf - to avoid this problem.
Renaming of `validators.no.xlf` (which is currently in Nynorsk `nn`) to `validators.nn.xlf` (in Validator component) must be done in order to make the relation between translation content and locales consistent. I don't think this will lead to any major problems, since people expect to have Bokmål as the default translation.
Any thoughts?
Commits
-------
67d343f Fix locale and written standard inconsistencies for Norwegian translations
This PR was merged into the 2.8 branch.
Discussion
----------
[FrameworkBundle] Remove unused private method.
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Since 2.8, this method is not used in `TextDescriptor`.
Commits
-------
94bec9a [FrameworkBundle] Remove unused private method.
This PR was squashed before being merged into the 2.3 branch (closes#17719).
Discussion
----------
[DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder
[DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder
Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
The ContainerBuilder class wasn't implementing the ContainerInterface interface as it should according to the Liskov substitution principle.
It caused dependency on implementation instead than on the interface when using an instance of the ContainerBuilder class.
For example this code:
```php
<?php
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
use Symfony\Component\DependencyInjection\ContainerInterface;
/* @var $container ContainerInterface */
try {
$container->get("wrong_service_key");
} catch (ServiceNotFoundException $e) {
//action on a wrong key
}
```
works for correct implementations of the ContainerInterface interface, but the ContainerBuilder class was breaking that by throwing more abstract exceptions.
As the ServiceNotFoundException exceptions inherits from the InvalidArgumentException exception, this change shouldn't break code which catches the InvalidArgumentException exception while fetching values from a ContainerInterface interface implementation.
Commits
-------
aecb0fa [DependencyInjection] fixed exceptions thrown by get method of ContainerBuilder
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] remove useless code in ResizeFormListener
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
088c20c [Form] remove useless code in ResizeFormListener
This PR was merged into the 3.0 branch.
Discussion
----------
[Form] remove deprecated empty_value_in_choices
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | tiny
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
This has been deprecated since 2.6 in #12003. One part has already been removed (`empty_value`) but this part has been forgotten.
Commits
-------
735f92e [Form] remove deprecated empty_value_in_choices
* 2.8:
[VarDumper] Fix tests on PHP 7
[DomCrawler] Clarify the value returned by getPhpFiles()
[DependencyInjection] Fix#16461 Let Container::set() replace existing aliases
avoid (string) catchable fatal error for instances of __PHP_Incomplete_Class
remove unnecessary retrieval and setting of data
Update validators.fr.xlf
avoid (string) catchable fatal error for __PHP_Incomplete_Class instances
sendContent return as parent.
[DomCrawler] Remove the overridden getHash() method to prevent problems when cloning the crawler
[FrameworkBundle] Fix a typo
Added more exceptions to singularify method
Add width attribute on SVG
[FrameworkBundle] Support autowiring for TranslationInterface
[WebProfiler] Fixed styles for search block and menu profiler for IE Edge
Conflicts:
src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php
src/Symfony/Component/DomCrawler/Crawler.php
* 2.7:
[VarDumper] Fix tests on PHP 7
[DomCrawler] Clarify the value returned by getPhpFiles()
[DependencyInjection] Fix#16461 Let Container::set() replace existing aliases
avoid (string) catchable fatal error for instances of __PHP_Incomplete_Class
remove unnecessary retrieval and setting of data
avoid (string) catchable fatal error for __PHP_Incomplete_Class instances
sendContent return as parent.
[FrameworkBundle] Fix a typo
Added more exceptions to singularify method
* 2.3:
[DomCrawler] Clarify the value returned by getPhpFiles()
[DependencyInjection] Fix#16461 Let Container::set() replace existing aliases
Added more exceptions to singularify method
This PR was merged into the 2.3 branch.
Discussion
----------
[DomCrawler] Clarify the value returned by getPhpFiles()
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14021
| License | MIT
| Doc PR | -
The comment was previously suggesting the returned value is similar to the one stored in $_FILES, while it is more similar to the way PHP stores submitted form values. It is actually more convenient to have it this way, so rather then changing the returned value (which would break BC), it is better to clarify the comment.
Commits
-------
a694401 [DomCrawler] Clarify the value returned by getPhpFiles()
The comment was previously suggesting the returned value is similar to the one stored in $_FILES, while it is more similar to the way PHP stores submitted form values. It is actually more convenient to have it this way, so rather then changing the returned value (which would break BC), it is better to clarify the comment.
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes#17742).
Discussion
----------
[DependencyInjection] Fix#16461 Container::set() replace aliases
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16461
| License | MIT
| Doc PR | -
`Container::set()` now overrides any previously alias defined with the same name. Please see #16461 for the background.
Example:
- given `event_dispatcher` is an alias to `debug.event_dispatcher`
- when I run: `$container->set('event_dispatcher', new FakeEventDispatcher)`
- *before this patch*: nothing happens
- *after this patch*: the `event_dispatcher` is now my fake event dispatcher
Commits
-------
be85d16 [DependencyInjection] Fix#16461 Let Container::set() replace existing aliases
This PR was merged into the 2.3 branch.
Discussion
----------
Added more exceptions to singularify method
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #16532
| License | MIT
| Doc PR | -
Added exceptions for `series`, `news` and `services`.
Commits
-------
f5daa0d Added more exceptions to singularify method
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes#17691).
Discussion
----------
Fixed (string) catchable fatal error for PHP Incomplete Class instances
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #17586
| License | MIT
| Doc PR | -
Commits
-------
4b7ed98 avoid (string) catchable fatal error for instances of __PHP_Incomplete_Class
* 2.3:
remove unnecessary retrieval and setting of data
avoid (string) catchable fatal error for __PHP_Incomplete_Class instances
sendContent return as parent.
[FrameworkBundle] Fix a typo