ql/mcp-panthor

A thin microframework built on Slim and Symfony

This package's canonical repository appears to be gone and the package has been frozen as a result.

4.1.0 2021-02-03 18:07 UTC

README

CircleCI Latest Stable Version License

A thin PHP microframework built on Slim and Symfony.

Slim + Symfony = 💞

Panthor uses the simplicity of Slim and provides a bit more structure for applications with additional Symfony components. Utilities and helpers are provided to simplify template caching and dependency injection using Symfony Dependency Injection and Slim. It can be used for html applications, APIs, or both.

Here's a few of the features Panthor provides:

  • Standard interfaces for Controllers, Middleware, and Templates
  • Error Handling (with Content Negotiation)
  • Cookie Encryption with Libsodium
  • A simple Session interface to store PHP session data in cookies.
  • DI Configuration using Symfony PHP Fluent format and routes with YAML
  • Support for HTTP Problem
  • Utilities for Unit Testing
  • Utilities for Templating

Table of Contents

Compatibility

Panthor Slim Symfony PHP
~1.0 ~2.0 ~2.0 ~5.5
~2.0 ~2.0 ~2.0 ~5.6
~3.0 ~3.3 ~3.0 || ~4.0 ~5.6 || ~7.0
~3.3 ~3.10 ~4.0 ~7.1
~4.0 ~4.5 ~5.0 >=7.3

Installation

The following command will clone this project and set up a simple skeleton. See the files used in the starter-kit.

composer create-project ql/mcp-panthor my-project-dir --no-install --remove-vcs

Never used Composer, Slim or Symfony before? Here are some resources:

Quick Start

The following will clone this project, bootstrap your application with the starter-kit. Afterwards, just install dependencies and start the app with the built-in PHP webserver.

composer create-project ql/mcp-panthor my-project-dir --no-install --remove-vcs
cd hello-world
composer install
php -S localhost:8888 -t public

Now just visit localhost:8888 and Panthor should start right up!

Documentation

  • How To Use

    Explanations of controllers and middleware, as well as services injected into the DI Container by Panthor.

  • Application Structure

    Details on where code and configuration goes.

  • Error Handling

    How to use the included error handler and logger.