-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[4.0] Setup & Page Creation updates #8544
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
Closed
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
57918e4
WIP
weaverryan efb7b50
updating page_creation and setup for 4.0
weaverryan 5cd1e20
Changes thanks to Javier
weaverryan f727f17
Fixing build issues
weaverryan 771f41c
last tweaks
weaverryan 17d1a10
Fixes thanks to Wouter
weaverryan 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
Changes thanks to Javier
- Loading branch information
8000
commit 5cd1e20f8415b3e82d9b8c0a03875de93471f067
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 |
---|---|---|
|
@@ -60,7 +60,9 @@ random) number and prints it. To do that, create a "Controller class" and a | |
} | ||
} | ||
|
||
To map a URL to this controller, create a route in ``config/routes.yaml``: | ||
Now you need to associate this controller function with a public URL (e.g. ``/lucky/number``) | ||
so that the ``number()`` method is executed when a user browses to it. This association | ||
is defined by creating a **route** in the ``config/routes.yaml`` file: | ||
|
||
.. code-block:: yml | ||
|
||
|
@@ -106,7 +108,7 @@ the annotation route import at the bottom: | |
resource: ../src/Controller/ | ||
type: annotation | ||
|
||
After this one-time setup, you can nowadd your route directly *above* the controller: | ||
After this one-time setup, you can now add your route directly *above* the controller: | ||
|
||
.. code-block:: diff | ||
|
||
|
@@ -139,11 +141,12 @@ special things happened, both thanks to a powerful Composer plugin called | |
First, ``annotations`` isn't a real package name: it's an *alias* (i.e. shortcut) | ||
that Flex resolves to ``sensio/framework-extra-bundle``. | ||
|
||
Second, after this package was downloaded, Flex executed a *recipe*, which automatically | ||
enabled the bundle. Flex recipes exist for many packages (not just bundles) and have | ||
have the ability to do a lot, like adding configuration files, creating directories, | ||
updating ``.gitignore`` and adding new config to your ``.env`` file. Flex *automates* | ||
the installation of packages so you can get back to coding. | ||
Second, after this package was downloaded, Flex executed a *recipe*, which is a | ||
set of automated instructions that tell Symfony how to integrate an external | ||
package. Flex recipes exist for many packages (not just bundles) and have the | ||
ability to do a lot, like adding configuration files, creating directories, | ||
updating ``.gitignore`` and adding new config to your ``.env`` file. Flex | ||
*automates* the installation of packages so you can get back to coding. | ||
|
||
You can learn more about Flex by reading ":doc:`/setup/flex`". But that's not necessary: | ||
Flex works automatically in the background when you add packages. | ||
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. This is probably the time to link to http://symfony.sh ? |
||
|
@@ -239,7 +242,7 @@ variable so you can use it in Twig:: | |
} | ||
} | ||
|
||
Template files live in the ``templates/`` directory, which was created for your automatically | ||
Template files live in the ``templates/`` directory, which was created for you automatically | ||
when you installed Twig. Create a new ``templates/lucky`` directory with a new | ||
``number.html.twig`` file inside: | ||
|
||
|
@@ -265,7 +268,7 @@ project: | |
|
||
``config/`` | ||
Contains... configuration of course!. You will configure routes, :doc:`services </service_container>` | ||
and pckages. | ||
and packages. | ||
|
||
``src/`` | ||
All your PHP code lives here. | ||
|
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
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.
One last comment on my side. In this paragraph we mention "bundles" for the first time and without prior introduction ("[...] Flex recipes exist for many packages (not just bundles) and have [...]"). Given that bundles are not important in this article, we could remove this mention. Thanks!