Commit Graph

67 Commits

Author SHA1 Message Date
Nicolas Grekas
8ea7c26326 Merge branch '5.0'
* 5.0: (27 commits)
  Fix versions
  [Security/Http] Allow setting cookie security settings for delete_cookies
  [DI] fix generating TypedReference from PriorityTaggedServiceTrait
  [FrameworkBundle] revert to legacy wiring of the session when circular refs are detected
  bumped Symfony version to 3.4.40
  updated VERSION for 3.4.39
  update CONTRIBUTORS for 3.4.39
  updated CHANGELOG for 3.4.39
  [DomCrawler] Fix BC break in assertions breaking Panther
  [BrowserKit] fixed missing post request parameters in file uploads
  update Italian translation
  [Validator] Add missing Hungarian translations
  [Validator] Add the missing translations for the Arabic (ar) locale
  [Validator] Add missing vietnamese translations
  [Console] Fix OutputStream for PHP 7.4
  add missing gitattributes for phpunit-bridge
  add German translations
  Bump Symfony version to 5.0.7
  Update VERSION for 5.0.6
  Update CHANGELOG for 5.0.6
  ...
2020-03-30 13:43:41 +02:00
Fabien Potencier
f5ff33c935 Merge branch '4.4' into 5.0
* 4.4:
  add missing gitattributes for phpunit-bridge
  Bump Symfony version to 4.4.7
  Update VERSION for 4.4.6
  Update CHANGELOG for 4.4.6
2020-03-27 17:56:45 +01:00
Fabien Potencier
0076ed5752 feature #36154 [Notifier][Slack] Add fields on Slack Section block (birkof)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Notifier][Slack] Add fields on Slack Section block

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       |  <!-- prefix each issue number with "Fix #", if any -->
| 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 master.
-->
Added `fields` field on section block.
> An array of text objects. Any text objects included with fields will be rendered in a compact format that allows for 2 columns of side-by-side text. Maximum number of items is 10. Maximum length for the text in each item is 2000 characters.

Example of use:
```
$slackOptions = (new SlackOptions())
            ->block((new SlackSectionBlock())->text('My message'))
            ->block(new SlackDividerBlock())
            ->block(
                (new SlackSectionBlock())
                    ->field('*Max Rating*')
                    ->field('5.0')
                    ->field('*Min Rating*')
                    ->field('1.0')
            );
```

Expected output:

<img width="677" alt="Screen Shot 2020-03-21 at 09 57 36" src="https://user-images.githubusercontent.com/65848/77222314-b8360c80-6b5a-11ea-874c-2cfb1829f839.png">

Commits
-------

faad197e85 Added fields on Slack Section block
2020-03-23 09:59:47 +01:00
Daniel STANCU
faad197e85 Added fields on Slack Section block 2020-03-21 09:46:58 +02:00
Nicolas Grekas
c650fe6dfc minor #35945 Leverage PHP8's get_debug_type() (nicolas-grekas)
This PR was merged into the 5.1-dev branch.

Discussion
----------

Leverage PHP8's get_debug_type()

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

See https://github.com/symfony/polyfill/pull/226 for background.

We might have to port part of the patch to 4.4 when we'll work on having it support PHP 8, but that's not needed for now.

Commits
-------

daf1c6605e Leverage PHP8's get_debug_type()
2020-03-16 18:33:00 +01:00
Nicolas Grekas
daf1c6605e Leverage PHP8's get_debug_type() 2020-03-16 17:46:21 +01:00
Fabien Potencier
313d865456 Merge branch '5.0'
* 5.0:
  [Notifier] Add tests for AbstractChannel and ChannelPolicy
2020-03-16 17:00:50 +01:00
Fabien Potencier
16ed2b9f7d minor #35847 [Notifier] Add unit tests (jschaedl)
This PR was merged into the 5.0 branch.

Discussion
----------

[Notifier] Add unit tests

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | - <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

