Skip to content
PHP Framework providing ActiveRecord models and out of the box CRUD controllers with versioning and ORM support
Branch: master
Clone or download
hparadiz PHPDoc, a new test, and cryptographically save session handle maker
Methods that return Models from ActiveRecord and VersionedRecord will now return static[] and static which is more accurate PHPDoc notation.
Session method generateUniqueHandle is now cryptographically secure with 2^128 possible handles.
Added binary type support to SQL class.
Added a test for Session generateUniqueHandle
Latest commit daaf78a Feb 17, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
src PHPDoc, a new test, and cryptographically save session handle maker Feb 17, 2019
tests PHPDoc, a new test, and cryptographically save session handle maker Feb 17, 2019
.editorconfig Editor config file as per /r/php suggestions May 29, 2018
LICENSE Create LICENSE Apr 30, 2018
phpunit.xml Fix phpunit code coverage config May 24, 2018

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 for versioning and ORM.
    • 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

    • Integrated CRUD controllers load templates or JSON depending on the response mode.
    • 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.
    • Reuse permission traits from one model to another.
  • Templates

    • Out of the box support for Smarty & Dwoo Templates using the Dwoo engine
    • Respond with a Template instantly RequestHandler::respond('/path/to/tpl')

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


You can’t perform that action at this time.