Awesome Open Source
Awesome Open Source

Build Status Coverage Status codecov Latest Stable Version Latest Unstable Version Scrutinizer Code Quality License

Divergence is a PHP framework designed for rapid development and modern practices without becoming an over abstracted mess.


Getting Started



This collection of classes contains my favorite building blocks for developing websites with PHP and they have an impressive track record with hundreds of currently active websites using one version or another of the classes in this framework. While they were originally written years ago they are all PSR compatible and support modern practices out of the box.

Unit testing the code base and providing code coverage is a primary goal of this project.

Main Features

  • Models

    • Real PHP classes.
    • Extend an ActiveRecord class.
    • Use traits to unlock Relationships and Versioning as needed.
    • Automatically creates table on first time use.
    • Built in support for MySQL.
  • Database

    • Use the existing DB class or access PDO directly by calling DB::getConnection().
  • Routing

    • Simpler, faster, tree based routing system.
    • Built with basic class inheritance in mind.
  • Controllers

    • Psr7 compatible controllers.
    • Pre-made REST API controllers allow you to build APIs rapidly.
    • 100% Unit test coverage for filters, sorters, and conditions go ive you peace of mind.
    • Build HTTP APIs in minutes by extending RecordsRequestHandler and setting the one config variable: the name of your model class.
    • Use a pre-made security trait with RecordsRequestHandler or extend it and write in your own permissions.
    • Standard permissions interface allows reuse of permission traits from one model to another.
  • Templates

    • Out of the box support for Twig
  • Media

    • Out of the box support for a media storage.
    • Automated thumbnail generation for JPEG, GIF, PNG, and PDF.
    • Built in support for MP4 and WEBM chunkable emitters allowing you to easily host videos with the ability to seek.
    • Manage media remotely with a built in JSON API using the standard permissions interface for all controllers.
    • Supports POST and PUT request types for media uploads.

Contributing To Divergence

All issues and pull requests should be filed on the Divergence/framework repository.


The Divergence framework is open-sourced software licensed under the MIT license


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Php (395,237
Php7 (4,328
Restful Api (2,568
Validation (2,492
Composer (2,243
Orm (2,110
Php Framework (793
Coverage (674
Activerecord (640
Phpunit (578
Mvc Framework (556
Mvc Architecture (413
Crud Api (166
Phpunit Tests (34
Mysql Orm (24
Divergence (13
Http Api Generator (4
Dwoo (2
Related Projects