2017 © Pedro Peláez
 

library command

Command is small library providing execution of system commands in OOP way

image

northern-lights/command

Command is small library providing execution of system commands in OOP way

  • Thursday, May 31, 2018
  • by xZero707
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 250 % Grown

The README.md

Command

Maintainability, (*1)

Command is small library providing execution of system commands in OOP way, (*2)

Deprecation

I have decided to deprecate this project. If you want to take over and continue maintaining it, welcome contact me.
This repository is archived and there will be no further updates.
The reason is that symfony/process is everything this project is, and was intended to be, but so much better, actively maintained and fully mature, so there is really no reason for this project to exist., (*3)

Install

Via Composer, (*4)

``` bash $ composer require northern-lights/command, (*5)

It really is that easy!

## Usage
``` php
<?php

namespace NorthernLights\Command\Example;

use NorthernLights\Command\Result\CommandResultInterface;
use function NorthernLights\Command\Run as command;

require __DIR__ . '/vendor/autoload.php';

/** @var CommandResultInterface $result */
$result = command('ls -all');

if ($result->isOk()) {
    // Note: $result->getOutput() will return an instance of OutputInterface which implements __toString()
    echo $result->getOutput() . PHP_EOL;
} else {
    echo "Command failed with status code " . $result->getExitCode() . PHP_EOL;
}

See Example, (*6)

Please pay attention to line "use function NorthernLights\Command\Run as command" which is crucial as it assigns function NorthernLights\Command\Run to commmand alias., (*7)

If you don't want to use this way, see Run function declaration, (*8)

PSR-2 Standard

Library strives to comply with PSR-2 coding standards, therefore we included following commands: ``` bash $ composer check-style $ composer fix-style, (*9)

Note: Second command will actually modify files

## PSR-4 Standard
Library complies with PSR-4 autoloading standard

## Testing

``` bash
$ composer php-lint
$ composer test

License

The MIT License (MIT). Please see License File for more information., (*10)

The Versions

31/05 2018

dev-master

9999999-dev

Command is small library providing execution of system commands in OOP way

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

31/05 2018

dev-dependabot/composer/phpunit/phpunit-tw-6.5|tw-7.0

dev-dependabot/composer/phpunit/phpunit-tw-6.5|tw-7.0

Command is small library providing execution of system commands in OOP way

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

31/05 2018

dev-dependabot/composer/phpunit/php-invoker-tw-1.1|tw-2.0

dev-dependabot/composer/phpunit/php-invoker-tw-1.1|tw-2.0

Command is small library providing execution of system commands in OOP way

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

02/05 2018

1.2.0

1.2.0.0

Command is small library providing execution of system commands in OOP way

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

01/05 2018

1.1.0

1.1.0.0

Command is small library providing execution of system commands in OOP way

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

27/04 2018

1.0.0

1.0.0.0

Command is small library providing execution of system commands in OOP way

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires