Created
July 19, 2014 15:56
-
-
Save tom--/dad3fc7925e765d0d093 to your computer and use it in GitHub Desktop.
Start the wonderful Boris PHP REPL (https://github.com/d11wtq/boris) with Yii2. Handy for trying things out. Both files go in my home directory
This file contains hidden or 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
| <?php | |
| require __DIR__ . '/startYii2.php'; | |
| $boris->setPrompt('yii2> '); |
This file contains hidden or 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
| <?php | |
| // Derived from Yii2's phpunit bootstrap | |
| // ensure we get report on all possible php errors | |
| error_reporting(-1); | |
| define('YII_ENABLE_ERROR_HANDLER', false); | |
| define('YII_DEBUG', true); | |
| $_SERVER['SCRIPT_NAME'] = '/' . __DIR__; | |
| $_SERVER['SCRIPT_FILENAME'] = __FILE__; | |
| $yii2dir = '/Volumes/Sites/yii2'; | |
| // require composer autoloader if available | |
| $composerAutoload = $yii2dir . '/vendor/autoload.php'; | |
| if (is_file($composerAutoload)) { | |
| require_once($composerAutoload); | |
| } | |
| require_once($yii2dir . '/framework/Yii.php'); | |
| new \yii\console\Application([ | |
| 'id' => 'boris', | |
| 'basePath' => __DIR__, | |
| ]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment