Skip to content

Commit

Permalink
Merge pull request #6 from pxgamer/feature/issue-1
Browse files Browse the repository at this point in the history
Feature/issue 1
  • Loading branch information
TheAdnan authored Oct 25, 2017
2 parents d649d6f + 4192d5e commit 002fbb7
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 21 deletions.
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
## Yiinker
*A REPL for Yii framework inspired by laravel's artisan Tinker*

*A REPL for the Yii framework inspired by [Laravel]'s Artisan Tinker.*

### Installation and usage

In the `protected` folder, add this to your composer.json file (if there isn't one, create an empty composer.json):

`"require": { `
` "psy/psysh": "0.7.*|0.8.*"`
`}
`
```json
{
"require": {
"psy/psysh": "0.7.* || 0.8.*"
}
}
```

Or simply run this command `composer require psy/psysh:@stable`.
Next, add the YiinkerCommand.php file to `protected/commands` folder.
Or simply run this command `composer require psy/psysh:@stable`.
Next, add the `src/YiinkerCommand.php` file to `protected/commands` folder.

Alternatively, you can run the `install.sh` script in your `protected` folder to do this job for you.

You can now run it in your terminal with:

`php yiic yiinker`

### License

This package is licensed under the [MIT license].

[Laravel]: https://laravel.com
[MIT license]: LICENSE
12 changes: 8 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

{
"require": {
"psy/psysh": "0.7.*|0.8.*"
}
"name": "theadnan/yiinker",
"description": "A REPL for the Yii framework inspired by Laravel's Artisan Tinker.",
"type": "library",
"minimum-stability": "stable",
"license": "MIT",
"require": {
"psy/psysh": "0.7.* || 0.8.*"
}
}
13 changes: 3 additions & 10 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
#!/bin/bash

echo "Installing Yiinker"

mkdir -p commands
touch commands/YiinkerCommand.php
echo "<?php
require (__DIR__ . '/../vendor/autoload.php');
class YiinkerCommand extends CConsoleCommand
{
public function actionIndex() {
echo 'Yiinker - Yii REPL application\n';
$_SERVER['argv'] = [];
call_user_func(Psy\bin());
}
}" >> commands/YiinkerCommand.php

cp src/YiinkerCommand commands/YiinkerCommand.php

composer require psy/psysh:@stable
composer dump-autoload

echo "Yiinker successfully installed!"

0 comments on commit 002fbb7

Please sign in to comment.