Commit Graph

53743 Commits

Author SHA1 Message Date
Thomas Calvet
00048a9c73 [DependencyInjection][AliasDeprecatedPublicServicesPass] Noop when the service is private 2021-04-19 18:07:35 +02:00
Alexander M. Turek
bf6e98c220 Merge branch '4.4' into 5.2
* 4.4:
  [VarDumper] Add PHP 8.1 enums tests
  [Console] : added phpdocs to InputOption constants
2021-04-19 16:07:32 +02:00
Alexander M. Turek
2dd8445198 minor #40867 [VarDumper] Add PHP 8.1 enums tests (shiftby)
This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] Add PHP 8.1 enums tests

VarDumper component already supports PHP 8.1 enums, but didn't have tests

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #40238
| License       | MIT
| Doc PR        | no

VarDumper component already supports PHP 8.1 enums, but it didn't have tests.

```php
enum UnitEnumFixture {
    case Hearts;
    case Diamonds;
    case Clubs;
    case Spades;
}

dump(UnitEnumFixture::Hearts);
```
```
Symfony\Component\VarDumper\Tests\Fixtures\UnitEnumFixture {#435
  +name: "Hearts"
}
```

```php
enum BackedEnumFixture: string {
    case Hearts = 'H';
    case Diamonds = 'D';
    case Clubs = 'C';
    case Spades = 'S';
}

dump(BackedEnumFixture::Hearts);
```
```
Symfony\Component\VarDumper\Tests\Fixtures\BackedEnumFixture {#157
  +name: "Hearts"
  +value: "H"
}
```

Commits
-------

9a2a02710a [VarDumper] Add PHP 8.1 enums tests
2021-04-19 16:06:43 +02:00
Maxim Dovydenok
9a2a02710a [VarDumper] Add PHP 8.1 enums tests
VarDumper component already supports PHP 8.1 enums, but didn't have tests
2021-04-19 16:36:17 +03:00
Fabien Potencier
a24f389f6e minor #40833 [Console] added phpdocs to InputOption constants (clxmstaab)
This PR was submitted for the 5.x branch but it was squashed and merged into the 4.4 branch instead.

Discussion
----------

[Console] added phpdocs to InputOption constants

| Q             | A
| ------------- | ---
| Branch?       | 5.x for features / 4.4 or 5.2 for bug fixes <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | n/a <!-- required for new features -->

This PR adds phpdocs to the `InputOption` constants. The docs itself were copied over from the docs on https://symfony.com/doc/current/console/input.html#using-command-options.

Over and over again people (including myself) confuse the different available constants.
having the meaning carried with the implementation should help to use the one which actually fits the use-case.

<!--
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
-------

9f124f6278 [Console] : added phpdocs to InputOption constants
2021-04-16 19:32:32 +02:00
Markus Staab
9f124f6278 [Console] : added phpdocs to InputOption constants 2021-04-16 19:32:19 +02:00
Nicolas Grekas
9fe3cce0ca Merge branch '4.4' into 5.2
* 4.4:
  [DoctrineBridge] Allow bundles to define a driver type "attribute"
  fix test SocketStreamTest for Windows
  Fix issue with RequestMatcher when attribute is a closure
  [PropertyInfo] Use the right context for methods defined in traits
2021-04-16 19:25:34 +02:00
Nicolas Grekas
449c60f9aa bug #40802 [FrameworkBundle] Fix array controller link in debug:router (fancyweb)
This PR was merged into the 5.2 branch.

Discussion
----------

[FrameworkBundle] Fix array controller link in debug:router

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

`debug:router` is broken when you add a route in the Kernel (see https://symfony.com/doc/current/configuration/micro_kernel_trait.html) because `kernel` is not a class and triggers a `\ReflectionException`. The code in the exception handling always expect `$controller` to be a string.

Commits
-------

be964bdfa6 [FrameworkBundle] Fix array controller link in debug:router
2021-04-16 19:21:25 +02:00
Nicolas Grekas
32cce9f7b6 minor #40836 [Mailer] Fix SocketStreamTest for windows (a1812)
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Fix SocketStreamTest for windows

| Q             | A
| ------------- | ---
| Branch?       |  4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? |no
| Tickets       | -
| License       | MIT
| Doc PR        | -

**How to reproduce**
PHP 8.0.3
PHPUnit 9.5.4

c:\php\php ./phpunit --bootstrap ./vendor/autoload.php --configuration ./phpunit.xml.dist --filter "/(SocketStreamTest::testSocketErrorNoConnection)( .*)?$/" --test-suffix SocketStreamTest.php ./src/Symfony/Component/Mailer/Tests/Transport/Smtp/Stream --testdox

Failed asserting that exception message 'Connection could not be established with host "ssl://localhost:9999": stream_socket_client(): Unable to connect to ssl://localhost:9999 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond)' matches '/Connection refused|unable to connect/'.

Commits
-------

a46fce402c fix test SocketStreamTest for Windows
2021-04-16 19:19:58 +02:00
Nyholm
3a021a7fc4
bug #40793 [DoctrineBridge] Add support for a driver type "attribute" (beberlei)
This PR was merged into the 4.4 branch.

Discussion
----------

[DoctrineBridge] Add support for a driver type "attribute"

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| License       | MIT

Without this change its not possible to use attributes for mapping when they get released in ORM 2.9 over the next days. Otherwise we would need to copy three methods from the `AbstractDoctrineExtension` into the Bundle. See the DoctrineBundle PR that makes the full changes: https://github.com/doctrine/DoctrineBundle/pull/1322

Commits
-------

cecaa7815a [DoctrineBridge] Allow bundles to define a driver type "attribute"
2021-04-16 16:09:41 +02:00
Benjamin Eberlei
cecaa7815a [DoctrineBridge] Allow bundles to define a driver type "attribute" 2021-04-16 15:04:32 +02:00
Roman Martinuk
a46fce402c fix test SocketStreamTest for Windows 2021-04-16 15:10:02 +03:00
Nyholm
d5e8d6ed88
bug #40807 RequestMatcher issue when _controller is a closure (Plopix)
This PR was merged into the 4.4 branch.

Discussion
----------

RequestMatcher issue when `_controller` is a closure

| Q             | A
| ------------- | ---
| Branch?       |  4.4
| Bug fix?      |  yes
| New feature?  | no
| Deprecations? |  no
| License       | MIT

## Description

If the `matches` method of `RequestMatcher` is used on an attribute which is a closure it crashes.

##  How did we get it

On a project that is using FOS HTTP Cache, we have this configuration

```yaml
fos_http_cache:
    cache_control:
        rules:
     -
                match:
                    attributes: { _controller: ^App\\Controller\\.*::.* }
                headers:
                    overwrite: true
                    cache_control: { public: true, private: false, must_revalidate: true, s_maxage: 3600 }
```

Everything works fine unless you are reaching a controller that is a closure.
You get a
```TypeError: preg_match(): Argument #2 ($subject) must be of type string, Closure given``` which is to me logical.

## Proposed solution

Just testing the type of attribute value and return false before crashing `preg_match`

This PR adds a quick unit test to enforce this.

Commits
-------

66491238e3 Fix issue with RequestMatcher when attribute is a closure
2021-04-15 21:04:28 +02:00
Morel Sébastien
66491238e3
Fix issue with RequestMatcher when attribute is a closure 2021-04-15 08:06:12 -07:00
Thomas Calvet
be964bdfa6 [FrameworkBundle] Fix array controller link in debug:router 2021-04-15 13:20:37 +02:00
Nicolas Grekas
236e61b620 bug #40811 [PropertyInfo] Use the right context for methods defined in traits (colinodell)
This PR was merged into the 4.4 branch.

Discussion
----------

[PropertyInfo] Use the right context for methods defined in traits

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #34191
| License       | MIT
| Doc PR        |

Pull request #40175 only partially fixed #34191 - it solved the problem for properties used in traits but it did not address the same issue with methods.

I have therefore applied the same style of fix and confirmed it works properly with tests.

Commits
-------

c7e9493c5b [PropertyInfo] Use the right context for methods defined in traits
2021-04-14 19:13:01 +02:00
Robin Chalas
255b7b6fad Merge branch '4.4' into 5.2
* 4.4:
  [FrameworkBundle] Fix messenger.receiver_locator service definition
  Fix CS in IsbnValidator and IssnValidator
2021-04-14 15:12:03 +02:00
Robin Chalas
094b45992c minor #40816 [FrameworkBundle] Fix missing class in messenger service locator definitions (chalasr)
This PR was merged into the 4.4 branch.

Discussion
----------

[FrameworkBundle] Fix missing class in messenger service locator definitions

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Should make travis green once merged up to 5.x.

Commits
-------

615bcaef08 [FrameworkBundle] Fix messenger.receiver_locator service definition
2021-04-14 15:09:38 +02:00
Robin Chalas
615bcaef08 [FrameworkBundle] Fix messenger.receiver_locator service definition 2021-04-14 15:03:08 +02:00
Nyholm
4c9fce835d
minor #40798 Fix CS in IsbnValidator and IssnValidator (guilliamxavier)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

Fix CS in IsbnValidator and IssnValidator

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

dc90c195e3 Fix CS in IsbnValidator and IssnValidator
2021-04-14 11:41:21 +02:00
Guilliam Xavier
dc90c195e3
Fix CS in IsbnValidator and IssnValidator 2021-04-14 11:41:13 +02:00
Colin O'Dell
c7e9493c5b
[PropertyInfo] Use the right context for methods defined in traits 2021-04-13 18:23:01 -04:00
Alexander M. Turek
255283cb24 Merge branch '4.4' into 5.2
* 4.4:
  [Serializer][Validator] Update some phpDoc relative to "getters"
  Update README.md
  [SecurityBundle] Empty line starting with dash under "access_control" causes all rules to be skipped
  [Cache] Apply NullAdapter as Null Object
2021-04-13 16:17:49 +02:00
Alexander M. Turek
ade71f0404 bug #40791 [WebProfilerBundle] Use ControllerReference instead of URL in twig render() (Foxprodev)
This PR was merged into the 5.2 branch.

Discussion
----------

[WebProfilerBundle] Use ControllerReference instead of URL in twig render()

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #40709
| License       | MIT
| Doc PR        |

Use `ControllerReference` instead of `UrlGenerator`'s URL. Helps to deal with different baseUrl

Feel free to help me with some advice. Thank you in advance

Commits
-------

f2ee8bc7ae [WebProfiler] Use ControllerReference instead of URL in twig render()
2021-04-13 16:13:45 +02:00
Foxprodev
f2ee8bc7ae [WebProfiler] Use ControllerReference instead of URL in twig render() 2021-04-13 10:28:22 +03:00
Fabien Potencier
3f42c08abd minor #40786 [Serializer][Validator] Update some phpDoc relative to "getters" (guilliamxavier)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Serializer][Validator] Update some phpDoc relative to "getters"

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yesish (phpDoc unaccurate after code updates)
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

5046500deb [Serializer][Validator] Update some phpDoc relative to "getters"
2021-04-13 08:32:45 +02:00
Guilliam Xavier
5046500deb [Serializer][Validator] Update some phpDoc relative to "getters" 2021-04-13 08:32:41 +02:00
Fabien Potencier
b8b29012da minor #40770 Update README.md (94noni)
This PR was merged into the 4.4 branch.

Discussion
----------

Update README.md

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | yes as doc
| Tickets       | see desc
| License       | MIT
| Doc PR        | .

Related to https://packagist.org/packages/symfony/web-server-bundle/stats
Also I do have a question, do Symfony uses the https://getcomposer.org/doc/04-schema.md#abandoned feature?
It can be useful I think

I’ve seen many differents way, inside the repo readme, via github repo description with [DEPRECATED], even marking the repo as readonly
IMHO a similar aproach should be done for all packages of the organisation :)

Commits
-------

37b19d9c06 Update README.md
2021-04-13 08:31:04 +02:00
Antoine Makdessi
37b19d9c06 Update README.md 2021-04-13 08:30:55 +02:00
Alexander M. Turek
e1f2e81306 bug #40330 [SecurityBundle] Empty line starting with dash under "access_control" causes all rules to be skipped (monteiro)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[SecurityBundle] Empty line starting with dash under "access_control" causes all rules to be skipped

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #40235 ... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

When the IDE by mistake puts an empty line in `access_control` in security.yaml there is no warning that we have an empty row, making the rest of routes defined, to be ignored and possible to be accessed by anyone that can authenticate no matter the role.

# How to reproduce the issue

- git clone git@github.com:monteiro/symfony-issue-40235.git
- composer install
- symfony server:start
- open 127.0.0.1:8000/admin with username: "john_user" and password "123456"
- Since that user has only ROLE_USER should not be able to access the route... but because there is an empty line in "access_control" in `security.yaml`, "by mistake" it is possible to access the protected `ROLE_ADMIN` route.

Commits
-------

ee26ce5987 [SecurityBundle] Empty line starting with dash under "access_control" causes all rules to be skipped
2021-04-12 16:25:43 +02:00
Hugo Monteiro
ee26ce5987 [SecurityBundle] Empty line starting with dash under "access_control" causes all rules to be skipped 2021-04-12 16:25:37 +02:00
Alexander M. Turek
8c43fac84c bug #40780 [Cache] Apply NullAdapter as Null Object (roukmoute)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Cache] Apply NullAdapter as Null Object

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix https://github.com/symfony/symfony/issues/40753
| License       | MIT
<!--| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

