-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Added standard bundle installation instructions #4163
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
javiereguiluz
wants to merge
11
commits into
symfony:master
from
javiereguiluz:bundle_installation_instructions
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b297d29
First draft of the bundle installation instructions
javiereguiluz 11db860
Applied all the fixes and suggestions made by reviewers
javiereguiluz 21ce2c0
Fixed minor typo
javiereguiluz ed96447
More improvements based on reviewers' comments
javiereguiluz c39f7d3
Fixed some code formatting
javiereguiluz 322ec60
Removed the first person perspective and other minor fixes
javiereguiluz 4b29de2
More tweaks and fixes
javiereguiluz 41ce2a5
Minor fixes and tweaks
javiereguiluz 7a6644b
Removed the sidebar and made some minor tweaks
javiereguiluz 35dddba
Reworded a bit the installation instructions
javiereguiluz 7097070
Added the fixes suggested by Ryan
javiereguiluz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -194,6 +194,59 @@ Extensive documentation should also be provided in the | |
the ``Resources/doc/`` directory; the ``Resources/doc/index.rst`` file is | ||
the only mandatory file and must be the entry point for the documentation. | ||
|
||
Installation Instructions | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
In order to ease the installation of third-party bundles, consider using the | ||
following standardized instructions in your ``README.md`` file. | ||
|
||
.. code-block:: text | ||
|
||
Installation | ||
============ | ||
|
||
Step 1: Download the Bundle | ||
--------------------------- | ||
|
||
Open a command console, enter your project directory and execute the | ||
following command to download the latest stable version of this bundle: | ||
|
||
```bash | ||
$ composer require <package-name> "~1" | ||
``` | ||
|
||
This command requires you to have Composer installed globally, as explained | ||
in the [installation chapter](https://getcomposer.org/doc/00-intro.md) | ||
of the Composer documentation. | ||
|
||
Step 2: Enable the Bundle | ||
------------------------- | ||
|
||
Then, enable the bundle by adding the following line in the `app/AppKernel.php` | ||
file of your project: | ||
|
||
```php | ||
<?php | ||
// app/AppKernel.php | ||
|
||
// ... | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can remove this blank line. |
||
public function registerBundles() | ||
{ | ||
$bundles = array( | ||
// ... | ||
return new <vendor>\<bundle-name>\<bundle-long-name>(), | ||
); | ||
} | ||
``` | ||
|
||
This template assumes that your bundle is in its ``1.x`` version. If not, change | ||
the ``"~1"`` installation version accordingly (``"~2"``, ``"~3"``, etc.) | ||
|
||
Optionally, you can add more installation steps (*Step 3*, *Step 4*, etc.) to | ||
explain other required installation tasks, such as registering routes or | ||
dumping assets. | ||
|
||
Routing | ||
------- | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We can add a
// ...
here. What do you think?