Commit Graph

52204 Commits

Author SHA1 Message Date
Fabien Potencier
bb0362d167 feature #39258 [Notifier] Add ContextBlock for slack notifier (norkunas)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Notifier] Add ContextBlock for slack notifier

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

This block allows to add small text to the message layout footer

Commits
-------

6687e23c7d Add ContextBlock for slack notifier
2020-12-05 07:30:00 +01:00
Fabien Potencier
53e1bc01b7 feature #39300 [Notifier] Check for maximum number of buttons in slack action block (malteschlueter)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Notifier] Check for maximum number of buttons in slack action block

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

After having problems with the SlackSectionBlock (https://github.com/symfony/symfony/pull/39236) i thought it would be helpful to also have a check for the maximum elements in the SlackActionsBlock and a test. https://api.slack.com/reference/block-kit/blocks#actions
Edit: The actual documentation says that the maximum are 5 elements but this is outdated. The actual number is 25. The slack support confirmed that.

Can this be added to 5.2 or better to the 5.x branch?

There are also some other implementations of slack blocks like the SlackDividerBlock but they have only a constructor and no additional methods. Should we also add some tests for them even if they have no extra logic?

Commits
-------

a7936d2b0e [Notifier] Check for maximum number of buttons in slack action block
2020-12-05 07:13:36 +01:00
Malte Schlüter
a7936d2b0e [Notifier] Check for maximum number of buttons in slack action block 2020-12-05 07:13:20 +01:00
Alexander M. Turek
31ee43a8c6 Merge branch '5.2' into 5.x
* 5.2:
  [DependencyInjection] Fixed incorrect report for private services if required service does not exist
  Remove Xdebug from php-extra runs.
  Fix checking slack section fields limit
2020-12-03 10:38:03 +01:00
Alexander M. Turek
2b36487983 Merge branch '5.1' into 5.2
* 5.1:
  [DependencyInjection] Fixed incorrect report for private services if required service does not exist
  Remove Xdebug from php-extra runs.
2020-12-03 10:29:40 +01:00
Alexander M. Turek
2d062df845 Merge branch '4.4' into 5.1
* 4.4:
  [DependencyInjection] Fixed incorrect report for private services if required service does not exist
  Remove Xdebug from php-extra runs.
2020-12-03 10:18:36 +01:00
Alexander M. Turek
31cbfdc36a minor #39297 Remove Xdebug from php-extra runs (derrabus)
This PR was merged into the 4.4 branch.

Discussion
----------

Remove Xdebug from php-extra runs

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

Apparently, Travis already bundles Xdebug 3 with their PHP 7.4 binaries. This causes a lot of segfaults in our CI at the moment. This PR removes the Xdebug configuration files from all PHP tarballs that we download for our Travis build.

Commits
-------

1bb0fefbd5 Remove Xdebug from php-extra runs.
2020-12-03 10:05:22 +01:00
Alexander M. Turek
fbd67c8f85 bug #39151 [DependencyInjection] Fixed incorrect report for private services if required service does not exist (Islam93)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Fixed incorrect report for private services if required service does not exist

…does not exist

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

looks like `CheckExceptionOnInvalidReferenceBehaviorPass` can be moved to `beforeRemovingPasses` section without any consequences. this solves the problem and all tests still pass

Commits
-------

39bd05c5bc [DependencyInjection] Fixed incorrect report for private services if required service does not exist
2020-12-03 02:30:31 +01:00
Islam Israfilov (Islam93)
39bd05c5bc [DependencyInjection] Fixed incorrect report for private services if required service does not exist 2020-12-03 02:30:23 +01:00
Alexander M. Turek
1bb0fefbd5 Remove Xdebug from php-extra runs. 2020-12-03 02:22:48 +01:00
Fabien Potencier
4b97b160a2 bug #39236 [Notifier] Fix slack section block (norkunas)
This PR was merged into the 5.2 branch.

Discussion
----------

[Notifier] Fix slack section block

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

In SlackSectionBlock fields array is not initialized directly in the constructor so when running tests and trying to add a field to  it throws `Undefined index: fields`.

Commits
-------

472fa3b50a Fix checking slack section fields limit
2020-12-02 12:28:51 +01:00
Alexander M. Turek
e97f9e7d6e Merge branch '5.2' into 5.x
* 5.2:
  Fix rate limiter documentation
  Fix merge.
  fix lexing mapping values with trailing whitespaces
  [String] Fix Notice when argument is empty string
  [Inflector] Fix Notice when argument is empty string
  [Security] fix #39262, more defensive PasswordMigratingListener
  [Workflow] Fixed case when the marking store is not defined
  [Security] fix #39249, default entry_point compiler pass was returning too early
  Fix small typos
2020-12-02 09:55:39 +01:00
Alexander M. Turek
5e5796b504 minor #39279 [RateLimiter] Fix rate limiter documentation (Chi-teck)
This PR was submitted for the 5.x branch but it was merged into the 5.2 branch instead.

Discussion
----------

[RateLimiter] Fix rate limiter documentation

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | yes
| New feature?  | yes
| Deprecations? | no
| License       | MIT

The current example in README.md is not working.

Commits
-------

f90f27b63a Fix rate limiter documentation
2020-12-02 09:46:49 +01:00
Chi-teck
f90f27b63a Fix rate limiter documentation 2020-12-02 09:46:43 +01:00
Alexander M. Turek
56e79395c4 Merge branch '5.1' into 5.2
* 5.1:
  Fix merge.
  fix lexing mapping values with trailing whitespaces
  [String] Fix Notice when argument is empty string
  [Inflector] Fix Notice when argument is empty string
  Fix small typos
2020-12-02 09:39:23 +01:00
Alexander M. Turek
d4100fb453 Merge branch '4.4' into 5.1
* 4.4:
  fix lexing mapping values with trailing whitespaces
2020-12-01 21:33:29 +01:00
Alexander M. Turek
6f7e4dd8dc Fix merge. 2020-12-01 21:15:15 +01:00
Alexander M. Turek
7882c4a0b1 bug #39274 [Yaml] fix lexing mapping values with trailing whitespaces (xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] fix lexing mapping values with trailing whitespaces

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

Commits
-------

5e455f321a fix lexing mapping values with trailing whitespaces
2020-12-01 21:08:57 +01:00
Grégoire Pineau
d899f5de54 bug #39256 [Workflow] Fixed case when the marking store is not defined (lyrixx)
This PR was merged into the 5.2 branch.

Discussion
----------

[Workflow] Fixed case when the marking store is not defined

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

---

Since we are using `abstract_arg()` in the [service definition](https://github.com/symfony/symfony/blob/v5.2.0/src/Symfony/Bundle/FrameworkBundle/Resources/config/workflow.php#L25) (where we used `null` before), and since there is a validation mechanism that ensure all abstract arg are resolved, the container compilation failed.
But if the marking store is not defined (which is legit), we want to fallback on the raw PHP implementation.
That's why, now, I replace the abstract arg by null, and everything seems OK

Commits
-------

bd38cceaa8 [Workflow] Fixed case when the marking store is not defined
2020-12-01 19:56:33 +01:00
Alexander M. Turek
88cbcf99c0 bug #39244 [String] Fix Notice when argument is empty string (moldman)
This PR was merged into the 5.1 branch.

Discussion
----------

[String] Fix Notice when argument is empty string

| Q             | A
| ------------- | ---
| Branch?       | 5.1 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License       | MIT

PHP Notice is generated when we pass empty string to `singularize` or `pluralize` method.
```
$inflector = new \Symfony\Component\String\Inflector\EnglishInflector();
$inflector->singularize('');
```
```
Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
PHP Notice:  Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
```
```
$inflector = new \Symfony\Component\String\Inflector\EnglishInflector();
$inflector->pluralize('');
```
```
Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 424
PHP Notice:  Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 424
```

**Background**:
When `\Symfony\Component\PropertyAccess\PropertyAccessorInterface::setValue` is used with `_` property, then it calls \Symfony\Component\String\Inflector\EnglishInflector::singularize with empty string.
```
class Check
{
    public $_;
}
$check = new Check();
$pr = PropertyAccess::createPropertyAccessorBuilder()
    ->getPropertyAccessor();
if($pr->isWritable($check, '_')){
    $pr->setValue($check, '_', 'test');
}
var_dump($check);
```
```
Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
PHP Notice:  Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
...
Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
PHP Notice:  Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344

Notice: Uninitialized string offset: 0 in vendor/symfony/string/Inflector/EnglishInflector.php on line 344
object(Check)#6 (1) {
  ["_"]=>
  string(4) "test"
}
```

P.S.
Another solution is to include empty string in \Symfony\Component\String\Inflector\EnglishInflector::$uninflected
```
    private static $uninflected = [
        '',
        'atad',
        'reed',
        'kcabdeef',
        'hsif',
        'ofni',
        'esoom',
        'seires',
        'peehs',
        'seiceps',
    ];
```

If this PR is not relevant please close and sorry for inconvenience.

Commits
-------

88c2b9be62 [String] Fix Notice when argument is empty string
2020-12-01 18:07:21 +01:00
Alexander M. Turek
f7c372e636 Merge branch '4.4' into 5.1
* 4.4:
  [Inflector] Fix Notice when argument is empty string
2020-12-01 18:05:45 +01:00
Alexander M. Turek
782ee5d1d3 bug #39270 [Inflector] Fix Notice when argument is empty string (moldman)
This PR was merged into the 4.4 branch.

Discussion
----------

[Inflector] Fix Notice when argument is empty string

| 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 -->
| License       | MIT

Fixing issue when we call `Inflector` with empty string:

```
\Symfony\Component\Inflector\Inflector::singularize('');
```
```
Notice: Uninitialized string offset: 0 in src/Symfony/Component/Inflector/Inflector.php on line 363
PHP Notice:  Uninitialized string offset: 0 in src/Symfony/Component/Inflector/Inflector.php on line 363
...
Notice: Uninitialized string offset: 0 in src/Symfony/Component/Inflector/Inflector.php on line 363
PHP Notice:  Uninitialized string offset: 0 in src/Symfony/Component/Inflector/Inflector.php on line 363
```

Fix for 5.1 https://github.com/symfony/symfony/pull/39244

Commits
-------

2dfe342452 [Inflector] Fix Notice when argument is empty string
2020-12-01 18:03:27 +01:00
Christian Flothmann
5e455f321a fix lexing mapping values with trailing whitespaces 2020-12-01 17:24:09 +01:00
moldman
88c2b9be62 [String] Fix Notice when argument is empty string 2020-12-01 17:34:07 +02:00
moldman
2dfe342452 [Inflector] Fix Notice when argument is empty string 2020-12-01 17:29:30 +02:00
Alexander M. Turek
42f440ec25 bug #39263 [Security] more defensive PasswordMigratingListener (romaricdrigon)
This PR was merged into the 5.2 branch.

Discussion
----------

[Security] more defensive PasswordMigratingListener

| Q             | A
| ------------- | ---
| Branch?       | 5.2 (bug not here in 5.1.x)
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39262
| License       | MIT
| Doc PR        | /

This proposed fix makes `PasswordMigratingListener` code more robust. It should handle Passports which does not contain an `UserBadge`, as it is not enforced by `UserPassportInterface`. Developers should be free to implement different passports with different badges (as I did on my own project), and it shouldn't lead to a crash in *frameworkland*.

The issue became apparent in 5.2.0 exactly, as `PasswordMigratingListener` is now called in (almost) every login, as `PasswordUpgradeBadge` is automatically added.

Commits
-------

0222ed3a32 [Security] fix #39262, more defensive PasswordMigratingListener
2020-12-01 13:09:54 +01:00
Romaric Drigon
0222ed3a32 [Security] fix #39262, more defensive PasswordMigratingListener 2020-12-01 12:09:46 +01:00
Robin Chalas
0b48115fed bug #39261 [Security] fix #39249, default entry_point compiler pass was returning too early (romaricdrigon)
This PR was merged into the 5.2 branch.

Discussion
----------

[Security] fix #39249, default entry_point compiler pass was returning too early

| Q             | A
| ------------- | ---
| Branch?       | 5.2 (bug introduced in 5.2.0, after RC2)
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #39249
| License       | MIT
| Doc PR        | N/A

A `return` instead of `continue` was making compiler pass return after the first firewall. Hence subsequents firewalls never had a default entrypoint set.
This issue would occur with all firewalls, with any type of authenticator, though I saw it first with `http_basic` - because it is a bit more opaque and harder to debug.

Commits
-------

c3778050bd [Security] fix #39249, default entry_point compiler pass was returning too early
2020-12-01 10:40:15 +01:00
Grégoire Pineau
bd38cceaa8 [Workflow] Fixed case when the marking store is not defined 2020-12-01 10:12:38 +01:00
Alexander M. Turek
54d5139a2d minor #39260 [DomCrawler] Fix small typos in changelog (j0k3r)
This PR was merged into the 5.1 branch.

Discussion
----------

[DomCrawler] Fix small typos in changelog

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

Fixing a small typos in CHANGELOG.
As these typos were introduced in 5.0 but that version is no longer maintained, I target 5.1.

Following https://github.com/symfony/symfony/pull/39231

Commits
-------

529bbaf0a9 Fix small typos
2020-12-01 09:55:11 +01:00
Romaric Drigon
c3778050bd [Security] fix #39249, default entry_point compiler pass was returning too early 2020-12-01 09:51:35 +01:00
Jérémy Benoist
529bbaf0a9
Fix small typos 2020-12-01 09:40:05 +01:00
Tomas
6687e23c7d Add ContextBlock for slack notifier 2020-12-01 08:48:46 +02:00
Alexander M. Turek
ff97b5f17b Merge branch '5.2' into 5.x
* 5.2:
  remove return type definition in order to avoid type juggling
2020-11-30 23:47:58 +01:00
Alexander M. Turek
0d9dd43ecc Merge branch '5.1' into 5.2
* 5.1:
  remove return type definition in order to avoid type juggling
2020-11-30 23:47:11 +01:00
Alexander M. Turek
e4f1b5be56 Merge branch '4.4' into 5.1
* 4.4:
  remove return type definition in order to avoid type juggling
2020-11-30 23:46:30 +01:00
Robin Chalas
27127a4bab bug #39247 [Security] remove return type definition in order to avoid type juggling (adeptofvoltron)
This PR was merged into the 4.4 branch.

Discussion
----------

[Security] remove return type definition in order to avoid type juggling

| Q             | A
| ------------- | ---
| Branch?       |4.4 <!-- see below -->
| 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 #39205  <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        | <!-- required for new features -->

<!--
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.
-->
Everything described with details inrelated ticket

Commits
-------

668431fc09 remove return type definition in order to avoid type juggling
2020-11-30 18:58:27 +01:00
Alexander M. Turek
4f59d2f7c4 Merge branch '5.2' into 5.x
* 5.2:
  Added additional file existence check on temporary file cleanup for dumpFile method
  fix lexing inline sequences/mappings with trailing whitespaces
  Added test for issue 39229
  Bump Symfony version to 5.2.1
  Update VERSION for 5.2.0
  Update CHANGELOG for 5.2.0
  [Security] [DX] Automatically add PasswordUpgradeBadge + default support() impl in AbstractFormLoginAuthenticator
  [Console] Enable hyperlinks in Konsole/Yakuake
2020-11-30 18:27:11 +01:00
Alexander M. Turek
0b8d634706 Merge branch '5.1' into 5.2
* 5.1:
  Added additional file existence check on temporary file cleanup for dumpFile method
  fix lexing inline sequences/mappings with trailing whitespaces
  Added test for issue 39229
  [Console] Enable hyperlinks in Konsole/Yakuake
2020-11-30 18:15:52 +01:00
Tomas
472fa3b50a Fix checking slack section fields limit 2020-11-30 19:08:19 +02:00
Bernard van der Esch
668431fc09 remove return type definition in order to avoid type juggling 2020-11-30 18:07:19 +01:00
Alexander M. Turek
8bced673cc Merge branch '4.4' into 5.1
* 4.4:
  Added additional file existence check on temporary file cleanup for dumpFile method
  fix lexing inline sequences/mappings with trailing whitespaces
  Added test for issue 39229
  [Console] Enable hyperlinks in Konsole/Yakuake
2020-11-30 18:05:38 +01:00
Robin Chalas
da65c57fb4 bug #39223 [Console] Re-enable hyperlinks in Konsole/Yakuake (OndraM)
This PR was merged into the 4.4 branch.

Discussion
----------

[Console] Re-enable hyperlinks in Konsole/Yakuake

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| 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 #31809 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

Hyperlinks feature was broken in KDE's Konsole/Yakuake (#31809) and thus disabled by #31849.

But the feature has been recently [implemented](https://invent.kde.org/utilities/konsole/-/merge_requests/138), and is about to be released in KDE 20.12 on December 10th 2020, see [release notes](https://community.kde.org/Releases/20.12_Release_Notes#Konsole).

![obrazek](https://user-images.githubusercontent.com/793041/100556284-92dccf00-32a1-11eb-9907-f65c2eaa1335.png)

Tested in RC version and seems to be working fine. The feature is disabled by default (as per security concerns), but even when disabled, it just gracefully don't show the links.

Commits
-------

728edf36bf [Console] Enable hyperlinks in Konsole/Yakuake
2020-11-30 17:35:14 +01:00
Alexander M. Turek
f9e93342df bug #39241 [Yaml] fix lexing inline sequences/mappings with trailing whitespaces (Nyholm, xabbuh)
This PR was merged into the 4.4 branch.

Discussion
----------

[Yaml] fix lexing inline sequences/mappings with trailing whitespaces

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

Commits
-------

66bc898f61 fix lexing inline sequences/mappings with trailing whitespaces
b562a54e53 Added test for issue 39229
2020-11-30 17:34:03 +01:00
Alexander M. Turek
264b7fe58d bug #39243 [Filesystem] File existence check before calling unlink method (gechetspr)
This PR was merged into the 4.4 branch.

Discussion
----------

[Filesystem] File existence check before calling unlink method

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

Added additional file existence check on temporary file cleanup for `Filesystem::dumpFile()` method.

Commits
-------

520a10c221 Added additional file existence check on temporary file cleanup for dumpFile method
2020-11-30 14:49:51 +01:00
gechetspr
520a10c221 Added additional file existence check on temporary file cleanup for dumpFile method 2020-11-30 15:04:35 +02:00
Christian Flothmann
66bc898f61 fix lexing inline sequences/mappings with trailing whitespaces 2020-11-30 13:49:14 +01:00
Nyholm
b562a54e53
Added test for issue 39229 2020-11-30 13:01:48 +01:00
Fabien Potencier
6440b70b31 Bump Symfony version to 5.2.1 2020-11-30 06:59:51 +01:00
Fabien Potencier
8b51547061
Merge pull request #39224 from fabpot/release-5.2.0
released v5.2.0
2020-11-30 06:56:34 +01:00