Skip to content

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

Closed
wants to merge 4 commits into from
Closed

Added the initial documentation #13

wants to merge 4 commits into from

Conversation

javiereguiluz
Copy link
Member

No description provided.


[1]: https://github.com/sensiolabs/SensioGeneratorBundle
[2]: https://symfony.com/doc/current/setup/flex.html
[3]: Resources/doc/index.rst
Copy link
Member

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.

Copy link
Member Author

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

// ...
}

Finally, implement the methods requires by the ``AbstractCommand`` class::
Copy link
Member

Choose a reason for hiding this comment

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

required

// 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']));
Copy link
Member

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
Copy link
Member

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

[...]

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.

Copy link
Member Author

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'

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? 😃

Copy link
Member Author

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.


.. code-block:: terminal

$ php bin/console make:
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

It works ... but it's not pretty:

command-1

Your proposal is much better (although the output is a bit noisy):

command-2

------------------------

In case your applications need to generate custom boilerplate code, you can
create your own ``make: ...`` command reusing the tools provided by this bundle.
Copy link
Member

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:

@fabpot
Copy link
Member

fabpot commented Nov 18, 2017

Thank you @javiereguiluz.

@fabpot fabpot closed this in 3a9484f Nov 18, 2017
@xabbuh xabbuh deleted the add_docs branch November 18, 2017 08:47
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