Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A collection of Phing Tasks for a ZF2 app.
PHP
Tag: 1.0.1

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src/task
.gitignore
README.md
composer.json

README.md

zf2-phing-task

A collection of Phing Tasks for a ZF2 app.

Note: it will look for config/application.config.yml instead of config/application.config.php on bootstrap. If you use PHP config files, you'll have to change the code in each Task's main() method.

Installation

Composer:

{
    "require": {
        "heartsentwined/zf2-phing-task": "1.*"
    }
}

Phing is not bundled with this package.

You can install it through Composer and use the CLI at vendor/bin/phing:

{
    "require": {
        "phing/phing": "*"
    }
}

or through PEAR and use the CLI at phing:

$ pear channel-discover pear.phing.info
$ pear install [--alldeps] phing/phing

Usage

ClassmapTask

Generate a classmap for the directory foo/library (and its subdirectories), save it at foo/autoload_classmap.php.

<project>
    <target>
        <includepath classpath="vendor/heartsentwined/zf2-phing-task/src/task" />
        <taskdef name="classmap" classname="ClassmapTask" />
        <classmap dir="foo/library" output="foo/autoload_classmap.php" />
    </target>
</project>

DoctrineEntityTask

Generate entities for the EntityManager doctrine.entitymanager.orm_default, base directory at foo/src, with filter Foo\Entity.

<project>
    <target>
        <includepath classpath="vendor/heartsentwined/zf2-phing-task/src/task" />
        <taskdef name="d-entity" classname="DoctrineEntityTask" />
        <d-proxy em="doctrine.entitymanager.orm_default" filter="Foo\Entity" output="foo/src" />
    </target>
</project>

DoctrineRepoTask

Generate repositories for the EntityManager doctrine.entitymanager.orm_default, base directory at foo/src, with filter Foo\Entity.

<project>
    <target>
        <includepath classpath="vendor/heartsentwined/zf2-phing-task/src/task" />
        <taskdef name="d-repo" classname="DoctrineRepoTask" />
        <d-repo em="doctrine.entitymanager.orm_default" filter="Foo\Entity" output="foo/src" />
    </target>
</project>

DoctrineProxyTask

Generate proxies for the EntityManager doctrine.entitymanager.orm_default, at directory foo/cache/proxy, with filter Foo\Entity.

<project>
    <target>
        <includepath classpath="vendor/heartsentwined/zf2-phing-task/src/task" />
        <taskdef name="d-proxy" classname="DoctrineProxyTask" />
        <d-proxy em="doctrine.entitymanager.orm_default" filter="Foo\Entity" output="foo/cache/proxy" />
    </target>
</project>

DoctrineUpdateTask

Update database schema for the EntityManager doctrine.entitymanager.orm_default.

<project>
    <target>
        <includepath classpath="vendor/heartsentwined/zf2-phing-task/src/task" />
        <taskdef name="d-update" classname="DoctrineUpdateTask" />
        <d-update em="doctrine.entitymanager.orm_default" />
    </target>
</project>

DoctrineDropTask

Drop all database tables from the connection of the EntityManager doctrine.entitymanager.orm_default.

This Task differs from Doctrine CLI's behavior. It drops ALL tables, not just those found in the metadata mapping files.

<project>
    <target>
        <includepath classpath="vendor/heartsentwined/zf2-phing-task/src/task" />
        <taskdef name="d-drop" classname="DoctrineDropTask" />
        <d-drop em="doctrine.entitymanager.orm_default" />
    </target>
</project>

TwigTask

Load the Twig template foo/bar.

<project>
    <target>
        <includepath classpath="vendor/heartsentwined/zf2-phing-task/src/task" />
        <taskdef name="twig" classname="TwigTask" />
        <twig file="foo/bar" />
    </target>
</project>
Something went wrong with that request. Please try again.