PHPackages                             davihu/phalcon-ext - 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. davihu/phalcon-ext

ActiveLibrary[Framework](/categories/framework)

davihu/phalcon-ext
==================

Various extensions and utilities for Phalcon Framework

v5.0.0(4y ago)79.0kBSD-3-ClausePHPPHP &gt;=7.0

Since Jul 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/davihu/phalcon-ext)[ Packagist](https://packagist.org/packages/davihu/phalcon-ext)[ RSS](/packages/davihu-phalcon-ext/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (13)Used By (0)

Phalcon Ext
===========

[](#phalcon-ext)

Various extensions and utilities for Phalcon Framework

Pre-requisites
--------------

[](#pre-requisites)

1. [Phalcon framework 2.x or 3.x](https://phalconphp.com/)

Installation
------------

[](#installation)

### Using Composer

[](#using-composer)

You can use the `composer` package manager to install. Either run:

```
$ php composer.phar require davihu/phalcon-ext "^1.2"

```

or add:

```
"davihu/phalcon-ext": "^1.2"

```

to your composer.json file

Whats new?
----------

[](#whats-new)

### Version 1.2

[](#version-12)

#### Added nested set support

[](#added-nested-set-support)

Adds nested set support to your model. Simply use trait \\PhalconExt\\Mvc\\Model\\Traits\\NestedSetTrait in your model.

### Version 1.1

[](#version-11)

#### Added SQL database migrations support

[](#added-sql-database-migrations-support)

Can be easily attached to your console application.

##### Supported commands:

[](#supported-commands)

```
php console.php migrations generate                        # generates new migration class
php console.php migrations migrate                         # migrates database to last version
php console.php migrations migrate 160910160944            # migrates database to selected version
php console.php migrations sql > migrate.sql               # saves SQL statements for migration to last version to file migrate.sql
php console.php migrations sql 160910160944 > migrate.sql  # saves SQL statements for migration to selected version to file migrate.sql

```

##### Set up in console bootstrap file:

[](#set-up-in-console-bootstrap-file)

1. Choose migrations directory

    define('MIGRATIONS\_DIR', '... your migrations dir ...');
2. Register dir to your loader

Without namespace usage

```
$loader->registerDirs([ ... , MIGRATIONS_DIR]);

```

With namespace usage

```
$loader->registerNamespaces([ ... , 'Your\\Namespace' => MIGRATIONS_DIR]);

```

3. Register migrations service to DI

Without namespace usage

```
$di->set('migrations', function () {
    return new \PhalconExt\Db\SqlMigrations($this->get('db'), MIGRATIONS_DIR);
}, true);

```

With namespace usage

```
$di->set('migrations', function () {
    return new \PhalconExt\Db\SqlMigrations($this->get('db'), MIGRATIONS_DIR, 'Your\\Namespace');
}, true);

```

##### Writing migrations classes

[](#writing-migrations-classes)

```
use PhalconExt\Db\SqlMigrations\AbstractMigration;

class Migration160910160944 extends AbstractMigration
{
    public function up()
    {
        # simple statements
        $this->addSql("ALTER TABLE robots ADD COLUMN number VARCHAR(20)");

        # routine statements like triggers, procedures and functions
        $this->addSql("CREATE TRIGGER MyTrigger ...", true);
    }

    public function down()
    {
        $this->addSql("ALTER TABLE robots DROP COLUMN number");
        $this->addSql("DROP TRIGGER MyTrigger");
    }
}

```

Thats all, very simple but powerfull!

Contents
--------

[](#contents)

### Db

[](#db)

- [PhalconExt\\Mvc\\Db\\SqlMigrations](src/PhalconExt/Db/SqlMigrations) - Database migrations service directly via. SQL statements
- [PhalconExt\\Mvc\\Db\\SqlMigrations\\AbstractMigration](src/PhalconExt/Db/SqlMigrations/AbstractMigration) - Abstract SQL migration, all migrations must extend this class

### Model

[](#model)

- [PhalconExt\\Mvc\\Model\\Traits\\RateLimitAccessTrait](src/PhalconExt/Mvc/Model) - Adds access rate limit support to target model
- [PhalconExt\\Mvc\\Model\\Traits\\RateLimitLoginTrait](src/PhalconExt/Mvc/Model) - Adds login rate limit support to target model

### Validators

[](#validators)

- [PhalconExt\\Validation\\Validator\\Color](src/PhalconExt/Validation/Validator) - Validates if value is valid color
- [PhalconExt\\Validation\\Validator\\EmailDomain](src/PhalconExt/Validation/Validator) - Validates email domain existence via DNS
- [PhalconExt\\Validation\\Validator\\PasswordRetype](src/PhalconExt/Validation/Validator) - Validates if password confirmation matches password
- [PhalconExt\\Validation\\Validator\\PasswordStrength](src/PhalconExt/Validation/Validator) - Validates password strength
- [PhalconExt\\Validation\\Validator\\StringLengthExact](src/PhalconExt/Validation/Validator) - Validates exact string length

License
-------

[](#license)

Phalcon Ext is open-sourced software licensed under the [New BSD License](docs/LICENSE.md). © David Hübner

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

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 ~231 days

Recently: every ~509 days

Total

10

Last Release

1540d ago

Major Versions

v1.2.1 → v5.0.02022-04-12

PHP version history (2 changes)v1.0.0PHP &gt;=5.4

v1.2.0PHP &gt;=7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11491151?v=4)[David Hübner](/maintainers/davihu)[@davihu](https://github.com/davihu)

---

Top Contributors

[![davihu](https://avatars.githubusercontent.com/u/11491151?v=4)](https://github.com/davihu "davihu (42 commits)")

---

Tags

frameworkextensionphalcon

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/davihu-phalcon-ext/health.svg)

```
[![Health](https://phpackages.com/badges/davihu-phalcon-ext/health.svg)](https://phpackages.com/packages/davihu-phalcon-ext)
```

###  Alternatives

[phalcon/cphalcon

Phalcon is an open source web framework delivered as a C extension for the PHP language providing high performance and lower resource consumption.

10.8k243.3k1](/packages/phalcon-cphalcon)[phalcon/incubator

Adapters, prototypes or functionality that can be potentially incorporated to the C-framework.

7223.0M81](/packages/phalcon-incubator)[phalcon/migrations

Run and Generate DB Migrations with Phalcon Framework

28993.1k6](/packages/phalcon-migrations)[phalcon/incubator-mailer

Phalcon Incubator Mailer Adapters

1320.1k6](/packages/phalcon-incubator-mailer)

PHPackages © 2026

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