Category: dependencies

Re-Introducing Composer – the Cornerstone of Modern PHP Apps

In this article, we will tackle the basics of Composer, and what makes it such a powerful and useful tool. Before we go into detail, there are two things that we need to have in mind: What Composer is: As we can see on their website: “Composer is a tool for dependency management in PHP. It allows you to declare...

Disco with Design Patterns: A Fresh Look at Dependency Injection

Dependency Injection is all about code reusability. It’s a design pattern aiming to make high-level code reusable, by separating the object creation / configuration from usage. Consider the following code: <?php class Test { protected $dbh; public function __construct(PDO $dbh) { ...