Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Building Websites with PHP Dependency Management Autoloading

Manish Giri
Manish Giri
16,266 Points

Need of Composer/Autoloading etc?

I'm in the autoloading part of the "dependency management" tutorial, and so far, I didn't really understand what is the need of doing all these things - composer, autoloading, Monolog etc? I mean what exactly is the use of this in our tutorial? Our php files barely have even 20-30 lines of code.

These features might be handy for larger sized projects, but do we need it in this tutorial? if so, what for?

Aamnah Akram
Aamnah Akram
17,549 Points

I'm kind of confused about the same thing.. The project is building a basic website, but then comes Monolog and i go say whhaaatt?. It's anything but basic, because you need to have some idea of OOP and such. I think it'd have helped if the instructor mentioned why we are using monolog or where it would be required in the project.

1 Answer

Tom Checkley
Tom Checkley
25,165 Points

I'm at about the same stage. Looking through further headings for this project it looks like we'll be using a 3rd party bit of code for the contact form. If my knowledge of gulp and grunt crossover to php, we'll need the dependency manager to control these 3rd party codes. Hope this helps

Tom Checkley
Tom Checkley
25,165 Points

What I mean is I think Composer and autoloader are similarish to grunt or gulp