Skip to content

This is my first documentation PR.. #1471

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

Closed
wants to merge 9 commits into from
Closed

This is my first documentation PR.. #1471

wants to merge 9 commits into from

Conversation

armetiz
Copy link
Contributor

@armetiz armetiz commented Jun 18, 2012

Let me knonw for any change that I have to make.

Also,
The PHP Service declaration is missing, I don't know this syntax.

Regards

Additional information
----------------------

To begin with, change the ``TransportChain`` class:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to open a php bloc, you have to use double colon like

change the TransportChain class::

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it's ok right now,

{
public function process(ContainerBuilder $container)
{
if (false === $container->hasDefinition('acme_mailer.transport_chain')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should use ! instead of false ===

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have copied / pasted the TransportChain definition. See the beginning of this page.

return;
}

$definition = $container->getDefinition('acme_mailer.transport_chain');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong as it forbids using the same tag several times (as you only read the first tag)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the problem ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, you edited the PR after I loaded the page but before I commented, so the comments are in the wrong place. This one should be on the line 235

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like my previous comment, I don't understand the problem with this.. I have take this part of code inside a Sensio or a FOS Bundle I don't remember.

@armetiz
Copy link
Contributor Author

armetiz commented Jun 18, 2012

I don't know how to deal with the ".. configuration-block::". Do you have any clue ? Because this part isn't display.

@@ -157,3 +157,86 @@ run when the container is compiled::

$container = new ContainerBuilder();
$container->addCompilerPass(new TransportCompilerPass);

Adding additional attributes on tags
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the case to be:

Adding additional Attributes on Tags

The rough rule is to capitalize nouns.

}
}

Take care of ``$attributes`` variable. Because you can use the same tag many times on the same service, ``$attributes`` is an array of attributes for each tag that refers to the same service.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like what you're doing here, but I think we can explain what this $attributes variable is even more. Specifically, $attributes is an array of all of the tag details for each acme_mailer.transport tag that the service has (because a service may be tagged multiple times with the same tag). With a few more details, I think we'll have a better idea of why we have 2 foreach nested statements here.

Also, be sure to break your line after the first word that crosses the 72nd character :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm quite limited with this...
Do I have to add a other example with 2 TransportChain with the same tag ?

@weaverryan
Copy link
Member

Hey Thomas!

Great PR man, and welcome to the docs :). I've just added a few more comments - but everything is looking great.

Thanks!


Change the service delaration:

.. configuration-block::
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how to deal with ...configuration-block.. do you have any clue ?

weaverryan added a commit that referenced this pull request Jul 3, 2012
@weaverryan
Copy link
Member

Hey Thomas!

Thanks for the excellent PR and updates. Since this is not a new feature to Symfony 2.1, I've patched this into the 2.0 branch. I've also made a few small tweaks at sha: 1c98e4c

Thanks!

@weaverryan weaverryan closed this Jul 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants