My PHP Toolkit to Build a (quite) Frameworkless App
Tags: php, tools, githunt, framework
Published: 2019-01-22 23:15:08

---
title: My PHP Toolkit to Build a (quite) Frameworkless App
published: true
description: My PHP Toolkit / On Building a (quite) Frameworkless App with Slim and no ORM
tags: php, tools, githunt, framework
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sp6baiex1tjq736iz7lk.jpg
canonical_url: https://mamyn0va.github.io/2019/01/22/my-php-toolkit-to-build-a-quite-frameworkless-app
---

Hey, let me introduce you some of the libraries & tools I've been using in many PHP projects running in production.

I'm used to build my own framework by picking up libs in the below list each time I start a new PHP project. But to be honest, I must admit that I still use a micro-framework for basic HTTP stuff: [Slim](https://www.slimframework.com/).

📝 *I use no ORM and I mainly build backend apps with Web APIs.*

## Libraries

### 1. Slim Framework

![slim](https://thepracticaldev.s3.amazonaws.com/i/qrzabdcle0b75ecjqa1o.png)

🙋 **Purpose:** *Micro-Framework intended to build Web APIs*
🌠 **GitHub stars:** *9,475*
🔗 **URL:** *[slimphp/slim](https://github.com/slimphp/Slim)*

### 2. Slim Framework CSRF protection middleware

{% github slimphp/slim-csrf %}

🙋 **Purpose:** *Protect your GUI pages with a CSRF token*
🌠 **GitHub stars:** *201*
🔗 **URL:** *[slimphp/csrf](https://github.com/slimphp/Slim-Csrf)*

### 3. Slim Framework Flash Messages

{% github slimphp/slim-flash %}

🙋 **Purpose:** *This enables you to define transient messages that persist only from the current request to the next request*
🌠 **GitHub stars:** *104*
🔗 **URL:** *[slimphp/flash](https://github.com/slimphp/Slim-Flash)*

### 4. Twig

![twig](https://thepracticaldev.s3.amazonaws.com/i/0s27wg4owzcagj2urnpf.png)

🙋 **Purpose:** *A very popular template engine that integrates well with Slim ([slimphp/twig-view](https://github.com/slimphp/Twig-View))*
🌠 **GitHub stars:** *5,705*
🔗 **URL:** *[twigphp/twig](https://github.com/twigphp/Twig)*

### 5. Monolog

{% github seldaek/monolog %}

🙋 **Purpose:** *Sends your logs to files, sockets, inboxes, databases and various web services*
🌠 **GitHub stars:** *13,388*
🔗 **URL:** *[seldaek/monolog](https://github.com/Seldaek/monolog)*

### 6. Zend ACL permissions

{% github zendframework/zend-permissions-acl %}

🙋 **Purpose:** *Provides a lightweight and flexible access control list (ACL) implementation for privileges management*
🌠 **GitHub stars:** *55*
🔗 **URL:** *[zendframework/zend-permissions-acl](https://github.com/zendframework/zend-permissions-acl)*

### 7. Guzzle

{% github guzzle/guzzle %}

🙋 **Purpose:** *Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and trivial to integrate with web services*
🌠 **GitHub stars:** *15,355*
🔗 **URL:** *[guzzlehttp/guzzle](https://github.com/guzzle/guzzle)*

### 8. PDO

🙋 **Purpose:** *PHP extension to build and execute secured SQL prepared statements*
🔗 **URL:** *[PDO](http://php.net/manual/en/book.pdo.php)*

### 9. Zend XML-RPC

{% github zendframework/zend-xmlrpc %}

🙋 **Purpose:** *Provides support for both consuming remote XML-RPC services and building new XML-RPC servers*
🌠 **GitHub stars:** *14*
🔗 **URL:** *[zendframework/zend-xmlrpc](https://github.com/zendframework/zend-xmlrpc)*

### 10. PHPMailer

{% github phpmailer/phpmailer %}

🙋 **Purpose:** *A full-featured email creation and transfer class for PHP*
🌠 **GitHub stars:** *12,422*
🔗 **URL:** *[phpmailer/phpmailer](https://github.com/PHPMailer/PHPMailer)*

### 11. Firebase / PHP-JWT

{% github firebase/php-jwt %}

🙋 **Purpose:** *A simple library to encode and decode JSON Web Tokens (JWT) in PHP, conforming to RFC 7519*
🌠 **GitHub stars:** *4,574*
🔗 **URL:** *[firebase/php-jwt](https://github.com/firebase/php-jwt)*

### 12. Hassankhan / Config

{% github hassankhan/config %}

🙋 **Purpose:** *Config is a lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files*
🌠 **GitHub stars:** *749*
🔗 **URL:** *[hassankhan/config](https://github.com/hassankhan/config)*

## Tools

As a PHP craftsman, the tools below are mandatory in my toolkit. Most of them (except *shellcheck*) are installable through *composer*, which allows you to add them as dev dependencies to your project's `composer.json`.

### 1. Composer

![composer](https://thepracticaldev.s3.amazonaws.com/i/vy9xvol1rclwo2a1q27m.png)

🙋 **Purpose:** *Essential PHP dependency manager, and much more*
🌠 **GitHub stars:** *18,049*
🔗 **URL:** *[Composer](https://getcomposer.org/)*

### 2. PHPUnit

![phpunit](https://thepracticaldev.s3.amazonaws.com/i/7k6yp7wenwtj0eawb7ba.png)

🙋 **Purpose:** *Awesome unit tests framework with mocking features*
🌠 **GitHub stars:** *12,785*
🔗 **URL:** *[PHPUnit](https://phpunit.de/)*

### 3. PHP Code Sniffer

{% github squizlabs/PHP_CodeSniffer %}

🙋 **Purpose:** *Static analysis tool to detect & fix coding standard violations*
🌠 **GitHub stars:** *5,915*
🔗 **URL:** *[squizlabs/php_codesniffer](https://github.com/squizlabs/PHP_CodeSniffer)*

### 4. PHP Mess Detector aka *phpmd*

![phpmd](https://thepracticaldev.s3.amazonaws.com/i/17tn178k0o2ko760xhi5.png)

🙋 **Purpose:** *Static analysis tool to detect code smells, bad design, bugs, unused parameters, etc.*
🌠 **GitHub stars:** *1,315*
🔗 **URL:** *[phpmd/phpmd](https://phpmd.org/)*

### 5. PHP Coding Standard Fixer aka *php-cs-fixer*

![php-cs-fixer](https://thepracticaldev.s3.amazonaws.com/i/d17gmfhu6g20uah8rp6n.png)

🙋 **Purpose:** *Automatically fixes coding standard violations*
🌠 **GitHub stars:** *7,036*
🔗 **URL:** *[friendsofphp/php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer)*

### 6. SensioLabs Security Checker

![security-checker](https://thepracticaldev.s3.amazonaws.com/i/to78ce7ag0pfgzy45tzs.png)

🙋 **Purpose:** *The SensioLabs Security Checker is a command line tool that checks if your application uses dependencies with known security vulnerabilities*
🌠 **GitHub stars:** *1,397*
🔗 **URL:** *[sensiolabs/security-checker](https://github.com/sensiolabs/security-checker)*

### 7. XML Linter

{% github sclable/xml-lint %}

🙋 **Purpose:** *A PHP tool to lint and validate XML files from the command line*
🌠 **GitHub stars:** *6*
🔗 **URL:** *[sclable/xml-lint](https://github.com/sclable/xml-lint)*

### 8. YAML Linter

{% github j13k/yaml-lint %}

🙋 **Purpose:** *Compact command line utility for checking YAML file syntax*
🌠 **GitHub stars:** *3*
🔗 **URL:** *[j13k/yaml-lint](https://github.com/j13k/yaml-lint)*

### 9. Dockerfile Linter

{% github projectatomic/dockerfile_lint %}

🙋 **Purpose:** *Rule based Dockerfile linter*
🌠 **GitHub stars:** *259*
🔗 **URL:** *[projectatomic/dockerfile_lint](https://github.com/projectatomic/dockerfile_lint)*

### 10. Shellcheck

{% github koalaman/shellcheck %}

🙋 **Purpose:** *A static analysis tool for shell scripts*
🌠 **GitHub stars:** *13,440*
🔗 **URL:** *[koalaman/shellcheck](https://github.com/koalaman/shellcheck)*

### 11. Swagger CLI

![swagger-cli](https://thepracticaldev.s3.amazonaws.com/i/eidkatpr5zih7e4k9s4c.png)

🙋 **Purpose:** *Validate Swagger/OpenAPI files in JSON or YAML format*
🌠 **GitHub stars:** *125*
🔗 **URL:** *[APIDevTools/swagger-cli](https://github.com/APIDevTools/swagger-cli)*

---

All these tools can be run automatically:
- in your IDE
- in a git hook
- in your CI/CD pipeline

If you want to go further, please have a look at one of my former articles:

{% link https://dev.to/biros/-how-to-master-your-code-through-your-project-lifecycle-22-2pej %}

Thanks for reading.

See ya!