-
-
Notifications
You must be signed in to change notification settings - Fork 424
Added the initial documentation #13
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
Conversation
|
||
[1]: https://github.com/sensiolabs/SensioGeneratorBundle | ||
[2]: https://symfony.com/doc/current/setup/flex.html | ||
[3]: Resources/doc/index.rst |
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.
I would link to the rendered documentation on symfony.com instead. Reading reStructuredText files may not be much fun.
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.
Yes! We'll update this when/if docs are published on symfony.com
src/Resources/doc/index.rst
Outdated
// ... | ||
} | ||
|
||
Finally, implement the methods requires by the ``AbstractCommand`` class:: |
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.
required
src/Resources/doc/index.rst
Outdated
// Optionally, display some message after the generation of code | ||
protected function writeNextStepsMessage(array $params, ConsoleStyle $io) | ||
{ | ||
$io->text(sprintf('A new report was generated in %s file.', $params['filename'])); |
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.
[...] in the [...]
README.md
Outdated
@@ -3,5 +3,11 @@ SymfonyMakerBundle | |||
|
|||
Symfony Maker helps you creating empty commands, controllers, form classes, | |||
tests and more so you can forget about the required boilerplate code. This | |||
bundle replaces [SensioGeneratorBundle](https://github.com/sensiolabs/SensioGeneratorBundle) | |||
in modern Symfony applications. | |||
bundle replaces [SensioGeneratorBundle][1] in modern Symfony applications and |
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.
I'm sure we can claim that it replaces the generator bundle. At least, not yet as the main feature is CRUD generation, which this bundle does not do yet.
make:controller Creates a new controller class | ||
make:entity Creates a new Doctrine entity class | ||
|
||
[...] |
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.
What about to explicitly list all the commands here? We'd know exactly all that is possible to make only by reading the readme.
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.
I prefer to not do that to avoid having to maintain that list forever. This bundle just started, so we'll update this list of commands often ... and the less work we put on ourselves (e.g. maintaining this doc) the better.
.. code-block:: terminal | ||
|
||
$ cd your-project/ | ||
$ php bin/console make:command 'make:report' |
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.
Why not create a make:maker
command? 😃
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.
For the moment this is an "edge feature". If it gets popular, we would add it in the future.
src/Resources/doc/index.rst
Outdated
|
||
.. code-block:: terminal | ||
|
||
$ php bin/console make: |
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 command to run is php bin/console list make
. Yours does not work AFAIK.
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.
src/Resources/doc/index.rst
Outdated
------------------------ | ||
|
||
In case your applications need to generate custom boilerplate code, you can | ||
create your own ``make: ...`` command reusing the tools provided by this bundle. |
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.
I would remove the space aftermake:
Thank you @javiereguiluz. |
No description provided.