• Stars
    star
    1,320
  • Rank 35,625 (Top 0.8 %)
  • Language
    JavaScript
  • License
    Other
  • Created over 12 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Phalcon Developer Tools

Phalcon Devtools

codecov Latest Version Software License Total Downloads Daily Downloads Build Status

Phalcon WebTools

What's Phalcon?

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

What are Devtools?

This tools provide you useful scripts to generate code helping to develop faster and easy applications that use with Phalcon framework.

Requirements

  • PHP >= 7.2
  • Phalcon >= 4.0.0

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-dev": {
        "phalcon/devtools": "~4.1"
    }
}

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

{
    "require-dev": {
        "phalcon/devtools": "^3.4"
    }
}

Run the composer installer:

php composer.phar install

Build .phar

Install composer and box in a common location or in your project:

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

Build phar file phalcon-devtools

bin/box build -v
chmod +xr ./phalcon.phar
# Test it!
php ./phalcon.phar

Installation via Git

Phalcon Devtools can be installed by using Git.

Just clone the repo and checkout the current branch:

cd ~
git clone https://github.com/phalcon/phalcon-devtools.git
cd phalcon-devtools

This method requires a little bit more of setup. Probably the best way would be to symlink the phalcon file to a directory in your PATH, so you can issue phalcon commands in each directory where a phalcon project resides.

cd phalcon-devtools
composer install
ln -s $(pwd)/phalcon /usr/bin/phalcon
chmod ugo+x /usr/bin/phalcon

If you get a "phalcon: command not found" message while creating the symlink, make an alias.

alias phalcon=/home/[USERNAME]/phalcon-devtools/phalcon

Usage

To get a list of available commands just execute following:

phalcon commands help

This command should display something similar to:

$ phalcon --help

Phalcon DevTools (4.1.0)

Help:
  Lists the commands available in Phalcon DevTools

Available commands:
  info             (alias of: i)
  commands         (alias of: list, enumerate)
  controller       (alias of: create-controller)
  module           (alias of: create-module)
  model            (alias of: create-model)
  all-models       (alias of: create-all-models)
  project          (alias of: create-project)
  scaffold         (alias of: create-scaffold)
  migration        (alias of: create-migration)
  webtools         (alias of: create-webtools)
  serve            (alias of: server)
  console          (alias of: shell, psysh)

Database adapter

Should add adapter parameter in your db config file (if you use not MySQL database).

For PostgreSQL it will be something like:

$config = [
  'host'     => 'localhost',
  'dbname'   => 'my_db_name',
  'username' => 'my_db_user',
  'password' => 'my_db_user_password',
  'adapter'  => 'Postgresql'
];

Configuration file

By creating config.json or any other configuration file called config in root project you can set options for all possible commands, for example:

{
  "migration" : {
    "migrations": "App/Migrations",
    "config": "App/Config/db.ini"
  },
  "controller" : {
    "namespace": "Phalcon\\Test",
    "directory": "App/Controllers",
    "base-class": "App\\MyAbstractController"
  }
}

And then you can use phalcon migration run or phalcon controller SomeClass and those commands will be executed with options from file. Arguments provided by developer from command line will overwrite existing one in a file.

License

Phalcon Developer Tools is open source software licensed under the New BSD License.
© Phalcon Framework Team and contributors

More Repositories

1

cphalcon

High performance, full-stack PHP framework delivered as a C extension.
PHP
10,727
star
2

mvc

Phalcon MVC Examples
PHP
810
star
3

incubator

Incubator adapters/functionality for the Phalcon PHP Framework
PHP
732
star
4

awesome-phalcon

A curated list of awesome Phalcon libraries and resources
Ruby
606
star
5

vokuro

Sample application for Phalcon Framework (Acl, Auth, Security)
PHP
369
star
6

forum

Phalcon official Forum
PHP
364
star
7

invo

Sample application for the Phalcon PHP Framework
PHP
347
star
8

docs