- [x] `AbstractChannel`
- [x] `ChannelPolicy`
- [x] `RecipientTest` (done in PR #35773)
- [x] `EmailRecipientTest` (done in PR #35773)
- [x] `SmsRecipientTest` (done in PR #35773)
- [x] `Transports` (see PR #35834)

Commits
-------

022c1707e2 [Notifier] Add tests for AbstractChannel and ChannelPolicy
2020-03-16 14:29:03 +01:00
Fabien Potencier
c46d7027e5 Add missing dots at the end of exception messages 2020-03-15 15:54:58 +01:00
Fabien Potencier
d6dd06ba89 Merge branch '5.0'
* 5.0:
  Add missing dots at the end of exception messages
  Add missing dots at the end of exception messages
  [DI][Form] Fixed test suite (TimeType changes & unresolved merge conflict)
  Fix bad merge
  Add missing dots at the end of exception messages
2020-03-15 15:51:35 +01:00
Fabien Potencier
81cf96749b Add missing dots at the end of exception messages 2020-03-15 15:37:05 +01:00
Jan Schädlich
022c1707e2 [Notifier] Add tests for AbstractChannel and ChannelPolicy 2020-03-08 10:15:54 +01:00
Nicolas Grekas
c56cf2da5d Merge branch '5.0'
* 5.0:
  minor #35833 [FrameworkBundle] Add missing items in the unused tag pass whitelist (fabpot)
  [HttpClient][DX] Add URL context to JsonException messages
  [Routing] Improve localized routes performances
  [4.4][DoctrineBridge] Use new Types::* constants and support new json type
  [Validator] Add missing translations
  [Notifier] Dispatch message event in null transport
  [Messenger] Use Doctrine DBAL new Types::* constants
2020-02-25 15:29:12 +01:00
Fabien Potencier
8b819ba442 bug #35841 [Notifier] Dispatch message event in null transport (jschaedl)
This PR was squashed before being merged into the 5.0 branch.

Discussion
----------

[Notifier] Dispatch message event in null transport

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | - <!-- prefix each issue number with "Fix #", if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

I think we should be able to log notifications via the `NotificationLoggerListener` even if they were sent to a null transport. The mailer component does it the same way.

Commits
-------

a0d99ce398 [Notifier] Dispatch message event in null transport
2020-02-24 18:03:22 +01:00
Jan Schädlich
a0d99ce398 [Notifier] Dispatch message event in null transport 2020-02-24 18:03:13 +01:00
Nicolas Grekas
c231214e59 Merge branch '5.0'
* 5.0: (28 commits)
  [DoctrineBridge] Use new Types::* constants and support new json type
  Fix bad merge in README of Nexmo Notifier bridge
  [Debug][ErrorHandler] improved deprecation notices for methods new args and return type
  [BrowserKit] Nested file array prevents uploading file
  [ExpressionLanguage] Fixed collisions of character operators with object properties
  remove usage of already deleted Symfony\Component\EventDispatcher\Event
  [Notifier] Add correct tags for NullTransportFactory
  [Validator] Remove specific check for Valid targets
  [PhpUnitBridge] Use trait instead of extending deprecated class
  Fix versioned namespace clears
  fix remember me
  Use strict assertion in asset tests
  [DoctrineBridge][DoctrineExtractor] Fix indexBy with custom and some core types
  Do not rely on the current locale when dumping a Graphviz object
  fix typo
  [Ldap] force default network timeout
  [Config] don't throw on missing excluded paths
  Docs: Typo, grammar
  [Validator] Add the missing translations for the Polish ("pl") locale
  [PhpUnitBridge] Add compatibility to PHPUnit 9 #35662
  ...
2020-02-24 16:14:17 +01:00
Fabien Potencier
f4332cb109 Merge branch '5.0'
* 5.0:
  [FrameworkBundle] Skip notifiers tags in UnusedTagsPass
  [Notifier] Remove not needed argument $bus in BrowserChannel::notify()
2020-02-24 14:39:20 +01:00
Jacek Jędrzejewski
a8d0c5b1d7
Fix bad merge in README of Nexmo Notifier bridge 2020-02-23 20:22:26 +01:00
Jan Schädlich
ab4123ce68 [Notifier] Remove not needed argument $bus in BrowserChannel::notify() 2020-02-18 13:11:08 +01:00
Iliya Miroslavov Iliev
db6d360be8 [Notifier] added Sinch texter transport 2020-02-17 17:10:29 +01:00
bastien
9f31581fd8 time ( void ) : int
no need to cast
2020-02-15 11:25:26 +01:00
Fabien Potencier
5b1e3ddda9 Fix package names 2020-02-13 18:19:37 +01:00
Fabien Potencier
39f9ac2620 [Notifier] Simplify OVH implementation 2020-02-12 17:24:01 +01:00
Cyrille Bourgois
a49dead4e0
sms endpoint is only available in ovh-eu
Signed-off-by: Cyrille Bourgois <cyrille.bourgois@corp.ovh.com>
2020-02-12 14:30:49 +01:00
Antoine Leblanc
e65a8cffad
Remove deprecated endpoint
runabove has been closed.

Signed-off-by: Antoine Leblanc <antoine.leblanc@corp.ovh.com>
2020-02-12 12:02:15 +01:00
Fabien Potencier
acc98b775a Fix typos 2020-02-11 14:52:27 +01:00
Thomas Ferney
76bfb85e26 [Notifier] add OvhCloud bridge 2020-02-11 14:51:25 +01:00
Fabien Potencier
7e4abf5e9d feature #33968 [Notifier] Add Firebase bridge (Jeroeny)
This PR was squashed before being merged into the 5.1-dev branch (closes #33968).

Discussion
----------

[Notifier] Add Firebase bridge

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | See #33687
| License       | MIT

This would add [Firebase](https://firebase.google.com) integration for the Notifier component. With Firebase you can send push notifications to the users of you Android and iOS app and website (formerly known as Google Cloud messaging).

I'm not sure if it's possible to have this merged, like the other bridges. Or if I should create a stand-alone repository? That'd be fine too.

Also it's now using the `ChatMessage` as implementation of `Symfony\Component\Notifier\Message\MessageInterface`, but I feel like this component could use a `PushMessage` or something similar. Although I'm not sure if it would contain more than `subject` that the `ChatMessage` does.

Commits
-------

2776d2f811 [Notifier] Add Firebase bridge
2020-02-10 16:35:00 +01:00
Jeroeny
2776d2f811 [Notifier] Add Firebase bridge 2020-02-10 16:34:55 +01:00
Jeroeny
4869ef61cd [Notifier] add RocketChat bridge 2020-02-10 16:33:29 +01:00
Emanuele Panzeri
eaba6a507c Add Mattermost notifier bridge 2020-02-10 10:04:31 +01:00
Fabien Potencier
753d4a2639 feature #34747 [Notifier] Added possibility to extract path from provided DSN (espectrio)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Notifier] Added possibility to extract path from provided DSN

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #34746
| License       | MIT

I'm currently working on Microsoft Teams Webhook Notifier (https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using#setting-up-a-custom-incoming-webhook), and there is no way to provide DSN for it, because of missing parse_url()['path'] option

It looks like
`teams://outlook.office.com/webhook/{uuid}@{uuid}/IncomingWebhook/{id}/{uuid}`
and I'd like to be able to build Notifier Transport endpoint from it

Commits
-------

ab9b49b5c6 [Notifier] Added possibility to extract path from provided DSN
2020-02-04 14:19:51 +01:00
Fabien Potencier
c8725bf198 feature #35167 [Notifier] Remove superfluous parameters in *Message::fromNotification() (fancyweb)
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Notifier] Remove superfluous parameters in *Message::fromNotification()

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

Those classes are final so I think we don't need those extra arguments.

Commits
-------

d0dacf51e1 [Notifier] Remove superfluous parameters in *Message::fromNotification()
2020-02-04 14:11:37 +01:00
Fabien Potencier
f64f59a9c0 Fix CS 2020-02-04 10:47:34 +01:00
Fabien Potencier
c6d0a2a10e Merge branch '5.0'
* 5.0:
  Add missing use statements
  [Translation] Add missing use statement
  [Translation] Add missing use statement
  [Config][XmlReferenceDumper] Prevent potential \TypeError
  [Mailer] Fix broken mandrill http send for recipients with names
  [Translation] prefer intl domain when adding messages to catalogue
  Fix CS
  Fix CS
  Fail on empty password verification (without warning on any implementation)
  [Translation][Debug] Add installation and minimal example to README
  [Validator] try to call __get method if property is uninitialized
  Show both missing packages in the same error message
  Fix handling of empty_data's \Closure value in Date/Time form types
2020-02-04 08:41:44 +01:00
Fabien Potencier
85f793bec6 Merge branch '4.4' into 5.0
* 4.4:
  Add missing use statements
  [Translation] Add missing use statement
  [Translation] Add missing use statement
  [Config][XmlReferenceDumper] Prevent potential \TypeError
  [Mailer] Fix broken mandrill http send for recipients with names
  [Translation] prefer intl domain when adding messages to catalogue
  Fix CS
  Fix CS
  Fail on empty password verification (without warning on any implementation)
  [Translation][Debug] Add installation and minimal example to README
  [Validator] try to call __get method if property is uninitialized
  Show both missing packages in the same error message
  Fix handling of empty_data's \Closure value in Date/Time form types
2020-02-04 08:41:34 +01:00
Alireza Mirsepassi
c16ee4a894 [Notifier] Fix infinite loop on round robin transport 2020-01-30 16:19:41 +01:00
Nicolas Grekas
8acfd3a9d2 Merge branch '5.0'
* 5.0:
  [Debug] fix ClassNotFoundFatalErrorHandler
  [FrameworkBundle] Document the router.cache_class_prefix parameter removal
  [Routing] Fix using a custom matcher & generator dumper class
  [Notifier] Add more specific types at documentation level when php engine can't
  [Serializer] Fix cache in MetadataAwareNameConverter
  [Dotenv] Fixed infinite loop with missing quote followed by quoted value
  [HttpClient] Added missing sprintf
  [TwigBridge] button_widget now has its title attr translated even if its label = null or false
  [PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script
  [Messenger] Added check if json_encode succeeded
  [Messenger] Added check if json_encode succeeded
  [FrameworkBundle][ContainerLintCommand] Only skip .errored. services
  [HttpClient] fix exception in case of PSR17 discovery failure
  [DependencyInjection] Handle ServiceClosureArgument for callable in container linting
  fix processing chain adapter based cache pool
  [HttpKernel] release lock explicitly
  [Security] Prevent canceled remember-me cookie from being accepted
  [FrameworkBundle][TranslationUpdateCommand] Do not output positive feedback on stderr
  [Security\Guard] Fix missing typehints
  do not render preferred choices as selected
2020-01-08 18:33:57 +01:00
Philippe Segatori
b9931f571c [Notifier] Add more specific types at documentation level when php engine can't 2020-01-08 10:13:26 +01:00
Nicolas Grekas
b1bee60119 Merge branch '5.0'
* 5.0:
  Fix closing tag in mailer collector template
  [Notifier] Fix two minor issues
  [HttpClient] Don't read from the network faster than the CPU can deal with
  [DI] DecoratorServicePass should keep container.service_locator on the decorated definition
2020-01-06 14:05:24 +01:00
Thomas Calvet
4f80d4d639 [Notifier] Fix two minor issues 2020-01-06 11:24:48 +01:00
Thomas Calvet
d0dacf51e1 [Notifier] Remove superfluous parameters in *Message::fromNotification() 2020-01-06 11:21:21 +01:00
Nicolas Grekas
e9f0cfe9db Merge branch '5.0'
* 5.0: (31 commits)
  [HttpClient] NativeHttpClient should not send >1.1 protocol version
  [HttpClient] fix support for non-blocking resource streams
  [Mailer] Make sure you can pass custom headers to Mailgun
  [Mailer] Remove line breaks in email attachment content
  Update links to documentation
  [Validator] Add the missing translations for the Arabic (ar) locale
  ensure to expect no validation for the right reasons
  [Security-Guard] fixed 35203 missing name tag in param docblock
  [HttpClient] fix casting responses to PHP streams
  [PhpUnitBridge] Add test case for @expectedDeprecation annotation
  [PhpUnitBridge][SymfonyTestsListenerTrait] Remove $testsWithWarnings stack
  [FrameworkBundle] Fix getUser() phpdoc in AbstractController
  [Mailer] Fix addresses management in Sendgrid API payload
  [Mailer][MailchimpBridge] Fix missing attachments when sending via Mandrill API
  [Mailer][MailchimpBridge] Fix incorrect sender address when sender has name
  [HttpClient] fix capturing SSL certificates with NativeHttpClient
  Update year in license files
  Update year in license files
  [TwigBridge][Form] Added missing help messages in form themes
  Update year in license files
  ...
2020-01-04 15:20:45 +01:00
Jan Rosier
ef4426ae87 Update year in license files 2020-01-01 15:53:07 +01:00
Emanuele Panzeri
879ba76a6a Fix Nexmo notifier bridge namespace 2019-12-31 15:16:53 +01:00
Nicolas Grekas
392d0b01f3 Merge branch '5.0'
* 5.0: (24 commits)
  Removing unused variable
  Fixed #35084
  Add missing use statement
  [HttpClient] fix scheduling pending NativeResponse
  do not overwrite variable value
  [Profiler] wording
  Use spaces correctly to display options in DebugCommand
  Add supported schemes doc blocks type
  X-Accel Nginx URL updated
  ticket-30197 [Validator] Add the missing translations for the Chinese (Taiwan) ("zh_TW") locale
  Fixed test added in #35022
  Use locale_parse for computing fallback locales
  [Console] Fix filtering out identical alternatives when there is a command loader
  [String][UnicodeString] Remove unneeded flag in chunk regex pattern
  add note about HTTP status code change
  Migrate server:log command away from WebServerBundle
  [DependencyInjection][CheckTypeDeclarationsPass] Handle \Closure for callable
  [Security] Fix missing defaults for auto-migrating encoders
  bumped Symfony version to 5.0.3
  updated VERSION for 5.0.2
  ...
2019-12-28 16:12:20 +01:00
Philippe Segatori
9bf46f88fb Add supported schemes doc blocks type 2019-12-26 09:06:53 +01:00
Alexander M. Turek
c7e612d4ad [EventDispatcher] Deprecate LegacyEventDispatcherProxy. 2019-12-15 23:54:05 +01:00
Dmitry Pigin
ab9b49b5c6 [Notifier] Added possibility to extract path from provided DSN 2019-12-01 21:12:29 +02:00
Fabien Potencier
324272111c Merge branch '5.0'
* 5.0:
  Add missing use statement
  [Notifier] Add telegram tests
  [Notifier] Add Slack bridge tests
2019-12-01 10:14:14 +01:00