Commit Graph

35970 Commits

Author SHA1 Message Date
Kévin Dunglas
24876f2adc [DI] Service decoration: autowire the inner service 2018-03-20 19:23:30 +01:00
Fabien Potencier
a5dbc68cd4 feature #24363 [Console] Modify console output and print multiple modifyable sections (pierredup)
This PR was squashed before being merged into the 4.1-dev branch (closes #24363).

Discussion
----------

[Console] Modify console output and print multiple modifyable sections

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | TBD
| Fixed tickets |
| License       | MIT
| Doc PR        | symfony/symfony-docs#9304

Add support to create different output sections for the console output.
Each section is it's own 'stream' of output, where the output can be modified (even if there are other output after it). This allows you to modify previous output in the console, either by appending new lines, modifying previous lines or clearing the output. Modifying a sections output doesn't affect the output after that or in other sections.

Some examples of what can be done:

**Overwriting content in a previous section:**

Code:

```php
$section1 = $output->section();
$section2 = $output->section();

$section1->writeln("<comment>Doing something</comment>\n");
usleep(500000);
$section2->writeln('<info>Result of first operation</info>');
usleep(500000);

$section1->overwrite("<comment>Doing something else</comment>\n");
usleep(500000);
$section2->writeln('<info>Result of second operation</info>');
usleep(500000);

$section1->overwrite("<comment>Finishing</comment>\n");
usleep(500000);
$section2->writeln('<info>Last Result</info>');
```

Result:
![overwrite-append](https://user-images.githubusercontent.com/144858/30975030-769f2c46-a471-11e7-819f-c3698b43f0af.gif)

**Multiple Progress Bars:**

Code:

```php
$section1 = $output->section();
$section2 = $output->section();

$progress = new ProgressBar($section1);
$progress2 = new ProgressBar($section2);

$progress->start(100);
$progress2->start(100);

$c = 0;
while (++$c < 100) {
    $progress->advance();

    if ($c % 2 === 0) {
        $progress2->advance(4);
    }

    usleep(500000);
}
```

Result:
![multiple-progress](https://user-images.githubusercontent.com/144858/30975119-b63222be-a471-11e7-89aa-a555cdf3d2e0.gif)

**Modifying content of a table & updating a progress bar:**

Code:

```php
$section1 = $output->section();
$section2 = $output->section();

$progress = new ProgressBar($section1);
$table = new Table($section2);

$table->addRow(['Row 1']);
$table->render();

$progress->start(5);

$c = 0;
while (++$c < 5) {
    $table->appendRow(['Row '.($c + 1)]);

    $progress->advance();

    usleep(500000);
}

$progress->finish();
$section1->clear();
```

Result:
![progress-table](https://user-images.githubusercontent.com/144858/30975176-e332499c-a471-11e7-9d4f-f58b464a53c2.gif)

**Example with Symfony Installer:***

Before:
![sf-installer-old](https://user-images.githubusercontent.com/144858/30975291-40f22106-a472-11e7-8836-bc39139c2d30.gif)

After:
![sf-installer](https://user-images.githubusercontent.com/144858/30975302-4a00acf4-a472-11e7-83ba-88ea9d0f0f3f.gif)

TODO:
- [x] Add unit tests

Commits
-------

9ec51a1797 [Console] Modify console output and print multiple modifyable sections
2018-03-20 15:41:21 +01:00
Pierre du Plessis
9ec51a1797 [Console] Modify console output and print multiple modifyable sections 2018-03-20 15:41:20 +01:00
Fabien Potencier
1fffb8554c feature #26381 Transform both switchToXHR() and removeXhr() to xmlHttpRequest() (Simperfit)
This PR was merged into the 4.1-dev branch.

Discussion
----------

Transform both switchToXHR() and removeXhr() to xmlHttpRequest()

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | none   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | Will do.

See https://github.com/symfony/symfony/pull/24778#issuecomment-369879079 for more information about this.

We are switching from a possible global estate change to just only one request affected.

Commits
-------

4ed08896fa feature: transform both switchToXHR and removeXhr to a xhrRequest
2018-03-20 09:40:29 +01:00
Amrouche Hamza
4ed08896fa
feature: transform both switchToXHR and removeXhr to a xhrRequest 2018-03-20 08:54:48 +01:00
Nicolas Grekas
98d5cf9e73 fix merge 2018-03-19 23:45:52 +01:00
Nicolas Grekas
2ca8657547 Merge branch '4.0'
* 4.0: (32 commits)
  [Form] fix tests and deps
  [Cache] Rely on mock for Doctrine ArrayCache
  [FrameworkBundle] Respect debug mode when warm up annotations
  [Console] Fix docblock of DescriptorInterface::describe
  [Config] Handle nullable node name + fix inheritdocs
  [Security] added userChecker to SimpleAuthenticationProvider
  [Debug] fix test
  Fix typo in test method name
  Fixes #26563 (open_basedir restriction in effect)
  [Debug] Reset previous exception handler ealier to prevent infinite loop
  add hint in Github pull request template
  [Validator] Fix docblock of ClassMetadata#members
  [BrowserKit] Fix cookie path handling when $domain is null
  [DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore
  [BrowserKit] Improves CookieJar::get
  [BrowserKit] Fix Cookie's PHPDoc
  [DomCrawler] Change bad wording in ChoiceFormField::untick
  [DomCrawler] Fix the PHPDoc of ChoiceFormField::setValue
  [DomCrawler] Avoid a useless call to strtolower
  [FrameworkBundle] HttpCache is not longer abstract
  ...
2018-03-19 23:38:22 +01:00
Nicolas Grekas
1f119cc16c Merge branch '3.4' into 4.0
* 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
  ...
2018-03-19 23:35:49 +01:00
Nicolas Grekas
34d5b5eb99 Merge branch '2.8' into 3.4
* 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
  ...
2018-03-19 23:32:39 +01:00
Nicolas Grekas
ed028fc4f4 [Form] fix tests and deps 2018-03-19 23:30:33 +01:00
Nicolas Grekas
2251ec3147 minor #26605 [Cache] Rely on mock for Doctrine ArrayCache (nicolas-grekas)
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
2018-03-19 23:28:55 +01:00
Nicolas Grekas
e4973ad8dc [Cache] Rely on mock for Doctrine ArrayCache 2018-03-19 23:12:11 +01:00
Fabien Potencier
4cc8cf62a1 feature #26449 Make ProgressBar::setMaxSteps public (ostrolucky)
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
2018-03-19 22:16:45 +01:00
Nicolas Grekas
677d9aa8be Merge branch '2.7' into 2.8
* 2.7:
  [Console] Fix docblock of DescriptorInterface::describe
2018-03-19 22:13:58 +01:00
Fabien Potencier
28f4662935 bug #26513 [FrameworkBundle] Respect debug mode when warm up annotations (Strate)
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
2018-03-19 22:13:45 +01:00
Artur Eshenbrener
f3ec39616c [FrameworkBundle] Respect debug mode when warm up annotations 2018-03-19 22:13:45 +01:00
Nicolas Grekas
af6be350e6 Merge branch '2.7' into 2.8
* 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
2018-03-19 22:11:56 +01:00
Fabien Potencier
019590de42 minor #26604 [Console] Fix docblock of DescriptorInterface::describe (codedmonkey)
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
2018-03-19 22:10:49 +01:00
Tim Goudriaan
dad27b0b2a [Console] Fix docblock of DescriptorInterface::describe 2018-03-19 21:46:57 +01:00
Nicolas Grekas
7101893b51 [Routing] rename Route::getLocales() to Route::getLocalizedPaths() 2018-03-19 21:13:17 +01:00
Nicolas Grekas
7323372c2b minor #26335 [Config] Handle nullable node name + fix inheritdocs (ro0NL)
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
2018-03-19 21:05:12 +01:00
Roland Franssen
5c3e6a95b3 [Config] Handle nullable node name + fix inheritdocs 2018-03-19 21:05:09 +01:00
Nicolas Grekas
775328240f bug #26370 [Security] added userChecker to SimpleAuthenticationProvider (i3or1s)
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
2018-03-19 21:02:10 +01:00
Boris Vujicic
cb9c92d065 [Security] added userChecker to SimpleAuthenticationProvider 2018-03-19 21:02:10 +01:00
Nicolas Grekas
bd49884804 bug #26569 [BrowserKit] Fix cookie path handling when $domain is null (dunglas)
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
2018-03-19 21:00:51 +01:00
Nicolas Grekas
ee47236a4c [Debug] fix test 2018-03-19 19:37:04 +01:00
Nicolas Grekas
cddfaabb16 minor #26602 Fix typo in test method name (kubk)
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
2018-03-19 19:30:35 +01:00
Egor Gorbachev
cc38c6bb62 Fix typo in test method name 2018-03-19 19:30:35 +01:00
Nicolas Grekas
887cba28f4 minor #26297 [Config] Backport string|null api for node names (ro0NL)
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
2018-03-19 18:44:39 +01:00
Nicolas Grekas
5e5216017a Merge branch '4.0'
* 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
  ...
2018-03-19 18:34:12 +01:00
Nicolas Grekas
72041c8821 Merge branch '3.4' into 4.0
* 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
  ...
2018-03-19 18:30:36 +01:00
Nicolas Grekas
7ae529291f bug #26273 [Security][Profiler] Display the original expression in 'Access decision log' (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security][Profiler] Display the original expression in 'Access decision log'

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #24127
| License       | MIT
| Doc PR        |

---

before:

![screenshot at 2018-02-22 18-22-28](https://user-images.githubusercontent.com/408368/36553752-798001ba-17fd-11e8-9539-254a25a01e60.png)

after:

![after](https://user-images.githubusercontent.com/408368/36553856-b7449fe2-17fd-11e8-94cb-ddaf4f033511.png)

Commits
-------

8f16c2e [Security][Profiler] Display the original expression in 'Access decision log'
2018-03-19 18:03:08 +01:00
Nicolas Grekas
6059bdc80e feature #26308 [Config] Introduce BuilderAwareInterface (ro0NL)
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
2018-03-19 17:48:53 +01:00
Roland Franssen
1353694bfd [Config] Introduce BuilderAwareInterface 2018-03-19 17:48:47 +01:00
Nicolas Grekas
ba2e6edb8a bug #26427 [DependencyInjection] fix regression when extending the Container class without a constructor (lsmith77)
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
2018-03-19 17:17:44 +01:00
Nicolas Grekas
d818636019 minor #26542 [DI] Add tests for EnvVarProcessor (mcfedr)
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
2018-03-19 15:53:29 +01:00
Fred Cox
2992bb3fd3 [DI] Add tests for EnvVarProcessor 2018-03-19 15:53:26 +01:00
Nicolas Grekas
5d00aa3961 bug #26562 [Bridge\PhpUnit] Cannot autoload class "\Symfony\Bridge\PhpUnit\SymfonyTestsListener" (Jake Bishop)
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
2018-03-19 15:48:02 +01:00
Nicolas Grekas
0222fde005 bug #26598 Fixes #26563 (open_basedir restriction in effect) (temperatur)
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
-------

7a04976 Fixes #26563 (open_basedir restriction in effect)
2018-03-19 15:39:18 +01:00
temperatur
7a049769bf Fixes #26563 (open_basedir restriction in effect)
If the open_basedir is set is_file(PHP_BINARY) is false.
2018-03-19 15:39:02 +01:00
Nicolas Grekas
609b56a3c3 minor #26578 [HttpKernel] Allow generators in registerBundle (ostrolucky)
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
2018-03-19 14:14:15 +01:00
Nicolas Grekas
1e38f41f18 minor #26582 [Validator] Fix docblock of ClassMetadata#members (ostrolucky)
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
2018-03-19 14:13:22 +01:00
Nicolas Grekas
9446fa01c4 minor #26592 [FrameworkBundle] Use a::b notation in ControllerTrait docblock (hacfi)
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
2018-03-19 13:53:48 +01:00
Nicolas Grekas
b79f29ed4f bug #26538 [Routing] remove capturing groups from requirements, they break the merged regex (nicolas-grekas)
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
2018-03-19 13:48:11 +01:00
Nicolas Grekas
8444022426 [Routing] remove capturing groups from requirements, they break the merged regex 2018-03-19 13:47:01 +01:00
Nicolas Grekas
0f9246fcfe feature #26518 [Routing] Allow inline definition of requirements and defaults (nicolas-grekas)
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
2018-03-19 13:12:13 +01:00
Nicolas Grekas
f6066532ea typo 2018-03-19 13:09:45 +01:00
Nicolas Grekas
567cbaaa21 bug #26568 [Debug] Reset previous exception handler earlier to prevent infinite loop (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Reset previous exception handler earlier to prevent infinite loop

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26438
| License       | MIT
| Doc PR        | -

Commits
-------

f7e1bb0 [Debug] Reset previous exception handler ealier to prevent infinite loop
2018-03-19 13:01:48 +01:00
Nicolas Grekas
e32c1da628 bug #26597 [Routing] Fix name-prefixing when using PHP DSL (nicolas-grekas)
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
2018-03-19 12:54:18 +01:00
Nicolas Grekas
0053eeefcf [Routing] Fix name-prefixing when using PHP DSL 2018-03-19 12:40:52 +01:00