Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.

Commit

Permalink
Merge a5377de into 21dcea4
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Feb 5, 2020
2 parents 21dcea4 + a5377de commit 12dd65f
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 14 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/lint.yaml
@@ -0,0 +1,14 @@
on: [push, pull_request]
name: Lint
jobs:
doctor-rst:
name: DOCtor-RST
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: DOCtor-RST
uses: docker://oskarstark/doctor-rst
with:
args: --short
env:
DOCS_DIR: 'docs/'
4 changes: 2 additions & 2 deletions .github/workflows/stale.yml
Expand Up @@ -18,12 +18,12 @@ jobs:
days-before-stale: 180
repo-token: "${{ secrets.GITHUB_TOKEN }}"
exempt-issue-label: "keep"
stale-issue-label: "pending author"
stale-issue-label: "stale"
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
stale-pr-label: "pending author"
stale-pr-label: "stale"
stale-pr-message: >
This PR has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
Expand Down
32 changes: 32 additions & 0 deletions docs/.doctor-rst.yaml
@@ -0,0 +1,32 @@
rules:
blank_line_after_directive: ~
short_array_syntax: ~
typo: ~
replacement: ~
composer_dev_option_at_the_end: ~
yarn_dev_option_at_the_end: ~
versionadded_directive_should_have_version: ~
no_composer_req: ~
no_php_open_tag_in_code_block_php_directive: ~
blank_line_after_filepath_in_code_block: ~
no_php_prefix_before_bin_console: ~
use_deprecated_directive_instead_of_versionadded: ~
no_space_before_self_xml_closing_tag: ~
no_explicit_use_of_code_block_php: ~
ensure_order_of_code_blocks_in_configuration_block: ~
american_english: ~
valid_use_statements: ~
extend_abstract_admin: ~
final_admin_class: ~
final_admin_extension_classes: ~
no_admin_yaml: ~
no_bash_prompt: ~
no_composer_phar: ~
no_inheritdoc: ~

# can be enabled when no Symfony 3.4 support anymore
#yaml_instead_of_yml_suffix: ~
#no_app_bundle: ~
#no_config_yaml: ~
#kernel_instead_of_app_kernel: ~
#no_app_console: ~
4 changes: 1 addition & 3 deletions docs/reference/installation.rst
Expand Up @@ -116,9 +116,7 @@ Now, add the new ``Application`` Bundle into the ``bundles.php``::
App\Application\Sonata\NotificationBundle\ApplicationSonataNotificationBundle::class => ['all' => true],
];

And configure ``SonataNotificationBundle`` to use the newly generated Message class:

.. code-block:: php
And configure ``SonataNotificationBundle`` to use the newly generated ``Message`` class::

# config/packages/sonata_notification.yaml

Expand Down
18 changes: 9 additions & 9 deletions docs/reference/usage.rst
Expand Up @@ -90,15 +90,6 @@ message is receive or created.

.. configuration-block::

.. code-block:: xml
<!-- config/services.xml -->
<service id="sonata.notification.consumer.logger" class="Sonata\NotificationBundle\Consumer\LoggerConsumer">
<argument type="service" id="logger" />
<tag name="sonata.notification.consumer" type="logger" />
</service>
.. code-block:: yaml
# config/services.yaml
Expand All @@ -110,6 +101,15 @@ message is receive or created.
tags:
- { name: sonata.notification.consumer, type: logger }
.. code-block:: xml
<!-- config/services.xml -->
<service id="sonata.notification.consumer.logger" class="Sonata\NotificationBundle\Consumer\LoggerConsumer">
<argument type="service" id="logger"/>
<tag name="sonata.notification.consumer" type="logger"/>
</service>
Now you can use the created service to send a message to the Symfony logger::

$this->get('sonata.notification.backend')->createAndPublish('logger', [
Expand Down

0 comments on commit 12dd65f

Please sign in to comment.