danc0 / gimliduck-php
GimliDuck is an adaptable micro PHP framework that tries to stay out of your way.
Requires
- php: >=8.1
- latte/latte: >=3.0
Requires (Dev)
- phpstan/phpstan: >=1.8
- phpunit/php-code-coverage: >=9.2
- phpunit/phpunit: >=11
- squizlabs/php_codesniffer: >=3.7
- dev-master
- v0.18.3
- v0.18.2
- v0.18.1
- v0.18.0
- v0.17.3
- v0.17.2
- v0.17.1
- v0.17.0
- v0.16.1
- v0.16.0
- v0.15.1
- v0.15.0
- v0.14.17
- v0.14.16
- v0.14.5
- v0.14.4
- v0.14.3
- v0.14.2
- v0.14.1
- v0.14.0
- v0.13.5
- v0.13.4
- v0.13.3
- v0.13.2
- v0.13.1
- v0.13.0
- v0.12.2
- v0.12.1
- v0.12.0
- v0.11.6
- v0.11.5
- v0.11.4
- v0.11.3
- v0.11.2
- v0.11.1
- v0.11.0
- v0.10.4
- v0.10.3
- v0.10.2
- v0.10.1
- v0.10.0
- v0.9.3
- v0.9.2
- v0.9.1
- v0.9.0
- v0.8.3
- v0.8.2
- v0.8.1
- v0.8.0
- v0.7.1
- v0.7.0
- v0.6.7
- v0.6.6
- v0.6.5
- v0.6.4
- v0.6.3
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.1
- v0.5.0
- v0.4.1
- v0.4.0
- v0.3.6
- v0.3.5
- v0.3.4
- v0.3.3
- v0.3.2
- 0.3.1
- 0.3.0
- dev-gimliduck-6
- dev-gimli-phpcs
This package is auto-updated.
Last update: 2025-06-17 06:39:44 UTC
README
An adaptable micro PHP framework that tries to stay out of your way.
Certainty of death. Small chance of success. What are we waiting for?
Installation
composer require danc0/gimliduck-php
Create a skeleton project with:
composer create-project danc0/gimli-skeleton
Add the devtools with composer require --dev danc0/gimliduck-devtools
Create a .htaccess
file that looks something like this to point requests to your index.php
file
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
Usage
Creating a GimliDuck application is simple:
declare(strict_types=1); require_once __DIR__ . '/vendor/autoload.php'; use Gimli\Application; use Gimli\Application_Registry; use Gimli\Router\Route; $App = Application::create(__DIR__, $_SERVER); Route::get('/', function(){ echo "Hello World"; }); Application_Registry::set($App); $App->run();
That is really all you need to get started. You can add more like a template engine, a config file, etc, but you don't have to.
A more complex example
<?php declare(strict_types=1); require_once __DIR__ . '/vendor/autoload.php'; use Gimli\Application; use Gimli\Application_Registry; use App\Core\Config; use App\Core\Cache; define('APP_ROOT', __DIR__); $App = Application::create(APP_ROOT, $_SERVER); // set up your config and add it to the Application $config_file = parse_ini_file(APP_ROOT . '/App/Core/config.ini', true); $App->Config = $App->Injector->resolveFresh(Config::class, ['config' => $config_file], $App); // Register a cache class with the Injector $App->Injector->register(Cache::class, Cache::getCache($App->Config->admin_cache)); Application_Registry::set($App); // Run Application $App->run();
Read the Docs for more information and examples.