2017 © Pedro Peláez
 

library phingy

A useful collection of build scripts for managing PHP sites

image

3ev/phingy

A useful collection of build scripts for managing PHP sites

  • Tuesday, May 31, 2016
  • by 3ev
  • Repository
  • 5 Watchers
  • 2 Stars
  • 2,449 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 45 Versions
  • 2 % Grown

The README.md

Phingy

Phingy is a small collection of build scripts which you can mix together differently depending on your project. To use these scripts, you include the required ones in your build script starting with your own project.xml., (*1)

Installation & dependencies

Phingy is installed via Composer. Add the following to your project's composer.json and run composer install:, (*2)

{
    "require": {
        "3ev/phingy": "~4.0"
    },
    "scripts": {
        "post-install-cmd": [
            "Tev\\Phingy\\ComposerScripts::postInstall"
        ]
    },
    "config": {
        "bin-dir": "bin"
    }
}

You'll then be able to run Phing using, (*3)

$ bin/phing

'Skel' files

Phingy will automatically generate files from .skel files anywhere in your project. These files can include Phing properties which will be replaced with their actual values at compile time., (*4)

You may for example want to create an Apache vhost config file for your project, which you'll be able to commit to source control without having to including any environment specific config. Like so:, (*5)

# In config/httpd.conf.skel

<VirtualHost *:80>
    ServerName ${build.url}
    DocumentRoot ${build.public_dir}
</VirtualHost>

Database tasks & S3

If you'd like to make use of the database tasks that push/pull database dumps from Amazon S3, you will need to install the Pear Amazon S3 package:, (*6)

$ pear install Services_Amazon_S3

This will allow you to backup and download your full database to/from S3 using:, (*7)

$ bin/phing db:commit
$ bin/phing db:update

There are numerous other database tasks that make it easy to configure a MySQL database for your project., (*8)

Setting up a webserver

Phingy includes a build:server task which will by default configure and install Apache configuration for your project., (*9)

Config will be symlinked from config/httpd.conf to /etc/apache2/sites-enabled, so you can commit a file to version control (or use a .skel extension) and simply run, (*10)

$ sudo bin/phing build:server

to start your project running on Apache., (*11)

Platform specific tasks

Phingy includes a few 'platform' specifc task sets, as followss:, (*12)

  • typo3 Typo3 specific tasks (includes db). Will set up TYPO3 on build, and provides some utility methods.
  • sphinx Sphinx specific tasks. Provides tasks to index Sphinx data for the project.
  • laravel Laravel specific tasks. Provides tasks to work with the Laravel framework

Setting up your project with Platforms

When you run composer install, you will be prompted to pick a template to use for your project. Selecting a template will create a file called project.xml in your project's config/ directory., (*13)

The project.xml file includes a number of hooks you can add to for project-specific tasks. Currently, These are:, (*14)

project:config                Configure extra properties to use in your build
project:build:before          Run some tasks before `build`
project:build:after           Run some tasks after `build`
project:build:housekeeping    Cleanup any uneeded files or data

Each platform includes each of these hooks as well, of the form [platform]:build:before etc. If you'd like to make use of a platform, simply include it with:, (*15)

<import file="${phingy.path}/scripts/platform/[platform].xml" />

and then call each of its hooks in your project-specific hooks:, (*16)

<target name="project:build:before">
    <phingcall target="[platform]:build:before" />
</target>

Note: If you pick a non-default template (like 'typo3'), all of this will be handled for you., (*17)

Adding your own project specific tasks and config

You can add any of your own tasks in config/project.xml. These should be namespaced with project: for convention. You can either add standalone tasks, or call them in any of the available hooks., (*18)

Overriding existing tasks

If you need to, you can override built in tasks by creating a new task with the same name in your project.xml. You shouldn't have to do this though, as the built in hooks provide enough flexibility for you to customise tasks., (*19)

Adding extra config

You add should any project specific config to config/project.properties if possible. If you need to prompt the user for it during build, you can do so in the project:config hook., (*20)

About ./build.xml

build.xml sits in the root of your project, and is symlinked from vendor/. You should add this file to your .gitignore., (*21)

The Versions

31/05 2016

dev-master

9999999-dev http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

31/05 2016

v4.0.0

4.0.0.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

18/03 2016

v3.0.0

3.0.0.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

18/03 2016

v2.0.0

2.0.0.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

15/01 2016

v1.0.1

1.0.1.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

27/11 2015

v1.0.0

1.0.0.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

27/11 2015

v0.13.0

0.13.0.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

18/08 2015

v0.12.3

0.12.3.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

03/06 2015

v0.12.2

0.12.2.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

22/04 2015

v0.12.1

0.12.1.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

01/04 2015

v0.12.0

0.12.0.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

24/03 2015

v0.11.0

0.11.0.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

16/02 2015

v0.10.0

0.10.0.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

04/12 2014

v0.9.1

0.9.1.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

04/12 2014

v0.9.0

0.9.0.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

30/09 2014

v0.8.1

0.8.1.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

30/09 2014

v0.8.0

0.8.0.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

30/09 2014

v0.7.5

0.7.5.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

30/09 2014

v0.7.4

0.7.4.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

29/04 2014

v0.7.3

0.7.3.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

28/04 2014

v0.7.2

0.7.2.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

21/03 2014

v0.7.1

0.7.1.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

20/03 2014

v0.7.0

0.7.0.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

20/03 2014

v0.6.2

0.6.2.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

06/03 2014

v0.6.1

0.6.1.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

06/03 2014

v0.6.0

0.6.0.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

 

05/03 2014

v0.5.0

0.5.0.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

15/10 2013

v0.4.2

0.4.2.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

  • pear-pear/services_amazon_s3 0.4.0

 

30/09 2013

v0.4.1

0.4.1.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

  • pear-pear/services_amazon_s3 0.4.0

 

29/09 2013

v0.4.0

0.4.0.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

The Requires

  • pear-pear/services_amazon_s3 *

 

23/09 2013

v0.3.0

0.3.0.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

20/09 2013

v0.2.1

0.2.1.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

20/09 2013

v0.2.0

0.2.0.0 http://github.com/3ev/phingy

A useful collection of build scripts for managing PHP sites

  Sources   Download

06/09 2013

v0.1.4

0.1.4.0

  Sources   Download

05/09 2013

v0.1.3

0.1.3.0

  Sources   Download

02/09 2013

v0.1.2

0.1.2.0

  Sources   Download

02/09 2013

v0.1.1

0.1.1.0

  Sources   Download

29/08 2013

v0.1.0

0.1.0.0

  Sources   Download

20/08 2013

v0.0.7

0.0.7.0

  Sources   Download

19/08 2013

v0.0.6

0.0.6.0

  Sources   Download

19/08 2013

v0.0.5

0.0.5.0

  Sources   Download

19/08 2013

v0.0.4

0.0.4.0

  Sources   Download

16/08 2013

v0.0.3

0.0.3.0

  Sources   Download

14/08 2013

v0.0.2

0.0.2.0

  Sources   Download

13/08 2013

v0.0.1

0.0.1.0

  Sources   Download