Skip to content

Commit

Permalink
Merge pull request #456 from phel-lang/feature/update-gacela-0.15
Browse files Browse the repository at this point in the history
Update Gacela 0.15
  • Loading branch information
jenshaase committed Mar 26, 2022
2 parents c8f341d + b91a91c commit 9e64890
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 40 deletions.
6 changes: 3 additions & 3 deletions composer.json
Expand Up @@ -14,7 +14,7 @@
"require": {
"ext-json": "*",
"php": ">=8.0",
"gacela-project/gacela": "^0.14",
"gacela-project/gacela": "^0.15",
"symfony/console": "^5.4",
"phpunit/php-timer": "^5.0"
},
Expand All @@ -23,8 +23,8 @@
"phpunit/phpunit": "^9.5",
"vimeo/psalm": "^4.22",
"symfony/var-dumper": "^5.4",
"friendsofphp/php-cs-fixer": "^3.7",
"phpmetrics/phpmetrics": "^2.7",
"friendsofphp/php-cs-fixer": "^3.8",
"phpmetrics/phpmetrics": "^2.8",
"phpbench/phpbench": "^1.2"
},
"autoload": {
Expand Down
59 changes: 30 additions & 29 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions phel
Expand Up @@ -5,6 +5,7 @@ declare(strict_types=1);

use Gacela\Framework\Config\GacelaConfigBuilder\ConfigBuilder;
use Gacela\Framework\Gacela;
use Gacela\Framework\Setup\SetupGacela;
use Phel\Build\BuildFacade;
use Phel\Formatter\FormatterFacade;
use Phel\Interop\InteropFacade;
Expand All @@ -20,11 +21,12 @@ if (!file_exists($autoloadPath)) {

require $autoloadPath;

Gacela::bootstrap($projectRootDir, [
'config' => static function (ConfigBuilder $configBuilder): void {
$setupGacela = (new SetupGacela())
->setConfig(static function (ConfigBuilder $configBuilder): void {
$configBuilder->add('phel-config.php', 'phel-config-local.php');
},
]);
});

Gacela::bootstrap($projectRootDir, $setupGacela);

$interopFacade = new InteropFacade();
$formatterFacade = new FormatterFacade();
Expand Down
10 changes: 6 additions & 4 deletions src/php/Phel.php
Expand Up @@ -6,6 +6,7 @@

use Gacela\Framework\Config\GacelaConfigBuilder\ConfigBuilder;
use Gacela\Framework\Gacela;
use Gacela\Framework\Setup\SetupGacela;
use Phel\Run\RunFacade;

final class Phel
Expand All @@ -15,11 +16,12 @@ final class Phel
*/
public static function run(string $projectRootDir, string $namespace): void
{
Gacela::bootstrap($projectRootDir, [
'config' => static function (ConfigBuilder $configBuilder): void {
$setupGacela = (new SetupGacela())
->setConfig(static function (ConfigBuilder $configBuilder): void {
$configBuilder->add('phel-config.php', 'phel-config-local.php');
},
]);
});

Gacela::bootstrap($projectRootDir, $setupGacela);

$runFacade = new RunFacade();
$runFacade->runNamespace($namespace);
Expand Down

0 comments on commit 9e64890

Please sign in to comment.