Skip to content

lisong/incubator

 
 

Repository files navigation

Build Status Latest Version Software License Total Downloads Daily Downloads

Phalcon Incubator

Phalcon is a web framework delivered as a C extension providing high performance and lower resource consumption.

This is a repository to publish/share/experiment with new adapters, prototypes or functionality that can potentially be incorporated into the framework.

We also welcome submissions of snippets from the community, to further extend the framework.

The code in this repository is written in PHP.

Installation

Installing via Composer

Install composer in a common location or in your project:

curl -s http://getcomposer.org/installer | php

Create the composer.json file as follows:

{
    "require": {
        "phalcon/incubator": "dev-master"
    }
}

If you are still using Phalcon 1.3.x, create a composer.json with the following instead:

{
    "require": {
        "phalcon/incubator": "v1.3.5"
    }
}

Run the composer installer:

php composer.phar install

Installing via GitHub

Just clone the repository in a common location or inside your project:

git clone https://github.com/phalcon/incubator.git

For a specific Git branch (eg 1.3.5) please use:

git clone -b 1.3.5 git@github.com:phalcon/incubator.git

Autoloading from the Incubator

Add or register the following namespace strategy to your Phalcon\Loader in order to load classes from the incubator repository:

$loader = new Phalcon\Loader();

$loader->registerNamespaces([
    'Phalcon' => '/path/to/incubator/Library/Phalcon/'
]);

$loader->register();

Tests

Incubator uses Codeception unit tests.

First you need to re-generate base classes for all suites:

$ vendor/bin/codecept build

You can execute all test with run command:

$ vendor/bin/codecept run
# OR
$ vendor/bin/codecept run --debug # Detailed output

Execute test groups with run -g <group_name> command.

Available groups:

  • Acl
  • Annotation
  • Avatar
  • Beanstalk
  • Cache
  • Config
  • DbValidation
  • EagerLoading
  • Http
  • Loader
  • MetaData
  • Paginator
  • Utils
  • Validation

Read more about the installation and configuration of Codeception:

Some tests require a connection to the database. For those you need to create a test database using MySQL:

$ echo 'create database incubator_tests charset=utf8mb4 collate=utf8mb4_unicode_ci;' | mysql -u root

For these tests we use the user root without a password. You may need to change this in codeception.yml file.

Obviously, Beanstalk-tests use Beanstalk and Memcached-tests use Memcached.

We use the following settings of these services:

Beanstalk

  • Host: 127.0.0.1
  • Port: 11300

Memcached

  • Host: 127.0.0.1
  • Port: 11211

You can change the connection settings of these services before running tests by using environment variables:

# Beanstalk
export TEST_BT_HOST="127.0.0.1"
export TEST_BT_PORT="11300"

# Memcached
export TEST_MC_HOST="127.0.0.1"
export TEST_MC_PORT="11211"

If you cannot run the tests, please refer to the .travis.yml file for more instructions how we test Incubator. For detailed information on our testing environment setting refer to tests/_bootstrap.php file.

The testing process

Incubator is built under Travis CI service. Every commit pushed to this repository will queue a build into the continuous integration service and will run all tests to ensure that everything is going well and the project is stable.

Contributing

See CONTRIBUTING.md

Contributions Index

Acl

Annotations

Behaviors

Cache

Config

Console

  • Phalcon\Cli\Console\Extended - Extended Console application that uses annotations in order to create automatically a help description (@sarrubia)
  • Phalcon\Cli\Environment - This component provides functionality that helps writing CLI oriented code that has runtime-specific execution params (@sergeyklay)

Database

Loader

  • Phalcon\Loader\Extended - This component extends Phalcon\Loader and added ability to set multiple directories per namespace (@sergeyklay)
  • Phalcon\Loader\PSR - Implements PSR-0 autoloader for your apps (!Piyush)

Logger

Mailer

Template Engines

ORM Validators

Error Handling

  • Phalcon\Error - Error handler used to centralize the error handling and displaying clean error pages (theDisco)
  • Phalcon\Utils\PrettyExceptions - Pretty Exceptions is an utility to show exceptions/errors/warnings/notices using a nicely visualization. (@phalcon / @kenjikobe)

Queue

Test

Translate

Session

Utils

  • Phalcon\Utils\Slug - Creates a slug for the passed string taking into account international characters. (@niden)
  • Phalcon\Avatar\Gravatar - Provides an easy way to retrieve a user's profile image from Gravatar site based on a given email address (@sergeyklay)

Validators

License

Incubator is open-sourced software licensed under the New BSD License. © Phalcon Framework Team and contributors

About

Incubator adapters/functionality for the Phalcon PHP Framework

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 99.9%
  • Shell 0.1%