You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+13-4
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,7 @@ This section applies to any local, host OS or Docker project construction.
98
98
- The complete list is [here](https://www.php.net/manual/en/timezones.php).
99
99
4. On Windows, download and install [Composer Setup](https://getcomposer.org/Composer-Setup.exe)
100
100
and [Symfony Setup](https://get.symfony.com/cli/setup.exe).
101
-
5. Check that you got everything OK using `symfony check:requirements` in any directory. Ignore the *"Enable or install a PHP accelerator"* advice.
101
+
5. Check that you got everything OK using `symfony check:requirements` in any environement. Ignore the *"Enable or install a PHP accelerator"* advice in development.
102
102
6. Start from an empty directory, use `symfony new [your_project_directory_name]`.
103
103
7. Create a `README.md` file inside the root directory and put everything you can document inside, at least those sections:
104
104
- The **title** of the project.
@@ -218,6 +218,13 @@ twig:
218
218
- `base.html.twig`
219
219
7. Make sure **all** the files and directories under `/templates` use snake_case only for their filenames.
220
220
8. Add file input previews to all image fields using a `LiipImagineBundle` preset through a custom form theme (`add it in config/twig.yaml`).
221
+
9. Customize your error pages.
222
+
- The whole tutorial is in the documentation ([https://symfony.com/doc/current/controller/error_pages.html](https://symfony.com/doc/current/controller/error_pages.html)).
223
+
- This implies that you change at least the basic messages: HTTP 500, 404 and 403 (if you don't use them, you app seems weird or overcomfident).
224
+
- Basically, this simply means you need to create templates in `templates/bundles/TwigBundle/Exception`, don't forget to start with a generic one: `error.html.twig`.
225
+
- Test them during development (there's a simple way to do that, you don't need to generate the errors, the framework will create artificial routes for you)
226
+
- Use a friendly message for the content, put something nice (and funny, to compensante the sadness of viewing error pages), with jokes linked to your website contents.
227
+
- Include a way for people to go on browsing. You have to have all main navigation, menus and incentives to redirect users to the most common pages.
221
228
222
229
## 4. Produce your models
223
230
@@ -404,19 +411,20 @@ twig:
404
411
- `app.js`
405
412
- `bootstrap.js`
406
413
- `controllers.json`
407
-
4. Create a favicon and add its configuration to your `base.html.twig` and `assets/favicon/browserconfig.xml`.
414
+
4. Create a favicon and add its configuration to your `base.html.twig` and `assets/favicon/browserconfig.xml`. Use a favicon generator for that and a manifest file.
408
415
5. Create a default OpenGraph image for your site and put it in `assets/images` (name it `ogimage.jpg` if you copied the included files of this project).
409
416
6. Prepare an external shell script to start your project from your user home directory. See an example with `start-project` included scripts.
410
417
411
418
## 9. Pre-flight checks
412
419
413
420
1. Run `symfony check:security` to validate that your project has no known vulnerabilities from its dependencies.
414
-
2. Create a deployment script for your non-dev environments.
421
+
2. Check that you got everything OK using `symfony check:requirements` while on the production server (see above). This time, pay attention to OPCache (see below).
422
+
3. Create a deployment script for your non-dev environments.
415
423
- If you don't know what you're doing, use the one provided in this repository (`production-deployment.sh.dist`) for a start.
416
424
- On your non-dev environments, copy the `production-deployment.sh.dist` to `[environment]-deployment.sh`.
417
425
- Check that they're in the `.gitignore` and only on destination servers filesystems. Don't version the final ones.
418
426
- Use those scripts to clear OpCache and realpath caches.
419
-
3. Make sure your application only uses HTTPS. Your `config/services.yaml` should contain this:
427
+
4. Make sure your application only uses HTTPS. Your `config/services.yaml` should contain this:
420
428
421
429
```yaml
422
430
parameters:
@@ -485,6 +493,7 @@ parameters:
485
493
- Other browser warnings
486
494
23. Check that your services definitions are OK using `php bin/console lint:container`.
487
495
24. Unless your website ecosystem doesn't like it, configure your web server to use `SameSite / strict` cookies.
496
+
25. Define a custom (random) string for the `APP_SECRET` variable in your DotEnv file, one for each different environement.
0 commit comments