Commit Graph

39522 Commits

Author SHA1 Message Date
Martin Hujer
076310cfe3 [Security] Update Czech translations
- closes #41040
- The translations are not perfect for some %minutes% values
   as the pluralization is more complicated in Czech than in English.
- See: https://github.com/symfony/symfony/issues/40863#issuecomment-823928594
2021-05-04 17:37:23 +02:00
Noel Light-Hilary
2e4335fc70 Expand LockConflictedException docs
The goal of this is to reduce the chance of bad assumptions about lock acquisition behaviour. Fixes #40969
2021-05-04 13:06:07 +01:00
Alexander M. Turek
88dcf52964 bug #41075 [ErrorHandler] Skip "same vendor" `@method deprecations for Symfony\*` classes unless symfony/symfony is being tested (nicolas-grekas)
This PR was merged into the 4.4 branch.

Discussion
----------

[ErrorHandler] Skip "same vendor" ``@method`` deprecations for `Symfony\*` classes unless symfony/symfony is being tested

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | ref #40975 #40996 #40893
| License       | MIT
| Doc PR        |

Replaces #41001

Commits
-------

7a1a91017d [ErrorHandler] Skip "same vendor" ``@method`` deprecations for `Symfony\*` classes unless symfony/symfony is being tested
2021-05-03 22:26:13 +02:00
Alexander M. Turek
2f3519ba4f minor #41076 [Security] Add missing German translations (derrabus)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Security] Add missing German translations

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

Commits
-------

31bba079c3 [Security] Add missing German translations
2021-05-03 22:24:54 +02:00
Alexander M. Turek
31bba079c3 [Security] Add missing German translations 2021-05-03 22:24:48 +02:00
Nicolas Grekas
7a1a91017d [ErrorHandler] Skip "same vendor" @method deprecations for Symfony\* classes unless symfony/symfony is being tested 2021-05-02 22:47:26 +02:00
Christiaan Wiesenekker
e30eb8f555 [Security] Add missing Dutch translations 2021-05-02 22:22:44 +02:00
Alexander M. Turek
c8cc4c3ee3 minor #41068 [Security] Update Security Arabic Translations (MouadZIANI)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Security] Update Security Arabic Translations

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #41028
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Related to #41028

Commits
-------

68c10337cc [Security] Update Security Arabic Translations
2021-05-02 21:25:58 +02:00
Mouad ZIANI
68c10337cc [Security] Update Security Arabic Translations 2021-05-02 21:25:52 +02:00
Alexander M. Turek
dab2c9c255 minor #41073 [Security] Add missing Hungarian translations (Daniel Tiringer)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] Add missing Hungarian translations

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

This PR adds missing Hungarian translations.

Commits
-------

89057b97d0 Add missing Hungarian translations
2021-05-02 21:24:16 +02:00
Alexander M. Turek
1621d78a37 minor #41069 Update Romanian Translation based on English (cybernet)
This PR was merged into the 4.4 branch.

Discussion
----------

Update Romanian Translation based on English

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

Commits
-------

d2b38fa54a Update Romanian Translation based on English
2021-05-02 21:21:38 +02:00
Jan Schädlich
3703010b1b add missing vietnamese translations 2021-05-02 18:29:24 +01:00
Daniel Tiringer
89057b97d0 Add missing Hungarian translations 2021-05-02 17:43:59 +02:00
cybernet
d2b38fa54a
Update Romanian Translation based on English
2 missing keys
2021-05-02 11:15:38 +01:00
Fabien Potencier
30dd608576 Bump Symfony version to 4.4.23 2021-05-01 16:48:05 +02:00
Fabien Potencier
f015673f30 Update VERSION for 4.4.22 2021-05-01 16:38:48 +02:00
jmsche
b64efd2848 [Security] Add missing French translations for logging throttling 2021-04-30 16:11:22 +02:00
Fabien Potencier
8679945b43 minor #40973 [HttpFoundation] Small phpdoc improvement (flack)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpFoundation] Small phpdoc improvement

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

I have been looking for a way to emulate `$_REQUEST` in Symfony, and I always thought the `get` method is useless for that, because it only looks at some custom routing stuff, GET and whatever BODY might be. Only today I actually looked at the source code and found out that it's actually (almost) doing what I was looking for, i.e. check `$_GET`, and then `$_POST`. So I figured it would be good to be a bit more explicit in the phpdoc (analoguous to the phpdoc for `$request->request`, which says "Request body parameters ($_POST).").

Commits
-------

a53f256b4b Small phpdoc imporvement
2021-04-30 14:05:50 +02:00
Nicolas Grekas
f01ea99254 [Security/Core] fix checking for bcrypt 2021-04-29 20:10:21 +02:00
flack
a53f256b4b Small phpdoc imporvement 2021-04-29 15:01:54 +02:00
Fabien Potencier
061ac77773 bug #40923 [Yaml] expose references detected in inline notation structures (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] expose references detected in inline notation structures

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

Commits
-------

6d7d3fb520 expose references detected in inline notation structures
2021-04-29 14:36:56 +02:00
Jeremiasz Major
10be072b2b
[HttpFoundation] Fixes for PHP 8.1 deprecations 2021-04-27 18:57:06 +02:00
David Maicher
72493c6acf
[Mime] DataPart: remove confusing fix-me comment 2021-04-27 16:58:50 +02:00
Nyholm
a5afe47ccf [CI] Make sure to restore default locale 2021-04-23 23:06:14 +02:00
Christian Flothmann
6d7d3fb520 expose references detected in inline notation structures 2021-04-23 14:09:37 +02:00
Christian Flothmann
6c7abd1380 minor #40924 [Yaml] make fabbot happy (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] make fabbot happy

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

Commits
-------

9826c05928 make fabbot happy
2021-04-23 14:08:29 +02:00
Christian Flothmann
9826c05928 make fabbot happy 2021-04-23 13:57:46 +02:00
Christian Flothmann
df6b1ebf78 bug #40514 [Yaml] Allow tabs as separators between tokens (bertramakers)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] Allow tabs as separators between tokens

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

As described in #40507, the Yaml spec allows tabs as whitespace characters between tokens. However, the Yaml parser crashes on this as it only expects spaces after the colon. https://yaml.org/spec/1.2/spec.html#id2778241

While I'm not a huge fan of it personally, it's an issue when a different linter tells us that a given YAML file with content that we have little control over has valid syntax in an unrelated check, and then our app crashes because it cannot be parsed after all.

Commits
-------

9a130ae93e Fix issue 40507: Tabs as separators between tokens
2021-04-23 09:45:19 +02:00
Bert Ramakers
9a130ae93e Fix issue 40507: Tabs as separators between tokens 2021-04-23 09:44:00 +02:00
Jack Thomas
a1e0408d08 [Cache] phpredis: Added full TLS support for RedisCluster 2021-04-23 09:09:57 +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
Markus Staab
9f124f6278 [Console] : added phpdocs to InputOption constants 2021-04-16 19:32:19 +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
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
615bcaef08 [FrameworkBundle] Fix messenger.receiver_locator service definition 2021-04-14 15:03:08 +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
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