* 3.4: (32 commits)
[Form] fix tests and deps
[Cache] Rely on mock for Doctrine ArrayCache
[FrameworkBundle] Respect debug mode when warm up annotations
[Console] Fix docblock of DescriptorInterface::describe
[Config] Handle nullable node name + fix inheritdocs
[Security] added userChecker to SimpleAuthenticationProvider
[Debug] fix test
Fix typo in test method name
Fixes#26563 (open_basedir restriction in effect)
[Debug] Reset previous exception handler ealier to prevent infinite loop
add hint in Github pull request template
[Validator] Fix docblock of ClassMetadata#members
[BrowserKit] Fix cookie path handling when $domain is null
[DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore
[BrowserKit] Improves CookieJar::get
[BrowserKit] Fix Cookie's PHPDoc
[DomCrawler] Change bad wording in ChoiceFormField::untick
[DomCrawler] Fix the PHPDoc of ChoiceFormField::setValue
[DomCrawler] Avoid a useless call to strtolower
[FrameworkBundle] HttpCache is not longer abstract
...
* 2.8: (29 commits)
[Console] Fix docblock of DescriptorInterface::describe
[Config] Handle nullable node name + fix inheritdocs
[Security] added userChecker to SimpleAuthenticationProvider
[Debug] fix test
Fix typo in test method name
Fixes#26563 (open_basedir restriction in effect)
[Debug] Reset previous exception handler ealier to prevent infinite loop
add hint in Github pull request template
[Validator] Fix docblock of ClassMetadata#members
[BrowserKit] Fix cookie path handling when $domain is null
[DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore
[BrowserKit] Improves CookieJar::get
[BrowserKit] Fix Cookie's PHPDoc
[DomCrawler] Change bad wording in ChoiceFormField::untick
[DomCrawler] Fix the PHPDoc of ChoiceFormField::setValue
[DomCrawler] Avoid a useless call to strtolower
[FrameworkBundle] HttpCache is not longer abstract
Php Inspections (EA Ultimate): address some of one-time used local variables
[Intl] Load locale aliases to support alias fallbacks
[CssSelector] Fix CSS identifiers parsing - they can start with dash
...
This PR was merged into the 3.4 branch.
Discussion
----------
[Cache] Rely on mock for Doctrine ArrayCache
| 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 | -
See also https://github.com/doctrine/cache/pull/253
Commits
-------
e4973ad [Cache] Rely on mock for Doctrine ArrayCache
This PR was merged into the 4.1-dev branch.
Discussion
----------
Make ProgressBar::setMaxSteps public
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24100
| License | MIT
| Doc PR | -
This is useful in cases when target of tracking changes its size during progress advancement. My exact use case is showing progress of file upload for file which is still being downloading.
Commits
-------
2b3c37a2d8 Make ProgressBar::setMaxSteps public
This PR was squashed before being merged into the 3.4 branch (closes#26513).
Discussion
----------
[FrameworkBundle] Respect debug mode when warm up annotations
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Propagate current debug mode to the annotations reader. Without thi, warmup is useless with debug mode, because timetsamps are not written to cache.
Commits
-------
f3ec39616c [FrameworkBundle] Respect debug mode when warm up annotations
* 2.7:
[Config] Handle nullable node name + fix inheritdocs
[Security] added userChecker to SimpleAuthenticationProvider
[Debug] fix test
Fix typo in test method name
Fixes#26563 (open_basedir restriction in effect)
[Debug] Reset previous exception handler ealier to prevent infinite loop
add hint in Github pull request template
[Validator] Fix docblock of ClassMetadata#members
[BrowserKit] Fix cookie path handling when $domain is null
[DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore
[BrowserKit] Improves CookieJar::get
[BrowserKit] Fix Cookie's PHPDoc
[DomCrawler] Change bad wording in ChoiceFormField::untick
[DomCrawler] Fix the PHPDoc of ChoiceFormField::setValue
[DomCrawler] Avoid a useless call to strtolower
[FrameworkBundle] HttpCache is not longer abstract
[DomCrawler] extract(): fix a bug when the attribute list is empty
[Config] Backport string|null api for node names
This PR was merged into the 2.7 branch.
Discussion
----------
[Console] Fix docblock of DescriptorInterface::describe
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes?
This might be the smallest commit ever, but I came across this docblock which seems to be incorrectly copied from 7101893b51/src/Symfony/Component/Console/Descriptor/Descriptor.php (L74) and it threw me off guard for a moment when I read it.
I can see more improvements being made (like mentioning the `InvalidArgumentException`) but I didn't want to overdo it.
Commits
-------
dad27b0b2a [Console] Fix docblock of DescriptorInterface::describe
This PR was squashed before being merged into the 2.7 branch (closes#26335).
Discussion
----------
[Config] Handle nullable node name + fix inheritdocs
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no-ish
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Small split from #26297 that can be merged until master/4.1. Whereas the doc fixes only apply until 3.4, hence the split.
Small change regarding `getName/Path()` for not returning a `null` value anymore which violates `NodeInterface::getName/Path()`
Remainng issue left at
cd5f4105a4/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php (L381-L383)
which i tend to leave untouched across all branches for now.
Commits
-------
5c3e6a9 [Config] Handle nullable node name + fix inheritdocs
This PR was submitted for the 2.8 branch but it was squashed and merged into the 2.7 branch instead (closes#26370).
Discussion
----------
[Security] added userChecker to SimpleAuthenticationProvider
[Security] added userChecker to SimpleAuthenticationProvider
[SecurityBundle] [DependencyInjection] updated SimpleFormFactory
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26314
| License | MIT
| Doc PR | no
Introduces user checker to the simple authentication provider.
Commits
-------
cb9c92d [Security] added userChecker to SimpleAuthenticationProvider
This PR was merged into the 2.7 branch.
Discussion
----------
[BrowserKit] Fix cookie path handling when $domain is null
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? |no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? |no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
The bug is highlighted by the new test: there is an inconsistency in the path handling regarding if a domain is set or not. If it is set, and the cookie is set to a subpath of the passed path, the cookie is returned. However if no domain is set, it is not. This PR fixes this bug.
Commits
-------
acc20fc [BrowserKit] Fix cookie path handling when $domain is null
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes#26602).
Discussion
----------
Fix typo in test method name
| Q | A
| ------------- | ---
| Branch? | master
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| License | MIT
| Doc PR | no
Method test**Cach**WithInvalidCallback replaced with test**Cache**WithInvalidCallback
<!--
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
-------
cc38c6b Fix typo in test method name
This PR was merged into the 2.7 branch.
Discussion
----------
[Config] Backport string|null api for node names
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Commits
-------
fe586ac [Config] Backport string|null api for node names
* 4.0: (28 commits)
[DI] Add tests for EnvVarProcessor
typo
[Bridge\PhpUnit] Fix#26430 Cannot autoload listeners
Make sure we always render errors. Eventhough labels are disabled
Make sure form errors is valid HTML
[HttpKernel] Allow generators in registerBundle
[TwigBundle] document TwigRenderer BC break in UPGRADE-3.4
Extra line to bootstrap 3 horizontal layout
[Serializer] Remove const override
Update Client.php
[PhpUnitBridge] Ability to use different composer.json file
[DomCrawler] FormField: remove an useless return statement
[Config] ReflectionClassResource check abstract ServiceSubscriberInterface and EventSubscriberInterface
Display the Welcome Page when there is no homepage defined
[DI] Remove dead dumper check
Make KernelInterface docblock more fit for bundle-less environment
fix regression when extending the Container class without a constructor
fix the updating of timestamp in the MemcachedSessionHandler
[SecurityBundle] Make extra character non mandatory in regex
[Config] Add characters to the regex
...
* 3.4: (22 commits)
[DI] Add tests for EnvVarProcessor
[Bridge\PhpUnit] Fix#26430 Cannot autoload listeners
Make sure we always render errors. Eventhough labels are disabled
Make sure form errors is valid HTML
[HttpKernel] Allow generators in registerBundle
[TwigBundle] document TwigRenderer BC break in UPGRADE-3.4
Extra line to bootstrap 3 horizontal layout
[Serializer] Remove const override
Update Client.php
[PhpUnitBridge] Ability to use different composer.json file
[DomCrawler] FormField: remove an useless return statement
[Config] ReflectionClassResource check abstract ServiceSubscriberInterface and EventSubscriberInterface
Display the Welcome Page when there is no homepage defined
fix regression when extending the Container class without a constructor
fix the updating of timestamp in the MemcachedSessionHandler
[SecurityBundle] Make extra character non mandatory in regex
[Config] Add characters to the regex
bumped Symfony version to 3.4.7
updated VERSION for 3.4.6
updated CHANGELOG for 3.4.6
...
This PR was squashed before being merged into the 4.1-dev branch (closes#26308).
Discussion
----------
[Config] Introduce BuilderAwareInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Split `ParentNodeDefinitionInterface` into `BuilderAwareInterface`.
Use case is custom node definition (extended from VariableNodeDef) with a corresponding prototyped array node.
To set the actual prototype i need the builder at definition level, provided by `ParentNodeDefinitionInterface`. However i don't implement `children()` + `append()`, i solely need the builder scope.
To go after #26297
Commits
-------
1353694 [Config] Introduce BuilderAwareInterface
This PR was merged into the 3.4 branch.
Discussion
----------
[DependencyInjection] fix regression when extending the Container class without a constructor
| Q | A
| ------------- | ---
| Branch? | 3.4+
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/26397
| License | MIT
| Doc PR | -
fix regression introduced in c026ec63e3 (diff-f7b23d463cba27ac5e4cb677f2be7623R985)
Commits
-------
0beb64a fix regression when extending the Container class without a constructor
This PR was squashed before being merged into the 3.4 branch (closes#26542).
Discussion
----------
[DI] Add tests for EnvVarProcessor
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR | n/a
Add tests for the `EnvVarProcessor` as it doesn't have any at the moment.
Originally from this PR against master, https://github.com/symfony/symfony/pull/26498
Commits
-------
2992bb3 [DI] Add tests for EnvVarProcessor
This PR was merged into the 3.4 branch.
Discussion
----------
[Bridge\PhpUnit] Cannot autoload class "\Symfony\Bridge\PhpUnit\SymfonyTestsListener"
| Q | A
| ------------- | ---
| Branch? | 3.4 <!-- see below -->
| Bug fix? | yes
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26430
| License | MIT
| Doc PR | - <!-- required for new features -->
Allows composer to discover the class for autoloading when using `composer install --classmap-authoritative`
Commits
-------
6b6fdab [Bridge\PhpUnit] Fix#26430 Cannot autoload listeners
This PR was submitted for the 4.0 branch but it was merged into the 2.7 branch instead (closes#26598).
Discussion
----------
Fixes#26563 (open_basedir restriction in effect)
If the open_basedir is set is_file(PHP_BINARY) is false.
| Q | A
| ------------- | ---
| Branch? | 4.0
| Bug fix? | yes/
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26563
| License | MIT
| Doc PR |
If we are using cli we already used the binary so there is no need to check if the file exists.
Commits
-------
7a04976Fixes#26563 (open_basedir restriction in effect)
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] Allow generators in registerBundle
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Flex recipe [utilizes generator in Kernel.php](a067bebf03/symfony/framework-bundle/3.3/src/Kernel.php (L33)). This needs to be explicitly allowed in interface.
Commits
-------
f36cfd4 [HttpKernel] Allow generators in registerBundle
This PR was merged into the 2.7 branch.
Discussion
----------
[Validator] Fix docblock of ClassMetadata#members
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Structure of this array is in reality array<string, array<int, PropertyMetadata>>, so MemberMetadata is 2 levels deep in this array, instead of one
Commits
-------
44008c4 [Validator] Fix docblock of ClassMetadata#members
This PR was merged into the 4.1-dev branch.
Discussion
----------
[FrameworkBundle] Use `a::b` notation in ControllerTrait docblock
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26085
| License | MIT
| Doc PR | already documented
<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
- Bug fixes must be submitted against the lowest branch where they apply
(lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
-->
Replaced the deprecated the bundle notation with the new `a::b` notation in the docblock of `ControllerTrait::forward`
Commits
-------
973c5ec [FrameworkBundle] Use `a::b` notation in ControllerTrait docblock
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Routing] remove capturing groups from requirements, they break the merged regex
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Group positions are now used to extract variables. Capturing groups in requirements break them for now.
Commits
-------
8444022 [Routing] remove capturing groups from requirements, they break the merged regex
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Routing] Allow inline definition of requirements and defaults
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26481
| License | MIT
| Doc PR | -
```
{bar} -- no requirement, no default value
{bar<.*>} -- with requirement, no default value
{bar?default_value} -- no requirement, with default value
{bar<.*>?default_value} -- with requirement and default value
{bar?} -- no requirement, with default value of null
{bar<.*>?} -- with requirement and default value of null
```
Details:
* Requirements and default values are not escaped in any way. This is valid -> `@Route("/foo/{bar<>>?<>}")` (requirements = `>` and default value = `<>`)
* Because of the lack of escaping, you can't use a closing brace (`}`) inside the default value (wrong -> `@Route("/foo/{bar<\d+>?aa}bb}")`) but you can use it inside requirements (correct -> `@Route("/foo/{bar<\d{3}>}")`).
* PHP constants are not supported (use the traditional `defaults` syntax for that)
* ...
Commits
-------
67559e1 [Routing] Allow inline definition of requirements and defaults
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Routing] Fix name-prefixing when using PHP DSL
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Fixes bad implem merged in #25178
Commits
-------
0053eee [Routing] Fix name-prefixing when using PHP DSL
This PR was merged into the 4.1-dev branch.
Discussion
----------
[Routing] Implement i18n routing
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? |no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | N/A
| License | MIT
This PR introduces support for I18N routing into core. This is a port from a bundle I've made recently, now merged into the default implementation. While it's ok to have this as a bundle, it was suggested by @nicolas-grekas to create a PR for this so it can be included into the core.
## New usages
### YAML
```yaml
contact:
controller: ContactController::formAction
path:
en: /send-us-an-email
nl: /stuur-ons-een-email
```
Will be effectively the same as declaring:
```yaml
contact.en:
controller: ContactController::formAction
path: /send-us-an-email
defaults:
_locale: en
contact.nl:
controller: ContactController::formAction
path: /stuur-ons-een-email
defaults:
_locale: nl
```
### Annotation usage:
```php
<?php
use Symfony\Component\Routing\Annotation\Route;
class ContactController
{
/**
* @Route({"en": "/send-us-an-email", "nl": "/stuur-ons-een-email"}, name="contact")
*/
public function formAction()
{
}
}
/**
* @Route("/contact")
*/
class PrefixedContactController
{
/**
* @Route({"en": "/send-us-an-email", "nl": "/stuur-ons-een-email"}, name="contact")
*/
public function formAction()
{
}
}
```
### Route generation
```php
<?php
/** @var UrlGeneratorInterface $urlGenerator */
$urlWithCurrentLocale = $urlGenerator->generate('contact');
$urlWithSpecifiedLocale = $urlGenerator->generate('contact', ['_locale' => 'nl']);
```
Route generation is based on your request locale. When not available it falls back on a configured default. This way of route generation means you have a "route locale switcher" out of the box, but generate the current route with another locale for most cases.
## Advantages
Having i18n routes defined like this has some advantages:
* Less error prone.
* No need to keep `requirements` or `defaults` in sync with other definitions.
* No need to `{_locale}` in the path (bad for route matching performance).
* Better developer experience.
### Next steps
I've ported all the things the bundle supported, before moving on I'd like to discuss this first in order not to waste our collective time. This initial PR should give a clear enough picture to see what/how/why this is done.
If and when accepted I/we can move forward to implement the XML loader and @nicolas-grekas mentioned there should be a `Configurator` implemented for this as well. He opted to help with this (for which I'm very thankful).
- [x] Yaml Loader
- [x] Annotation Loader
- [x] XML Loader
- [x] PHP Loader?
- [ ] Documentation
Commits
-------
4ae66dc [Routing] Handle "_canonical_route"
e32c414 [Routing] Implement i18n routing
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBundle] document TwigRenderer BC break in UPGRADE-3.4
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? |no
| Tests pass? | yes
| Fixed tickets | #24616, #25659
| License | MIT
| Doc PR | -
This is a follow up for https://github.com/symfony/symfony/pull/26553 as it seems impossible to fix the BC break in a clean way for everyone.
ping @nicolas-grekas @Tobion
Commits
-------
47a3d7a084 [TwigBundle] document TwigRenderer BC break in UPGRADE-3.4
This PR was merged into the 3.4 branch.
Discussion
----------
Make sure form errors is valid HTML
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #26461
| License | MIT
| Doc PR |
Using `<div>` and `<ul>` in a `<label>` is not valid HTML. This PR uses `<span>`s instead and some Bootstrap 4 classes to make it look just like before.
Commits
-------
5dcaaadb5e Make sure form errors is valid HTML