PHPackages                             andrebian-solucoes-web/zf-base - 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. andrebian-solucoes-web/zf-base

Abandoned → [andrebian/laminas-base](/?search=andrebian%2Flaminas-base)Project[Framework](/categories/framework)

andrebian-solucoes-web/zf-base
==============================

A Zend Framework 3 Bootstrap Project

526JavaScriptCI failing

Since Apr 14Pushed 6y ago2 watchersCompare

[ Source](https://github.com/andrebian-solucoes-web/zf-base)[ Packagist](https://packagist.org/packages/andrebian-solucoes-web/zf-base)[ RSS](/packages/andrebian-solucoes-web-zf-base/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

ZF Base
=======

[](#zf-base)

> Deprecated: I suggest you to use  instead.

A Zend Framework Bootstrap Application for multipurpose applications.

1 - Installing
--------------

[](#1---installing)

### 1.1 - Creating a project with Composer

[](#11---creating-a-project-with-composer)

```
composer create-project -sdev andrebian-solucoes-web/zf-base path/to/installation
```

### 1.2 - Cloning repository

[](#12---cloning-repository)

Clone this repository and remove the `.git` folder before start to code.

### 1.3 - Downloading Zip

[](#13---downloading-zip)

Download the zip file and remove the `.git` folder before start to code.

#### Note

[](#note)

When installing dependencies with composer, some questions will appear.

```
 - Installing doctrine/doctrine-module (dev-master 57c0ee9): Cloning 57c0ee9586 from cache

  Please select which config file you wish to inject 'DoctrineModule' into:
  [0] Do not inject
  [1] config/development.config.php.dist
  Make your selection (default is 0):0

  Remember this option for other packages of the same type? (y/N)y
```

Just select the option "0". All project dependencies are already set in `config/modules.config.php`. Then select the option "y" to remember this decision for packages of the same type.

2 - Initializing the application
--------------------------------

[](#2---initializing-the-application)

### 2.1 - Create a database

[](#21---create-a-database)

```
CREATE SCHEMA `your_db_name` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
```

### 2.2 - Set database config

[](#22---set-database-config)

Copy the file `config/autoload/doctrine_orm.local.php.dist` to `config/autoload/doctrine_orm.local.php`. After this edit the result file and set your database configurations.

```
# File config/autoload/doctrine_orm.local.php

return [
    'doctrine' => [
        'connection' => [
            'orm_default' => [
                'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
                'params' => [
                    'host' => 'host',
                    'port' => '3306',
                    'user' => 'user',
                    'password' => 'password',
                    'dbname' => 'dbname',
                    'driverOptions' => [
                        PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'"
                    ]
                ]
            ]
        ]
    ],
    'dbal' => [
        'types' => [
            'datetime' => \BaseApplication\Database\Mysql\CustomDateTimeType::class
        ]
    ]
];
```

### 2.3 - Update the schema

[](#23---update-the-schema)

In `composer.json` has one configured command to update schema. This command was named as **update-db**.

```
composer update-db
```

The result is something like this:

```
composer update-db
> doctrine-module migrations:diff
Loading configuration from the integration code of your framework (setter).
Generated new migration class to "data/DoctrineORMModule/Migrations/Version20180722171236.php" from schema differences.
> doctrine-module migrations:migrate --no-interaction
Loading configuration from the integration code of your framework (setter).

                    Doctrine Database Migrations

Migrating up to 20180722171236 from 0

  ++ migrating 20180722171236

     -> CREATE TABLE user_users (id INT AUTO_INCREMENT NOT NULL, role_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, username VARCHAR(255) NOT NULL, password VARCHAR(60) NOT NULL, avatar LONGTEXT DEFAULT NULL, last_login DATETIME DEFAULT NULL, created DATETIME DEFAULT NULL, modified DATETIME DEFAULT NULL, active TINYINT(1) DEFAULT '1' NOT NULL, INDEX IDX_F6415EB1D60322AC (role_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB
     -> CREATE TABLE user_roles (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, created DATETIME DEFAULT NULL, modified DATETIME DEFAULT NULL, active TINYINT(1) DEFAULT '1' NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB
     -> CREATE TABLE user_password_recoveries (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, token VARCHAR(255) NOT NULL, created DATETIME DEFAULT NULL, modified DATETIME DEFAULT NULL, active TINYINT(1) DEFAULT '1' NOT NULL, INDEX IDX_7F8992A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB
     -> ALTER TABLE user_users ADD CONSTRAINT FK_F6415EB1D60322AC FOREIGN KEY (role_id) REFERENCES user_roles (id)
     -> ALTER TABLE user_password_recoveries ADD CONSTRAINT FK_7F8992A76ED395 FOREIGN KEY (user_id) REFERENCES user_users (id)

  ++ migrated (0.61s)

  ------------------------

  ++ finished in 0.61s
  ++ 1 migrations executed
  ++ 5 sql queries
> git add data/DoctrineORMModule/Migrations/*.php
```

### 2.4 - Initialize fixtures

[](#24---initialize-fixtures)

Now just initialize fixtures and your application is ready to run. Use the configured command **fixtures-init**.

```
composer fixtures-init
> ./vendor/bin/doctrine-module orm:fixtures:load
  > purging database
  > loading [0] User\Fixture\LoadRole
  > loading [1] User\Fixture\LoadUser
```

Have fun!

What this project does?
-----------------------

[](#what-this-project-does)

A set of common features to turn the development faster.

Which features were included?
-----------------------------

[](#which-features-were-included)

### BaseApplication Module

[](#baseapplication-module)

#### Assets: Form Elements

[](#assets-form-elements)

- NameField
- SaveButton
- FilterName

> Avoid to write these elements every time.

#### Mysql Custom Types

[](#mysql-custom-types)

- CustomDateTime

#### Filters

[](#filters)

- CurrencyToFloat
- DateTime
- FloatVal

#### Helpers

[](#helpers)

- LicensePlateFormatter - at the moment only for brazilian cars
- PhoneFormatter - at the moment only for brazilian phone numbers
- PriceFormatter - at the moment only for BRL

#### Mail

[](#mail)

An e-mail wrapper. Easily send transactional e-mails.

#### Validators

[](#validators)

- NameAndLastName

#### View Helpers

[](#view-helpers)

- BrazilianStateHelper - Easily populate forms with Brazilian States
- JsonDecode - Decode json data in views. Useful for twig templates
- Slugify - Generates slugs by a given string
- Zap Loading - A Customizable WhatsApp Web loading clone

### User Module

[](#user-module)

#### Assets

[](#assets)

- Session Default namespace

#### Auth

[](#auth)

- Customizable Auth Adapter

#### Fixtures

[](#fixtures)

- First Role (admin)
- First Registered User as admin

#### Helper

[](#helper)

- UserIdentity - fetch the authenticated user data in session

#### View Helper

[](#view-helper)

- UserIdentity - one more view helper to fetch the authenticated user data in session

Running tests
-------------

[](#running-tests)

`composer test`

License
-------

[](#license)

[MIT](LICENSE)

Contributing
------------

[](#contributing)

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/97df5e6c6aeda1550e75a26b9614532cb5304961dea595f1aa1e4328a7d7cdff?d=identicon)[andrebian](/maintainers/andrebian)

---

Top Contributors

[![andrebian](https://avatars.githubusercontent.com/u/2091739?v=4)](https://github.com/andrebian "andrebian (52 commits)")

### Embed Badge

![Health badge](/badges/andrebian-solucoes-web-zf-base/health.svg)

```
[![Health](https://phpackages.com/badges/andrebian-solucoes-web-zf-base/health.svg)](https://phpackages.com/packages/andrebian-solucoes-web-zf-base)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k104.3M831](/packages/laravel-socialite)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k38.6M289](/packages/laravel-dusk)[pinguo/php-msf

Pinguo Micro Service Framework For PHP

1.7k4.2k](/packages/pinguo-php-msf)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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