Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/issue 1 #4

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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!"