Giter VIP home page Giter VIP logo

phing-symfony-command-task's Introduction

Phing Symfony Command Task

This Phing task allows you to call commands from a Symfony Console Application comfortably.

There is a built in SymfonyConsoleTask in Phing, but with this custom task you can:

  • see the output as soon as it is ready (displaying progress bars)
  • configure default Symfony Application Console location
  • configure the executable with which the Console is run (environments on Windows usually require running the console trough PHP binary, not executing directly), again with a configurable default value
  • escaping argument values and paths as in the ExecTask

Usage

To call the commands in the simplest possible way like this:

<symfony-cmd cmd="test:test"/>

you have to configure the default values:

<property name="symfony-command.default.app" value="path/to/console"/>
<property name="symfony-command.default.executable" value="php"/>

Of course you can set these properties in any other regular way.

If you do not want to use the defaults, or you want to override them you can always specify both or one of them:

<symfony-cmd executable="php-cgi" app="path/to/another/console" cmd="test:test"/>

If you want to pass any additional parameters, you can use <arg> elements to do so (as in ExecTask):

<symfony-cmd cmd="test:test">
  <arg value="--strict"/>
  <arg path="path/to/tests"/>
</symfony-cmd>

Installation

  1. Install package vasek-purchart/phing-symfony-command-task with Composer:
composer require vasek-purchart/phing-symfony-command-task
  1. Register this task under a name of your choosing.

There are several ways how to register a task, see the TaskDefTask documentation. The recommended way is putting this in your build.xml:

<taskdef name="symfony-cmd" classname="VasekPurchart\Phing\SymfonyCommand\SymfonyCommandTask"/>

You can pick any other name for the command if you would like to.

phing-symfony-command-task's People

Contributors

vasekpurchart avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

phing-symfony-command-task's Issues

Phing3 support?

Is Phing version 3 supported? Looking at UPGRADING.md from official phing repository, it would suggest very little breaking changes between 2.x and 3.0
However composer is blocking installation of this plugin due to version restrictions. Could you also include support for 3.0 in your composer.json?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.