PHPackages                             hubert/avocado - 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. [Database &amp; ORM](/categories/database)
4. /
5. hubert/avocado

ActiveFramework[Database &amp; ORM](/categories/database)

hubert/avocado
==============

Avocado is hobbyist PHP framework which implements routing and ORM

v7.1.2(3y ago)7242[1 issues](https://github.com/HubertKuch/Avocado/issues)2Apache-2.0PHPPHP 8.1.\*

Since May 23Pushed 3y ago1 watchersCompare

[ Source](https://github.com/HubertKuch/Avocado)[ Packagist](https://packagist.org/packages/hubert/avocado)[ Docs](https://avocadoframework.com)[ RSS](/packages/hubert-avocado/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (4)Versions (44)Used By (2)

Avocado Project
===============

[](#avocado-project)

---

Avocado is easy to learn and use framework for PHP8.1 or higher. Heavily inspired by Spring Boot. Goals
-----

[](#goals)

- Easy and fast way to create applications in PHP.
- Easy extensible with new features.
- OOP based application.
- High abstraction level especially database connection is only a detail.
- Testable applications.
- Easy configured app.
- Fully use PHP attributes from PHP8.0.

Features
--------

[](#features)

---

- Rest controllers.
- ORM.
- Configuration properties in `application.{yaml,json}` file.
- Database connection is only a detail.
- Easy writing integration tests.
- Easy file uploading.
- JSON serializing and deserializing.
- Many allowed databases - to connect you only need to set driver class.
- Middleware.
- Custom attributes (annotations) interceptors.
- Parsing request body, params, query, files, attributes into variables (also objects).
- Fully support for enums.
- Abstraction level for database.
- Errors and exceptions handlers.
- Dependency injection.

Is Avocado for you?
-------------------

[](#is-avocado-for-you)

---

If you like Java environment (especially Spring boot), OOP, fast development process or fully tests application Avocado is for you.

First app
---------

[](#first-app)

---

You need to redirect all request into main file. In Apache, you can do it in `.htaccess` file like this:

```
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /index.php/$1 [L,QSA]
```

or in NGINX

```
server {
    listen 80 default_server;

    location / {
            rewrite ^ /index.php last
    }
}
```

Quick start

```
class Message {
    public function __construct(private string $message){}
}

#[RestController]
class GrettingController {

    // response will be JSON { "message": "Hello, !" }
    #[GetMapping("/gretting/:name")]
    public function greet(#[RequestParam(name: "name", defaulValue: "John")] string $name): Message {
        return new Message("Hello, " . $name . "!");
    }

}

#[Avocado]
class DemoApplication {

    public static function run(): void {
        Application::run(__DIR__);
    }

}

DemoApplication::run();
```

Plans for future
----------------

[](#plans-for-future)

---

- Create a similar system for JPA repositories.
- Caching data in Redis database.

License
-------

[](#license)

---

Open Source on Apache2.0

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Recently: every ~1 days

Total

32

Last Release

1257d ago

Major Versions

v2.3.4 → v3.0.02022-08-24

v3.1.0 → v4.0.02022-08-29

v4.2.0 → v5.0.02022-11-14

v5.4.0 → v6.0.02023-01-10

v6.0.2 → v7.0.02023-01-13

PHP version history (2 changes)v2.3.1PHP 8.1

v2.3.2PHP 8.1.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/ec84363206a7f2d3ed96fac01bd3fac0c52015301f956ca9053e61bbbad8b5f3?d=identicon)[HubertKuch](/maintainers/HubertKuch)

---

Top Contributors

[![HubertKuch](https://avatars.githubusercontent.com/u/84969448?v=4)](https://github.com/HubertKuch "HubertKuch (289 commits)")

---

Tags

api-serverframeworkormorm-frameworkrouterrouting

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/hubert-avocado/health.svg)

```
[![Health](https://phpackages.com/badges/hubert-avocado/health.svg)](https://phpackages.com/packages/hubert-avocado)
```

###  Alternatives

[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
