bihan/bihan

A PHP micro-framework based on the Symfony Components

dev-master 2021-04-05 10:45 UTC

This package is not auto-updated.

Last update: 2024-04-17 17:02:23 UTC


README

Bihan means "small" in Breton language. It started as a personnal project to improve my knowledge on building framework using Symfony. So I decided to use main HTTP Symfony components, Pimple dependencies container and fast-route router to implement a fast and lightweight framework. Bihan is very inspired from Silex and is perfect to implement small rest API.

I recommend you to read the very good article about fast-route and fast request routing using regular expressions.

Installation

$ composer require bihan/bihan

Usage

<?php

require_once __DIR__.'/../vendor/autoload.php';

use Symfony\Component\HttpFoundation\JsonResponse;

$app = new Bihan\Application();

$app->match('GET', '/', function () {
  return new JsonResponse(['code' => 'OK']);
});

$app->run();

Tests

$ composer install
$ phpunit