Commit Graph

54332 Commits

Author SHA1 Message Date
Fabien Potencier
8fc4c1bf3b Merge branch '5.2' into 5.x
* 5.2:
  Add test.
  [Console] Add Helper::strwidth() and Helper::strlength()
  Update README.md
2021-04-08 08:54:07 +02:00
Fabien Potencier
74056a70be bug #40698 [Console] Add Helper::width() and Helper::length() (Nyholm, grasmash)
This PR was merged into the 5.2 branch.

Discussion
----------

[Console] Add Helper::width() and Helper::length()

| Q             | A
| ------------- | ---
| Branch?       | 5.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Close #40697 Fix #40634, fix #40635
| License       | MIT
| Doc PR        |

This PR will add add a Helper::strwidth() and a Helper::strlength(). Same with with the Helper::strlenWithoutDecoration(). It does not deprecate anything. That is done in #40695

With this PR we dont have to revert the emoji issue (ie close #40697)

FYI @grasmash, I used your tests from #40635

Commits
-------

d9ea4c597c Add test.
dc02ab3d74 [Console] Add Helper::strwidth() and Helper::strlength()
2021-04-08 08:53:22 +02:00
Matthew Grasmick
d9ea4c597c Add test. 2021-04-08 08:53:10 +02:00
Nyholm
dc02ab3d74 [Console] Add Helper::strwidth() and Helper::strlength() 2021-04-08 08:53:10 +02:00
Fabien Potencier
790e2a852b minor #40700 [CI] Make sure packages contain all metafiles (Nyholm)
This PR was squashed before being merged into the 5.3-dev branch.

Discussion
----------

[CI] Make sure packages contain all metafiles

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

This PR introduce a new CI job to just do some checks on a package. It first looks at the git diff to figure out what packages have changed. Then for each changed package it verifies:

- .gitattributes exists
- .gitignore exists
- CHANGELOG.md exists
- LICENSE exists
- phpunit.xml.dist exists
- README.md exists
- The LICENSE file includes "Fabien Potencier", the correct year and has same content as /LICENSE

If the package is new (license file changed), we also make sure that the package is present in composer.json's replace.

I got this idea after seeing PRs like #40696. And we do add one or two package every month.

Commits
-------

18658a29a3 [CI] Make sure packages contain all metafiles
2021-04-08 08:41:29 +02:00
Nyholm
18658a29a3 [CI] Make sure packages contain all metafiles 2021-04-08 08:41:25 +02:00
Fabien Potencier
9966e980e6 minor #40730 [Notifier] [CS] [5.x] Replace easy occurrences of ?: with ?? (fancyweb)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Notifier] [CS] [5.x] Replace easy occurrences of ?: with ??

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

https://github.com/symfony/symfony/pull/40729 on 5.x

Commits
-------

726075c177 [CS] [5.x] Replace easy occurrences of ?: with ??
2021-04-08 08:36:31 +02:00
Robin Chalas
a6b589e6d4 minor #40733 * LightSmsTransport.php - suggestion for pull request #40712 (StaffNowa)
This PR was merged into the 5.3-dev branch.

Discussion
----------

* LightSmsTransport.php - suggestion for pull request #40712

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

After remove issets still get warnings about undefined variables. My solution for this:
1. Create method which have all issets cases.
2. Return (int) errorCode

Commits
-------

0b1a450194 * LightSmsTransport.php
2021-04-08 00:13:02 +02:00
Vasilij Dusko
0b1a450194 * LightSmsTransport.php 2021-04-08 01:08:46 +03:00
Nyholm
f2de7d5eec
minor #40704 Update README.md (94noni)
This PR was merged into the 5.2 branch.

Discussion
----------

Update README.md

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

I think it can be a good idea to make a link from here to the book (Symfony v5.2+)

Commits
-------

fbd4cb2671 Update README.md
2021-04-07 20:59:37 +02:00
Thomas Calvet
726075c177 [CS] [5.x] Replace easy occurrences of ?: with ?? 2021-04-07 18:47:35 +02:00
Alexander M. Turek
fe9b188e28 Merge branch '5.2' into 5.x
* 5.2:
  [CS] [5.2] Replace easy occurrences of ?: with ??
2021-04-07 18:44:23 +02:00
Alexander M. Turek
dc84d5a3b1 minor #40729 [CS] [5.2] Replace easy occurrences of ?: with ?? (fancyweb)
This PR was merged into the 5.2 branch.

Discussion
----------

[CS] [5.2] Replace easy occurrences of ?: with ??

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

https://github.com/symfony/symfony/pull/40727 on 5.2

Commits
-------

3f28f2ac31 [CS] [5.2] Replace easy occurrences of ?: with ??
2021-04-07 18:41:12 +02:00
Thomas Calvet
3f28f2ac31 [CS] [5.2] Replace easy occurrences of ?: with ?? 2021-04-07 18:27:53 +02:00
Thomas Calvet
dd1481642b [PHPDoc] Fix some union type cases 2021-04-07 18:22:29 +02:00
Alexander M. Turek
855aab243d Merge branch '5.2' into 5.x
* 5.2:
  [CS] Replace easy occurences of ?: with ??
2021-04-07 18:09:00 +02:00
Alexander M. Turek
b64ae4d419 Merge branch '4.4' into 5.2
* 4.4:
  [CS] Replace easy occurences of ?: with ??
2021-04-07 18:07:52 +02:00
Alexander M. Turek
b946077529 minor #40727 [CS] Replace easy occurences of ?: with ?? (fancyweb)
This PR was merged into the 4.4 branch.

Discussion
----------

[CS] Replace easy occurences of ?: with ??

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

Since we don't support PHP 5 anymore, we can easily replace `?:` with `??` when dealing with "nullable" objects. It seems more modern to me (make the code evolve with the new language features). Once we do not support < PHP 7.4, we can replace with `??=`.

Commits
-------

959d3d976c [CS] Replace easy occurences of ?: with ??
2021-04-07 18:03:50 +02:00
Alexander M. Turek
47f3c4e52d Merge branch '5.2' into 5.x
* 5.2:
  Avoid warning with Xdebug 3 with develop mode disabled
2021-04-07 17:57:56 +02:00
Alexander M. Turek
945942020c Merge branch '4.4' into 5.2
* 4.4:
  Avoid warning with Xdebug 3 with develop mode disabled
2021-04-07 17:57:33 +02:00
Thomas Calvet
959d3d976c [CS] Replace easy occurences of ?: with ?? 2021-04-07 17:47:03 +02:00
Oskar Stark
0cc982c251 minor #40712 [Notifier]  Simplify LightSms implementation (jderusse)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Notifier]  Simplify LightSms implementation

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

/cc @OskarStark

Commits
-------

1240e9f551 [notifier] Simplify lightsms implementation
2021-04-07 08:36:17 +02:00
Alexander M. Turek
8925dc7d98 minor #40716 [FrameworkBundle] Fix fragment.uri_generator definition (dunglas)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[FrameworkBundle] Fix fragment.uri_generator definition

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

Fix for a bug I introduced in #40575 (missing service).

Commits
-------

eaae4500f4 [FrameworkBundle] Fix fragment.uri_generator definition
2021-04-06 17:50:31 +02:00
Kévin Dunglas
eaae4500f4
[FrameworkBundle] Fix fragment.uri_generator definition 2021-04-06 16:17:34 +02:00
Jérémy Derussé
1240e9f551
[notifier] Simplify lightsms implementation 2021-04-06 14:01:04 +02:00
Thomas Calvet
5f0fe3235f [DependencyInjection] Add env() and EnvConfigurator in the PHP-DSL 2021-04-06 13:54:30 +02:00
Oskar Stark
345eb75686 feature #40647 [Notifier] [FakeChat] Added the bridge (OskarStark)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Notifier] [FakeChat] Added the bridge

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/15171
| Recipe PR     | todo

This PR is based on https://github.com/symfony/symfony/pull/39949 but for chat messages instead of SMS.

Commits
-------

0ce156c484 [Notifier] [FakeChat] Added the bridge
2021-04-06 12:48:08 +02:00
Oskar Stark
0ce156c484 [Notifier] [FakeChat] Added the bridge 2021-04-06 12:38:02 +02:00
Oskar Stark
71a407da29 feature #40607 [Notifier] Add LightSms notifier bridge (Vasilij Dusko, StaffNowa)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Notifier] Add LightSms notifier bridge

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License       | MIT
| Doc PR        | symfony/symfony-docs/pull/15178
| Recipe PR | https://github.com/symfony/recipes/pull/921

LightSms notifier https://github.com/D4DLab/lightsms-notifier

Commits
-------

37c665eb5c * LightSmsTransport.php - make fabbot happy
68a12fa4f4 * fix tests
f1f83b9e5c * LightSmsTransport.php - use query string parameters
026dcd97a9 * LightSmsTransport.php - isset
2a9ac2d92a * LightSmsTransport.php - fix
4213564be1 * composer.json - fix Fabien comment from another pull request #40646
21e972a69e * coding standard
bea5256cc2 * type cast. On success lightsms return error code like string. On error return integer.
9b2e2d0b4a * type cast. On success lightsms return error code like string. On error return integer.
0d7488b10a * type cast. On success lightsms return error code like string. On error return integer.
9a832ef595 * LightSmsTransport.php - via mistake removed www which return (Closing direction to the user). Removed additional isset which in reality not needed. Added new method which allow to return "unknown error" and throw exception if not successfully
178d9c2a5a * pull request #40696
95e82f6ef1 Update LightSmsTransport.php
a197deeed1 * LightSmsTransport.php - better to remove if we do not have it?
83d259832b * Coding Standard patch
1ff97e410a * LightSmsTransport.php - build signature and use http_build_query, timestamp int
1c993b7224 * ERROR_CODES -> int * www. - bug * isset validate ['error']
1b59a7d47e * LightSmsTransport.php - string param
58ac708d0f * LightSmsTransport.php - return back www (without will not work). Now fail tests
b9f9ff8c94 * LightSmsTransport.php - tests fail
265f776394 * LightSmsTransport.php - issue with Symfony\Component\Notifier\Bridge\LightSms\Tests\LightSmsTransportTest
23a446a2e1 * LightSmsTransport.php - issue with Symfony\Component\Notifier\Bridge\LightSms\Tests\LightSmsTransportTest
08235e5a3c * LightSmsTransport.php - bug fix
80ef5ba565 * LightSmsTransport.php - Unable to send the SMS: Closing direction to the user
08b0729751 Update LightSmsTransport.php
7180c1f400 Update LightSmsTransport.php
f16b4d2aa2 * phone changed to from
7f13dbf711 * sender changed to from
e20ef1ed35 * LightSmsTransport.php - change + to 00
b0e64b9250 * LightSmsTransport.php - not ok throw exception
fc13bb27e2 * LightSmsTransport.php - changed login for validation (the same like we have all places)
5d2e6928f3 * LightSmsTransport.php - escape phone number
8620e828a7 * LightSmsTransport.php - move timestamp
66c34baf03 Update README.md
2e0e1d733d Update README.md
7b51e0dd7f Update src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php
079406ed3d Update src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php
0e41bc9186 Update src/Symfony/Component/Notifier/Bridge/LightSms/Tests/LightSmsTransportFactoryTest.php
3d0d79cfe2 Update src/Symfony/Component/Notifier/Bridge/LightSms/Tests/LightSmsTransportFactoryTest.php
e0a68bd0ac Update src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php
1b073c2366 Update src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php
b0891be0b2 Update src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php
49b4780f40 Update src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php
b2e46387b7 Update src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php
c02dbbd963 Update src/Symfony/Component/Notifier/Bridge/LightSms/README.md
9f89014d94 Update src/Symfony/Component/Notifier/Bridge/LightSms/README.md
5e54dfe475 * LightSmsTransport.php - quick fix for private constant.
3cbbc85e43 * HOST split into two parts
9e1809e6ae * small changes
febff4613d Update src/Symfony/Component/Notifier/Bridge/LightSms/LICENSE
4a11b945a3 * github account author
728a3e2450 * Transport.php - missing use
ce41756a6c * notifier_transports.php - Coding Standard
d1ccd46e75 * Attached file changes which are required to run the lightsms notifier
a0fae7dc4a * tests
15686c0851 * LightSmsTransport.php - Coding Standard
2f65b92cba * LightSmsTransport.php - Coding Standard
6792535a52 * composer.json - requirements bug fix
167f325f40 * LightSmsTransport.php - logic error
be8f994fca * LightSmsTransport.php - return type
f2ba226b46 * LightSmsTransport.php - bug fix
b075c0eae2 * LightSms notifier
2021-04-06 12:32:50 +02:00
Robin Chalas
de143497ff minor #40671 [Notifier] Mercure bridge: bump mercure dependency to 0.5 (azjezz, mtarld)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Notifier] Mercure bridge: bump mercure dependency to 0.5

| Q             | A
| ------------- | ---
| Branch?       | 5.x
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/15179

Bump Mercure bridge's `symfony/mercure` dependency to 0.5 to deal with hubs instead of publishers.

---
To be able to use `HandlerRegistry::all` method, this PR needs https://github.com/symfony/mercure/pull/50 to be merged and released.

Commits
-------

498f96f1a8 Drop support of mercure:^0.4
d3306fdc92 add support for symfony/mercure:^0.5
2021-04-06 12:24:06 +02:00
Vasilij Dusko | CREATION
37c665eb5c * LightSmsTransport.php - make fabbot happy 2021-04-06 13:22:50 +03:00
Vasilij Dusko | CREATION
68a12fa4f4 * fix tests 2021-04-06 13:18:17 +03:00
Vasilij Dusko | CREATION
f1f83b9e5c * LightSmsTransport.php - use query string parameters 2021-04-06 13:12:05 +03:00
Vasilij Dusko | CREATION
026dcd97a9 * LightSmsTransport.php - isset 2021-04-06 13:09:30 +03:00
Vasilij Dusko | CREATION
2a9ac2d92a * LightSmsTransport.php - fix 2021-04-06 13:06:59 +03:00
Mathias Arlaud
498f96f1a8 Drop support of mercure:^0.4 2021-04-06 11:32:33 +02:00
Christian Flothmann
e357dbb173 bug #40679 [Debug][ErrorHandler] Avoid warning with Xdebug 3 with develop mode disabled (Jean85)
This PR was merged into the 4.4 branch.

Discussion
----------

[Debug][ErrorHandler] Avoid warning with Xdebug 3 with develop mode disabled

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

As reported in #40677, this fix is needed when Xdebug 3 is enabled but its `develop` mode is off.

Commits
-------

0e0639b129 Avoid warning with Xdebug 3 with develop mode disabled
2021-04-06 09:22:26 +02:00
Alexander M. Turek
c11666264d [Serializer] Construct annotations using named arguments 2021-04-05 19:03:11 +02:00
Alexander M. Turek
3ca3de50c3 Merge branch '5.2' into 5.x
* 5.2:
  improve dx and document auth exception
2021-04-05 17:16:47 +02:00
Wouter de Jong
2ad08d5a02 minor #40672 [Security] [Passport] improve dx and document AuthenticationException (jrushlow)
This PR was merged into the 5.2 branch.

Discussion
----------

[Security] [Passport] improve dx and document AuthenticationException

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

`Passport::getUser()` (Instance of `UserPassportInterface::class`) throws an `AuthenticationException::class`
 if a user does not exist. Let's document that for better DX and visibility.

Use case:

- User login w/ a `username` that does not exist (custom json authenticator)
- Attempt Authentication...
- Auth failed `LoginFailureEvent` dispatched
- snippet below:
```php
// Userland\LoginFailureEventSubscriber::class

public function dispatchFailure(LoginFailureEvent $event): void
{
   $user = $event->getPassport()->getUser();

   $message = new UserlandMessage($user);

  $this->messageBus->dispatch($message);
}
```
- `401` status is returned.

The above subscriber fails silently because a `UsernameNotFoundException` was ultimately thrown from `UserBadge::getUser()`.

Commits
-------

97ceba0f5d improve dx and document auth exception
2021-04-05 14:32:26 +02:00
Vasilij Dusko
4213564be1 * composer.json - fix Fabien comment from another pull request #40646 2021-04-05 15:00:41 +03:00
Alexandre Daubois
d5f8c887a2 [Yaml] Fixed infinite loop when parser goes through an additional and invalid closing tag
Instead of letting the parser goes in an infinite loop, throw an exception when the additional and invalid is found
2021-04-05 12:16:45 +02:00
Wouter de Jong
01c3bf9604 [Security] Add concept of required passport badges
A badge on a passport is a critical security element, it determines which
security checks are run during authentication. Using the `required_badges`
setting, applications can make sure the expected security checks are run.
2021-04-05 11:07:23 +02:00
Oskar Stark
712100924d minor #40696 [Mailer][Notifier] added missing gitattributes and gitignore (iamvar)
This PR was merged into the 5.3-dev branch.

Discussion
----------

[Mailer][Notifier] added missing gitattributes and gitignore

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

just added missing .gitattributes and .gitignore to be consistent with other components

Commits
-------

00ac6d4b45 added missing gitattributes and gitignore
2021-04-04 17:37:30 +02:00
Antoine Makdessi
fbd4cb2671
Update README.md 2021-04-04 16:42:37 +02:00
Alexander M. Turek
51c0c5a1bf Merge branch '5.2' into 5.x
* 5.2:
  added missing gitattributes and gitignore
  allow CurlHttpClient on Windows
  [Security] Mark ExpiredLoginLinkStorage as experimental
  remove references to "Silex"
2021-04-04 14:44:25 +02:00
Alexander M. Turek
58fa56f359 Merge branch '4.4' into 5.2
* 4.4:
  allow CurlHttpClient on Windows
  remove references to "Silex"
2021-04-04 14:43:53 +02:00
Alexander M. Turek
09866a3b76 minor #40693 [Security] Mark ExpiredLoginLinkStorage as experimental (Nyholm)
This PR was merged into the 5.2 branch.

Discussion
----------

[Security] Mark ExpiredLoginLinkStorage as experimental

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

We missed marking this as experimental together with the other "LoginLink" features.

This PR follows the discussion in https://github.com/symfony/symfony/pull/40145/files#r589072524

Commits
-------

76a88f2211 [Security] Mark ExpiredLoginLinkStorage as experimental
2021-04-04 14:42:57 +02:00
Alexander M. Turek
3b1948fe72 bug #40702 [HttpClient] allow CurlHttpClient on Windows (n0rbyt3)
This PR was merged into the 4.4 branch.

Discussion
----------

[HttpClient] allow CurlHttpClient on Windows

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

Even if you don't set curl options or openssl cert options on Windows in ```php.ini```, you should be able to use ```CurlHttpClient``` if ```cafile``` or ```capath``` options are set as default options as they will override the options in ```php.ini```.

Commits
-------

6609a175f2 allow CurlHttpClient on Windows
2021-04-04 14:33:28 +02:00
Vasilij Dusko
21e972a69e * coding standard 2021-04-04 10:54:22 +03:00