Skip to content

Commit 564b58c

Browse files
committed
performance updates
1 parent e6e6076 commit 564b58c

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

README.md

+13-4
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ This section applies to any local, host OS or Docker project construction.
9898
- The complete list is [here](https://www.php.net/manual/en/timezones.php).
9999
4. On Windows, download and install [Composer Setup](https://getcomposer.org/Composer-Setup.exe)
100100
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.
102102
6. Start from an empty directory, use `symfony new [your_project_directory_name]`.
103103
7. Create a `README.md` file inside the root directory and put everything you can document inside, at least those sections:
104104
- The **title** of the project.
@@ -218,6 +218,13 @@ twig:
218218
- `base.html.twig`
219219
7. Make sure **all** the files and directories under `/templates` use snake_case only for their filenames.
220220
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.
221228

222229
## 4. Produce your models
223230

@@ -404,19 +411,20 @@ twig:
404411
- `app.js`
405412
- `bootstrap.js`
406413
- `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.
408415
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).
409416
6. Prepare an external shell script to start your project from your user home directory. See an example with `start-project` included scripts.
410417

411418
## 9. Pre-flight checks
412419

413420
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.
415423
- If you don't know what you're doing, use the one provided in this repository (`production-deployment.sh.dist`) for a start.
416424
- On your non-dev environments, copy the `production-deployment.sh.dist` to `[environment]-deployment.sh`.
417425
- Check that they're in the `.gitignore` and only on destination servers filesystems. Don't version the final ones.
418426
- 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:
420428

421429
```yaml
422430
parameters:
@@ -485,6 +493,7 @@ parameters:
485493
- Other browser warnings
486494
23. Check that your services definitions are OK using `php bin/console lint:container`.
487495
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.
488497

489498
## 10. Dockerize your project
490499

0 commit comments

Comments
 (0)