From 33b4c9b82709e2232f36408d5b417c6ceae9d8a6 Mon Sep 17 00:00:00 2001 From: Eric Wheeler Date: Sun, 3 Jul 2016 09:05:44 -0700 Subject: [PATCH] Config --- .idea/deployment.xml | 26 +- bin/console | 30 + composer.json | 12 +- composer.lock | 815 ++++++++++++++++++++----- config/config.yml | 7 + resume.json | 6 +- resume.schema.json | 385 ++++++++++++ src/Sikofitt/Config.php | 25 + src/Sikofitt/Config/ConfigLoader.php | 25 + src/Sikofitt/Config/YamlFileLoader.php | 20 - web/index.php | 23 +- yaml.yml | 3 - 12 files changed, 1197 insertions(+), 180 deletions(-) create mode 100644 bin/console create mode 100644 config/config.yml create mode 100644 resume.schema.json create mode 100644 src/Sikofitt/Config.php create mode 100644 src/Sikofitt/Config/ConfigLoader.php delete mode 100644 src/Sikofitt/Config/YamlFileLoader.php delete mode 100644 yaml.yml diff --git a/.idea/deployment.xml b/.idea/deployment.xml index 7d69a67..a54d11c 100644 --- a/.idea/deployment.xml +++ b/.idea/deployment.xml @@ -1,4 +1,28 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/bin/console b/bin/console new file mode 100644 index 0000000..263d0b5 --- /dev/null +++ b/bin/console @@ -0,0 +1,30 @@ +#!/usr/bin/env php +getParameterOption(['--env', '-e'], getenv('SYMFONY_ENV') ?: 'dev'); +$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod'; + +if ($debug) { + Debug::enable(); +} + +//$kernel = new AppKernel($env, $debug); +$application = new Application(); +$application->add(new \Symfony\Bundle\FrameworkBundle\Command\ServerRunCommand()); +$application->run($input); diff --git a/composer.json b/composer.json index 9b77310..2981c19 100644 --- a/composer.json +++ b/composer.json @@ -25,13 +25,16 @@ "h4cc/wkhtmltopdf-amd64": "0.12.x", "h4cc/wkhtmltoimage-amd64": "0.12.x", "webmozart/json": "^1.2", - "symfony/yaml": "^3.1" + "symfony/yaml": "^3.1", + "monolog/monolog": "^1.20", + "symfony/monolog-bridge": "^3.1", + "google/recaptcha": "^1.1", + "hassankhan/config": "^0.10.0" }, "require-dev": { "symfony/asset": "~2.8|^3.0", "symfony/expression-language": "~2.8|^3.0", "symfony/security": "~2.8|^3.0", - "symfony/config": "~2.8|^3.0", "symfony/form": "~2.8|^3.0", "symfony/browser-kit": "~2.8|^3.0", "symfony/css-selector": "~2.8|^3.0", @@ -39,7 +42,6 @@ "symfony/dom-crawler": "~2.8|^3.0", "symfony/finder": "~2.8|^3.0", "symfony/intl": "~2.8|^3.0", - "symfony/monolog-bridge": "~2.8|^3.0", "symfony/doctrine-bridge": "~2.8|^3.0", "symfony/options-resolver": "~2.8|^3.0", "symfony/phpunit-bridge": "~2.8|^3.0", @@ -52,9 +54,9 @@ "twig/twig": "~1.8|~2.0", "doctrine/dbal": "~2.2", "swiftmailer/swiftmailer": "~5", - "monolog/monolog": "^1.4.1", "symfony/console": "^3.1", - "texthtml/whoops-silex": "^1.0" + "texthtml/whoops-silex": "^1.0", + "symfony/framework-bundle": "^3.1" }, "replace": { "silex/api": "v2.0.2", diff --git a/composer.lock b/composer.lock index 449f746..99afee7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,54 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "25df9af0b41ac7ef6d45ab96d5d667b7", - "content-hash": "03d1d2ef3ffe14233c10db19ae9521f6", + "hash": "71801946159db95551f1b5f598ebc4c2", + "content-hash": "187f9c913a02a610f50a59cc8b60c8e3", "packages": [ + { + "name": "google/recaptcha", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/google/recaptcha.git", + "reference": "f3390c376129f84d22734df1f94cc7db25006bbc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/google/recaptcha/zipball/f3390c376129f84d22734df1f94cc7db25006bbc", + "reference": "f3390c376129f84d22734df1f94cc7db25006bbc", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.5.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "ReCaptcha\\": "src/ReCaptcha" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Client library for reCAPTCHA, a free service that protect websites from spam and abuse.", + "homepage": "http://www.google.com/recaptcha/", + "keywords": [ + "Abuse", + "captcha", + "recaptcha", + "spam" + ], + "time": "2015-12-28 18:03:30" + }, { "name": "h4cc/wkhtmltoimage-amd64", "version": "0.12.3", @@ -87,6 +132,63 @@ ], "time": "2016-02-02 19:38:55" }, + { + "name": "hassankhan/config", + "version": "0.10.0", + "source": { + "type": "git", + "url": "https://github.com/hassankhan/config.git", + "reference": "06ac500348af033f1a2e44dc357ca86282626d4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hassankhan/config/zipball/06ac500348af033f1a2e44dc357ca86282626d4a", + "reference": "06ac500348af033f1a2e44dc357ca86282626d4a", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "scrutinizer/ocular": "~1.1", + "squizlabs/php_codesniffer": "~2.2" + }, + "suggest": { + "symfony/yaml": "~2.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Noodlehaus\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Hassan Khan", + "homepage": "http://hassankhan.me/", + "role": "Developer" + } + ], + "description": "Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files", + "homepage": "http://hassankhan.me/config/", + "keywords": [ + "config", + "configuration", + "ini", + "json", + "microphp", + "unframework", + "xml", + "yaml", + "yml" + ], + "time": "2016-02-11 16:21:17" + }, { "name": "justinrainbow/json-schema", "version": "1.6.1", @@ -218,6 +320,84 @@ ], "time": "2015-11-17 13:16:27" }, + { + "name": "monolog/monolog", + "version": "1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "55841909e2bcde01b5318c35f2b74f8ecc86e037" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/55841909e2bcde01b5318c35f2b74f8ecc86e037", + "reference": "55841909e2bcde01b5318c35f2b74f8ecc86e037", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", + "ruflin/elastica": ">=0.90 <3.0", + "sentry/sentry": "^0.13", + "swiftmailer/swiftmailer": "~5.3" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "time": "2016-07-02 14:02:10" + }, { "name": "pimple/pimple", "version": "dev-master", @@ -609,6 +789,66 @@ "homepage": "https://symfony.com", "time": "2016-07-01 16:08:10" }, + { + "name": "symfony/monolog-bridge", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/monolog-bridge.git", + "reference": "2c533fb1ba9eecab9a8ede9e51cf0cea50816645" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/monolog-bridge/zipball/2c533fb1ba9eecab9a8ede9e51cf0cea50816645", + "reference": "2c533fb1ba9eecab9a8ede9e51cf0cea50816645", + "shasum": "" + }, + "require": { + "monolog/monolog": "~1.11", + "php": ">=5.5.9", + "symfony/http-kernel": "~2.8|~3.0" + }, + "require-dev": { + "symfony/console": "~2.8|~3.0", + "symfony/event-dispatcher": "~2.8|~3.0" + }, + "suggest": { + "symfony/console": "For the possibility to show log messages in console commands depending on verbosity settings. You need version ~2.3 of the console for it.", + "symfony/event-dispatcher": "Needed when using log messages in console commands.", + "symfony/http-kernel": "For using the debugging handlers together with the response life cycle of the HTTP kernel." + }, + "type": "symfony-bridge", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bridge\\Monolog\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Monolog Bridge", + "homepage": "https://symfony.com", + "time": "2016-06-29 05:43:10" + }, { "name": "symfony/polyfill-mbstring", "version": "dev-master", @@ -1523,84 +1763,6 @@ ], "time": "2016-04-07 06:16:25" }, - { - "name": "monolog/monolog", - "version": "1.x-dev", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "55841909e2bcde01b5318c35f2b74f8ecc86e037" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/55841909e2bcde01b5318c35f2b74f8ecc86e037", - "reference": "55841909e2bcde01b5318c35f2b74f8ecc86e037", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "provide": { - "psr/log-implementation": "1.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^2.4.9", - "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", - "jakub-onderka/php-parallel-lint": "0.9", - "php-amqplib/php-amqplib": "~2.4", - "php-console/php-console": "^3.1.3", - "phpunit/phpunit": "~4.5", - "phpunit/phpunit-mock-objects": "2.3.0", - "ruflin/elastica": ">=0.90 <3.0", - "sentry/sentry": "^0.13", - "swiftmailer/swiftmailer": "~5.3" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "sentry/sentry": "Allow sending log messages to a Sentry server" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "time": "2016-07-02 14:02:10" - }, { "name": "paragonie/random_compat", "version": "v2.0.2", @@ -1649,6 +1811,52 @@ ], "time": "2016-04-03 06:00:07" }, + { + "name": "psr/cache", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "9e66031f41fbbdda45ee11e93c45d480ccba3eb3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/9e66031f41fbbdda45ee11e93c45d480ccba3eb3", + "reference": "9e66031f41fbbdda45ee11e93c45d480ccba3eb3", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "time": "2015-12-11 02:52:07" + }, { "name": "swiftmailer/swiftmailer", "version": "5.x-dev", @@ -1814,6 +2022,128 @@ "homepage": "https://symfony.com", "time": "2016-06-29 05:43:10" }, + { + "name": "symfony/cache", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache.git", + "reference": "30ac2b8853f8ab733d939ccf101fbe3175ea1c3f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache/zipball/30ac2b8853f8ab733d939ccf101fbe3175ea1c3f", + "reference": "30ac2b8853f8ab733d939ccf101fbe3175ea1c3f", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/cache": "~1.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/cache-implementation": "1.0" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/cache": "~1.6", + "predis/predis": "~1.0" + }, + "suggest": { + "symfony/polyfill-apcu": "For using ApcuAdapter on HHVM" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Cache\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony implementation of PSR-6", + "homepage": "https://symfony.com", + "keywords": [ + "caching", + "psr6" + ], + "time": "2016-07-01 16:09:33" + }, + { + "name": "symfony/class-loader", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/class-loader.git", + "reference": "a155e9640c16d7d7282e5be8676546abe2747983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/class-loader/zipball/a155e9640c16d7d7282e5be8676546abe2747983", + "reference": "a155e9640c16d7d7282e5be8676546abe2747983", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "symfony/finder": "~2.8|~3.0", + "symfony/polyfill-apcu": "~1.1" + }, + "suggest": { + "symfony/polyfill-apcu": "For using ApcClassLoader on HHVM" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\ClassLoader\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony ClassLoader Component", + "homepage": "https://symfony.com", + "time": "2016-06-29 05:43:10" + }, { "name": "symfony/config", "version": "dev-master", @@ -1982,6 +2312,69 @@ "homepage": "https://symfony.com", "time": "2016-06-29 05:43:10" }, + { + "name": "symfony/dependency-injection", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "54c33a9e194086202a09907c1a7eaf687fa0faa3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/54c33a9e194086202a09907c1a7eaf687fa0faa3", + "reference": "54c33a9e194086202a09907c1a7eaf687fa0faa3", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "conflict": { + "symfony/yaml": "<3.2" + }, + "require-dev": { + "symfony/config": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/yaml": "~3.2" + }, + "suggest": { + "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", + "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DependencyInjection Component", + "homepage": "https://symfony.com", + "time": "2016-07-01 16:08:10" + }, { "name": "symfony/doctrine-bridge", "version": "dev-master", @@ -2334,6 +2727,104 @@ "homepage": "https://symfony.com", "time": "2016-07-01 16:08:10" }, + { + "name": "symfony/framework-bundle", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/framework-bundle.git", + "reference": "22205e5ae668553c7c7e5acff392255377736fa6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/22205e5ae668553c7c7e5acff392255377736fa6", + "reference": "22205e5ae668553c7c7e5acff392255377736fa6", + "shasum": "" + }, + "require": { + "doctrine/annotations": "~1.0", + "doctrine/cache": "~1.0", + "php": ">=5.5.9", + "symfony/asset": "~2.8|~3.0", + "symfony/cache": "~3.1", + "symfony/class-loader": "~2.8|~3.0", + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~3.2", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/filesystem": "~2.8|~3.0", + "symfony/finder": "~2.8|~3.0", + "symfony/http-foundation": "~3.1", + "symfony/http-kernel": "~3.1.2|~3.2", + "symfony/polyfill-mbstring": "~1.0", + "symfony/routing": "~3.0", + "symfony/security-core": "~2.8|~3.0", + "symfony/security-csrf": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0", + "symfony/templating": "~2.8|~3.0", + "symfony/translation": "~2.8|~3.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<3.0" + }, + "require-dev": { + "phpdocumentor/reflection-docblock": "^3.0", + "symfony/browser-kit": "~2.8|~3.0", + "symfony/console": "~2.8.8|~3.0.8|~3.1.2|~3.2", + "symfony/css-selector": "~2.8|~3.0", + "symfony/dom-crawler": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/form": "~2.8|~3.0", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/process": "~2.8|~3.0", + "symfony/property-info": "~2.8|~3.0", + "symfony/security": "~2.8|~3.0", + "symfony/serializer": "~2.8|^3.0", + "symfony/validator": "~3.1", + "symfony/yaml": "~3.2", + "twig/twig": "~1.23|~2.0" + }, + "suggest": { + "ext-apcu": "For best performance of the system caches", + "symfony/console": "For using the console commands", + "symfony/form": "For using forms", + "symfony/process": "For using the server:run, server:start, server:stop, and server:status commands", + "symfony/property-info": "For using the property_info service", + "symfony/serializer": "For using the serializer service", + "symfony/validator": "For using validation", + "symfony/yaml": "For using the debug:config and lint:yaml commands" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bundle\\FrameworkBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony FrameworkBundle", + "homepage": "https://symfony.com", + "time": "2016-07-01 16:08:10" + }, { "name": "symfony/inflector", "version": "dev-master", @@ -2466,66 +2957,6 @@ ], "time": "2016-06-29 05:43:10" }, - { - "name": "symfony/monolog-bridge", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/symfony/monolog-bridge.git", - "reference": "2c533fb1ba9eecab9a8ede9e51cf0cea50816645" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/monolog-bridge/zipball/2c533fb1ba9eecab9a8ede9e51cf0cea50816645", - "reference": "2c533fb1ba9eecab9a8ede9e51cf0cea50816645", - "shasum": "" - }, - "require": { - "monolog/monolog": "~1.11", - "php": ">=5.5.9", - "symfony/http-kernel": "~2.8|~3.0" - }, - "require-dev": { - "symfony/console": "~2.8|~3.0", - "symfony/event-dispatcher": "~2.8|~3.0" - }, - "suggest": { - "symfony/console": "For the possibility to show log messages in console commands depending on verbosity settings. You need version ~2.3 of the console for it.", - "symfony/event-dispatcher": "Needed when using log messages in console commands.", - "symfony/http-kernel": "For using the debugging handlers together with the response life cycle of the HTTP kernel." - }, - "type": "symfony-bridge", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Bridge\\Monolog\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Monolog Bridge", - "homepage": "https://symfony.com", - "time": "2016-06-29 05:43:10" - }, { "name": "symfony/options-resolver", "version": "dev-master", @@ -3078,6 +3509,110 @@ "homepage": "https://symfony.com", "time": "2016-06-29 05:52:42" }, + { + "name": "symfony/stopwatch", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "5b139e1c4290e6c7640ba80d9c9b5e49ef22b841" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5b139e1c4290e6c7640ba80d9c9b5e49ef22b841", + "reference": "5b139e1c4290e6c7640ba80d9c9b5e49ef22b841", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "https://symfony.com", + "time": "2016-06-29 05:43:10" + }, + { + "name": "symfony/templating", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/templating.git", + "reference": "fd340a1ea52f08f12642c3df5155b6dcfd069ad1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/templating/zipball/fd340a1ea52f08f12642c3df5155b6dcfd069ad1", + "reference": "fd340a1ea52f08f12642c3df5155b6dcfd069ad1", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "psr/log": "~1.0" + }, + "suggest": { + "psr/log": "For using debug logging in loaders" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Templating\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Templating Component", + "homepage": "https://symfony.com", + "time": "2016-05-13 18:13:23" + }, { "name": "symfony/translation", "version": "dev-master", diff --git a/config/config.yml b/config/config.yml new file mode 100644 index 0000000..2807e66 --- /dev/null +++ b/config/config.yml @@ -0,0 +1,7 @@ +app: + debug: true + environment: dev + resume_title: My Resume +twig: + paths: + - views diff --git a/resume.json b/resume.json index 0bc6602..d5fba97 100644 --- a/resume.json +++ b/resume.json @@ -43,7 +43,7 @@ "position": "Developer / Systems Administrator", "website": "https://ee.stanford.edu", "startDate": "2007-05-27", - "endDate": "", + "endDate": "2016-07-02", "summary": "", "highlights": [ "Build an algorithm for artist to detect if their music was violating copy right infringement laws", @@ -55,8 +55,8 @@ "company": "Searchathlon INC.", "position": "Web Developer / Linux System Administration", "website": "http://searchathlon.com", - "startDate": "2005", - "endDate": "2006", + "startDate": "2005-01-01", + "endDate": "2006-01-01", "summary": "", "highlights": [] } diff --git a/resume.schema.json b/resume.schema.json new file mode 100644 index 0000000..6f24601 --- /dev/null +++ b/resume.schema.json @@ -0,0 +1,385 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Resume Schema", + "type": "object", + "additionalProperties": false, + "properties": { + "basics": { + "type": "object", + "additionalProperties": true, + "properties": { + "name": { + "type": "string" + }, + "label": { + "type": "string", + "description": "e.g. Web Developer" + }, + "picture": { + "type": "string", + "description": "URL (as per RFC 3986) to a picture in JPEG or PNG format" + }, + "email": { + "type": "string", + "description": "e.g. thomas@gmail.com", + "format": "email" + }, + "phone": { + "type": "string", + "description": "Phone numbers are stored as strings so use any format you like, e.g. 712-117-2923" + }, + "website": { + "type": "string", + "description": "URL (as per RFC 3986) to your website, e.g. personal homepage", + "format": "uri" + }, + "summary": { + "type": "string", + "description": "Write a short 2-3 sentence biography about yourself" + }, + "location": { + "type": "object", + "additionalProperties": true, + "properties": { + "address": { + "type": "string", + "description": "To add multiple address lines, use \n. For example, 1234 Glücklichkeit Straße\nHinterhaus 5. Etage li." + }, + "postalCode": { + "type": "string" + }, + "city": { + "type": "string" + }, + "countryCode": { + "type": "string", + "description": "code as per ISO-3166-1 ALPHA-2, e.g. US, AU, IN" + }, + "region": { + "type": "string", + "description": "The general region where you live. Can be a US state, or a province, for instance." + } + } + }, + "profiles": { + "type": "array", + "description": "Specify any number of social networks that you participate in", + "additionalItems": false, + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "network": { + "type": "string", + "description": "e.g. Facebook or Twitter" + }, + "username": { + "type": "string", + "description": "e.g. neutralthoughts" + }, + "url": { + "type": "string", + "description": "e.g. http://twitter.com/neutralthoughts" + } + } + } + } + } + }, + "work": { + "type": "array", + "additionalItems": false, + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "company": { + "type": "string", + "description": "e.g. Facebook" + }, + "position": { + "type": "string", + "description": "e.g. Software Engineer" + }, + "website": { + "type": "string", + "description": "e.g. http://facebook.com", + "format": "uri" + }, + "startDate": { + "type": "string", + "description": "resume.json uses the ISO 8601 date standard e.g. 2014-06-29", + "format": "date" + }, + "endDate": { + "type": "string", + "description": "e.g. 2012-06-29", + "format": "date" + }, + "summary": { + "type": "string", + "description": "Give an overview of your responsibilities at the company" + }, + "highlights": { + "type": "array", + "description": "Specify multiple accomplishments", + "additionalItems": false, + "items": { + "type": "string", + "description": "e.g. Increased profits by 20% from 2011-2012 through viral advertising" + } + } + } + } + }, + "volunteer": { + "type": "array", + "additionalItems": false, + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "organization": { + "type": "string", + "description": "e.g. Facebook" + }, + "position": { + "type": "string", + "description": "e.g. Software Engineer" + }, + "website": { + "type": "string", + "description": "e.g. http://facebook.com", + "format": "uri" + }, + "startDate": { + "type": "string", + "description": "resume.json uses the ISO 8601 date standard e.g. 2014-06-29", + "format": "date" + }, + "endDate": { + "type": "string", + "description": "e.g. 2012-06-29", + "format": "date" + }, + "summary": { + "type": "string", + "description": "Give an overview of your responsibilities at the company" + }, + "highlights": { + "type": "array", + "description": "Specify multiple accomplishments", + "additionalItems": false, + "items": { + "type": "string", + "description": "e.g. Increased profits by 20% from 2011-2012 through viral advertising" + } + } + } + } + }, + "education": { + "type": "array", + "additionalItems": false, + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "institution": { + "type": "string", + "description": "e.g. Massachusetts Institute of Technology" + }, + "area": { + "type": "string", + "description": "e.g. Arts" + }, + "studyType": { + "type": "string", + "description": "e.g. Bachelor" + }, + "startDate": { + "type": "string", + "description": "e.g. 2014-06-29", + "format": "date" + }, + "endDate": { + "type": "string", + "description": "e.g. 2012-06-29", + "format": "date" + }, + "gpa": { + "type": "string", + "description": "grade point average, e.g. 3.67/4.0" + }, + "courses": { + "type": "array", + "description": "List notable courses/subjects", + "additionalItems": false, + "items": { + "type": "string", + "description": "e.g. H1302 - Introduction to American history" + } + } + } + } + }, + "awards": { + "type": "array", + "description": "Specify any awards you have received throughout your professional career", + "additionalItems": false, + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "title": { + "type": "string", + "description": "e.g. One of the 100 greatest minds of the century" + }, + "date": { + "type": "string", + "description": "e.g. 1989-06-12", + "format": "date" + }, + "awarder": { + "type": "string", + "description": "e.g. Time Magazine" + }, + "summary": { + "type": "string", + "description": "e.g. Received for my work with Quantum Physics" + } + } + } + }, + "publications": { + "type": "array", + "description": "Specify your publications through your career", + "additionalItems": false, + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "name": { + "type": "string", + "description": "e.g. The World Wide Web" + }, + "publisher": { + "type": "string", + "description": "e.g. IEEE, Computer Magazine" + }, + "releaseDate": { + "type": "string", + "description": "e.g. 1990-08-01" + }, + "website": { + "type": "string", + "description": "e.g. http://www.computer.org/csdl/mags/co/1996/10/rx069-abs.html" + }, + "summary": { + "type": "string", + "description": "Short summary of publication. e.g. Discussion of the World Wide Web, HTTP, HTML." + } + } + } + }, + "skills": { + "type": "array", + "description": "List out your professional skill-set", + "additionalItems": false, + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "name": { + "type": "string", + "description": "e.g. Web Development" + }, + "level": { + "type": "string", + "description": "e.g. Master" + }, + "keywords": { + "type": "array", + "description": "List some keywords pertaining to this skill", + "additionalItems": false, + "items": { + "type": "string", + "description": "e.g. HTML" + } + } + } + } + }, + "languages": { + "type": "array", + "description": "List any other languages you speak", + "additionalItems": false, + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "language": { + "type": "string", + "description": "e.g. English, Spanish" + }, + "fluency": { + "type": "string", + "description": "e.g. Fluent, Beginner" + } + } + } + }, + "interests": { + "type": "array", + "additionalItems": false, + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "name": { + "type": "string", + "description": "e.g. Philosophy" + }, + "keywords": { + "type": "array", + "additionalItems": false, + "items": { + "type": "string", + "description": "e.g. Friedrich Nietzsche" + } + } + } + } + }, + "references": { + "type": "array", + "description": "List references you have received", + "additionalItems": false, + "items": { + "type": "object", + "additionalProperties": true, + "properties": { + "name": { + "type": "string", + "description": "e.g. Timothy Cook" + }, + "reference": { + "type": "string", + "description": "e.g. Joe blogs was a great employee, who turned up to work at least once a week. He exceeded my expectations when it came to doing nothing." + } + } + } + }, + "meta": { + "type": "object", + "additionalProperties": true, + "properties": { + "url": { + "type": "string", + "description": "URL (as per RFC 3986) to latest version of this document" + } + }, + "description": "The schema version and any other tooling configuration lives here" + } + } +} diff --git a/src/Sikofitt/Config.php b/src/Sikofitt/Config.php new file mode 100644 index 0000000..db5ead0 --- /dev/null +++ b/src/Sikofitt/Config.php @@ -0,0 +1,25 @@ + [ + 'debug' => true, + 'base_dir' => dirname(dirname(__DIR__)), + ], + ]; + } +} \ No newline at end of file diff --git a/src/Sikofitt/Config/ConfigLoader.php b/src/Sikofitt/Config/ConfigLoader.php new file mode 100644 index 0000000..0045506 --- /dev/null +++ b/src/Sikofitt/Config/ConfigLoader.php @@ -0,0 +1,25 @@ +testing = explode("\\", $r->getName()); + $this->testing[] = __DIR__; + return $this->testing; + } +} \ No newline at end of file diff --git a/src/Sikofitt/Config/YamlFileLoader.php b/src/Sikofitt/Config/YamlFileLoader.php deleted file mode 100644 index 1dce7aa..0000000 --- a/src/Sikofitt/Config/YamlFileLoader.php +++ /dev/null @@ -1,20 +0,0 @@ -register(new TwigServiceProvider(), [ 'twig.path' => __DIR__.'/../views', ]); +$app['config'] = function($app) { + $configFromFiles = \Noodlehaus\Config::load(APP_ROOT . 'config'); + $defaultOptions = new \Sikofitt\Config($configFromFiles->all()); + return $defaultOptions; +}; $app->register(new WhoopsServiceProvider()); - +$app->register(new \Silex\Provider\AssetServiceProvider()); +$app->register(new \Silex\Provider\MonologServiceProvider()); +$app->register(new \Silex\Provider\VarDumperServiceProvider()); +$app->register(new \Silex\Provider\HttpKernelServiceProvider()); $app['json.decoder'] = function($app) { return new Webmozart\Json\JsonDecoder(); }; @@ -29,9 +36,9 @@ $app['json.validator'] = function($app) { $app->get('/', function() use($app) { - $yaml = Yaml::parse(file_get_contents(APP_ROOT . 'yaml.yml')); - dump($yaml); - return $app['twig']->render('base.html.twig'); + $decoded = $app['json.decoder']->decodeFile(APP_ROOT . 'resume.json', APP_ROOT . 'resume.schema.json'); + dump($app['config']->get('app.debug')); + return $app['twig']->render('base.html.twig', ['resume' => $decoded]); }); $app->run(); diff --git a/yaml.yml b/yaml.yml deleted file mode 100644 index 56d317c..0000000 --- a/yaml.yml +++ /dev/null @@ -1,3 +0,0 @@ -first: - - { second: Third } - \ No newline at end of file