-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Conversation
I guess this is actually not possible with XML since you can't set an attribute multiple times. |
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) |
@wouterj The issue is that the MonologBundle XML schema doesn't allow |
@xabbuh then someone should fix that. If we don't put the scheme in schemeLocation, it'll not be validated and work perfectly |
@wouterj I'm preparing a pull request on the MonologBundle. |
Nice work @xabbuh! I think we should merge this and then update the docs later after that code PR is merged. Make sense? |
@weaverryan I'm fine with that. We can update the XML example once the pull request on the MonologBundle is merged. |
Thanks for the quick responses guys! |
…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
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
… 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
This follows #3940. It just adds the example also to PHP. But I can't see how this would work with XML.
Thanks!