Edit on GitHub
Jump to docs navigation

Extending Bolt / Introduction

This chapter has information about the two major ways to write custom code for (and "on top of") Bolt. Namely, developing extensions as well as adding custom to a specific Bolt project.

As you undoubtedly have discovered by now, Bolt 5 is a Symfony application through and through. This means that for extending the functionality, we heavily borrow from the tools and ecosystem that the Symfony network provides.

  • Bolt extensions are true Composer packages. If you create a Bolt extension, you can add it to packagist, and it will show up on the Extensions site. You can install and remove it from a Bolt project using composer require and composer remove.
  • Custom code for a specific project can be put in the src/ folder. This follows the default Symfony project structure, and this folder is set up for Dependency Injection and Autowiring of Services.

Apart from the information contained in this chapter, it's very useful if you have some experience with PHP, as well as Symfony. Here's some recommended resources, if you want to brush up on your knowledge:

PHP in general:

Symfony specific:

  • Symfony's documentation is very extensive. Great resource, for users of all levels of expertise alike: Symfony documentation.
  • There's a new Symfony: the fast track book, written by Symfony's lead developer. Currently, you can purchase it from the site, but supposedly it'll be published online in the near future as well.
  • Symfonycasts has great video tutorials on all things Symfony.

Other than that, make sure you have a proper local development setup.



Edit this page on GitHub
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.