GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Divergence/framework: PHP Framework providing ActiveRecord models and out of the box CRUD controllers with versioning and ORM support

BranchesTags
Open more actions menu

Latest commit

 

History

418 Commits
418 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.phan
.phan
 
 
bootstrap
bootstrap
 
 
config
config
 
 
public
public
 
 
src
src
 
 
tests
tests
 
 
views/dwoo
views/dwoo
 
 
.coveralls.yml
.coveralls.yml
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.php-cs-fixer.dist.php
.php-cs-fixer.dist.php
 
 
.scrutinizer.yml
.scrutinizer.yml
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
composer.json
composer.json
 
 
phpdoc.xml
phpdoc.xml
 
 
phpunit.xml
phpunit.xml
 
 
readme.md
readme.md
 
 

Repository files navigation

Code Coverage Latest Stable Version Build Status 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.

Requires PHP 8.1+

Documentation

Getting Started

Minimal Model

<?php

namespace App\Models;

use Divergence\Models\Model;
use Divergence\Models\Mapping\Column;

class Article extends Model
{
    public static $tableName = 'articles';

    #[Column(type: 'string', notnull: true)]
    private string $Title;

    #[Column(type: 'clob', notnull: true)]
    private string $Body;
}

Purpose

Divergence is a full-featured ActiveRecord framework built on a reflection-driven DTO-style backend. It is designed for performance, and it backs that up with benchmarks. It gives developers a fast procedural-global path for getting real work done, while its internal abstractions stay disciplined and modern. Divergence follows PSR-4, PSR-7, and PSR-15 wherever doing so strengthens the framework instead of turning it into ceremony.

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

Main Features

  • Models

    • Real PHP classes.
    • Declare fields with static arrays or PHP 8 attributes (#[Column(...)]).
    • Declare relationships with static arrays or PHP 8 attributes (#[Relation(...)]).
    • Built in support for relationships and object versioning.
    • Speed up prototyping and automate new deployments by automatically creating tables based on your models when none are found.
    • Built in support for MySQL, PostgreSQL, and SQLite.
  • Routing

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

    • PSR-7 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.
    • RecordsRequestHandler and MediaRequestHandler route response-producing actions through focused endpoint classes instead of one large handler method pile.
    • 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.

Installation

composer require divergence/divergence

The divergence/cli package is also available to initialize new projects and manage database configurations from the command line.

Running Tests

# Run all test suites
composer test

# MySQL suite only
composer test:mysql

# PostgreSQL suite only
composer test:pgsql

# SQLite in-memory suite only
composer test:sqlite

# Run merged coverage across MySQL, PostgreSQL, and SQLite
composer test:coverage

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

  • The patterns in this framework are a fork of the PHP framework portion of Emergence by Chris Alfano.
  • This project is maintained by Henry Paradiz

About

PHP Framework providing ActiveRecord models and out of the box CRUD controllers with versioning and ORM support

Topics

activerecordcomposercoveragecrud-apidivergenceffmpeghttp-api-generatormodern-practicesmvc-frameworkormphpphp-frameworkphpunitphpunit-testspsr15psr7restful-apitwig

Resources

Readme
MIT license
Activity
Custom properties

Stars

19 stars

Watchers

2 watching

Forks

4 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.