-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
41 changed files
with
1,032 additions
and
531 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ dist | |
coverage.xml | ||
bin | ||
!bin/console | ||
!bin/interactive* | ||
.phpunit.result.cache | ||
var | ||
.idea |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in(__DIR__) | ||
->exclude('config') | ||
->exclude('var') | ||
->exclude('wordpress') | ||
->exclude('public/bundles') | ||
->exclude('public/build') | ||
// exclude files generated by Symfony Flex recipes | ||
->notPath('bin/interactive') | ||
->notPath('public/index.php') | ||
->notPath('node_modules') | ||
; | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'linebreak_after_opening_tag' => true, | ||
'mb_str_functions' => true, | ||
'no_php4_constructor' => true, | ||
'no_unreachable_default_argument_value' => true, | ||
'no_useless_else' => true, | ||
'no_useless_return' => true, | ||
'php_unit_strict' => true, | ||
'phpdoc_order' => true, | ||
'strict_comparison' => true, | ||
'strict_param' => true, | ||
'no_multiline_whitespace_around_double_arrow' => false, | ||
'concat_space' => ['spacing' => 'one'], | ||
]) | ||
->setFinder($finder) | ||
->setCacheFile(__DIR__.'/var/.php_cs.cache') | ||
; |
This file was deleted.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env php | ||
<?php declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the InteractiveBundle package. | ||
* | ||
* (c) Théo FIDRY <theo.fidry@gmail.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
if (false === in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) { | ||
echo 'Warning: The interactive shell should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL; | ||
} | ||
|
||
set_time_limit(0); | ||
|
||
require_once __DIR__.'/../vendor/autoload.php'; | ||
|
||
use Jrmgx\InteractiveBundle\Functional\AppKernel; | ||
use Symfony\Bundle\FrameworkBundle\Console\Application; | ||
use Symfony\Component\Console\Input\ArgvInput; | ||
use Symfony\Component\Console\Output\ConsoleOutput; | ||
use Symfony\Component\ErrorHandler\Debug; | ||
|
||
$input = new ArgvInput(); | ||
$output = new ConsoleOutput(); | ||
|
||
$env = $input->getParameterOption( | ||
['--env', '-e'], | ||
getenv('APP_ENV') ?: 'dev' | ||
); | ||
|
||
$debug = (getenv('APP_DEBUG') !== '0') | ||
&& !$input->hasParameterOption(['--no-debug', '']) | ||
&& $env !== 'prod' | ||
; | ||
|
||
if ($debug) { | ||
umask(0000); | ||
|
||
if (class_exists(Debug::class)) { | ||
Debug::enable(); | ||
} | ||
} | ||
|
||
$application = new Application(new AppKernel($env, $debug)); | ||
$application->setDefaultCommand('interactive'); | ||
$application->doRun($input, $output); |
Oops, something went wrong.