PHPackages                             libertyphp/libertyphp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. libertyphp/libertyphp

ActiveLibrary[Framework](/categories/framework)

libertyphp/libertyphp
=====================

The Liberty PHP framework. Fast and extensible micro framework for PHP.

1.2(1y ago)92573[1 PRs](https://github.com/vblila/libertyphp/pulls)MITPHPPHP &gt;=8.1

Since Nov 18Pushed 1y ago2 watchersCompare

[ Source](https://github.com/vblila/libertyphp)[ Packagist](https://packagist.org/packages/libertyphp/libertyphp)[ Docs](https://github.com/vblila/libertyphp)[ RSS](/packages/libertyphp-libertyphp/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (6)Versions (4)Used By (0)

Liberty PHP
===========

[](#liberty-php)

Fast and extensible micro framework for PHP. Liberty PHP helps you build RESTful web applications quickly and easily.

Philosophy of the project
=========================

[](#philosophy-of-the-project)

- Large frameworks have a lot of extra functionality that reduce code performance. Preferably to use an extensible framework, where the developer decides which part of the framework he wants to write himself or find a suitable extension.
- The framework should contain only the functionality that will be used by 99% in project. All optional functionality should be on extensions.
- There shouldn't be any "magic" in frameworks (like in Laravel). Only clear method calling and object access.
- Clear code is better than short code.

Installation and quick start
============================

[](#installation-and-quick-start)

Install
-------

[](#install)

Install Liberty PHP with composer

```
composer require libertyphp/libertyphp

```

Make directories like this:

```
|--bootstrap
|--myapp
    |--http
|--public
|--views

```

Class autoload
--------------

[](#class-autoload)

Append to `composer.json` autoload rule:

```
"autoload": {
    "psr-4": {
        "MyApp\\": "myapp/"
    }
},

```

Error handler
-------------

[](#error-handler)

Create file `bootstrap/error_handler.php` with content:

```
