3 Most Useful Composer Packages

April 22nd, 2019

Composer packages are a quick way to streamline your development process and improve productivity. However, it can be difficult to find useful packages.

#1 joshcam/mysqli-database-class

This database class is a great way to keep database queries clean, quick and secure. By running everything through this PHP class there is no room for making mistakes to open yourself up to SQL Injection attacks. Although you will still need to check for this even when using this package.

It’s incredibly simple to use but is only really beneficial when working on a system not running on an MVC framework such as Laravel / Symfony etc. as they have similar functionality built in.

#2 vlucas/phpdotenv

PHP Dot Env allows you to create and use a .env file to set global variables, similarly to Laravel, Symfony, PHP Cake and other MVC Frameworks.

.env files are a clean way of setting global variables, they are especially useful when working within a team of developers as it’s noticeably a file which should not be uploaded to the server so it reduces the chances of newbie developers replacing the file on the live env if FTP is used.

Again, this is not useful in most modern frameworks due to the functionality being already included.

#3 phpmailer/phpmailer

This package is a quick to configure alternative to the default PHP mail() function, the main benefit of running emails through this mailer is the SMTP configuration & error catching support. Catching errors with the default PHP mail() is a little hacky and does not provide valuable error codes, with PHPMailer the errors are handled automatically and simply returned to you ( this is how the mail() function should have been originally! ).

It also has multi language support and is available in over 50 languages, allowing for it to be openly used globally.

3 Most Useful Composer Packages UK Zestcode

Ready To Get Started?

Request A Callback

Get Started
White Label Development

Get A Quote