-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
[Documentation] Fixtures bundle #5286
[Documentation] Fixtures bundle #5286
Conversation
pamil
commented
Jun 17, 2016
Q | A |
---|---|
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
Related tickets | bundle introduced in #5219, core fixtures in #5285 |
License | MIT |
options: ~ # Fixture options | ||
|
||
They implement ``Sylius\Bundle\FixturesBundle\Fixture\FixtureInterface`` and needs to be registered under | ||
``sylius_fixtures.fixture`` tag in order to be used in suite configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be worthy to present some example definition of service? Code of class and declaration in services.xml. It is explained pretty well, but example can be helpful for beginners. Same for the listener.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upcoming in the next sections :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Custom fixture section added.
7f43da2
to
c1f9afe
Compare
c1f9afe
to
65adc94
Compare
|
||
.. code-block:: yaml | ||
|
||
<service id="app.fixture.country" class="AppBundle\Fixture\Country"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CountryFixture
65adc94
to
5c59930
Compare
5c59930
to
a4b71ec
Compare
a4b71ec
to
981b351
Compare
priority: 0 # The higher priority is, the sooner the fixture will be executed | ||
options: ~ # Fixture options | ||
|
||
They implement ``Sylius\Bundle\FixturesBundle\Fixture\FixtureInterface`` and needs to be registered under |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... the Sylius\Bundle\FixturesBundle\Fixture\FixtureInterface
and need to be registered under the sylius_fixtures.fixture
tag ...
|
||
$this->countryManager->flush(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add docblocks in the examples? : D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, it will make listings unnecessarily longer and won't make anything clearer as those methods receives only typehinted parameters and usually does not return anything (except getName()
which is quite straightforward).
Only some corrections of articles, plus docblocks in code examples - for me looks really fine, clear and understandable! :) 👍 |
Thank you for so many great suggestions @TheMadeleine! 🎉 |
Nice! Thank you. 👍 |
I agree about skipping docblocks and not sure about <?php tag, if Symfony skips it, I think we can safely do it too! |