Bläddra i källkod

[ADD] Add interactive EPESI shell

tags/v1.8.2.4
Adam Bukowski 4 år sedan
förälder
incheckning
18d149686d
4 ändrade filer med 335 tillägg och 4 borttagningar
  1. +2
    -1
      composer.json
  2. +310
    -3
      composer.lock
  3. +1
    -0
      console.php
  4. +22
    -0
      console/ShellCommand.php

+ 2
- 1
composer.json Visa fil

@@ -6,7 +6,8 @@
"symfony/http-foundation": "^2.7",
"phpdocumentor/reflection-docblock": "^2.0.4",
"ifsnop/mysqldump-php": "dev-master",
"memio/memio": "^1.0"
"memio/memio": "^1.0",
"psy/psysh": "@stable"
},
"scripts": {
"post-install-cmd": [


+ 310
- 3
composer.lock Visa fil

@@ -4,10 +4,43 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "5c2e6a9c3c26e811d844d7b5c5612cd9",
"content-hash": "53b3d2a594d3e8618516f32efcc2f652",
"hash": "46daeee877468c2f1e248fe60c757992",
"content-hash": "d11f92f5f9d2fa06022509ca58979b88",
"packages": [
{
"name": "dnoegel/php-xdg-base-dir",
"version": "0.1",
"source": {
"type": "git",
"url": "https://github.com/dnoegel/php-xdg-base-dir.git",
"reference": "265b8593498b997dc2d31e75b89f053b5cc9621a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/265b8593498b997dc2d31e75b89f053b5cc9621a",
"reference": "265b8593498b997dc2d31e75b89f053b5cc9621a",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"require-dev": {
"phpunit/phpunit": "@stable"
},
"type": "project",
"autoload": {
"psr-4": {
"XdgBaseDir\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "implementation of xdg base directory specification for php",
"time": "2014-10-24 07:27:01"
},
{
"name": "ifsnop/mysqldump-php",
"version": "dev-master",
"source": {
@@ -102,6 +135,93 @@
"time": "2014-11-20 16:49:30"
},
{
"name": "jakub-onderka/php-console-color",
"version": "0.1",
"source": {
"type": "git",
"url": "https://github.com/JakubOnderka/PHP-Console-Color.git",
"reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1",
"reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"require-dev": {
"jakub-onderka/php-code-style": "1.0",
"jakub-onderka/php-parallel-lint": "0.*",
"jakub-onderka/php-var-dump-check": "0.*",
"phpunit/phpunit": "3.7.*",
"squizlabs/php_codesniffer": "1.*"
},
"type": "library",
"autoload": {
"psr-0": {
"JakubOnderka\\PhpConsoleColor": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-2-Clause"
],
"authors": [
{
"name": "Jakub Onderka",
"email": "jakub.onderka@gmail.com",
"homepage": "http://www.acci.cz"
}
],
"time": "2014-04-08 15:00:19"
},
{
"name": "jakub-onderka/php-console-highlighter",
"version": "v0.3.2",
"source": {
"type": "git",
"url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git",
"reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/7daa75df45242c8d5b75a22c00a201e7954e4fb5",
"reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5",
"shasum": ""
},
"require": {
"jakub-onderka/php-console-color": "~0.1",
"php": ">=5.3.0"
},
"require-dev": {
"jakub-onderka/php-code-style": "~1.0",
"jakub-onderka/php-parallel-lint": "~0.5",
"jakub-onderka/php-var-dump-check": "~0.1",
"phpunit/phpunit": "~4.0",
"squizlabs/php_codesniffer": "~1.5"
},
"type": "library",
"autoload": {
"psr-0": {
"JakubOnderka\\PhpConsoleHighlighter": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jakub Onderka",
"email": "acci@acci.cz",
"homepage": "http://www.acci.cz/"
}
],
"time": "2015-04-20 18:58:01"
},
{
"name": "memio/linter",
"version": "v1.0.2",
"source": {
@@ -406,6 +526,57 @@
"time": "2015-12-01 16:49:43"
},
{
"name": "nikic/php-parser",
"version": "v2.1.1",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "4dd659edadffdc2143e4753df655d866dbfeedf0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4dd659edadffdc2143e4753df655d866dbfeedf0",
"reference": "4dd659edadffdc2143e4753df655d866dbfeedf0",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=5.4"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"bin": [
"bin/php-parse"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.1-dev"
}
},
"autoload": {
"psr-4": {
"PhpParser\\": "lib/PhpParser"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Nikita Popov"
}
],
"description": "A PHP parser written in PHP",
"keywords": [
"parser",
"php"
],
"time": "2016-09-16 12:04:44"
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "2.0.4",
"source": {
@@ -548,6 +719,78 @@
"time": "2016-10-10 12:19:37"
},
{
"name": "psy/psysh",
"version": "v0.7.2",
"source": {
"type": "git",
"url": "https://github.com/bobthecow/psysh.git",
"reference": "e64e10b20f8d229cac76399e1f3edddb57a0f280"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/e64e10b20f8d229cac76399e1f3edddb57a0f280",
"reference": "e64e10b20f8d229cac76399e1f3edddb57a0f280",
"shasum": ""
},
"require": {
"dnoegel/php-xdg-base-dir": "0.1",
"jakub-onderka/php-console-highlighter": "0.3.*",
"nikic/php-parser": "^1.2.1|~2.0",
"php": ">=5.3.9",
"symfony/console": "~2.3.10|^2.4.2|~3.0",
"symfony/var-dumper": "~2.7|~3.0"
},
"require-dev": {
"fabpot/php-cs-fixer": "~1.5",
"phpunit/phpunit": "~3.7|~4.0|~5.0",
"squizlabs/php_codesniffer": "~2.0",
"symfony/finder": "~2.1|~3.0"
},
"suggest": {
"ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)",
"ext-pdo-sqlite": "The doc command requires SQLite to work.",
"ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.",
"ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history."
},
"bin": [
"bin/psysh"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-develop": "0.8.x-dev"
}
},
"autoload": {
"files": [
"src/Psy/functions.php"
],
"psr-4": {
"Psy\\": "src/Psy/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Justin Hileman",
"email": "justin@justinhileman.info",
"homepage": "http://justinhileman.com"
}
],
"description": "An interactive shell for modern PHP.",
"homepage": "http://psysh.org",
"keywords": [
"REPL",
"console",
"interactive",
"shell"
],
"time": "2016-03-09 05:03:14"
},
{
"name": "symfony/console",
"version": "v2.8.14",
"source": {
@@ -894,6 +1137,69 @@
"time": "2016-11-14 01:06:16"
},
{
"name": "symfony/var-dumper",
"version": "v3.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "86f4e8aeb07bd5fb467f6bdd599a30298d19fa5f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/86f4e8aeb07bd5fb467f6bdd599a30298d19fa5f",
"reference": "86f4e8aeb07bd5fb467f6bdd599a30298d19fa5f",
"shasum": ""
},
"require": {
"php": ">=5.5.9",
"symfony/polyfill-mbstring": "~1.0"
},
"require-dev": {
"twig/twig": "~1.20|~2.0"
},
"suggest": {
"ext-symfony_debug": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
}
},
"autoload": {
"files": [
"Resources/functions/dump.php"
],
"psr-4": {
"Symfony\\Component\\VarDumper\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony mechanism for exploring and dumping PHP variables",
"homepage": "https://symfony.com",
"keywords": [
"debug",
"dump"
],
"time": "2016-11-29 10:33:09"
},
{
"name": "twig/twig",
"version": "v1.28.1",
"source": {
@@ -959,7 +1265,8 @@
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"ifsnop/mysqldump-php": 20
"ifsnop/mysqldump-php": 20,
"psy/psysh": 0
},
"prefer-stable": false,
"prefer-lowest": false,


+ 1
- 0
console.php Visa fil

@@ -39,4 +39,5 @@ $application->add(new \Epesi\Console\Backup\BackupFilesCommand());
$application->add(new \Epesi\Console\Backup\BackupAllCommand());
$application->add(new \Epesi\Console\Backup\ListBackupsCommand());
$application->add(new \Epesi\Console\Develop\CreateModuleCommand());
$application->add(new \Epesi\Console\ShellCommand());
$application->run($input);

+ 22
- 0
console/ShellCommand.php Visa fil

@@ -0,0 +1,22 @@
<?php

namespace Epesi\Console;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class ShellCommand extends Command
{
protected function configure()
{
$this
->setName('shell')
->setDescription('Run interactive shell');
}

protected function execute(InputInterface $input, OutputInterface $output)
{
eval(\Psy\sh());
}
}

Laddar…
Avbryt
Spara