There is a problem with the NullAdapter if I have to add an expression to work:

```php
$adapter = new NullAdapter();
$item = new CacheItem();
$item->set('FooBar');
if (!$adapter->save($item) && !($adapter instanceof NullAdapter)) {
    throw new Exception('Uoh oh');
}
```

So the goal here is to modify the methods that are causing a problem to behave as a Null Object.

Commits
-------

f6818eb7ac [Cache] Apply NullAdapter as Null Object
2021-04-12 16:23:06 +02:00
Mathias STRASSER
f6818eb7ac [Cache] Apply NullAdapter as Null Object 2021-04-12 16:22:57 +02:00
Nicolas Grekas
c3b4e81c23 Merge branch '4.4' into 5.2
* 4.4:
  [HttpKernel] Minor fixes and tweaks in the Symfony Welcome Page
  Revert "minor #40768 [HttpClient] [PHPDoc] Fix 2 remaining return mixed (fancyweb)"
2021-04-12 10:50:37 +02:00
Nicolas Grekas
e05b4efec2 minor #40777 [HttpKernel] Minor fixes and tweaks in the Symfony Welcome Page (javiereguiluz)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[HttpKernel] Minor fixes and tweaks in the Symfony Welcome Page

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | (not needed)

The current "Welcome Page" has a minor issue related to CSS flexbox. See how the "debug mode" text looks in smaller screens:

![before](https://user-images.githubusercontent.com/73419/114359439-4620d300-9b74-11eb-85c6-ee7afdb937df.png)

The solution is to wrap the contents in a HTML element such as `<p>`, but this PR also does some other minor tweaks. This is how it'd look now:

![after](https://user-images.githubusercontent.com/73419/114359535-5cc72a00-9b74-11eb-86c4-07fba89b8e8f.png)

Commits
-------

ee49cfe2b9 [HttpKernel] Minor fixes and tweaks in the Symfony Welcome Page
2021-04-12 10:48:29 +02:00
Javier Eguiluz
ee49cfe2b9 [HttpKernel] Minor fixes and tweaks in the Symfony Welcome Page 2021-04-12 10:48:24 +02:00
Nicolas Grekas
d359b76907 minor #40775 [HttpClient] Revert "minor #40768 [PHPDoc] Fix 2 remaining return mixed (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] Revert "minor #40768  [PHPDoc] Fix 2 remaining return mixed

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

This reverts commit 40d7315202, reversing
changes made to 4e904ec108.

As spotted by the CI and reported in https://github.com/symfony/symfony/pull/40768#issuecomment-817388657

Using `Psr7ResponseInterface|mixed` instead of just `mixed` provides a better DX, by making autocompletion more useful.

Commits
-------

afea0a0dc2 Revert "minor #40768 [HttpClient] [PHPDoc] Fix 2 remaining return mixed (fancyweb)"
2021-04-12 10:22:28 +02:00
Nicolas Grekas
afea0a0dc2 Revert "minor #40768 [HttpClient] [PHPDoc] Fix 2 remaining return mixed (fancyweb)"
This reverts commit 40d7315202, reversing
changes made to 4e904ec108.
2021-04-12 08:52:04 +02:00
Alexander M. Turek
86c9c3b0f8 Merge branch '4.4' into 5.2
* 4.4:
  [HttpClient][PHPDoc] Fix 2 remaining return mixed
  [Cache] [FrameworkBundle] Fix logging for TagAwareAdapter
  [Route] Better inline requirements and defaults parsing
  Simplified condition and removed unused code from AbstractSessionListener::onKernelRequest
  [PhpUnitBridge] Fix phpunit symlink on Windows
  [Yaml] Fixed infinite loop when parser goes through an additional and invalid closing tag
2021-04-12 00:55:21 +02:00
Nicolas Grekas
40d7315202 minor #40768 [HttpClient] [PHPDoc] Fix 2 remaining return mixed (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] [PHPDoc] Fix 2 remaining return mixed

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Two cases I forgot in https://github.com/symfony/symfony/pull/40728 😕

Commits
-------

97a43e1dab [HttpClient][PHPDoc] Fix 2 remaining return mixed
2021-04-11 19:25:56 +02:00
Nicolas Grekas
4e904ec108 bug #40740 [Cache][FrameworkBundle] Fix logging for TagAwareAdapter (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[Cache][FrameworkBundle] Fix logging for TagAwareAdapter

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/40108
| License       | MIT
| Doc PR        | -

Commits
-------

6b0beca36f [Cache] [FrameworkBundle] Fix logging for TagAwareAdapter
2021-04-11 19:20:11 +02:00
Thomas Calvet
97a43e1dab [HttpClient][PHPDoc] Fix 2 remaining return mixed 2021-04-11 19:17:27 +02:00
Thomas Calvet
6b0beca36f [Cache] [FrameworkBundle] Fix logging for TagAwareAdapter 2021-04-11 19:05:34 +02:00
Nicolas Grekas
7ce1dda109 bug #40755 [Routing] Better inline requirements and defaults parsing (Foxprodev)
This PR was merged into the 4.4 branch.

Discussion
----------

[Routing] Better inline requirements and defaults parsing

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #40749 #40701
| License       | MIT
| Doc PR        |

Remove `!` symbol from requirements and defaults array keys in Route class. Leave `!` symbol in Route compiled path for correct token creation.
**The only restriction I found:**
Important variable can't get default value, only in UrlGenerator.
As mentioned in
0f96ac7484/src/Symfony/Component/Routing/RouteCompiler.php (L217)
they are not optional

Feel free to help me with some advice. Thank you in advance

Commits
-------

2a8c94a871 [Route] Better inline requirements and defaults parsing
2021-04-11 15:11:13 +02:00
Foxprodev
2a8c94a871 [Route] Better inline requirements and defaults parsing
Remove ! symbol from requirements and defaults array keys in Route class. Leave ! symbol in Route compiled path for correct token creation
Added some inline route settings tests
2021-04-11 14:59:39 +02:00
Nicolas Grekas
4a8ea4094f bug #40754 [PhpUnitBridge] Fix phpunit symlink on Windows (johnstevenson)
This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Fix phpunit symlink on Windows

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

If the symlink to `.phpunit/phpunit` already exists, unlink is called to remove it. But this fails on Windows (because it is a directory and requires `rmdir`), which in turn causes the subsequent `symlink` call to fail (because it already exists).

Additionally, creating symlinks on Windows requires Administrator permissions (generally), so `.phpunit/phpunit` can never be created for ordinary Users.

This PR uses a junction instead of a symlink on Windows. It also fixes some issues with stderror output and adds some argument escaping.

Commits
-------

ff8093246b [PhpUnitBridge] Fix phpunit symlink on Windows
2021-04-11 14:54:19 +02:00
Nicolas Grekas
03ef116496 minor #40760 Simplified condition and removed unused code from AbstractSessionListener::onKernelRequest (StefanoCappellini)
This PR was submitted for the 5.x branch but it was merged into the 4.4 branch instead.

Discussion
----------

Simplified condition and removed unused code from AbstractSessionListener::onKernelRequest

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | None
| License       | MIT

This PR simplifies a condition and removes unused code (AFAIK coming from  #38894)).

Commits
-------

d344b8d6cb Simplified condition and removed unused code from AbstractSessionListener::onKernelRequest
2021-04-11 14:47:43 +02:00
StefanoCappellini
d344b8d6cb Simplified condition and removed unused code from AbstractSessionListener::onKernelRequest 2021-04-11 14:47:37 +02:00
Jérémy Derussé
9ad3720efc
[security] NullToken signature 2021-04-10 12:08:01 +02:00
John Stevenson
ff8093246b [PhpUnitBridge] Fix phpunit symlink on Windows 2021-04-09 15:31:01 +01:00