News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Juan Treminio:
Composer Namespaces in 5 Minutes
October 02, 2012 @ 15:47:32

Juan Treminio has a new post to his site today talking about Composer and namespacing and shows you how the two work together to make using 3rd party tools easy.

You've heard of Composer, right? The nifty new tool for PHP that aims to centralize and streamline package management? Do you also know of, but don't really understand how namespaces work in PHP? Then let's set you straight! In 5 minutes you'll learn how Composer's autoloader and namespaces work!

He's broken it up into a few sections:

  • Getting Composer up and running
  • Making a basic "composer.json" file
  • Going through what the "install" creates (including the "autoload_namespaces.php" file)
  • Using the vendor/ autoloader

As a bonus, he also shows how to implement your own namespacing in the "composer.json" file if you have a special case - just use the "autoload" section in the configuration (examples included).

0 comments voice your opinion now!
composer namespace introduction custom configure


blog comments powered by Disqus

Similar Posts

Matt Stauffer: Laravel 5.0 - Middleware (replacing Filters)

Greg Beaver's Blog: Working towards Pyrus and PEAR2, check it out or miss out

PHPMaster.com: An Introduction to the Front Controller Pattern, Part 2

Oracle Coherence Blog: Getting Started With The Coherence Memcached Adaptor (and PHP)

Till Klampaeckel: Speeding up composer on AWS OpsWorks


Community Events





Don't see your event here?
Let us know!


framework release laravel voicesoftheelephpant mvc version package series tool symfony composer security opinion language library podcast update community interview introduction

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework