Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #4 from ergonode/develop
Browse files Browse the repository at this point in the history
Hotfix - missing files
  • Loading branch information
bleto committed Jun 14, 2019
2 parents 9ca9529 + bc007fa commit eed8dfb
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
/public/bundles/
/var/
/vendor/
/bin/
!/bin/console
/import
/tmp
.history
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<p align="center">
<a href="https://ergonode.com" target="_blank">
<img src="https://img.shields.io/badge/version-0.1.0-4c9aff.svg" alt="Version">
<img src="https://img.shields.io/badge/version-0.1.1-4c9aff.svg" alt="Version">
</a>
<a href="https://ergonode.com" target="_blank">
<img src="https://img.shields.io/badge/version%20code-Vegas-00bc87.svg" alt="Code Version">
Expand All @@ -19,7 +19,7 @@
<img src="https://img.shields.io/badge/docs-read-ffc108.svg" alt="Docs">
</a>
<a href="https://github.com/ergonode/backend/blob/master/LICENSE.txt" target="_blank">
<img src="https://img.shields.io/github/license/ergonode/ergonode.svg" alt="License">
<img src="https://img.shields.io/github/license/ergonode/backend.svg" alt="License">
</a>
</p>
<br>
Expand Down
3 changes: 3 additions & 0 deletions bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/*
!.gitignore
!console
43 changes: 43 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env php
<?php

use App\Kernel;
use Doctrine\Common\Annotations\AnnotationRegistry;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
use Symfony\Component\Dotenv\Dotenv;

set_time_limit(0);

require __DIR__.'/../vendor/autoload.php';

// Fixes problems with JMS Serializer
AnnotationRegistry::registerLoader('class_exists');

if (!class_exists(Application::class)) {
throw new \RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.');
}

if (!isset($_SERVER['APP_ENV'])) {
if (!class_exists(Dotenv::class)) {
throw new \RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.');
}
(new Dotenv())->load(__DIR__.'/../.env');
}

$input = new ArgvInput();
$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true);
$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true);

if ($debug) {
umask(0000);

if (class_exists(Debug::class)) {
Debug::enable();
}
}

$kernel = new Kernel($env, $debug);
$application = new Application($kernel);
$application->run($input);

0 comments on commit eed8dfb

Please sign in to comment.