-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from pxgamer/feature/issue-1
Feature/issue 1
- Loading branch information
Showing
3 changed files
with
29 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!" |