Skip to content

Commit

Permalink
Rewrite as symfony
Browse files Browse the repository at this point in the history
  • Loading branch information
whikloj committed Dec 19, 2019
1 parent 879c9b7 commit 76b4a23
Show file tree
Hide file tree
Showing 33 changed files with 2,176 additions and 1,918 deletions.
65 changes: 35 additions & 30 deletions Gemini/composer.lock

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

21 changes: 21 additions & 0 deletions Houdini/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# In all environments, the following files are loaded if they exist,
# the later taking precedence over the former:
#
# * .env contains default values for the environment variables needed by the app
# * .env.local uncommitted file with local overrides
# * .env.$APP_ENV committed environment-specific defaults
# * .env.$APP_ENV.local uncommitted environment-specific overrides
#
# Real environment variables win over .env files.
#
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
#
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration

###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=6dc39d9beae73673bd864765298482be
#TRUSTED_PROXIES=127.0.0.1,127.0.0.2
#TRUSTED_HOSTS='^localhost|example\.com$'
###< symfony/framework-bundle ###
7 changes: 7 additions & 0 deletions Houdini/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

/var

###> symfony/phpunit-bridge ###
.phpunit
/phpunit.xml
###< symfony/phpunit-bridge ###
42 changes: 42 additions & 0 deletions Houdini/bin/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env php
<?php

use App\Islandora\Houdini\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;

if (false === in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.\PHP_SAPI.' SAPI'.\PHP_EOL;
}

set_time_limit(0);

require dirname(__DIR__).'/vendor/autoload.php';

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

$input = new ArgvInput();
if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) {
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
}

if ($input->hasParameterOption('--no-debug', true)) {
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
}

require dirname(__DIR__).'/config/bootstrap.php';

if ($_SERVER['APP_DEBUG']) {
umask(0000);

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

$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$application = new Application($kernel);
$application->run($input);
13 changes: 13 additions & 0 deletions Houdini/bin/phpunit
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env php
<?php

if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
exit(1);
}

if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
}

require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
88 changes: 66 additions & 22 deletions Houdini/composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
{
"name": "islandora/houdini",
"description": "Imagemagick as a web service",
"description": "Image processing microservice",
"type": "project",
"require": {
"islandora/crayfish-commons": "dev-dev"
},
"minimum-stability": "dev",
"prefer-stable": true,
"license": "MIT",
"authors": [
{
Expand All @@ -20,32 +15,81 @@
"role": "Maintainer"
}
],
"require": {
"php": "^7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"symfony/console": "^4.3",
"symfony/dotenv": "^4.3",
"symfony/flex": "^1.1",
"symfony/framework-bundle": "^4.3",
"symfony/yaml": "^4.3",
"symfony/web-server-bundle": "^4.3",
"symfony/monolog-bundle": "^3.4",
"islandora/crayfish-commons": "dev-symfony-flex"
},
"require-dev": {
"symfony/var-dumper": "^4.3",
"squizlabs/php_codesniffer": "^2.0",
"sebastian/phpcpd": "^3.0",
"symfony/phpunit-bridge": "^4.3"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"preferred-install": {
"*": "dist"
},
"sort-packages": true,
"platform": {
"php": "7.2"
}
},
"autoload": {
"psr-4": {
"Islandora\\Houdini\\": "src/"
"App\\Islandora\\Houdini\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Islandora\\Houdini\\Tests\\": "tests/"
}
},
"replace": {
"paragonie/random_compat": "2.*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php71": "*",
"symfony/polyfill-php70": "*",
"symfony/polyfill-php56": "*"
},
"scripts": {
"check": [
"phpcs --standard=PSR2 src tests",
"phpcpd --names *.php src"
"check": [
"./vendor/bin/phpcs --standard=PSR2 src tests",
"./vendor/bin/phpcpd --names *.php src tests"
],
"test": [
"@check",
"phpunit"
"php ./bin/phpunit"
],
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
]
},
"config": {
"sort-packages": true,
"platform": {
"php": "7.2"
}
"conflict": {
"symfony/symfony": "*"
},
"require-dev": {
"symfony/browser-kit": "^3.0",
"symfony/css-selector": "^3.0",
"phpunit/phpunit": "^5.0",
"squizlabs/php_codesniffer": "^2.0",
"sebastian/phpcpd": "^3.0"
"extra": {
"symfony": {
"allow-contrib": false,
"require": "4.3.*"
}
}
}
Loading

0 comments on commit 76b4a23

Please sign in to comment.