Skip to content

Updated Bundles Best Practices for Symfony 4 #8616

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

Merged
merged 3 commits into from
Nov 16, 2017

Conversation

javiereguiluz
Copy link
Member

No description provided.

@javiereguiluz javiereguiluz added this to the 4.0 milestone Nov 10, 2017
Installation
------------

Bundles must define a `Symfony Flex recipe`_ to automate their integration
Copy link
Member

Choose a reason for hiding this comment

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

This seems way to strict and unwanted in my opinion. You only need to add a flex recipe if you need logic to be executed when installing your bundle. Otherwise, type: symfony-bundle is enough to have auto registration.

We shouldn't want to have many empty manifests in the contrib repository.

Copy link
Member

Choose a reason for hiding this comment

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

I agree. How about:

Bundles should set ``"type": "symfony-bundle"`` in their ``composer.json`` file. With this,
`Symfony Flex`_ will be able to automatically enable your bundle when it's installed.

If your bundle requires any setup (e.g. configuration, new files, changes to `.gitignore`, etc),
then you should create a `Flex recipe`_.


Open a command console, enter your project directory and execute:

.. code-block:: terminal
Copy link
Member

Choose a reason for hiding this comment

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

We have to use bash here, as terminal is a special Symfony docs only lexer.

Installation
------------

Bundles must define a `Symfony Flex recipe`_ to automate their integration
Copy link
Member

Choose a reason for hiding this comment

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

I agree. How about:

Bundles should set ``"type": "symfony-bundle"`` in their ``composer.json`` file. With this,
`Symfony Flex`_ will be able to automatically enable your bundle when it's installed.

If your bundle requires any setup (e.g. configuration, new files, changes to `.gitignore`, etc),
then you should create a `Flex recipe`_.

@weaverryan weaverryan merged commit 9e6d75d into symfony:master Nov 16, 2017
weaverryan added a commit that referenced this pull request Nov 16, 2017
This PR was squashed before being merged into the master branch (closes #8616).

Discussion
----------

Updated Bundles Best Practices for Symfony 4

Commits
-------

9e6d75d Fixes by reviewers
1f433da Fixed a missing reference
7f00345 Updated Bundles Best Practices for Symfony 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants