Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#3940] Adding php example for an array of emails #4135

Merged
merged 1 commit into from
Aug 16, 2014

Conversation

weaverryan
Copy link
Member

This follows #3940. It just adds the example also to PHP. But I can't see how this would work with XML.

Q A
Doc fix? yes
New docs? no
Applies to 2.3+
Fixed tickets

Thanks!

@xabbuh
Copy link
Member

xabbuh commented Aug 16, 2014

I guess this is actually not possible with XML since you can't set an attribute multiple times.

@wouterj
Copy link
Member

wouterj commented Aug 16, 2014

This should work:

<monolog:config>
    <monolog:handler name="swift" ...>
        <monolog:to-email>[email protected]</monolog:to-email>
        <monolog:to-email>[email protected]</monolog:to-email>
    </monolog:handler>
</monolog:config>

(iirc, the XML parser doesn't parse elements or attributes differently, you can replace all attributes by elements)

@xabbuh
Copy link
Member

xabbuh commented Aug 16, 2014

@wouterj The issue is that the MonologBundle XML schema doesn't allow to-email elements: https://github.com/symfony/MonologBundle/blob/master/Resources/config/schema/monolog-1.0.xsd#L18-28

@wouterj
Copy link
Member

wouterj commented Aug 16, 2014

@xabbuh then someone should fix that. If we don't put the scheme in schemeLocation, it'll not be validated and work perfectly

@xabbuh
Copy link
Member

xabbuh commented Aug 16, 2014

@wouterj I'm preparing a pull request on the MonologBundle.

@xabbuh
Copy link
Member

xabbuh commented Aug 16, 2014

see symfony/monolog-bundle#91

@weaverryan
Copy link
Member Author

Nice work @xabbuh! I think we should merge this and then update the docs later after that code PR is merged. Make sense?

@xabbuh
Copy link
Member

xabbuh commented Aug 16, 2014

@weaverryan I'm fine with that. We can update the XML example once the pull request on the MonologBundle is merged.

@weaverryan
Copy link
Member Author

Thanks for the quick responses guys!

@weaverryan weaverryan merged commit 0366d6e into 2.3 Aug 16, 2014
weaverryan added a commit that referenced this pull request Aug 16, 2014
…ryan)

This PR was merged into the 2.3 branch.

Discussion
----------

[#3940] Adding php example for an array of emails

This follows #3940. It just adds the example also to PHP. But I can't see how this would work with XML.

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.3+
| Fixed tickets |

Thanks!

Commits
-------

0366d6e [#3940] Adding php example for an array of emails
@weaverryan weaverryan deleted the monolog-multiple-emails branch August 16, 2014 19:37
stof added a commit to symfony/monolog-bundle that referenced this pull request Aug 18, 2014
This PR was merged into the 2.1.x-dev branch.

Discussion
----------

make it possible to use multiple to_email in XML

The Configuration class allows to configure more than one recipient (see symfony/symfony-docs#4135). Since the ``to_email`` field was configured as an attribute in XML configurations, it couldn't be specified multiple times.

Commits
-------

44505b6 make it possible to use multiple to_email in XML
weaverryan added a commit that referenced this pull request Aug 25, 2014
… configs (xabbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

[Cookbook][Logging] document multiple recipients in XML configs

| Q             | A
| ------------- | ---
| Doc fix?      | no
| New docs?     | yes (symfony/monolog-bundle#91)
| Applies to    | all
| Fixed tickets | #3940, #4135

Commits
-------

37ab23d document multiple recipients in XML configs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants