Skip to content

Commit

Permalink
Merge branch '2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
crynobone committed Jul 5, 2014
2 parents 9774b55 + 10c42a2 commit 73538c4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ To see a working example of testbench including how to set your configuration, c

### Cannot redeclare crypt_random_string()

> To avoid this, please use `"phpseclib/phpseclib": ">=0.3.7"` which already solve the issue, otherwise read the alternative solution below.
Due to the requirement with Laravel Framework 4.1, we need to maintain a modified version of `phpseclib/phpseclib` for developing Laravel/PHP packages using workbench. In order to make this work please include the following code in both your `composer.json` file for `app` and `workbench`:

```json
Expand Down
6 changes: 0 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
"Orchestra\\Testbench\\" : "src/Testbench/"
}
},
"repositories": [
{
"type": "vcs",
"url": "git://github.com/orchestral/phpseclib.git"
}
],
"require": {
"php": ">=5.4.0",
"laravel/framework": "4.3.*"
Expand Down
2 changes: 0 additions & 2 deletions src/Testbench/BehatFeatureContext.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php namespace Orchestra\Testbench;

use Behat\Behat\Context\BehatContext;
use Illuminate\Auth\UserInterface;
use Orchestra\Testbench\Traits\ApplicationClientTrait;
use Orchestra\Testbench\Traits\ApplicationTrait;
use Orchestra\Testbench\Traits\BehatPHPUnitAssertionsTrait;
Expand Down Expand Up @@ -46,4 +45,3 @@ protected function getEnvironmentSetUp($app)
// Define your environment setup.
}
}

12 changes: 8 additions & 4 deletions src/Testbench/Traits/ApplicationTrait.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php namespace Orchestra\Testbench\Traits;

use Illuminate\Config\EnvironmentVariables;
use Illuminate\Config\Repository as Config;
use Illuminate\Foundation\Application;
use Illuminate\Foundation\AliasLoader;
Expand Down Expand Up @@ -151,8 +152,8 @@ public function createApplication()
$app = new Application;

$app->detectEnvironment(array(
'local' => array('your-machine-name'),
));
'local' => array('your-machine-name'),
));

$app->bindInstallPaths($this->getApplicationPaths());

Expand All @@ -163,8 +164,11 @@ public function createApplication()
Facade::clearResolvedInstances();
Facade::setFacadeApplication($app);

$config = new Config($app->getConfigLoader(), $app['env']);
$app->instance('config', $config);
$app->registerCoreContainerAliases();

with($envVariables = new EnvironmentVariables($app->getEnvironmentVariablesLoader()))->load($app['env']);

$app->instance('config', $config = new Config($app->getConfigLoader(), $app['env']));
$app->startExceptionHandling();

date_default_timezone_set($this->getApplicationTimezone());
Expand Down

0 comments on commit 73538c4

Please sign in to comment.