divergence / divergence
The Divergence Framework.
Installs: 122
Dependents: 1
Suggesters: 0
Security: 0
Stars: 18
Watchers: 4
Forks: 4
Open Issues: 3
Type:project
Requires
- php: >=8.1
- filp/whoops: *
- guzzlehttp/psr7: ^2.0
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0
- symfony/var-dumper: *
- twig/extra-bundle: ^3.0
- twig/twig: *
Requires (Dev)
- dms/phpunit-arraysubset-asserts: ^0.4.0
- fakerphp/faker: ^1.20
- friendsofphp/php-cs-fixer: *
- mikey179/vfsstream: ^1.6
- phpunit/phpunit: ^9.5
Suggests
- divergence/cli: Lets you initialize a new project as well as create, edit, and test database configurations via CLI.
README
Divergence is a PHP framework designed for rapid development and modern practices without becoming an over abstracted mess.
Documentation
Getting Started
Purpose
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.
- Map fields with array or attributes.
- Built in support for relationships and object versioning.
- Speed up prototyping and automate new deployments by automatically creates table based on your models when none are found.
- Built in support for MySQL.
-
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.
- 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.
License
The Divergence framework is open-sourced software licensed under the MIT license
Credits
- Much of the original code in this framework was published as part of the PHP framework portion of Emergence by Chris Alfano.
- This project is maintained by Henry Paradiz