Autoloading

Before we start to create Http classes to represent request and response, let's dive into Composer in order to set up autoloading.

The folder structure will be important here because we are creating framework files and classes but also application files and classes (i.e. the kind of files that a framework user would create). I intend to keep these separate by having a src folder and a framework folder.

Because I am using docker, I execute these commands in my running app container by prefixing them with this: docker compose exec app

If you are just using Composer installed locally on your computer, just run the Composer commands as normal.


* Note - I don't mention this in the recording but I also added the /vendor folder to the .gitignore file. Check the code examples below 👇

Complete and Continue  
Discussion

5 comments