Phalcon Framework documentation
HTML
320
star
9

phalcon

[WIP] Phalcon Framework. Work will continue after release of v5.0
PHP
219
star
10

tutorial

Phalcon Tutorial
PHP
159
star
11

dockerfiles

Phalcon Dockerfiles used for internal purposes.
Dockerfile
152
star
12

ide-stubs

Phalcon IDE Stubs
PHP
150
star
13

website

Archived Website repository - https://github.com/phalcon/phalcon.io
CSS
109
star
14

rest-api

Implementation of an API application using the Phalcon Framework
PHP
86
star
15

album-o-rama

Sample application for the Phalcon PHP Framework.
CSS
84
star
16

builtwith

Websites built with Phalcon
CSS
39
star
17

blog

Phalcon Framework's blog
CSS
32
star
18

volt-sublime-textmate

Volt syntax highlight for Sublime Text 2/Textmate
30
star
19

phalconist

Resources catalog for Phalcon Framework
PHP
28
star
20

migrations

Generate or migrate database changes via migrations.
PHP
26
star
21

packagecloud

☁️ Phalcon Build Project
Shell
26
star
22

dd

This package will add the dd and dump helpers to your Phalcon application.
PHP
20
star
23

homebrew-tap

Official Homebrew tap for Phalcon PHP Framework (brew install phalcon)
Ruby
17
star
24

cli-options-parser

Command line arguments/options parser to use in Phalcon applications.
PHP
16
star
25

docs-app

Official Phalcon documentation website.
HTML
14
star
26

incubator-mailer

Send mail with Phalcon
PHP
12
star
27

bridge-swoole

Bridge to run Phalcon with Swoole.
PHP
7
star
28

incubator-session

Extra Phalcon Session Adapters.
PHP
7
star
29

incubator-logger

Extended Adapters for Phalcon Framework Logger component.
PHP
7
star
30

middlewares

Phalcon Middlewares
6
star
31

phalcon.io

phalcon.io website
HTML
6
star
32

incubator-mongodb

MongoDB Database adapter for Phalcon Framework.
PHP
5
star
33

incubator-acl

Extra components for Acl
PHP
5
star
34

docker

Official docker images with Phalcon framework.
Dockerfile
5
star
35

traits

Traits used primarily in the v6 package but also available as a helper package for applications
PHP
4
star
36

incubator-config

PHP
4
star
37

incubator-avatar

Phalcon Avatar Adapters
PHP
4
star
38

forum-static

Phosphorum Static
HTML
3
star
39

volt

Volt template engine.
PHP
3
star
40

incubator-events

Extra Phalcon Events Adapters.
PHP
3
star
41

link

A (manual) URL shortener for Phalcon sites
CSS
3
star
42

platform

A foundation to build applications using Phalcon.
PHP
3
star
43

incubator-translate

Extra Phalcon Translate Adapters.
PHP
3
star
44

assets

This repository holds all the assets that Phalcon sites use
CSS
2
star
45

incubator-cli

PHP
2
star
46

incubator-validation

Extra Phalcon Validator Adapters.
PHP
2
star
47

incubator-cache

Extra Phalcon Cache Adapters.
PHP
2
star
48

incubator-db

PHP
2
star
49

incubator-test

Incubator - Test helpers for PhpUnit and Codeception
PHP
2
star
50

proxy-psr3

Package to offer PSR-3 (Logger) compatibility with Phalcon classes from the PHP userland
PHP
2
star
51

debugbar

PHP
1
star
52

incubator-error

1
star
53

forum-ng

New responsive theme for Phosphorum
HTML
1
star
54

proxy-psr16

Package to offer PSR-16 (Cache) compatibility with Phalcon classes from the PHP userland
PHP
1
star
55

incubator-annotations

Extra Phalcon Annotations Adapters.
PHP
1
star
56

proxy-psr13

Package to offer PSR-13 (Link) compatibility with Phalcon classes from the PHP userland
PHP
1
star