From a4804cb0296376835f1a4f03f072741cbc815654 Mon Sep 17 00:00:00 2001 From: Anton Minin <anton.a.minin@gmail.com> Date: Thu, 27 Jul 2017 01:19:18 +0300 Subject: [PATCH 1/5] Run benchmarks without Apache --- benchmark-no-apache.sh | 25 + benchmarks/_functions.sh | 3 +- libs/parse_results.php | 8 +- nofuss-1.2/.gitignore | 4 + nofuss-1.2/cache/.gitkeep | 0 nofuss-1.2/cache/nf.all.php | 6565 ---------------------- nofuss-1.2/cache/routes.all.php | 16 - staticphp-0.9/Application/Cache/.gitkeep | 0 8 files changed, 35 insertions(+), 6586 deletions(-) create mode 100644 benchmark-no-apache.sh create mode 100644 nofuss-1.2/.gitignore create mode 100644 nofuss-1.2/cache/.gitkeep delete mode 100644 nofuss-1.2/cache/nf.all.php delete mode 100644 nofuss-1.2/cache/routes.all.php mode change 100644 => 100755 staticphp-0.9/Application/Cache/.gitkeep diff --git a/benchmark-no-apache.sh b/benchmark-no-apache.sh new file mode 100644 index 000000000..3ba5c5d05 --- /dev/null +++ b/benchmark-no-apache.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +#base="http://127.0.0.1/php-framework-benchmark" +base="http://localhost:8888/php-framework-benchmark" + +cd `dirname $0` + +php -S localhost:8888 -t .. > /dev/null 2>&1 & +PHP_PID=$! +sleep 2; + +if [ $# -eq 0 ]; then + # include framework list + . ./list.sh + export targets="$list" +else + export targets="${@%/}" +fi + +cd benchmarks + +sh hello_world.sh "$base" + +php ../bin/show_results_table.php +kill $PHP_PID diff --git a/benchmarks/_functions.sh b/benchmarks/_functions.sh index 32fec509e..030f945a1 100644 --- a/benchmarks/_functions.sh +++ b/benchmarks/_functions.sh @@ -13,7 +13,8 @@ benchmark () # get time count=10 total=0 - for ((i=0; i < $count; i++)); do + #for ((i=0; i < $count; i++)); do + for i in $(seq 0 $count); do curl "$url" > "$output" t=`tail -1 "$output" | cut -f 2 -d ':'` total=`php ./benchmarks/sum_ms.php $t $total` diff --git a/libs/parse_results.php b/libs/parse_results.php index ccf5d4183..c36a0bb98 100644 --- a/libs/parse_results.php +++ b/libs/parse_results.php @@ -18,10 +18,10 @@ function parse_results($file) $time = (float) trim($column[3])*1000; $file = (int) trim($column[4]); - $min_rps = min($min_rps, $rps); - $min_memory = min($min_memory, $memory); - $min_time = min($min_time, $time); - $min_file = min($min_file, $file); + $min_rps = min($min_rps, $rps ?: INF); + $min_memory = min($min_memory, $memory ?: INF); + $min_time = min($min_time, $time ?: INF); + $min_file = min($min_file, $file ?: INF); $results[$fw] = [ 'rps' => $rps, diff --git a/nofuss-1.2/.gitignore b/nofuss-1.2/.gitignore new file mode 100644 index 000000000..f5b481dc8 --- /dev/null +++ b/nofuss-1.2/.gitignore @@ -0,0 +1,4 @@ +/cache/ +!/cache/.gitkeep +!/cache/smarty/.gitignore +!/cache/templates_c/.gitignore \ No newline at end of file diff --git a/nofuss-1.2/cache/.gitkeep b/nofuss-1.2/cache/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/nofuss-1.2/cache/nf.all.php b/nofuss-1.2/cache/nf.all.php deleted file mode 100644 index 70d879b81..000000000 --- a/nofuss-1.2/cache/nf.all.php +++ /dev/null @@ -1,6565 +0,0 @@ -<?php - - -namespace Nf; - -abstract class Session extends Singleton -{ - - protected static $_instance = null; - - public static function factory($namespace, $class, $params, $lifetime) - { - $className = '\\' . $namespace . '\\' . ucfirst($class); - return new $className($params, $lifetime); - } - - public static function start() - { - $config = Registry::get('config'); - if (isset($config->session)) { - // optional parameters sent to the constructor - if (isset($config->session->params)) { - $sessionParams = $config->session->params; - } - if (is_object($config->session->handler)) { - $sessionHandler = self::factory($config->session->handler->namespace, $config->session->handler->class, $sessionParams, $config->session->lifetime); - } else { - $sessionHandler = self::factory('Nf\Session', $config->session->handler, $sessionParams, $config->session->lifetime); - } - - session_name($config->session->cookie->name); - session_set_cookie_params(0, $config->session->cookie->path, $config->session->cookie->domain, false, true); - - session_set_save_handler(array( - &$sessionHandler, - 'open' - ), array( - &$sessionHandler, - 'close' - ), array( - &$sessionHandler, - 'read' - ), array( - &$sessionHandler, - 'write' - ), array( - &$sessionHandler, - 'destroy' - ), array( - &$sessionHandler, - 'gc' - )); - register_shutdown_function('session_write_close'); - session_start(); - // session_regenerate_id(true); - Registry::set('session', $sessionHandler); - return $sessionHandler; - } else { - return false; - } - - } - - public static function getData() - { - return $_SESSION; - } - - public function __get($key) - { - return self::get($key); - } - - public function __set($key, $value) - { - return self::set($key, $value); - } - - public static function get($key) - { - if (isset($_SESSION[$key])) { - return $_SESSION[$key]; - } else { - return null; - } - } - - public static function set($key, $value) - { - $_SESSION[$key] = $value; - } - - public static function delete($key) - { - unset($_SESSION[$key]); - } -} - - - -namespace Nf; - -abstract class Singleton -{ - - protected static $_instance=null; - - protected function __construct() - { - } - - public static function getInstance() - { - if (static::$_instance===null) { - $className = get_called_class(); - static::$_instance = new $className; - } - - return static::$_instance; - } - - public function __clone() - { - throw new Exception('Cloning not allowed on a singleton object', E_USER_ERROR); - } -} - - -namespace Nf; - -class Make -{ - - /** - * - * @param string $action - * Executes a make action, like "compress" for putting every file into a single .php file or "map" all the classes in a classmap - * You can use your method with make if you call something like: - * php index.php -m "\App\Mymake\Compressor::compress?type=js", type=js will be accessible with a - * $front = \Nf\Front::getInstance(); - * $params = $front->getRequest()->getParams(); - * - */ - - // merge all the framework files to a single php file, merge all the routes to /cache/allroutes.php - public static function compress($action = '') - { - // merge framework files - $destFile = Registry::get('applicationPath') . '/cache/nf.all.php'; - if (is_file($destFile)) { - unlink($destFile); - } - // get the actual folder of Nf in the app's settings - $includedFiles = get_included_files(); - $folder = null; - - foreach ($includedFiles as $includedFile) { - if (preg_match('%Nf\/Autoloader\.php$%', $includedFile, $regs)) { - $folder = str_replace('/Autoloader.php', '', $includedFile); - $allFiles = self::getAllFiles($folder); - // sort by depth for include - uasort($allFiles, array( - 'self', - 'orderFilesByDepth' - )); - $bigInclude = '<?' . 'php' . "\n"; - foreach ($allFiles as $file) { - if (substr($file, - 4) == '.php') { - $bigInclude .= "\n" . str_replace('<?' . 'php', '', file_get_contents($file)); - } - } - file_put_contents($destFile, $bigInclude); - - // merge routes files - $destRoutesFile = Registry::get('applicationPath') . '/cache/routes.all.php'; - if (is_file($destRoutesFile)) { - unlink($destRoutesFile); - } - $router = \Nf\Router::getInstance(); - $router->setRootRoutes(); - $router->setRoutesFromFiles(); - $router->addAllRoutes(); - $allRoutes = $router->getAllRoutes(); - $bigInclude = '<?' . 'php' . "\n return "; - $bigInclude .= var_export($allRoutes, true); - $bigInclude .= ";"; - file_put_contents($destRoutesFile, $bigInclude); - break; - } - } - - if ($folder === null) { - die('The cache already exists, remove the generated files before in /cache (nf.all.php and routes.all.php)' . PHP_EOL); - } - } - - private static function getAllFiles($folder) - { - $folder = rtrim($folder, '/'); - $root = scandir($folder); - foreach ($root as $value) { - if ($value === '.' || $value === '..') { - continue; - } - if (is_file($folder . '/' . $value)) { - $result[] = $folder . '/' . $value; - continue; - } - foreach (self::getAllFiles($folder . '/' . $value) as $value) { - $result[] = $value; - } - } - return $result; - } - - private static function orderFilesByDepth($file1, $file2) - { - $t = (substr_count($file1, '/') > substr_count($file2, '/')); - return $t ? 1 : - 1; - } -} - - -namespace Nf; - -class Db -{ - - const FETCH_ASSOC = 2; - - const FETCH_NUM = 3; - - const FETCH_OBJ = 5; - - const FETCH_COLUMN = 7; - - private static $_connections = array(); - - public static function factory($config) - { - if (! is_array($config)) { - // convert to an array - $conf = array(); - $conf['adapter'] = $config->adapter; - $conf['params'] = (array) $config->params; - $conf['profiler'] = (array) $config->profiler; - } else { - $conf = $config; - } - $adapterName = get_class() . '\\Adapter\\' . $conf['adapter']; - $dbAdapter = new $adapterName($conf['params']); - $dbAdapter->setProfilerConfig($conf['profiler']); - return $dbAdapter; - } - - public static function getConnection($configName, $alternateHostname = null, $alternateDatabase = null, $storeInInstance = true) - { - $config = \Nf\Registry::get('config'); - - if(!isset($config->db->$configName)) { - throw new \Exception('The adapter "' . $configName . '" is not defined in the config file'); - } - - $defaultHostname = $config->db->$configName->params->hostname; - $defaultDatabase = $config->db->$configName->params->database; - $hostname = ($alternateHostname !== null) ? $alternateHostname : $defaultHostname; - $database = ($alternateDatabase !== null) ? $alternateDatabase : $defaultDatabase; - - // if the connection has already been created and if we store the connection in memory for future use - if (isset(self::$_connections[$configName . '-' . $hostname . '-' . $database]) && $storeInInstance) { - return self::$_connections[$configName . '-' . $hostname . '-' . $database]; - } else { - // optional profiler config - $profilerConfig = isset($config->db->$configName->profiler) ? (array)$config->db->$configName->profiler : null; - if ($profilerConfig != null) { - $profilerConfig['name'] = $configName; - } - - // or else we create a new connection - $dbConfig = array( - 'adapter' => $config->db->$configName->adapter, - 'params' => array( - 'hostname' => $hostname, - 'username' => $config->db->$configName->params->username, - 'password' => $config->db->$configName->params->password, - 'database' => $database, - 'charset' => $config->db->$configName->params->charset - ), - 'profiler' => $profilerConfig - ); - - // connection with the factory method - $dbConnection = self::factory($dbConfig); - if ($storeInInstance) { - self::$_connections[$configName . '-' . $hostname . '-' . $database] = $dbConnection; - } - return $dbConnection; - } - } -} - - - -namespace Nf; - -use \IntlDateFormatter; -use \NumberFormatter; - -class Localization extends Singleton -{ - - protected static $_instance; - - protected $_currentLocale='fr_FR'; - - const NONE=IntlDateFormatter::NONE; - const SHORT=IntlDateFormatter::SHORT; - const MEDIUM=IntlDateFormatter::MEDIUM; - const LONG=IntlDateFormatter::LONG; - const FULL=IntlDateFormatter::FULL; - - public static function normalizeLocale($str) - { - $str=str_replace('-', '_', $str); - $arr=explode('_', $str); - $out=strtolower($arr[0]) . '_' . strtoupper($arr[1]); - return $out; - } - - public static function setLocale($locale) - { - $instance=self::$_instance; - $instance->_currentLocale=$locale; - } - - public static function getLocale() - { - $instance=self::$_instance; - return $instance->_currentLocale; - } - - public static function formatDate($timestamp, $formatDate = self::SHORT, $formatTime = self::SHORT) - { - $instance=self::$_instance; - $fmt=new IntlDateFormatter($instance->_currentLocale, $formatDate, $formatTime); - return $fmt->format($timestamp); - } - - // syntax can be found on : http://userguide.icu-project.org/formatparse/datetime - public static function formatOther($timestamp, $format = 'eeee') - { - $instance=self::$_instance; - $fmt=new IntlDateFormatter($instance->_currentLocale, 0, 0); - $fmt->setPattern($format); - return $fmt->format($timestamp); - } - - public static function formatDay($timestamp, $fullName = true) - { - return self::formatOther($timestamp, ($fullName?'EEEE':'EEE')); - } - - public static function formatMonth($timestamp, $fullName = true) - { - return self::formatOther($timestamp, ($fullName?'LLLL':'LLL')); - } - - public static function formatCurrency($amount, $currency) - { - $instance=self::$_instance; - $fmt = new NumberFormatter($instance->_currentLocale, NumberFormatter::CURRENCY); - return $fmt->formatCurrency($amount, $currency); - } - - public static function formatNumber($value) - { - $instance=self::$_instance; - $fmt = new NumberFormatter($instance->_currentLocale, NumberFormatter::DECIMAL); - return $fmt->format($value); - } - - public static function dateToTimestamp($date, $formatDate = self::SHORT, $formatTime = self::SHORT, $acceptISOFormat = false) - { - if (self::isTimestamp($date)) { - return $date; - } elseif ($acceptISOFormat && self::isISOFormat($date)) { - $dt=new \DateTime($date); - return $dt->getTimestamp(); - } else { - $instance=self::$_instance; - $fmt=new IntlDateFormatter($instance->_currentLocale, $formatDate, $formatTime); - $timestamp=$fmt->parse($date); - if ($timestamp) { - return $timestamp; - } else { - throw new \Exception('input date is in another format and is not recognized:' . $date); - } - } - } - - public static function isISOFormat($date) - { - if (preg_match('/\A(?:^([1-3][0-9]{3,3})-(0?[1-9]|1[0-2])-(0?[1-9]|[1-2][1-9]|3[0-1])\s([0-1][0-9]|2[0-4]):([0-5][0-9]):([0-5][0-9])$)\Z/im', $date)) { - return true; - } elseif (preg_match('/\A(?:^([1-3][0-9]{3,3})-(0?[1-9]|1[0-2])-(0?[1-9]|[1-2][1-9]|3[0-1])$)\Z/im', $date)) { - return true; - } else { - return false; - } - } - - public static function isTimestamp($timestamp) - { - return ((string) (int) $timestamp === (string) $timestamp) - && ($timestamp <= PHP_INT_MAX) - && ($timestamp >= ~PHP_INT_MAX); - } -} - - -namespace Nf; - -use Nf\Registry; -use Nf\Front; - -class Router extends Singleton -{ - - // pour le routeur - private $routingPreferences = array(); - - private $routesDirectories = array(); - - private $rootRoutesDirectories = array(); - - private $allRoutesByVersionAndLocale = array(); - - private $activeRoute = array(); - - private $allVersionsUrls = array(); - - const rootRouteFilename = '_root.php'; - - const defaultRequestType = 'default'; - - const defaultRouteName = 'default'; - - // routes - public function addAllRoutes() - { - - if (Registry::get('environment')!='dev' && file_exists(Registry::get('applicationPath') . '/cache/routes.all.php')) { - $this->allRoutesByVersionAndLocale = require(Registry::get('applicationPath') . '/cache/routes.all.php'); - } else { - $routesDirectory = realpath(Registry::get('applicationPath') . '/routes'); - $directory = new \RecursiveDirectoryIterator($routesDirectory); - $files = new \RecursiveIteratorIterator($directory); - $allRouteFiles = array(); - foreach ($files as $file) { - $pathname = ltrim(str_replace($routesDirectory, '', $file->getPathname()), '/'); - // if it's not a folder or anything other than a .php - if (substr($pathname, - 1, 1) != '.' && substr($pathname, -4)=='.php') { - $allRouteFiles[] = $pathname; - } - } - // sort allRouteFiles by their depth to allow inheriting a route from all versions and or locales - usort($allRouteFiles, function ($a, $b) { - return substr_count($a, '/') > substr_count($b, '/'); - }); - foreach ($allRouteFiles as $file) { - $pathname = ltrim(str_replace($routesDirectory, '', $file), '/'); - - $arrPath = explode('/', $pathname); - - // routes are sorted by version and locale - if (count($arrPath) == 3) { - $version = $arrPath[0]; - $locale = $arrPath[1]; - } elseif (count($arrPath) == 2) { - $version = $arrPath[0]; - $locale = '*'; - } elseif (count($arrPath) == 1) { - $version = '*'; - $locale = '*'; - } - // add the route to allRoutes, sorted by version and locale - // all your routes are belong to us - if (! isset($this->allRoutesByVersionAndLocale[$version])) { - $this->allRoutesByVersionAndLocale[$version] = array(); - } - if (! isset($this->allRoutesByVersionAndLocale[$version][$locale])) { - $this->allRoutesByVersionAndLocale[$version][$locale] = array(); - } - if (basename($file) != self::rootRouteFilename) { - $subPath = str_replace('.php', '', basename($file)); - } else { - $subPath = ''; - } - $newRoutes = require $routesDirectory . '/' . $pathname; - // the file doesn't contain an array, or contains nothing => we ignore it - if (is_array($newRoutes)) { - foreach ($newRoutes as &$newRoute) { - if (isset($newRoute['type']) && $newRoute['type']=='inherit') { - // go up one level until we find the route to inherit from - if (isset($this->allRoutesByVersionAndLocale[$version]['*'][$newRoute['from']])) { - $routeToAdd = $this->allRoutesByVersionAndLocale[$version]['*'][$newRoute['from']]; - $routeToAdd['regexp'] = $routeToAdd['inheritableRegexp']; - $routeToAdd['regexp'] = ltrim($routeToAdd['regexp'], '/'); - $routeToAdd['regexp'] = rtrim(ltrim($subPath . '/' . $routeToAdd['regexp'], '/'), '/'); - } elseif (isset($this->allRoutesByVersionAndLocale['*']['*'][$newRoute['from']])) { - $routeToAdd = $this->allRoutesByVersionAndLocale['*']['*'][$newRoute['from']]; - $routeToAdd['regexp'] = $routeToAdd['inheritableRegexp']; - $routeToAdd['regexp'] = ltrim($routeToAdd['regexp'], '/'); - $routeToAdd['regexp'] = rtrim(ltrim($subPath . '/' . $routeToAdd['regexp'], '/'), '/'); - } - $this->allRoutesByVersionAndLocale[$version][$locale][$routeToAdd['name']] = $routeToAdd; - } else { - if (isset($newRoute['regexp'])) { - $newRoute['regexp'] = ltrim($newRoute['regexp'], '/'); - $newRoute['inheritableRegexp'] = $newRoute['regexp']; - $newRoute['regexp'] = rtrim(ltrim($subPath . '/' . $newRoute['regexp'], '/'), '/'); - } - if (isset($newRoute['name'])) { - $this->allRoutesByVersionAndLocale[$version][$locale][$newRoute['name']] = $newRoute; - } else { - $this->allRoutesByVersionAndLocale[$version][$locale][] = $newRoute; - } - } - } - } - } - } - } - - public function setRoutesFromFiles() - { - $this->routingPreferences[] = 'files'; - } - - public function setStructuredRoutes() - { - $this->routingPreferences[] = 'structured'; - } - - public function setRootRoutes() - { - $this->routingPreferences[] = 'root'; - } - - public function findRoute($version, $locale) - { - $foundController = null; - $config = Registry::get('config'); - $front = Front::getInstance(); - $originalUri = $front->getRequest()->getUri(); - - // remove everything after a '?' which is not used in the routing system - $uri = preg_replace('/\?.*$/', '', $originalUri); - - // strip the trailing slash, also unused - $uri = rtrim((string) $uri, '/'); - - foreach ($this->routingPreferences as $routingPref) { - if ($routingPref == 'files') { - $foundController = $this->findRouteFromFiles($uri, $version, $locale); - // search by version only - if (!$foundController) { - $foundController = $this->findRouteFromFiles($uri, $version, '*'); - } - // search without version nor locale - if (!$foundController) { - $foundController = $this->findRouteFromFiles($uri, '*', '*'); - } - } - - if (! $foundController && $routingPref == 'structured') { - // l'url doit être de la forme /m/c/a/, ou /m/c/ ou /m/ - if (preg_match('#^(\w+)/?(\w*)/?(\w*)#', $uri, $uriSegments)) { - $uriSegments[2] = ! empty($uriSegments[2]) ? $uriSegments[2] : 'index'; - $uriSegments[3] = ! empty($uriSegments[3]) ? $uriSegments[3] : 'index'; - - // on regarde si on a un fichier et une action pour le même chemin dans les répertoires des modules - if ($foundController = $front->checkModuleControllerAction($uriSegments[1], $uriSegments[2], $uriSegments[3])) { - $this->activeRoute = array( - 'type' => self::defaultRequestType, - 'name' => self::defaultRouteName, - 'components' => array() - ); - - // les éventuels paramètres sont en /variable/value - $paramsFromUri = ltrim(preg_replace('#^(\w+)/(\w+)/(\w+)#', '', $uri), '/'); - - // si on envoie des variables avec des / - if ($paramsFromUri != '') { - if (substr_count($paramsFromUri, '/') % 2 == 1) { - preg_match_all('/([\w_]+)\/([^\/]*)/', $paramsFromUri, $arrParams, PREG_SET_ORDER); - for ($matchi = 0; $matchi < count($arrParams); $matchi ++) { - $front->getRequest()->setParam($arrParams[$matchi][1], $arrParams[$matchi][2]); - } - } - - // si on envoie des variables avec des var1=val1 - if (substr_count($paramsFromUri, '=') >= 1) { - preg_match_all('/([\w_]+)=([^\/&]*)/', $paramsFromUri, $arrParams, PREG_SET_ORDER); - for ($matchi = 0; $matchi < count($arrParams); $matchi ++) { - $front->getRequest()->setParam($arrParams[$matchi][1], $arrParams[$matchi][2]); - } - } - } - } - } - } - } - - // si c'est la route par défaut - if (! $foundController) { - if (empty($uri)) { - if ($foundController = $front->checkModuleControllerAction($config->front->default->module, $config->front->default->controller, $config->front->default->action)) { - if (isset($route[2]) && isset($result[1])) { - $front->associateParams($route[2], $result[1]); - } - } - } - } - - // reads which middlewares are required and adds them - if ($foundController) { - if (isset($this->activeRoute['middlewares'])) { - $this->activeRoute['middlewaresPre'] = array(); - $this->activeRoute['middlewaresPost'] = array(); - foreach ($this->activeRoute['middlewares'] as $middlewareClass) { - if (! class_exists($middlewareClass)) { - throw new \Exception('The middleware ' . $middlewareClass . ' cannot be found. Matched route: ' . print_r($this->activeRoute, true)); - } - if (isset(class_uses($middlewareClass)['Nf\Middleware\Pre'])) { - $this->activeRoute['middlewaresPre'][] = $middlewareClass; - } else { - $this->activeRoute['middlewaresPost'][] = $middlewareClass; - } - } - } - } - - return $foundController; - } - - private function findRouteFromFiles($uri, $version, $locale) - { - - $foundController = null; - $front = Front::getInstance(); - - if (isset($this->allRoutesByVersionAndLocale[$version][$locale])) { - $routes = $this->allRoutesByVersionAndLocale[$version][$locale]; - - if (! $foundController) { - $routes = array_reverse($routes); - - foreach ($routes as $route) { - if (! $foundController) { - // default type is "default" - $requestType = 'default'; - - // if a specific type is requested - if (isset($route['type'])) { - $requestType = $route['type']; - } - - $routeRegexpWithoutNamedParams = preg_replace('/\([\w_]+:/', '(', $route['regexp']); - - $arrRouteModuleControllerAction = explode('/', $route['controller']); - - // make the first slash after our route directory optional - $routeTest = rtrim('/' . ltrim($routeRegexpWithoutNamedParams, '/'), '/'); - - // check if this is a match, or else continue until we have a match - if (preg_match('#^' . $routeRegexpWithoutNamedParams . '#', $uri, $refs)) { - // if using a rest request, the user can override the method - if ($requestType == 'rest') { - // default action - if (isset($_SERVER['REQUEST_METHOD'])) { - $action = strtolower($_SERVER['REQUEST_METHOD']); - } - if ($_SERVER['REQUEST_METHOD'] == 'POST') { - // overloading the method with the "method" parameter if the request is POST - if (isset($_POST['method'])) { - $action = strtolower($_POST['method']); - } - // overloading the method with http headers - // X-HTTP-Method (Microsoft) or X-HTTP-Method-Override (Google/GData) or X-METHOD-OVERRIDE (IBM) - $acceptableOverridingHeaders = array( - 'HTTP_X_HTTP_METHOD', - 'HTTP_X_HTTP_METHOD_OVERRIDE', - 'HTTP_X_METHOD_OVERRIDE' - ); - foreach ($acceptableOverridingHeaders as $overridingHeader) { - if (isset($_SERVER[$overridingHeader])) { - $action = strtolower($_SERVER[$overridingHeader]); - } - } - } - - // if overriding the action in the route - if (isset($arrRouteModuleControllerAction[2])) { - $action = $arrRouteModuleControllerAction[2]; - } - } else { - $action = $arrRouteModuleControllerAction[2]; - } - - // on teste la présence du module controller action indiqué dans la route - if ($foundController = $front->checkModuleControllerAction($arrRouteModuleControllerAction[0], $arrRouteModuleControllerAction[1], $action)) { - $this->activeRoute = $route; - $front->setRequestType($requestType); - $front->associateParams($route['regexp'], $refs); - break; - } - } - } - } - unset($route); - } - } - return $foundController; - } - - public function getAllRoutes() - { - return $this->allRoutesByVersionAndLocale; - } - - public function getActiveRoute() - { - return $this->activeRoute; - } - - // returns the url from the defined routes by its name - public function getNamedUrl($name, $params = array(), $version = null, $locale = null, $getFullUrl = true) - { - if ($version == null) { - $version = Registry::get('version'); - } - if ($locale == null) { - $locale = Registry::get('locale'); - } - // get the actual domain name from the url.ini - $domainName = ''; - if ($getFullUrl) { - if (! isset($this->allVersionsUrls[$version][$locale])) { - $urlIni = Registry::get('urlIni'); - $localeSuffix = $urlIni->suffixes->$locale; - $versionPrefix = $urlIni->versions->$version; - if (strpos($versionPrefix, '|') !== false) { - $arrVersionPrefix = explode('|', $versionPrefix); - $versionPrefix = $arrVersionPrefix[0]; - if ($versionPrefix == '<>') { - $versionPrefix = ''; - } - } - $domainName = str_replace('[version]', $versionPrefix, $localeSuffix); - if (! isset($this->allVersionsUrls[$version])) { - $this->allVersionsUrls[$version] = array(); - $this->allVersionsUrls[$version][$locale] = $domainName; - } - } else { - $domainName = $this->allVersionsUrls[$version][$locale]; - } - } - $foundRoute = false; - if (isset($this->allRoutesByVersionAndLocale[$version][$locale][$name])) { - $url = $this->allRoutesByVersionAndLocale[$version][$locale][$name]['regexp']; - $foundRoute = true; - } elseif (isset($this->allRoutesByVersionAndLocale[$version]['*'][$name])) { - $url = $this->allRoutesByVersionAndLocale[$version]['*'][$name]['regexp']; - $foundRoute = true; - } elseif (isset($this->allRoutesByVersionAndLocale['*']['*'][$name])) { - $url = $this->allRoutesByVersionAndLocale['*']['*'][$name]['regexp']; - $foundRoute = true; - } - if ($foundRoute) { - preg_match_all('/\(([\w_]+):([^)]+)\)/im', $url, $result, PREG_SET_ORDER); - for ($matchi = 0; $matchi < count($result); $matchi ++) { - if (isset($params[$result[$matchi][1]])) { - $url = str_replace($result[$matchi][0], $params[$result[$matchi][1]], $url); - } - } - if ($getFullUrl) { - return $domainName . '/' . $url; - } else { - return $url; - } - } else { - throw new \Exception('Cannot find route named "' . $name . '" (version=' . $version . ', locale=' . $locale . ')'); - } - } -} - - -namespace Nf; - -abstract class File -{ - - public static function mkdir($pathname, $mode = 0775, $recursive = false) - { - if (! is_dir($pathname)) { - $oldumask = umask(0); - $ret = @mkdir($pathname, $mode, $recursive); - umask($oldumask); - return $ret; - } - return true; - } - - public static function rename($old, $new, $mode = 0775) - { - if (is_readable($old)) { - $pathname = dirname($new); - if (! is_dir($pathname)) { - self::mkdir($pathname, $mode, true); - } - return rename($old, $new); - } - return false; - } - - public static function uncompress($src, $dest, $unlinkSrc = false) - { - $finfo = finfo_open(FILEINFO_MIME_TYPE); - $mimeType = finfo_file($finfo, $src); - finfo_close($finfo); - - switch ($mimeType) { - case 'application/x-gzip': - exec('gzip -dcf ' . $src . ($dest !== null ? ' > ' . $dest : ''), $out, $ret); - break; - - default: - return false; - } - - if (isset($ret) && $ret === 0) { - if ($unlinkSrc) { - @unlink($src); - } - } - return ($ret === 0); - } - - public static function generatePath($input, $hereMark = '@') - { - $input = '' . $input; - // 15567 => /7/15/56/7/@/ - // 6871985 => /5/68/71/98/5/@/ - // 687198565 /5/68/71/98/56/5/@/ - // 68719856 /6/68/71/98/56/@/ - // 21 /1/21/@/ - // 2121 /1/21/21/@/ - // 1 /1/1/@ - // antix /x/an/ti/x/@/ - $len = strlen($input); - if ($len == 1) { - $output = $input . '/' . $input; - } else { - $output = $input{$len - 1} . '/'; - for ($i = 0; $i < $len - 1; $i ++) { - $output .= substr($input, $i, 1); - if ($i % 2) { - $trailing = '/'; - } else { - $trailing = ''; - } - $output .= $trailing; - } - $output .= $input{$len - 1}; - } - $output .= '/' . $hereMark . '/'; - return '/' . $output; - } -} - - - -/** - * Autoloader is a class loader. - * - * <code> - * require($library_path . '/php/classes/Nf/Autoloader.php'); - * $autoloader=new \Nf\Autoloader(); - * $autoloader->addMap($applicationPath . '/configs/map.php'); - * $autoloader->addNamespaceRoot('Nf', $libraryPath . '/Nf'); - * $autoloader->register(); - * </code> - * - * @package Nf - * @author Julien Ricard - * @version 1.0 - **/ -namespace Nf; - -class Autoloader -{ - - protected static $_directories = array(); - - protected static $_maps = array(); - - protected static $_namespaceSeparator = '\\'; - - const defaultSuffix = '.php'; - - public function __construct() { - - } - - public static function load($className) - { - if (! class_exists($className)) { - $foundInMaps = false; - - if (count(self::$_maps) != 0) { - // reads every map for getting class path - foreach (self::$_maps as $map) { - if (isset($map[$className])) { - if (self::includeClass($map[$className], $className)) { - return true; - } else { - return false; - } - } - } - $foundInMaps = false; - } - if (! $foundInMaps) { - $namespaceRoot = ''; - $fileNamePrefix = ''; - - // reads each directory until it finds the class file - if (false !== ($lastNsPos = strripos($className, self::$_namespaceSeparator))) { - $namespace = substr($className, 0, $lastNsPos); - $namespaceRoot = substr($className, 0, strpos($className, self::$_namespaceSeparator)); - $shortClassName = substr($className, $lastNsPos + 1); - $fileNamePrefix = str_replace(self::$_namespaceSeparator, DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; - } else { - $shortClassName = $className; - } - - $fileNamePrefix .= str_replace('_', DIRECTORY_SEPARATOR, $shortClassName); - - foreach (self::$_directories as $directory) { - if ($directory['namespaceRoot'] == $namespaceRoot && $directory['namespaceRoot'] != '') { - // use the specified directory with remaining path - $fileNamePrefix = str_replace($namespaceRoot . DIRECTORY_SEPARATOR, '', $fileNamePrefix); - if (self::includeClass($directory['path'] . $fileNamePrefix . $directory['suffix'], $className)) { - return true; - } else { - // file was not found in the specified directory - return false; - } - } elseif ($directory['namespaceRoot'] == '') { - if (self::includeClass($directory['path'] . $fileNamePrefix . $directory['suffix'], $className)) { - return true; - } - } - } - } - } else { - return true; - } - return false; - } - - public static function includeClass($file, $class_name) - { - if (! class_exists($class_name)) { - if (file_exists($file)) { - require $file; - return true; - } else { - return false; - } - } else { - // class already exists - } - } - - public static function addNamespaceRoot($namespaceRoot, $path, $suffix = self::defaultSuffix) - { - if (substr($path, - 1) != DIRECTORY_SEPARATOR) { - $path .= DIRECTORY_SEPARATOR; - } - self::$_directories[] = array( - 'namespaceRoot' => $namespaceRoot, - 'path' => $path, - 'suffix' => $suffix - ); - } - - public function addMap($mapFilePath = null) - { - global $applicationPath; - global $libraryPath; - - if($mapFilePath === null) { - $mapFilePath = $applicationPath . '/cache/autoloader.map.php'; - } - - if (file_exists($mapFilePath)) { - if (pathinfo($mapFilePath, PATHINFO_EXTENSION) == 'php') { - $newMap = require($mapFilePath); - self::$_maps[] = $newMap; - } - } - } - - public function register() - { - spl_autoload_register(__NAMESPACE__ . '\Autoloader::load'); - } -} - - - -namespace Nf; - -class Registry extends \ArrayObject -{ - - private static $_registry = null; - - /** - * Retrieves the default registry instance. - * - * @return Zend_Registry - */ - public static function getInstance() - { - if (self::$_registry === null) { - self::init(); - } - - return self::$_registry; - } - - /** - * Set the default registry instance to a specified instance. - * - * @param Zend_Registry $registry An object instance of type Zend_Registry, - * or a subclass. - * @return void - * @throws Zend_Exception if registry is already initialized. - */ - public static function setInstance(\Nf\Registry $registry) - { - if (self::$_registry !== null) { - #require_once 'Zend/Exception.php'; - throw new Exception('Registry is already initialized'); - } - - self::$_registry = $registry; - } - - /** - * Initialize the default registry instance. - * - * @return void - */ - protected static function init() - { - self::setInstance(new \Nf\Registry()); - } - - /** - * getter method, basically same as offsetGet(). - * - * This method can be called from an object of type Nf\Registry, or it - * can be called statically. In the latter case, it uses the default - * static instance stored in the class. - * - * @param string $index - get the value associated with $index - * @return mixed - * @throws Zend_Exception if no entry is registerd for $index. - */ - public static function get($index) - { - $instance = self::getInstance(); - - if (!$instance->offsetExists($index)) { - throw new \Exception("No entry is registered for key '$index'"); - } - - return $instance->offsetGet($index); - } - - /** - * setter method, basically same as offsetSet(). - * - * This method can be called from an object of type Zend_Registry, or it - * can be called statically. In the latter case, it uses the default - * static instance stored in the class. - * - * @param string $index The location in the ArrayObject in which to store - * the value. - * @param mixed $value The object to store in the ArrayObject. - * @return void - */ - public static function set($index, $value) - { - $instance = self::getInstance(); - $instance->offsetSet($index, $value); - } - - /** - * Returns TRUE if the $index is a named value in the registry, - * or FALSE if $index was not found in the registry. - * - * @param string $index - * @return boolean - */ - public static function isRegistered($index) - { - if (self::$_registry === null) { - return false; - } - return self::$_registry->offsetExists($index); - } - - /** - * Constructs a parent ArrayObject with default - * ARRAY_AS_PROPS to allow acces as an object - * - * @param array $array data array - * @param integer $flags ArrayObject flags - */ - public function __construct() - { - parent::__construct(); - } - - /** - * @param string $index - * @returns mixed - * - * Workaround for http://bugs.php.net/bug.php?id=40442 (ZF-960). - */ - public function offsetExists($index) - { - return array_key_exists($index, $this); - } -} - - - -namespace Nf; - -class UserAgent -{ - - public $httpUserAgent; - public $lowerHttpUserAgent; - - public function __construct($httpUserAgent) - { - $this->httpUserAgent=$httpUserAgent; - $this->lowerHttpUserAgent=strtolower($httpUserAgent); - } - - public function checkClass($class) - { - switch ($class) { - case 'iphone': - return $this->isIphone(); - break; - case 'ipad': - return $this->isIpad(); - break; - case 'androidmobile': - return $this->isAndroidMobile(); - break; - case 'androidtablet': - return $this->isAndroidTablet(); - break; - case 'blackberry': - return $this->isBlackberry(); - break; - } - } - - public function isIphone() - { - return strstr($this->lowerHttpUserAgent, 'iphone') || strstr($this->lowerHttpUserAgent, 'ipod'); - } - - public function isIpad() - { - return strstr($this->lowerHttpUserAgent, 'ipad'); - } - - public function isAndroidMobile() - { - return (strstr($this->lowerHttpUserAgent, 'android')!==false) && (strstr($this->lowerHttpUserAgent, 'mobile')===false); - } - - public function isAndroidTablet() - { - return (strstr($this->lowerHttpUserAgent, 'android')!==false) && (strstr($this->lowerHttpUserAgent, 'mobile')===false); - } - - public function isBlackberry() - { - return strstr($this->lowerHttpUserAgent, 'blackberry'); - } -} - - -namespace Nf; - -class Task -{ - - protected $pid; - - protected $ppid; - - protected $params = null; - - function __construct($params = null) - { - $this->params = $params; - } - - function fork() - { - $pid = pcntl_fork(); - if ($pid == - 1) - throw new Exception('fork error on Task object'); - elseif ($pid) { - // we are in the parent class - $this->pid = $pid; - // echo "< in parent with pid {$this->pid}\n"; - } else { - // we are in the child ᶘ ᵒᴥᵒᶅ - $this->ppid = posix_getppid(); - $this->pid = posix_getpid(); - $this->run(); - exit(0); - } - } - - // overload this method in your class - function run() - { - // echo "> in child {$this->pid}\n"; - } - - // call when a task is finished (in parent) - function finish() - { - // echo "task finished {$this->pid}\n"; - } - - function pid() - { - return $this->pid; - } -} - - - - - -namespace Nf; - -class Front extends Singleton -{ - - protected static $_instance; - - // les modules - private $_moduleDirectories = array(); - - const controllersDirectory = 'controllers'; - - // pour instancier le controller, forwarder... - private $_moduleNamespace; - - private $_moduleName; - - private $_controllerName; - - private $_actionName; - - // pour le controller - private $_request; - - private $_requestType; - - private $_response; - - private $_router; - - private $_session; - - public static $obLevel = 0; - - // the instance of the controller that is being dispatched - private $_controllerInstance; - - private $_applicationNamespace = 'App'; - - private $registeredMiddlewares = array(); - - const MIDDLEWARE_PRE = 0; - - const MIDDLEWARE_POST = 1; - - public function __get($var) - { - $varName = '_' . $var; - return $this->$varName; - } - - public function getRequestType() - { - return $this->_requestType; - } - - public function getModuleName() - { - return $this->_moduleName; - } - - public function getControllerName() - { - return $this->_controllerName; - } - - public function getActionName() - { - return $this->_actionName; - } - - public function setRequest($request) - { - $this->_request = $request; - } - - public function setResponse($response) - { - $this->_response = $response; - } - - public function setRequestType($requestType) - { - $this->_requestType = $requestType; - } - - public function getRequest() - { - return $this->_request; - } - - public function getResponse() - { - return $this->_response; - } - - public function setSession($session) - { - $this->_session = $session; - } - - public function getSession() - { - return $this->_session; - } - - public function getRouter() - { - return $this->_router; - } - - public function setRouter($router) - { - $this->_router = $router; - } - - public function setApplicationNamespace($namespace) - { - $this->_applicationNamespace = $namespace; - } - - public function getApplicationNamespace() - { - return $this->_applicationNamespace; - } - - public function getControllerInstance() - { - return $this->_controllerInstance; - } - - // cache - public function getCache($which) - { - // do we already have the cache object in the Registry ? - if (Registry::isRegistered('cache_' . $which)) { - return Registry::get('cache_' . $which); - } else { - // get the config for our cache object - $config = Registry::get('config'); - if (isset($config->cache->$which->handler)) { - $cache = Cache::factory($config->cache->$which->handler, (isset($config->cache->$which->params)) ? $config->cache->$which->params : array(), (isset($config->cache->$which->lifetime)) ? $config->cache->$which->lifetime : Cache::DEFAULT_LIFETIME); - return $cache; - } else { - throw new Exception('The cache handler "' . $which . '" is not set in config file'); - } - } - } - - // modules - public function addModuleDirectory($namespace, $dir) - { - $this->_moduleDirectories[] = array( - 'namespace' => $namespace, - 'directory' => $dir - ); - } - - private function getControllerFilename($namespace, $directory, $module, $controller) - { - $controllerFilename = ucfirst($controller . 'Controller.php'); - return $directory . $module . '/' . self::controllersDirectory . '/' . $controllerFilename; - } - - public function checkModuleControllerAction($inModule, $inController, $inAction) - { - $foundController = null; - - foreach ($this->_moduleDirectories as $moduleDirectory => $moduleDirectoryInfos) { - $controllerFilename = $this->getControllerFilename($moduleDirectoryInfos['namespace'], $moduleDirectoryInfos['directory'], $inModule, $inController); - - if (file_exists($controllerFilename)) { - $this->_moduleNamespace = $moduleDirectoryInfos['namespace']; - $this->_moduleName = $inModule; - $this->_controllerName = $inController; - $this->_actionName = $inAction; - $foundController = $controllerFilename; - break; - } - } - - unset($moduleDirectory); - unset($moduleDirectoryInfos); - if (! $foundController) { - return false; - } - return $foundController; - } - - public function forward($module, $controller, $action) - { - if ($foundController = $this->checkModuleControllerAction($module, $controller, $action)) { - if ($this->checkMethodForAction($foundController)) { - $this->launchAction(); - return true; - } else { - return false; - } - } else { - return false; - } - } - - public function associateParams($routeRegexp, $values) - { - if (! is_array($values)) { - $values = array( - $values - ); - } - - preg_match_all('/\((\w+):/', $routeRegexp, $matches); - - for ($i = 0; $i < count($matches[1]); $i ++) { - $this->_request->setParam($matches[1][$i], $values[$i + 1]); - } - } - - public function parseParameters($uri) - { - // les éventuels paramètres sont en /variable/value - $paramsFromUri = ltrim(preg_replace('#^(\w+)/(\w+)/(\w+)#', '', $uri), '/'); - - // si on envoie des variables avec des / - if ($paramsFromUri != '') { - if (substr_count($paramsFromUri, '/') % 2 == 1) { - preg_match_all('/(\w+)\/([^\/]*)/', $paramsFromUri, $arrParams, PREG_SET_ORDER); - for ($matchi = 0; $matchi < count($arrParams); $matchi ++) { - $this->_request->setParam($arrParams[$matchi][1], $arrParams[$matchi][2]); - } - } - - // si on envoie des variables avec des var1=val1 - if (substr_count($paramsFromUri, '=') >= 1) { - preg_match_all('/(\w+)=([^\/&]*)/', $paramsFromUri, $arrParams, PREG_SET_ORDER); - for ($matchi = 0; $matchi < count($arrParams); $matchi ++) { - $this->_request->setParam($arrParams[$matchi][1], $arrParams[$matchi][2]); - } - } - } - } - - public function getView() - { - if (! is_null($this->_controllerInstance->_view)) { - return $this->_controllerInstance->_view; - } else { - $config = Registry::get('config'); - $view = View::factory($config->view->engine); - $view->setResponse($this->_response); - return $view; - } - } - - public function dispatch() - { - // on va regarder le m/c/a concerné par l'url ou les paramètres déjà saisis - if ($foundController = $this->getRouter()->findRoute(Registry::get('version'), Registry::get('locale'))) { - return $this->checkMethodForAction($foundController); - } else { - return false; - } - } - - private function checkMethodForAction($foundController) - { - // on lancera dans l'ordre le init, action, postAction - require_once($foundController); - $controllerClassName = $this->_moduleNamespace . '\\' . ucfirst($this->_moduleName) . '\\' . ucfirst($this->_controllerName) . 'Controller'; - $this->_controllerInstance = new $controllerClassName($this); - - $reflected = new \ReflectionClass($this->_controllerInstance); - - if ($reflected->hasMethod($this->_actionName . 'Action')) { - return true; - } else { - return false; - } - } - - // called after dispatch - public function init() - { - return $this->_controllerInstance->init(); - } - - // registers a middleware programmatically and not through a route - public function registerMiddleware($middlewareInstance) - { - if (isset(class_uses($middlewareInstance)['Nf\Middleware\Pre'])) { - $key = self::MIDDLEWARE_PRE; - } else { - $key = self::MIDDLEWARE_POST; - } - // adds the middleware - $this->registeredMiddlewares[$key][] = $middlewareInstance; - } - - // calls the actual action found from the routing system - public function launchAction() - { - self::$obLevel = ob_get_level(); - - if (php_sapi_name() != 'cli') { - ob_start(); - } - - $router = $this->_router; - $activeRoute = $router->getActiveRoute(); - - // optionally sets the content-type - if (isset($activeRoute['contentType'])) { - $this->_response->setContentType($activeRoute['contentType']); - } - - // optionally sets the client cache duration - if (isset($activeRoute['cacheMinutes'])) { - $this->_response->setCacheable($activeRoute['cacheMinutes']); - } - - // call pre middlewares defined by the active route - if (isset($activeRoute['middlewaresPre'])) { - foreach ($activeRoute['middlewaresPre'] as $middleware) { - $object = new $middleware(); - $object->execute(); - } - unset($middleware); - } - // call pre middlewares defined programatically - if (isset($this->registeredMiddlewares[self::MIDDLEWARE_PRE])) { - foreach ($this->registeredMiddlewares[self::MIDDLEWARE_PRE] as $middleware) { - $middleware->execute(); - } - } - - // call the action - call_user_func(array( - $this->_controllerInstance, - $this->_actionName . 'Action' - )); - $content = ob_get_clean(); - $this->_response->addBodyPart($content); - - // call post middlewares - if (isset($activeRoute['middlewaresPost'])) { - foreach ($activeRoute['middlewaresPost'] as $middleware) { - $object = new $middleware(); - $object->execute(); - } - unset($middleware); - } - // call post middlewares defined programatically, by instance - if (isset($this->registeredMiddlewares[self::MIDDLEWARE_POST])) { - foreach ($this->registeredMiddlewares[self::MIDDLEWARE_POST] as $middleware) { - $middleware->execute(); - } - } - } - - // called after action - public function postLaunchAction() - { - $reflected = new \ReflectionClass($this->_controllerInstance); - if ($reflected->hasMethod('postLaunchAction')) { - call_user_func(array( - $this->_controllerInstance, - 'postLaunchAction' - ), null); - } - } -} - - -namespace Nf; - -abstract class Cache -{ - - static $instances = array(); - - // default lifetime for any stored value - const DEFAULT_LIFETIME = 600; - - public static function getKeyName($keyName, $keyValues = array()) - { - $config = Registry::get('config'); - if (! isset($config->cachekeys->$keyName)) { - throw new \Exception('Key ' . $keyName . ' is not set in the config file.'); - } else { - $configKey = $config->cachekeys->$keyName; - if (is_array($keyValues)) { - // if we send an associative array - if (self::isAssoc($keyValues)) { - $result = $configKey; - foreach ($keyValues as $k => $v) { - $result = str_replace('[' . $k . ']', $v, $result); - } - } else { - // if we send an indexed array - preg_match_all('/\[([^\]]*)\]/', $configKey, $vars, PREG_PATTERN_ORDER); - if (count($vars[0]) != count($keyValues)) { - throw new \Exception('Key ' . $keyName . ' contains a different number of values than the keyValues you gave.'); - } else { - $result = $configKey; - for ($i = 0; $i < count($vars[0]); $i ++) { - $result = str_replace('[' . $vars[0][$i] . ']', $keyValues[$i]); - } - } - } - } else { - // if we send only one value - $result = preg_replace('/\[([^\]]*)\]/', $keyValues, $configKey); - } - } - // if we still have [ in the key name, it means that we did not send the right parameters for keyValues - if (strpos($result, '[')) { - throw new \Exception('The cache key ' . $keyName . ' cannot be parsed with the given keyValues.'); - } else { - $keyPrefix = ! empty($config->cache->keyPrefix) ? $config->cache->keyPrefix : ''; - return $keyPrefix . $result; - } - } - - public static function isCacheEnabled() - { - $config = Registry::get('config'); - return isset($config->cache->enabled) ? (bool) $config->cache->enabled : true; - } - - private static function isAssoc($array) - { - return is_array($array) && array_diff_key($array, array_keys(array_keys($array))); - } - - public static function getStorage($type) - { - if (! in_array($type, self::$instances)) { - $config = Registry::get('config'); - if (isset($config->cache->$type->handler)) { - $handler = $config->cache->$type->handler; - } else { - throw new \Exception('The ' . $type . ' cache storage is not defined in the config file'); - } - if (isset($config->cache->$type->params)) { - $params = $config->cache->$type->params; - } else { - $params = null; - } - if (isset($config->cache->$type->lifetime)) { - $lifetime = $config->cache->$type->lifetime; - } else { - $lifetime = self::DEFAULT_LIFETIME; - } - $instance = self::factory($handler, $params, $lifetime); - self::$instances[$type]=$instance; - } - return self::$instances[$type]; - } - - public static function factory($handler, $params, $lifetime = DEFAULT_LIFETIME) - { - $className = get_class() . '\\' . ucfirst($handler); - return new $className($params, $lifetime); - } -} - - -namespace Nf; - -/** - * Reads an . - * - * - * ini file, handling sections, overwriting... - * - * @author Julien Ricard - * @package Nf - */ -class Ini -{ - - /** - * Internal storage array - * - * @var array - */ - private static $result = array(); - - /** - * Loads in the ini file specified in filename, and returns the settings in - * it as an associative multi-dimensional array - * - * @param string $filename - * The filename of the ini file being parsed - * @param boolean $process_sections - * By setting the process_sections parameter to TRUE, - * you get a multidimensional array, with the section - * names and settings included. The default for - * process_sections is FALSE - * @param string $section_name - * Specific section name to extract upon processing - * @throws Exception - * @return array|boolean - */ - public static function parse($filename, $process_sections = false, $section_name = null, $fallback_section_name = null) - { - - // load the raw ini file - // automatically caches the ini file if an opcache is present - ob_start(); - include($filename); - $str = ob_get_contents(); - ob_end_clean(); - $ini = parse_ini_string($str, $process_sections); - - // fail if there was an error while processing the specified ini file - if ($ini === false) { - return false; - } - - // reset the result array - self::$result = array(); - - if ($process_sections === true) { - // loop through each section - foreach ($ini as $section => $contents) { - // process sections contents - self::processSection($section, $contents); - } - } else { - // treat the whole ini file as a single section - self::$result = self::processSectionContents($ini); - } - - // extract the required section if required - if ($process_sections === true) { - if ($section_name !== null) { - // return the specified section contents if it exists - if (isset(self::$result[$section_name])) { - return self::bindArrayToObject(self::$result[$section_name]); - } else { - if ($fallback_section_name !== null) { - return self::bindArrayToObject(self::$result[$fallback_section_name]); - } else { - throw new \Exception('Section ' . $section_name . ' not found in the ini file'); - } - } - } - } - - // if no specific section is required, just return the whole result - return self::bindArrayToObject(self::$result); - } - - /** - * Process contents of the specified section - * - * @param string $section - * Section name - * @param array $contents - * Section contents - * @throws Exception - * @return void - */ - private static function processSection($section, array $contents) - { - // the section does not extend another section - if (stripos($section, ':') === false) { - self::$result[$section] = self::processSectionContents($contents); - - // section extends another section - } else { - // extract section names - list ($ext_target, $ext_source) = explode(':', $section); - $ext_target = trim($ext_target); - $ext_source = trim($ext_source); - - // check if the extended section exists - if (! isset(self::$result[$ext_source])) { - throw new \Exception('Unable to extend section ' . $ext_source . ', section not found'); - } - - // process section contents - self::$result[$ext_target] = self::processSectionContents($contents); - - // merge the new section with the existing section values - self::$result[$ext_target] = self::arrayMergeRecursive(self::$result[$ext_source], self::$result[$ext_target]); - } - } - - /** - * Process contents of a section - * - * @param array $contents - * Section contents - * @return array - */ - private static function processSectionContents(array $contents) - { - $result = array(); - - // loop through each line and convert it to an array - foreach ($contents as $path => $value) { - // convert all a.b.c.d to multi-dimensional arrays - $process = self::processContentEntry($path, $value); - - // merge the current line with all previous ones - $result = self::arrayMergeRecursive($result, $process); - } - - return $result; - } - - /** - * Convert a.b.c.d paths to multi-dimensional arrays - * - * @param string $path - * Current ini file's line's key - * @param mixed $value - * Current ini file's line's value - * @return array - */ - private static function processContentEntry($path, $value) - { - $pos = strpos($path, '.'); - - if ($pos === false) { - return array( - $path => $value - ); - } - - $key = substr($path, 0, $pos); - $path = substr($path, $pos + 1); - - $result = array( - $key => self::processContentEntry($path, $value) - ); - - return $result; - } - - private static function bindArrayToObject($array) - { - $return = new \StdClass(); - foreach ($array as $k => $v) { - if (is_array($v)) { - $return->$k = self::bindArrayToObject($v); - } else { - $return->$k = $v; - } - } - return $return; - } - - /** - * Merge two arrays recursively overwriting the keys in the first array - * if such key already exists - * - * @param mixed $a - * Left array to merge right array into - * @param mixed $b - * Right array to merge over the left array - * @return mixed - */ - private static function arrayMergeRecursive($a, $b, $level = 0) - { - // merge arrays if both variables are arrays - if (is_array($a) && is_array($b)) { - // loop through each right array's entry and merge it into $a - foreach ($b as $key => $value) { - if (isset($a[$key])) { - if (is_int($key) && ! is_array($value)) { - $a[] = $value; - } else { - $a[$key] = self::arrayMergeRecursive($a[$key], $value, $level + 1); - } - } else { - if ($key === 0) { - $a = array( - 0 => self::arrayMergeRecursive($a, $value, $level + 1) - ); - } else { - $a[$key] = $value; - } - } - } - } else { - // at least one of values is not an array - $a = $b; - } - return $a; - } - - /** - * Replaces text in every value of the config, recursively - * - * @param string $search - * The string to search for - * @param string $replace - * The string for replace with - * @throws Exception - * @return Ini - */ - public static function deepReplace($ini, $search, $replace) - { - if (is_object($ini)) { - foreach ($ini as $key => &$value) { - $value = self::deepReplace($value, $search, $replace); - } - } else { - $ini = str_replace($search, $replace, $ini); - return $ini; - } - return $ini; - } -} - - -/** - * Nf Input - * - */ - -namespace Nf; - -/** - * Filtering and validating for forms, input parameters, etc - * - * @author Julien Ricard - * @package Nf - */ -class Input -{ - - const F_INTEGER = 'Int'; - - const F_NATURAL = 'Natural'; - - const F_NATURALNONZERO = 'NaturalNonZero'; - - const F_ALPHA = 'Alpha'; - - const F_ALPHANUM = 'AlphaNum'; - - const F_NUMERIC = 'Numeric'; - - const F_BASE64 = 'Base64'; - - const F_REGEXP = 'Regexp'; - - const F_STRING = 'String'; - - const F_TRIM = 'Trim'; - - const F_URL = 'Url'; - - const F_STRIPTAGS = 'StripTags'; - - const F_NULL = 'NullIfEmptyString'; - - const F_BOOLEAN = 'Boolean'; - - const V_INTEGER = 'Int'; - - const V_NATURAL = 'Natural'; - - const V_NATURALNONZERO = 'NaturalNonZero'; - - const V_ALPHA = 'Alpha'; - - const V_ALPHANUM = 'AlphaNum'; - - const V_NUMERIC = 'Numeric'; - - const V_BASE64 = 'Base64'; - - const V_EQUALS = 'Equals'; - - const V_REGEXP = 'Regexp'; - - const V_REQUIRED = 'Required'; - - const V_NOTEMPTY = 'NotEmpty'; - - const V_GREATERTHAN = 'GreaterThan'; - - const V_LESSTHAN = 'LessThan'; - - const V_MINLENGTH = 'MinLength'; - - const V_MAXLENGTH = 'MaxLength'; - - const V_EXACTLENGTH = 'ExactLength'; - - const V_EMAIL = 'Email'; - - const V_MATCHES = 'Matches'; - - const V_URL = 'Url'; - - const V_DEFAULT = 'Default'; - - const V_BOOLEAN = 'Boolean'; - - /** - * An array of every input parameter - */ - private $_params = array(); - - /** - * An array of every filter instantiated for every input parameter - */ - private $_filters = array(); - - /** - * An array of every validator instantiated for every input parameter - */ - private $_validators = array(); - - /** - * An array of every parameter after filtering and validating - */ - private $_fields = array(); - - const REGEXP_ALPHA = '/[^a-z]*/i'; - - const REGEXP_ALPHANUM = '/[^a-z0-9]*/i'; - - const REGEXP_BASE64 = '%[^a-zA-Z0-9/+=]*%i'; - - const REGEXP_INT = '/^[\-+]?[0-9]+$/'; - - /** - * The constructor to use while filtering/validating input - * - * @param array $params the input paramters to filter and validate - * @param array $filters the list of filters for each parameter - * @param array $validators the list of validators for each parameter - * - * @return Input - */ - public function __construct(array $params, array $filters, array $validators) - { - $this->_params = $params; - $this->_filters = $filters; - $this->_validators = $validators; - $this->_classMethods = get_class_methods(__CLASS__); - $refl = new \ReflectionClass(__CLASS__); - $this->_classConstants = $refl->getConstants(); - } - - /** - * This method has to be called after specifying the parameters, filters and validators - * - * @param void - * - * @return bool returns true if every validator is validating, or false if any validator is not - * This method always filters before validating - */ - public function isValid() - { - // 1) filter - $this->filter(); - // 2) validate - return $this->validate(); - } - - /** - * Filters every input parameter - * - * @return void - */ - public function filter() - { - $this->metaFilterAndValidate('filter'); - } - - /** - * Validates every input parameter - * - * @return void - */ - public function validate() - { - return $this->metaFilterAndValidate('validate'); - } - - /** - * Returns every incorrect field and the corresponding validator - * - * @return array - */ - public function getMessages() - { - $messages = array(); - foreach ($this->_fields as $fieldName => $values) { - if (! $values['isValid']) { - $invalidators = array(); - foreach ($values['validators'] as $validatorName => $validatorValue) { - if (! $validatorValue) { - $invalidators[] = $validatorName; - } - } - $messages[$fieldName] = $invalidators; - unset($validator); - } - unset($fieldName); - unset($values); - } - return $messages; - } - - /** - * Returns the original input parameters - * - * @return array - */ - public function getFields() - { - return $this->_fields; - } - - /** - * Returns every input parameter after content filtering - * - * @return array - */ - public function getFilteredFields() - { - $filteredFields = array(); - foreach ($this->_fields as $fieldName => $data) { - $filteredFields[$fieldName] = $data['value']; - } - return $filteredFields; - } - - /** - * Does all the work needed to filter and validate the input parameters - * - * @param string $metaAction ("filter" or "validate") - * @return mixed - */ - private function metaFilterAndValidate($metaAction) - { - if ($metaAction == 'filter') { - $metaSource = $this->_filters; - } elseif ($metaAction == 'validate') { - $metaSource = $this->_validators; - $isValid = true; - } - - foreach ($metaSource as $paramName => $options) { - if ($metaAction == 'filter') { - $this->setField($paramName, (isset($this->_params[$paramName]) ? $this->_params[$paramName] : null)); - } - - if ($metaAction == 'validate') { - if (! isset($this->_fields[$paramName])) { - $this->setField($paramName, (isset($this->_params[$paramName]) ? $this->_params[$paramName] : null)); - } - $validators = array(); - } - - $options = (array) $options; - - foreach ($options as $option) { - // optional parameter sent to the filter/validator - // by default, it's not set - unset($optionParameter); - - if (is_array($option)) { - $optionKeys = array_keys($option); - $optionValues = array_values($option); - - // call with an alias and a parameter: array('isValidId' => '\App\Toto::validateId', 22) - if (isset($option[0]) && $optionKeys[1] == 0) { - $optionName = $optionKeys[0]; - $optionFunction = $optionValues[0]; - $optionParameter = $optionValues[1]; - } elseif ($this->isAssoc($option)) { - // call with an alias only : array('isValidId' => '\App\Toto::validateId'), - // or (if your name is Olivier D) call with the parameter as assoc : array('default' => 7), - $optionKeys = array_keys($option); - $optionValues = array_values($option); - - // if the value of the array is a function - if (isset($$optionFunction)) { - $optionName = $optionKeys[0]; - $optionFunction = $optionValues[0]; - } else { - // if the value of the array is a function (à la Olivier D) - $optionName = $optionKeys[0]; - $optionFunction = $optionKeys[0]; - $optionParameter = $optionValues[0]; - } - } else { - // call with a parameter only : array('regexp', '/[a-z]*/i') - $optionName = $option[0]; - $optionFunction = $option[0]; - $optionParameter = $option[1]; - } - } else { - $optionName = $option; - $optionFunction = $option; - } - - // if we want to validate against a method of a model - $idx = strpos($optionFunction, '::'); - if ($idx !== false) { - // find (with autoload) the class and call the method - $className = substr($optionFunction, 0, $idx); - $methodName = substr($optionFunction, $idx + 2); - if ($metaAction == 'filter') { - if (isset($optionParameter)) { - $this->setField($paramName, $className::$methodName($this->_fields[$paramName]['value'], $optionParameter)); - } else { - $this->setField($paramName, $className::$methodName($this->_fields[$paramName]['value'])); - } - } elseif ($metaAction == 'validate') { - if (isset($optionParameter)) { - $ret = $className::$methodName($this->_fields[$paramName]['value'], $optionParameter, $this); - } else { - $ret = $className::$methodName($this->_fields[$paramName]['value'], null, $this); - } - // add the validator to the validators for this field - $isValid = $isValid && $ret; - $validators[$optionName] = $ret; - } - } else { - // we will search for the function name in this class - $methodNameForOption = $metaAction . ucfirst($optionFunction); - // if the developer has used a shortname for the filter/validator - $methodNameFromConstants = (($metaAction == 'filter') ? 'F' : 'V') . '_' . strtoupper($optionFunction); - if (isset($this->_classConstants[$methodNameFromConstants])) { - $methodNameForOption = (($metaAction == 'filter') ? 'filter' : 'validate') . $this->_classConstants[$methodNameFromConstants]; - } - - if (in_array($methodNameForOption, $this->_classMethods)) { - if ($methodNameForOption == 'validateRequired') { - $ret = array_key_exists($paramName, $this->_params); - } else { - if (! isset($optionParameter)) { - $optionParameter = null; - } - if (is_array($this->_fields[$paramName]['value'])) { - if ($metaAction == 'filter') { - foreach ($this->_fields[$paramName]['value'] as $paramKey => $paramValue) { - $this->_fields[$paramName]['value'][$paramKey] = self::$methodNameForOption($this->_fields[$paramName]['value'][$paramKey], $optionParameter, $this); - } - unset($paramKey); - unset($paramValue); - $ret = $this->_fields[$paramName]['value']; - } else { - $ret = true; - foreach ($this->_fields[$paramName]['value'] as $paramKey => $paramValue) { - $ret &= self::$methodNameForOption($this->_fields[$paramName]['value'][$paramKey], $optionParameter, $this); - } - unset($paramKey); - unset($paramValue); - } - } else { - $ret = self::$methodNameForOption($this->_fields[$paramName]['value'], $optionParameter, $this); - } - } - if ($metaAction == 'filter') { - $this->setField($paramName, $ret); - } - // add the validator to the validators for this field - if ($metaAction == 'validate') { - // special case of the default value - if ($methodNameForOption == 'validateDefault') { - if (is_array($this->_fields[$paramName]['value'])) { - foreach ($this->_fields[$paramName]['value'] as $paramKey => $paramValue) { - if (empty($this->_fields[$paramName]['value'][$paramKey])) { - $this->_fields[$paramName]['value'][$paramKey] = $optionParameter; - } - } - unset($paramKey); - unset($paramValue); - $ret = true; - } else { - if (empty($this->_fields[$paramName]['value'])) { - $this->_fields[$paramName]['value'] = $optionParameter; - } - $ret = true; - } - } - $isValid = $isValid && $ret; - $validators[$optionName] = $ret; - } - } else { - throw new \Exception(__CLASS__ . ' hasn\'t a method called "' . $methodNameForOption . '"'); - } - } - } - unset($option); - - // we set the field after all the input value went through all validators - if ($metaAction == 'validate') { - // we test for each params if one of validators is not valid. - $paramIsValid = true; - foreach ($validators as $v) { - if ($v === false) { - $paramIsValid = false; - break; - } - } - $this->setField($paramName, false, $paramIsValid, $validators); - } - } - if ($metaAction == 'validate') { - return $isValid; - } - } - - /** - * After filtering or validating, updates the field with additional data - * - * @param mixed $paramName the name of the input parameter - * @param mixed $value the value after filtering - * @param boolean $isValid is the field valid - * @param array $validators sets the given validators for this parameter - * - * @return mixed - */ - private function setField($paramName, $value = false, $isValid = null, $validators = null) - { - if (! isset($this->_fields[$paramName])) { - $this->_fields[$paramName] = array( - 'originalValue' => (isset($this->_params[$paramName])) ? $this->_params[$paramName] : null, - 'value' => (isset($this->_params[$paramName])) ? $this->_params[$paramName] : null, - 'isValid' => true, - 'validators' => array() - ); - } - if ($value !== false) { - $this->_fields[$paramName]['value'] = $value; - } - if ($isValid !== null) { - $this->_fields[$paramName]['isValid'] = $this->_fields[$paramName]['isValid'] && $isValid; - } - if ($validators !== null) { - $this->_fields[$paramName]['validators'] = $validators; - } - } - - /** - * Returns the filtered value for any field given in the params - * - * @param mixed $paramName the name of the input parameter - * - * @return mixed - */ - public function __get($paramName) - { - return $this->_fields[$paramName]['value']; - } - - /** - * Returns true or false if the input parameter was specified within the instanciation - * - * @param mixed $paramName the name of the input parameter - * - * @return boolean - */ - public function __isset($paramName) - { - return isset($this->_fields[$paramName]['value']); - } - - /** - * Indicates if the array is an associative one or not - * - * @param array $paramName the name of the input parameter - * - * @return boolean - */ - private function isAssoc($array) - { - return is_array($array) && array_diff_key($array, array_keys(array_keys($array))); - } - - // ************************************************************************ - // filter functions - // ************************************************************************ - - /** - * Used for filtering integer as string in json data - * - * @param mixed $value the value of the input parameter - * - * @return mixed - */ - public static function filterNullIfEmptyString($value) - { - if ($value == '') { - return null; - } - return $value; - } - - /** - * Parses the value as an integer - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function filterInt($value) - { - return filter_var($value, FILTER_SANITIZE_NUMBER_INT); - } - - /** - * Parses the value as a natural (positive integer) - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function filterNatural($value) - { - return abs(self::filterInt($value)); - } - - /** - * Parses the value as a strict natural (strictly positive integer) - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function filterNaturalNonZero($value) - { - $natural = self::filterNatural($value); - if ($natural != 0) { - return $natural; - } else { - return null; - } - } - - /** - * Parses the value as alpha (letters only, no digit) - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function filterAlpha($value) - { - return preg_replace(self::REGEXP_ALPHA, '', $value); - } - - /** - * Parses the value as an alphanumeric - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function filterAlphaNum($value) - { - return preg_replace(self::REGEXP_ALPHANUM, '', $value); - } - - /** - * Parses the value as a base64 string - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function filterBase64($value) - { - return preg_replace(self::REGEXP_BASE64, '', $value); - } - - /** - * Parses the value as a boolean - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function filterBoolean($value) - { - $out = filter_var($value, FILTER_VALIDATE_BOOLEAN); - return $out; - } - - /** - * Parses the value as a float - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function filterNumeric($value) - { - return filter_var($value, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION); - } - - /** - * Removes the html tags from input - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function filterStripTags($value) - { - return strip_tags($value); - } - - /** - * Parses the value along a regexp - * - * @param mixed $value the value of the input parameter - * @param string $regexp the regular expression to filter the input parameter to - - * @return mixed - */ - public static function filterRegexp($value, $regexp) - { - return preg_replace($regexp, '', $value); - } - - /** - * Parses the value as a string - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function filterString($value) - { - return filter_var($value, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW); - } - - /** - * Trims the string (default php behaviour) - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function filterTrim($value) - { - return trim($value); - } - - /** - * Filters the input string along the php's internal regexp for a url - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function filterUrl($value) - { - return filter_var($value, FILTER_SANITIZE_URL); - } - - // ************************************************************************ - // validator functions - // ************************************************************************ - - /** - * Validates that the input value is an integer - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function validateInt($value) - { - return (self::filterInt($value) == $value); - } - - /** - * Validates that the input value is a natural - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function validateNatural($value) - { - return (self::filterNatural($value) == $value); - } - - /** - * Validates that the input value is a positive integer greater than zero - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function validateNaturalNonZero($value) - { - return (self::filterNaturalNonZero($value) == $value); - } - - /** - * Validates that the input value is alpha (letters only) - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function validateAlpha($value) - { - return (bool) preg_match(self::REGEXP_ALPHA, $value); - } - - /** - * Validates that the input value is an alphanumeric string - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function validateAlphaNum($value) - { - return (bool) preg_match(self::REGEXP_ALPHANUM, $value); - } - - /** - * Validates that the input value is a base64 string - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function validateBase64($value) - { - return (bool) preg_match(self::REGEXP_BASE64, $value); - } - - /** - * Validates that the input value is a boolean - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function validateBoolean($value) - { - return (self::filterBoolean($value) == $value); - } - - /** - * Validates that the input value is a number (float) - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function validateNumeric($value, $compare, $instance) - { - return (self::filterNumeric($value) == $value); - } - - /** - * Validates that the input value equals the second parameter (no type checking) - * - * @param mixed $value the value of the input parameter - * @param mixed $check the value of the second parameter - * - * @return mixed - */ - public static function validateEquals($value, $check) - { - return (bool) ($value == $check); - } - - /** - * Validates that the input value along a regular expression given as second parameter - * - * @param mixed $value the value of the input parameter - * @param string $regexp the regular expression to validate to - * @return mixed - */ - public static function validateRegexp($value, $regexp) - { - return (bool) preg_match($regexp, $value); - } - - /** - * This method actually does not exist :) and should not be called directly - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function validateRequired($value) - { - throw new \Exception('This method should never be called'); - } - - /** - * Validates that the input value is not an empty string - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function validateNotEmpty($value) - { - return ! (trim($value) === ''); - } - - /** - * Validates that the input value is greater than the given parameter - * - * @param mixed $value the value of the input parameter - * @param mixed $compare the value to compare to - * @return mixed - */ - public static function validateGreaterThan($value, $compare) - { - return ($value >= $compare); - } - - /** - * Validates that the input value is lesser than the given parameter - * - * @param mixed $value the value of the input parameter - * @param mixed $compare the value to compare to - * @return mixed - */ - public static function validateLessThan($value, $compare) - { - return ($value <= $compare); - } - - /** - * Validates that the input value has a minimum length of the given parameter - * - * @param mixed $value the value of the input parameter - * @param mixed $compare the value to compare to - * @return mixed - */ - public static function validateMinLength($value, $compare) - { - return (mb_strlen($value) >= $compare); - } - - /** - * Validates that the input value has a maximum length of the given parameter - * - * @param mixed $value the value of the input parameter - * @param mixed $compare the value to compare to - * @return mixed - */ - public static function validateMaxLength($value, $compare) - { - return (mb_strlen($value) <= $compare); - } - - /** - * Validates that the input value has the exact length of the given parameter - * - * @param mixed $value the value of the input parameter - * @param mixed $compare the value to compare to - * @return mixed - */ - public static function validateExactLength($value, $compare) - { - return (mb_strlen($value) == $compare); - } - - /** - * Validates that the input value is an e-mail address - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function validateEmail($value) - { - $regexp = '/^[A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4}$/i'; - return (bool) preg_match($regexp, $value); - } - - /** - * Validates that the input value matches another input parameter - * - * @param mixed $value the value of the input parameter - * @param mixed $compareField the name of the input parameter to compare to - * @param mixed $instance the instance of the Input object - * @return mixed - */ - public static function validateMatches($value, $compareField, $instance) - { - if (isset($instance->_fields[$compareField])) { - return ($value == $instance->_fields[$compareField]['value']); - } - } - - /** - * Validates that the input value is an url - * - * @param mixed $value the value of the input parameter - * @return mixed - */ - public static function validateUrl($value) - { - if (($url = parse_url($value)) && ! empty($url['scheme']) && ! empty($url['host'])) { - return true; - } - return false; - } - - /** - * Sets the field to a default value if the input value is empty - * - * @param mixed $value the value of the input parameter - * @param mixed $defaultValue the default value to assign if the input value is empty - * @return mixed - */ - public static function validateDefault($value, $defaultValue) - { - if (empty($value)) { - return $defaultValue; - } - return $value; - } -} - - - -namespace Nf; - -abstract class Date -{ - - - public static function dateFromMysql($date_origine, $return_time = false) - { - $date_output=''; - if ($return_time) { - // sous la forme 2007-12-25 14:55:36 (datetime) => on renvoie tout reformaté - if (preg_match('/^(\\d{4})\\-(\\d{2})\\-(\\d{2})\\ (\\d{2}):(\\d{2}):(\\d{2})$/', $date_origine, $matches)) { - $date_output = preg_replace('/(\\d{4})\\-(\\d{2})\\-(\\d{2})\\ (\\d{2}):(\\d{2}):(\\d{2})/', '$3/$2/$1 $4:$5:$6', $matches[0]); - } // sous la forme 2007-12-25 (date) => on renvoie une heure 00:00:00 - elseif (preg_match('/^(\\d{4})\\-(\\d{2})\\-(\\d{2})$/', $date_origine, $matches)) - $date_output = preg_replace('/(\\d{4})\\-(\\d{2})\\-(\\d{2})/', '$3/$2/$1 00:00:00', $matches[0]); - // sous la forme 25/12/2007 14:55:36 - elseif (preg_match('/^(\\d{2})\/(\\d{2})\/(\\d{4}) (\\d{2}):(\\d{2}):(\\d{2})$/', $date_origine, $matches)) - $date_output = $date_origine; - // sous la forme 25/12/2007 14:55 => on ajoute :00 - elseif (preg_match('/^(\\d{1,2})\/(\\d{1,2})\/(\\d{4}) (\\d{2}):(\\d{2})$/', $date_origine, $matches)) - $date_output = preg_replace('/^(\\d{1,2})\/(\\d{1,2})\/(\\d{4}) (\\d{2}):(\\d{2})$/', '$1/$2/$3 $4:$5:00', $matches[0]); - // sous la forme 25/12/2007 => on ajoute 00:00:00 - elseif (preg_match('/^(\\d{1,2})\/(\\d{1,2})\/(\\d{4})$/', $date_origine, $matches)) - $date_output = preg_replace('/^(\\d{1,2})\/(\\d{1,2})\/(\\d{4})$/', '$1/$2/$3 00:00:00', $matches[0]); - } else { - // sous la forme 2007-12-25 (qqch)? - if (preg_match('/(\\d{4})\\-(\\d{2})\\-(\\d{2})/', $date_origine, $matches)) { - $date_output = preg_replace('/(\\d{4})\\-(\\d{2})\\-(\\d{2})/', '$3/$2/$1', $matches[0]); - } // sous la forme 25/12/2007 => on ajoute 00:00:00 - elseif (preg_match('/(\\d{1,2})\/(\\d{1,2})\/(\\d{4})/', $date_origine, $matches)) - $date_output = preg_replace('/^(\\d{1,2})\/(\\d{1,2})\/(\\d{4})$/', '$1/$2/$3', $matches[0]); - } - if ($date_output!='') { - return $date_output; - } else { - throw new \Exception('Erreur date_from_mysql : date non reconnue ' . $date_origine); - } - } - - public static function dateRange($first, $last, $step = '+1 day') - { - - $dates = array(); - $current = strtotime($first); - $last = strtotime($last); - - switch ($step) { - case '+1 day': - $format = 'Y-m-d'; - break; - case '+1 month': - $format = 'Y-m-01'; - break; - case '+1 year': - $format = 'Y-01-01'; - break; - default: - $format = 'Y-m-d'; - } - - while ($current <= $last) { - $dates[] = date($format, $current); - $current = strtotime($step, $current); - } - - return $dates; - } - - public static function dateToMysql($date_origine, $return_time = false) - { - - $date_output=''; - if ($return_time) { - // sous la forme 25/12/2007 14:55:36 => on reformate tout - if (preg_match('/^(\\d{2})\/(\\d{2})\/(\\d{4}) (\\d{2}):(\\d{2}):(\\d{2})$/', $date_origine, $matches)) { - $date_output = preg_replace('/^(\\d{2})\/(\\d{2})\/(\\d{4}) (\\d{2}):(\\d{2}):(\\d{2})$/', '$3-$2-$1 $4:$5:$6', $matches[0]); - } // sous la forme 25/12/2007 14:55 => on ajoute :00 - elseif (preg_match('/^(\\d{1,2})\/(\\d{1,2})\/(\\d{4}) (\\d{2}):(\\d{2})$/', $date_origine, $matches)) - $date_output = preg_replace('/^(\\d{1,2})\/(\\d{1,2})\/(\\d{4}) (\\d{2}):(\\d{2})$/', '$3-$2-$1 $4:$5:00', $matches[0]); - // sous la forme 25/12/2007 => on ajoute 00:00:00 - elseif (preg_match('/^(\\d{1,2})\/(\\d{1,2})\/(\\d{4})$/', $date_origine, $matches)) - $date_output = preg_replace('/^(\\d{1,2})\/(\\d{1,2})\/(\\d{4})$/', '$3-$2-$1 00:00:00', $matches[0]); - // sous la forme time() numérique - elseif (is_numeric($date_origine)) { - $date_output = date("Y-m-d H:i:s", $date_origine); - } // sous la forme mysql datetime - elseif (preg_match('/^(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})$/', $date_origine, $matches)) - $date_output = preg_replace('/(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})/', '$1-$2-$3 $4:$5:$6', $matches[0]); - // sous la forme mysql date - elseif (preg_match('/^(\\d{4})-(\\d{2})-(\\d{2})$/', $date_origine, $matches)) - $date_output = preg_replace('/(\\d{4})-(\\d{2})-(\\d{2})/', '$1-$2-$3 00:00:00', $matches[0]); - } else { - if (preg_match('/(\\d{1,2})\/(\\d{1,2})\/(\\d{4})/', $date_origine, $matches)) { - $date_output = preg_replace('/(\\d{1,2})\/(\\d{1,2})\/(\\d{4})/', '$3-$2-$1', $matches[0]); - } // sous la forme d'une timestamp numérique - elseif (is_numeric($date_origine)) - $date_output = date("Y-m-d", $date_origine); - // sous la forme mysql datetime - elseif (preg_match('/^(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})$/', $date_origine, $matches)) - $date_output = preg_replace('/(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})/', '$1-$2-$3', $matches[0]); - // sous la forme mysql date - elseif (preg_match('/^(\\d{4})-(\\d{2})-(\\d{2})$/', $date_origine, $matches)) - $date_output = preg_replace('/(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})/', '$1-$2-$3', $matches[0]); - } - if ($date_output!='') { - return $date_output; - } elseif ($date_output=='') { - return null; - } else { - throw new \Exception('Erreur date_to_mysql : date non reconnue ' . $date_origine); - } - } -} - - - -namespace Nf; - -abstract class View extends Singleton -{ - - protected static $_instance; - - private $_vars=array(); - - private $_templateDirectory=null; - private $_configDirectory=null; - - protected $_response; - - public function setResponse($response) - { - $this->_response=$response; - } - - public static function factory($name) - { - $className='\\Nf\\View\\' . ucfirst($name); - $view=$className::getInstance(); - return $view; - } -} - - -namespace Nf; - -use Nf\Localization; - -/** - * Bootstrap is responsible for instanciating the application in cli or web environment - * - * @package Nf - * - */ -class Bootstrap -{ - - const DEFAULT_LOCALESELECTIONORDER = 'cookie,url,browser'; - - private $_localeAndVersionFromUrlCache = null; - - private $_applicationNamespace = 'App'; - - public function __construct($libraryPath, $applicationPath) - { - Registry::set('libraryPath', $libraryPath); - Registry::set('applicationPath', $applicationPath); - } - - public function initHttpEnvironment($inEnvironment = null, $inLocale = null, $inVersion = null) - { - $urlIni = Ini::parse(Registry::get('applicationPath') . '/configs/url.ini', true); - Registry::set('urlIni', $urlIni); - - // environment : dev, test, prod - // si il est défini en variable d'environnement - if (empty($inEnvironment)) { - if (getenv('environment') != '') { - $environment = getenv('environment'); - } else { - // sinon on lit le fichier url.ini - if (! empty($_SERVER['HTTP_HOST'])) { - if (preg_match($urlIni->environments->dev->regexp, $_SERVER['HTTP_HOST'])) { - $environment = 'dev'; - } elseif (preg_match($urlIni->environments->test->regexp, $_SERVER['HTTP_HOST'])) { - $environment = 'test'; - } else { - $environment = 'prod'; - } - } else { - trigger_error('Cannot guess the requested environment'); - } - } - } else { - // aucune vérification pour le moment - $environment = $inEnvironment; - } - - // locale - if (! empty($urlIni->i18n->$environment->localeSelectionOrder)) { - $localeSelectionOrder = $urlIni->i18n->$environment->localeSelectionOrder; - } else { - $localeSelectionOrder = self::DEFAULT_LOCALESELECTIONORDER; - } - $localeSelectionOrderArray = (array) explode(',', $localeSelectionOrder); - // 3 possibilities : suivant l'url ou suivant un cookie ou suivant la langue du navigateur (fonctionnement indiqué dans i18n de url.ini) - if (empty($inLocale)) { - $locale = null; - foreach ($localeSelectionOrderArray as $localeSelectionMethod) { - if ($locale === null) { - switch ($localeSelectionMethod) { - case 'browser': - // on utilise la locale du navigateur et on voit si on a une correspondance - if (! empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { - // vérification de la syntaxe par une regexp - if (preg_match('/[a-z]+[_\-]?[a-z]+[_\-]?[a-z]+/i', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $matches)) { - $locale = Localization::normalizeLocale($matches[0]); - if (! empty($_SERVER['HTTP_HOST'])) { - $httpHost = strtolower($_SERVER['HTTP_HOST']); - list ($localeFromUrl, $versionFromUrl, $redirectToHost) = $this->getLocaleAndVersionFromUrl($httpHost, $urlIni); - } - } - } - break; - case 'url': - // lire le fichier url.ini pour connaître la locale à utiliser - // en fonction de l'url - if (! empty($_SERVER['HTTP_HOST'])) { - $httpHost = strtolower($_SERVER['HTTP_HOST']); - list ($localeFromUrl, $versionFromUrl, $redirectToHost) = $this->getLocaleAndVersionFromUrl($httpHost, $urlIni); - if (! empty($localeFromUrl)) { - $locale = $localeFromUrl; - } - } - break; - case 'cookie': - // lire le cookie pour connaître la locale à utiliser - if (! empty($_COOKIE['_nfLc'])) { - // vérification de la syntaxe par une regexp - if (preg_match('/[a-z]+[_\-]?[a-z]+[_\-]?[a-z]+/i', $_COOKIE['_nfLc'], $matches)) { - $locale = Localization::normalizeLocale($matches[0]); - } - } - break; - } - } - } - } else { - $locale = $inLocale; - } - - // if we did not find the locale, we use the default value - if ($locale == null) { - if (! empty($urlIni->i18n->defaultLocale)) { - $locale = $urlIni->i18n->defaultLocale; - } else { - throw new \Exception('You have to set a default locale in url.ini'); - } - } - // we match the locale with the defined locale - $localeFound = false; - foreach ($urlIni->locales as $definedLocale => $definedLocaleNames) { - if (! $localeFound) { - if (strpos($definedLocaleNames, '|')) { - $arrDefinedLocaleNames = explode('|', $definedLocaleNames); - foreach ($arrDefinedLocaleNames as $localeNameOfArr) { - if (trim($localeNameOfArr) == trim($locale)) { - $locale = trim($definedLocale); - $localeFound = true; - break; - } - } - } else { - if (trim($definedLocaleNames) == trim($locale)) { - $locale = trim($definedLocale); - $localeFound = true; - break; - } - } - } - } - - // if the detected locale was not found in our defined locales - if (! $localeFound) { - // reverting to the default locale - if (! empty($urlIni->i18n->defaultLocale)) { - $locale = $urlIni->i18n->defaultLocale; - } else { - throw new \Exception('You have to set a default locale in url.ini'); - } - } - - // version (web, mobile, cli...) - if (empty($inVersion)) { - if (! empty($versionFromUrl)) { - $version = $versionFromUrl; - } else { - if (in_array('url', $localeSelectionOrderArray)) { - if (! empty($_SERVER['HTTP_HOST'])) { - $httpHost = strtolower($_SERVER['HTTP_HOST']); - list ($localeFromUrl, $versionFromUrl, $redirectToHost) = $this->getLocaleAndVersionFromUrl($httpHost, $urlIni); - } - } - if (! empty($versionFromUrl)) { - $version = $versionFromUrl; - } else { - // on prend la version par défaut si elle est définie - if (isset($urlIni->i18n->defaultVersion)) { - $version = $urlIni->i18n->defaultVersion; - } else { - trigger_error('Cannot guess the requested version'); - } - } - } - } else { - $version = $inVersion; - } - - // on assigne les variables d'environnement et de language en registry - Registry::set('environment', $environment); - Registry::set('locale', $locale); - Registry::set('version', $version); - - // on lit le config.ini à la section concernée par notre environnement - $config = Ini::parse(Registry::get('applicationPath') . '/configs/config.ini', true, $locale . '_' . $environment . '_' . $version, 'common'); - Registry::set('config', $config); - - if (! empty($redirectToHost)) { - header("HTTP/1.1 301 Moved Permanently"); - header("Location: http://" . $redirectToHost . $_SERVER['REQUEST_URI']); - return false; - } - - // prevention contre l'utilisation de index.php - if (isset($_SERVER['REQUEST_URI']) && in_array($_SERVER['REQUEST_URI'], array( - 'index.php', - '/index.php' - ))) { - header("HTTP/1.1 301 Moved Permanently"); - header("Location: /"); - return false; - } - - return true; - } - - private function getLocaleAndVersionFromUrl($httpHost, $urlIni) - { - $redirectToHost = null; - - if (! empty($this->_localeAndVersionFromUrlCache)) { - return $this->_localeAndVersionFromUrlCache; - } else { - $localeFromUrl = ''; - $versionFromUrl = ''; - - $found = false; - - foreach ($urlIni->versions as $version_name => $prefix) { - if (! $found) { - $redirectToHost = null; - foreach ($urlIni->suffixes as $locale => $suffix) { - if (! $found) { - if ($suffix != '') { - // the hosts names to test - $httpHostsToTest = array(); - if ($prefix == '') { - $httpHostsToTest = array( - ltrim(str_replace('[version]', '', $suffix), '.') - ); - } else { - if (strpos($prefix, '|') !== false) { - $prefixes = array_values(explode('|', $prefix)); - $redirectToHost = ltrim(str_replace('..', '.', ($prefixes[0] == '<>' ? str_replace('[version]', '', $suffix) : str_replace('[version]', $prefixes[0] . '.', $suffix))), '.'); - foreach ($prefixes as $thePrefix) { - // default empty prefix - if ($thePrefix == '<>') { - $httpHostsToTest[] = ltrim(str_replace('..', '.', str_replace('[version]', '', $suffix)), '.'); - } else { - $httpHostsToTest[] = ltrim(rtrim(str_replace('..', '.', str_replace('[version]', $thePrefix . '.', $suffix)), '.'), '.'); - } - } - } else { - $redirectToHost = null; - $httpHostsToTest[] = ltrim(rtrim(str_replace('..', '.', str_replace('[version]', str_replace('<>', '', $prefix) . '.', $suffix)), '.'), '.'); - } - } - } else { - if (strpos($prefix, '|') !== false) { - $prefixes = array_values(explode('|', $prefix)); - foreach ($prefixes as $thePrefix) { - $httpHostsToTest[] = $thePrefix; - } - } else { - $httpHostsToTest[] = $prefix; - } - } - - // le test sur la chaîne reconstruite - foreach ($httpHostsToTest as $httpHostToTest) { - if ($httpHost == $httpHostToTest) { - $localeFromUrl = $locale; - - $versionFromUrl = $version_name; - if ($locale == '_default') { - $localeFromUrl = $urlIni->i18n->defaultLocale; - } - if ($httpHostToTest == $redirectToHost) { - $redirectToHost = null; - } - $found = true; - break; - } - } - } - } - } else { - break; - } - unset($suffix); - } - - unset($prefix); - $this->_localeAndVersionFromUrlCache = array( - $localeFromUrl, - $versionFromUrl, - $redirectToHost - ); - } - - return array( - $localeFromUrl, - $versionFromUrl, - $redirectToHost - ); - } - - public function setApplicationNamespace($namespace) - { - $this->_applicationNamespace = $namespace; - \Nf\Registry::set('applicationNamespace', $namespace); - } - - public function initCliEnvironment() - { - $showUsage = true; - - if (isset($_SERVER['argv']) && $_SERVER['argc'] >= 2) { - $urlIni = Ini::parse(Registry::get('applicationPath') . '/configs/url.ini', true); - Registry::set('urlIni', $urlIni); - - $inEnvironment = 'dev'; - $inLocale = $urlIni->i18n->defaultLocale; - $inVersion = 'cli'; - $inAction = array( - 'type' => 'default', - 'uri' => null - ); - - // default values - Registry::set('environment', $inEnvironment); - Registry::set('locale', $inLocale); - Registry::set('version', $inVersion); - - $arrParams = array(); - - $ac = 1; - while ($ac < (count($_SERVER['argv']))) { - switch ($_SERVER['argv'][$ac]) { - case '-e': - case '--environment': - $inEnvironment = $_SERVER['argv'][$ac + 1]; - $ac += 2; - break; - case '-l': - case '--locale': - $inLocale = $_SERVER['argv'][$ac + 1]; - $ac += 2; - break; - case '-v': - case '--version': - $inVersion = $_SERVER['argv'][$ac + 1]; - $ac += 2; - break; - case '-a': - case '--action': - $inAction['uri'] = ltrim($_SERVER['argv'][$ac + 1], '/'); - $ac += 2; - $showUsage = false; - break; - case '-m': - case '--make': - $inAction['uri'] = ltrim($_SERVER['argv'][$ac + 1], '/'); - $inAction['type'] = 'make'; - $showUsage = false; - $ac += 2; - break; - default: - $ac += 2; - break; - } - } - } - - if (! $showUsage) { - // on lit le config.ini à la section concernée par notre environnement - $config = Ini::parse(Registry::get('applicationPath') . '/configs/config.ini', true, $inLocale . '_' . $inEnvironment . '_' . $inVersion); - Registry::set('config', $config); - - // on assigne les variables d'environnement et de langue en registry - Registry::set('environment', $inEnvironment); - Registry::set('locale', $inLocale); - Registry::set('version', $inVersion); - - return $inAction; - } else { - echo "Usage : module/controller/action"; - echo "\nOr : module/controller/action -variable1 value1 -variable2 value2 -variable3 value3"; - echo "\nOr : module/controller/action/variable1/value1/variable2/value2/variable3/value3"; - exit(04); - } - } - - function redirectForUserAgent() - { - if (isset($_SERVER['HTTP_USER_AGENT'])) { - $userAgent = new \Nf\UserAgent($_SERVER['HTTP_USER_AGENT']); - // check the [redirections] section of the url.ini against the userAgent and redirect if we've been told to - $urlIni = Registry::get('urlIni'); - foreach ($urlIni->redirections as $class => $forcedVersion) { - if ($userAgent->checkClass($class)) { - if (! empty($forcedVersion)) { - // get the redirection URL according to the current class - $suffixes = (array) $urlIni->suffixes; - $versions = (array) $urlIni->versions; - if ($forcedVersion != $this->_localeAndVersionFromUrlCache[1]) { - $redirectionUrl = 'http://' . str_replace('[version]', $versions[$forcedVersion], $suffixes[$this->_localeAndVersionFromUrlCache[0]]); - $response = new Front\Response\Http(); - $response->redirect($redirectionUrl, 301); - $response->sendHeaders(); - return true; - } - } - } - } - } - return false; - } - - function go() - { - if (php_sapi_name() == 'cli') { - $inAction = $this->initCliEnvironment(); - - $uri = $inAction['uri']; - Error\Handler::setErrorDisplaying(); - $front = Front::getInstance(); - - $request = new Front\Request\Cli($uri); - $front->setRequest($request); - - $request->setAdditionalCliParams(); - - $response = new Front\Response\Cli(); - - $front->setResponse($response); - $front->setApplicationNamespace($this->_applicationNamespace); - - $this->setTimezone(); - - // routing - $router = Router::getInstance(); - $front->setRouter($router); - $router->addAllRoutes(); - - // order in finding routes - $router->setStructuredRoutes(); - - $front->addModuleDirectory($this->_applicationNamespace, Registry::get('applicationPath') . '/application/cli/'); - $front->addModuleDirectory('library', Registry::get('libraryPath') . '/php/application/cli/'); - - $labelManager = LabelManager::getInstance(); - $labelManager->loadLabels(Registry::get('locale')); - - $localization = Localization::getInstance(); - $localization->setLocale(Registry::get('locale')); - - if ($inAction['type'] == 'default') { - $testDispatch = $front->dispatch(); - - if ($testDispatch) { - if ($front->init() !== false) { - $front->launchAction(); - $front->postLaunchAction(); - } - $response->sendResponse(); - } else { - throw new \Exception('Action not found : ' . $uri); - } - } else { - $front->parseParameters($inAction['uri']); - $className = array(); - - // $inAction['uri'] might be a class name with a static method like \Nf\Make::compress - if ((strpos($inAction['uri'], '\\') !== false)) { - if (strpos($inAction['uri'], '::') === false) { - throw new \Exception('You have to specify the model and method to call, or just choose a method from the "Nf\Make" class.'); - } else { - $uriSplit = explode('::', $inAction['uri']); - $className = $uriSplit[0]; - $methodName = $uriSplit[1]; - $obj = new $className(); - $className::$methodName(); - } - } else { - // or an already integrated method in Nf\Make - $methodName = $inAction['uri']; - \Nf\Make::$methodName(); - } - } - } else { - $this->initHttpEnvironment(); - - Error\Handler::setErrorDisplaying(); - - if (! $this->redirectForUserAgent()) { - $front = Front::getInstance(); - $request = new Front\Request\Http(); - - $front->setRequest($request); - $response = new Front\Response\Http(); - $front->setResponse($response); - $front->setApplicationNamespace($this->_applicationNamespace); - - $this->setTimezone(); - - // routing - $router = Router::getInstance(); - $front->setRouter($router); - $router->addAllRoutes(); - - // order in finding routes - $router->setRoutesFromFiles(); - $router->setRootRoutes(); - $router->setStructuredRoutes(); - - // modules directory for this version - $front->addModuleDirectory($this->_applicationNamespace, Registry::get('applicationPath') . '/application/' . Registry::get('version') . '/'); - $front->addModuleDirectory('library', Registry::get('libraryPath') . '/php/application/' . Registry::get('version') . '/'); - - $config = Registry::get('config'); - if (isset($config->session->handler)) { - $front->setSession(Session::start()); - } - - $labelManager = LabelManager::getInstance(); - $labelManager->loadLabels(Registry::get('locale')); - - $localization = Localization::getInstance(); - Localization::setLocale(Registry::get('locale')); - - $testDispatch = $front->dispatch(); - - $requestIsClean = $request->sanitizeUri(); - - if ($requestIsClean) { - if ($testDispatch === true) { - $request->setPutFromRequest(); - - if (! $request->redirectForTrailingSlash()) { - if ($front->init() !== false) { - if (! $front->response->isRedirect()) { - $front->launchAction(); - } - if (! $front->response->isRedirect()) { - $front->postLaunchAction(); - } - } - } - } else { - Error\Handler::handleNotFound(404); - } - } else { - Error\Handler::handleForbidden(403); - } - $response->sendResponse(); - } - } - } - - private function setTimezone() { - $config = Registry::get('config'); - if(isset($config->date->timezone)) { - try { - date_default_timezone_set($config->date->timezone); - } - catch(\Exception $e) { - echo 'timezone set failed (' . $config->date->timezone . ') is not a valid timezone'; - } - } - } - -} - - - -namespace Nf; - -abstract class Image -{ - - public static function generateThumbnail($imagePath, $thumbnailPath, $thumbnailWidth = 100, $thumbnailHeight = 100, $cut = false) - { - - // load the original image - $image = new \Imagick($imagePath); - - // undocumented method to limit imagick to one cpu thread - $image->setResourceLimit(6, 1); - - // get the original dimensions - $width = $image->getImageWidth(); - $height = $image->getImageHeight(); - - // the image will not be cut and the final dimensions will be within the requested dimensions - if (!$cut) { - // width & height : maximums and aspect ratio is maintained - if ($thumbnailHeight==0) { - $r=$width/$height; - $thumbnailHeight=ceil($thumbnailWidth/$r); - // create the thumbnail - $image->thumbnailImage($thumbnailWidth, $thumbnailHeight); - } elseif ($thumbnailWidth==0) { - $r=$width/$height; - $thumbnailWidth=ceil($thumbnailHeight*$r); - // create thumbnail - $image->thumbnailImage($thumbnailWidth, $thumbnailHeight); - } else { - // determine which dimension to fit to - $fitWidth = ($thumbnailWidth / $width) < ($thumbnailHeight / $height); - // create thumbnail - $image->thumbnailImage( - $fitWidth ? $thumbnailWidth : 0, - $fitWidth ? 0 : $thumbnailHeight - ); - } - } else { - if ($thumbnailWidth==0 || $thumbnailHeight==0) { - throw new \Exception('Cannot generate thumbnail in "cut" mode when a dimension equals zero. Specify the dimensions.'); - } - - // scale along the smallest side - $r=$width/$height; - if ($r<1) { - $newWidth=$thumbnailWidth; - $newHeight=ceil($thumbnailWidth/$r); - } else { - $newWidth=ceil($thumbnailHeight*$r); - $newHeight=$thumbnailHeight; - } - - $image->thumbnailImage($newWidth, $newHeight); - $width=$newWidth; - $height=$newHeight; - - $workingImage=$image->getImage(); - $workingImage->contrastImage(50); - $workingImage->setImageBias(10000); - $kernel = array( 0,-1,0, - -1,4,-1, - 0,-1,0); - - $workingImage->convolveImage($kernel); - - $x=0; - $y=0; - $sliceLength=16; - - while ($width-$x>$thumbnailWidth) { - $sliceWidth=min($sliceLength, $width - $x - $thumbnailWidth); - $imageCopy1=$workingImage->getImage(); - $imageCopy2=$workingImage->getImage(); - $imageCopy1->cropImage($sliceWidth, $height, $x, 0); - $imageCopy2->cropImage($sliceWidth, $height, $width - $sliceWidth, 0); - - if (self::entropy($imageCopy1) < self::entropy($imageCopy2)) { - $x+=$sliceWidth; - } else { - $width-=$sliceWidth; - } - } - - while ($height-$y>$thumbnailHeight) { - $sliceHeight=min($sliceLength, $height - $y - $thumbnailHeight); - $imageCopy1=$workingImage->getImage(); - $imageCopy2=$workingImage->getImage(); - $imageCopy1->cropImage($width, $sliceHeight, 0, $y); - $imageCopy2->cropImage($width, $sliceHeight, 0, $height - $sliceHeight); - - if (self::entropy($imageCopy1) < self::entropy($imageCopy2)) { - $y+=$sliceHeight; - } else { - $height-=$sliceHeight; - } - } - - $image->cropImage($thumbnailWidth, $thumbnailHeight, $x, $y); - } - - if ($thumbnailPath!=null) { - $image->writeImage($thumbnailPath); - $image->clear(); - $image->destroy(); - return $thumbnailPath; - } else { - return $image; - } - - } - - private static function entropy($image) - { - $image->setImageType(\Imagick::IMGTYPE_GRAYSCALE); - $pixels=$image->getImageHistogram(); - $hist=array(); - foreach ($pixels as $p) { - $color = $p->getColor(); - $theColor=$color['r']; - if (!isset($hist[$theColor])) { - $hist[$theColor]=0; - } - $hist[$theColor]+=$p->getColorCount(); - } - // calculate the entropy from the histogram - // cf http://www.mathworks.com/help/toolbox/images/ref/entropy.html - $entropy=0; - foreach ($hist as $c => $v) { - $entropy-=$v*log($v, 2); - } - return $entropy; - } - - public static function identifyImage($sourceFile) - { - return \Imagick::identifyImage($sourceFile); - } -} - - - -namespace Nf; - -class LabelManager extends Singleton -{ - - protected static $_instance; - - private $_labelsLoaded=false; - private $_labels=array(); - - // load the labels - public function loadLabels($locale, $force = false) - { - if (!$this->_labelsLoaded || $force) { - if (file_exists(\Nf\Registry::get('applicationPath') . '/labels/' . $locale . '.ini')) { - $this->_labels=parse_ini_file(\Nf\Registry::get('applicationPath') . '/labels/' . $locale . '.ini', true); - $this->_labelsLoaded=true; - } else { - throw new \Exception('Cannot load labels for this locale (' . $locale . ')'); - } - } - } - - public static function get($lbl) - { - $instance=self::$_instance; - return $instance->_labels[$lbl]; - } - - public static function getAll($section = null) - { - $instance=self::$_instance; - if ($section!=null) { - return $instance->_labels[$section]; - } else { - return $instance->_labels; - } - } - - public function __get($lbl) - { - return $this->_labels[$lbl]; - } -} - - - -namespace Nf\Middleware; - -trait Pre -{ - -} - - -namespace Nf\Middleware; - -interface MiddlewareInterface -{ - - public function execute(); -} - - -namespace Nf\Profiler; - -class File extends ProfilerAbstract -{ - - protected $handle = null; - - protected $filepath = '/tmp/profiler.log'; - - public function __construct($config) - { - if (isset($config['file'])) { - $this->filepath = $config['file']; - } - $this->handle = fopen($this->filepath, 'a'); - } -} - - - -namespace Nf\Middleware; - -trait Post -{ - -} - - - -namespace Nf\Session; - -use Nf\Session; -use Nf\Cache; - -class Memcached extends Session -{ - protected static $_instance=null; - - private $_lifeTime; - private $_memcache; - - function __construct($params, $lifetime) - { - register_shutdown_function('session_write_close'); - $this->_memcache = new \Memcache; - $this->_lifeTime = $lifetime; - if (strpos($params->hosts, ',')>0) { - $hosts=explode(',', $params->hosts); - foreach ($hosts as $host) { - $this->_memcache->addServer($host, $params->port); - } - unset($host); - } else { - $this->_memcache->addServer($params->hosts, $params->port); - } - } - - function open($savePath, $sessionName) - { - - } - - function close() - { - $this->_memcache = null; - return true; - } - - function read($sessionId) - { - $sessionId = session_id(); - $cacheKey = Cache::getKeyName('session', $sessionId); - if ($sessionId !== "") { - return $this->_memcache->get($cacheKey); - } - } - - function write($sessionId, $data) - { - // This is called upon script termination or when session_write_close() is called, which ever is first. - $cacheKey = Cache::getKeyName('session', $sessionId); - $result = $this->_memcache->set($cacheKey, $data, false, $this->_lifeTime); - return $result; - } - - function destroy($sessionId) - { - $cacheKey=Cache::getKeyName('session', $sessionId); - $this->_memcache->delete($cacheKey, 0); - return true; - } - - function gc($notUsedInMemcached) - { - return true; - } -} - - -namespace Nf\View; - -use Nf\View; - -class Smarty extends View -{ - - protected static $_instance; - - private $_smarty = null; - - const FILE_EXTENSION = '.tpl'; - - private $_vars = array(); - - protected function __construct() - { - require_once \Nf\Registry::get('libraryPath') . '/php/classes/Smarty/Smarty.class.php'; - $this->_smarty = new \Smarty(); - $front = \Nf\Front::getInstance(); - $this->setBasePath($front->getModuleName()); - } - - /** - * Return the template engine object, if any - * - * @return mixed - */ - public function getEngine() - { - return $this->_smarty; - } - - public function configLoad($filepath, $section = null) - { - $lang = \Nf\Registry::getInstance()->get('lang'); - $config_path = realpath(Registry::get('applicationPath') . '/configs/' . $lang . '/' . $front->getModuleName() . '/' . $filepath); - $this->_smarty->config_load($config_path, $section); - } - - /** - * Assign a variable to the view - * - * @param string $key - * The variable name. - * @param mixed $val - * The variable value. - * @return void - */ - public function __set($key, $val) - { - if ('_' == substr($key, 0, 1)) { - throw new Exception('Setting private var is not allowed', $this); - } - if ($this->_smarty == null) { - throw new Exception('Smarty is not defined', $this); - } - $this->_smarty->assignByRef($key, $val); - return; - } - - public function __get($key) - { - if ('_' == substr($key, 0, 1)) { - throw new Exception('Setting private var is not allowed', $this); - } - if ($this->_smarty == null) { - throw new Exception('Smarty is not defined', $this); - } - return $this->_smarty->getTemplateVars($key); - } - - /** - * Allows testing with empty() and - * isset() to work - * - * @param string $key - * @return boolean - */ - public function __isset($key) - { - $vars = $this->_smarty->getTemplateVars(); - return isset($vars[$key]); - } - - /** - * Allows unset() on object properties to work - * - * @param string $key - * @return void - */ - public function __unset($key) - { - $this->_smarty->clearAssign($key); - } - - /** - * Clear all assigned variables - * - * Clears all variables assigned to - * Zend_View either via {@link assign()} or - * property overloading ({@link __get()}/{@link __set()}). - * - * @return void - */ - public function clearVars() - { - $this->_smarty->clearAllAssign(); - } - - /** - * Processes a view script and returns the output. - * - * @param string $name - * The script script name to process. - * @return string The script output. - */ - public function render($name) - { - $this->_response->addBodyPart($this->fetch($name)); - } - - public function fetch($name) - { - return $this->_smarty->fetch($name . self::FILE_EXTENSION); - } - - public function setBasePath($path) - { - $config = \Nf\Registry::get('config'); - - // configuration de Smarty - $this->_smarty->setTemplateDir(array( - \Nf\Registry::get('applicationPath') . '/application/' . \Nf\Registry::get('version') . '/' . $path . '/views/', - \Nf\Registry::get('libraryPath') . '/php/application/' . \Nf\Registry::get('version') . '/' . $path . '/views/' - )); - - // répertoire du cache Smarty - $cacheDirectory = realpath(\Nf\Registry::get('applicationPath')) . '/cache/smarty/' . \Nf\Registry::get('version') . '/' . \Nf\Registry::get('locale') . '/' . $path . '/'; - // répertoire des templates compilés - $compileDirectory = realpath(\Nf\Registry::get('applicationPath')) . '/cache/templates_c/' . \Nf\Registry::get('version') . '/' . \Nf\Registry::get('locale') . '/' . $path . '/'; - - $configDirectory = realpath(\Nf\Registry::get('applicationPath')) . '/configs/' . \Nf\Registry::get('version') . '/' . \Nf\Registry::get('locale') . '/' . $path . '/'; - - $pluginsDirectories = array( - realpath(\Nf\Registry::get('applicationPath') . '/plugins/'), - realpath(\Nf\Registry::get('libraryPath') . '/php/plugins/'), - realpath(\Nf\Registry::get('libraryPath') . '/php/classes/Smarty/plugins/') - ); - - \Nf\File::mkdir($cacheDirectory, 0755, true); - \Nf\File::mkdir($compileDirectory, 0755, true); - - $this->_smarty->setUseSubDirs(true); - - // répertoire de cache de smarty - $this->_smarty->setCacheDir($cacheDirectory); - // répertoire de compilation - $this->_smarty->setCompileDir($compileDirectory); - // répertoire des configs smarty des applis - $this->_smarty->setConfigDir($configDirectory); - // répertoire des plugins - foreach ($pluginsDirectories as $pluginsDirectory) { - $this->_smarty->addPluginsDir($pluginsDirectory); - } - - $this->_smarty->left_delimiter = $config->view->smarty->leftDelimiter; - $this->_smarty->right_delimiter = $config->view->smarty->rightDelimiter; - - // dev : we disable Smarty's caching - if (\Nf\Registry::get('environment') == 'dev') { - $this->_smarty->caching = false; - $this->_smarty->force_compile = true; - $this->_smarty->setCompileCheck(true); - } - - // only one file generated for each rendering - $this->_smarty->merge_compiled_includes = true; - - // send the registry to the view - $this->_smarty->assign('_registry', \Nf\Registry::getInstance()); - - // send the label Manager to the view - $this->_smarty->assign('_labels', \Nf\LabelManager::getInstance()); - - // $this->_smarty->testInstall(); - } -} - - -namespace Nf\Db; - -class Expression -{ - - protected $_expression; - - public function __construct($expression) - { - $this->_expression = (string) $expression; - } - - public function __toString() - { - return $this->_expression; - } -} - - - -namespace Nf\Cache; - -use \Nf\Cache; - -class Memcached implements CacheInterface -{ - - private $_memcache; - - function __construct($params) - { - $this->_memcache = new \Memcache; - if (strpos($params->hosts, ',')>0) { - $hosts=explode(',', $params->hosts); - foreach ($hosts as $host) { - $this->_memcache->addServer($host, $params->port); - } - unset($host); - } else { - $this->_memcache->addServer($params->hosts, $params->port); - } - } - - public function load($keyName, $keyValues = array()) - { - if (Cache::isCacheEnabled()) { - return $this->_memcache->get(Cache::getKeyName($keyName, $keyValues)); - } else { - return false; - } - } - - public function save($keyName, $keyValues, $data, $lifetime = Cache::DEFAULT_LIFETIME) - { - if (Cache::isCacheEnabled()) { - $result = $this->_memcache->set(Cache::getKeyName($keyName, $keyValues), $data, false, $lifetime); - return $result; - } else { - return true; - } - } - - public function delete($keyName, $keyValues) - { - if (Cache::isCacheEnabled()) { - $this->_memcache->delete(Cache::getKeyName($keyName, $keyValues), 0); - return true; - } else { - return true; - } - } -} - - -namespace Nf\Cache; - -interface CacheInterface -{ - - public function load($keyName, $keyValues = array()); - - public function save($keyName, $keyValues, $data, $lifetime = Cache::DEFAULT_LIFETIME); - - public function delete($keyName, $keyValues); -} - - - -namespace Nf\Cache; - -use \Nf\Cache; - -class Apc implements CacheInterface -{ - - function __construct($params) - { - - } - - public function load($keyName, $keyValues = array()) - { - if (Cache::isCacheEnabled()) { - return apc_fetch(Cache::getKeyName($keyName, $keyValues)); - } else { - return false; - } - } - - public function save($keyName, $keyValues, $data, $lifetime = Cache::DEFAULT_LIFETIME) - { - if (Cache::isCacheEnabled()) { - return apc_store(Cache::getKeyName($keyName, $keyValues), $data, $lifetime); - } else { - return true; - } - } - - public function delete($keyName, $keyValues) - { - if (Cache::isCacheEnabled()) { - return apc_delete(Cache::getKeyName($keyName, $keyValues)); - } else { - return true; - } - } -} - - - -namespace Nf\View; - -use Nf\View; -use Nf\Front; -use Nf\Registry; -use Nf\Ini; - -class Php extends View -{ - - protected static $_instance; - - const FILE_EXTENSION='.php'; - - private $_vars=array(); - - private $_templateDirectory=null; - private $_configDirectory=null; - - protected $_response; - - protected function __construct() - { - parent::__construct(); - $front=Front::getInstance(); - $this->setBasePath($front->getModuleName()); - // send the label Manager to the view - $this->_vars['labels'] = \Nf\LabelManager::getInstance(); - } - - /** - * Assign a variable to the view - * - * @param string $key The variable name. - * @param mixed $val The variable value. - * @return void - */ - public function __set($key, $val) - { - $this->_vars[$key]=$val; - return; - } - - public function __get($key) - { - return $this->_vars[$key]; - } - - /** - * Allows testing with empty() and - * isset() to work - * - * @param string $key - * @return boolean - */ - public function __isset($key) - { - return isset($this->_vars[$key]); - } - - /** - * Allows unset() on object properties to work - * - * @param string $key - * @return void - */ - public function __unset($key) - { - unset($this->_vars[$key]); - } - - /** - * Clear all assigned variables - * - * Clears all variables assigned to - * Zend_View either via {@link assign()} or - * property overloading ({@link __get()}/{@link __set()}). - * - * @return void - */ - public function clearVars() - { - $this->_vars=array(); - } - - /** - * Processes a view script and returns the output. - * - * @param string $name The script script name to process. - * @return string The script output. - */ - public function render($name) - { - $this->_response->addBodyPart($this->fetch($name)); - } - - public function fetch($name) - { - // ob_start, require du tpl, ob_get_contents et return - extract($this->_vars); - ob_start(); - include($this->_templateDirectory . $name . self::FILE_EXTENSION); - $content=ob_get_contents(); - ob_end_clean(); - return $content; - } - - - public function setBasePath($path) - { - $this->_templateDirectory = Registry::get('applicationPath') . '/application/' . Registry::get('version') . '/' . $path . '/views/'; - $this->_configDirectory = Registry::get('applicationPath') . '/configs/' . Registry::get('version') . '/' . Registry::get('locale') . '/' . $path . '/'; - } - - public function configLoad($filepath, $section = null) - { - // lire le fichier ini, ajouter aux variables - $ini = Ini::parse($filepath); - foreach ($ini as $key => $value) { - $this->_vars[$key]=$value; - } - - } -} - - -namespace Nf\Task; - -class Manager -{ - - protected $pool; - - function __construct() - { - $this->pool = array(); - } - - function addTask($task, $callbackFunction = null) - { - $this->pool[] = array( - 'task' => $task, - 'callback' => $callbackFunction - ); - } - - function run() - { - foreach ($this->pool as $taskInfos) { - $taskInfos['task']->fork(); - } - - while (1) { - // echo "waiting\n"; - $pid = pcntl_wait($extra); - if ($pid == - 1) { - break; - } - // echo ": task done : $pid\n"; - $this->finishTask($pid); - } - // echo "processes done ; exiting\n"; - return; - } - - function finishTask($pid) - { - $taskInfos = $this->pidToTaskInfos($pid); - if ($taskInfos) { - $taskInfos['task']->finish(); - $taskInfos['callback'](); - } - } - - function pidToTaskInfos($pid) - { - foreach ($this->pool as $taskInfos) { - if ($taskInfos['task']->pid() == $pid) - return $taskInfos; - } - return false; - } -} - -namespace Nf\Profiler; - -use \Nf\Registry; -use \Nf\Middleware\Post; - -class Firephp extends ProfilerAbstract -{ - - use Post; - - protected $totalDuration = 0; - - protected $firephp = false; - - protected $dbName = ''; - - public function output() - { - } - - public function __construct($config) - { - - require_once(realpath(Registry::get('libraryPath') . '/php/classes/FirePHPCore/FirePHP.class.php')); - $this->firephp = \FirePHP::getInstance(true); - - $this->label = static::LABEL_TEMPLATE; - - $front = \Nf\Front::getInstance(); - - $this->dbName = $config['name']; - - $front->registerMiddleware($this); - - $this->payload = array( - array( - 'Duration', - 'Query', - 'Time' - ) - ); - } -} - - -namespace Nf\Profiler; - -use \Nf\Registry; - -class ProfilerAbstract -{ - - protected $label = array(); - protected $payload = array(); -} - - -namespace Nf\Error; - -class Handler extends \Exception -{ - - static $lastError = array( - 'type' => 'error', - 'httpCode' => 0, - 'message' => '', - 'number' => 0, - 'file' => '', - 'line' => 0, - 'trace' => '' - ); - - public static function getLastError() - { - return self::$lastError; - } - - public static function disableErrorHandler() - { - while (set_error_handler(create_function('$errno,$errstr', 'return false;'))) { - // Unset the error handler we just set. - restore_error_handler(); - // Unset the previous error handler. - restore_error_handler(); - } - // Restore the built-in error handler. - restore_error_handler(); - - while (set_exception_handler(create_function('$e', 'return false;'))) { - // Unset the error handler we just set. - restore_exception_handler(); - // Unset the previous error handler. - restore_exception_handler(); - } - // Restore the built-in error handler. - restore_exception_handler(); - } - - public static function handleError($errno = null, $errstr = 0, $errfile = null, $errline = null) - { - $error_reporting = error_reporting(); - if ($error_reporting == 0) { - return true; // developer used @ to ignore all errors - } - if (! ($error_reporting & $errno)) { - return true; // developer asked to ignore this error - } - throw new \ErrorException($errstr, 0, $errno, $errfile, $errline); - return false; - } - - public static function handleException($exception) - { - self::$lastError['httpCode'] = 500; - self::$lastError['message'] = $exception->getMessage(); - - if (method_exists($exception, 'getHttpStatus')) { - self::$lastError['httpCode'] = $exception->getHttpStatus(); - } - - if (method_exists($exception, 'getErrors')) { - self::$lastError['message'] = $exception->getErrors(); - } - - self::disableErrorHandler(); - self::$lastError['type'] = 'exception'; - self::$lastError['fullException'] = $exception; - self::$lastError['number'] = 0; - self::$lastError['file'] = $exception->getFile(); - self::$lastError['line'] = $exception->getLine(); - self::$lastError['trace'] = $exception->getTraceAsString(); - - return self::displayAndLogError($exception); - } - - public static function handleFatal() - { - self::disableErrorHandler(); - $last = error_get_last(); - if ($last != null) { - self::$lastError['type'] = 'fatal'; - self::$lastError['httpCode'] = 500; - self::$lastError['message'] = $last['message']; - self::$lastError['number'] = $last['type']; - self::$lastError['file'] = $last['file']; - self::$lastError['line'] = $last['line']; - self::$lastError['trace'] = ''; - return self::displayAndLogError(); - } - } - - public static function handleForbidden($httpCode = 403, $friendlyMessage = '') - { - return self::handleHttpError('forbidden', $httpCode, $friendlyMessage); - } - - public static function handleNotFound($httpCode = 404, $friendlyMessage = '') - { - return self::handleHttpError('notFound', $httpCode, $friendlyMessage); - } - - private static function handleHttpError($type = 'notFound', $httpCode, $friendlyMessage = '') - { - self::$lastError['type'] = $type; - self::$lastError['httpCode'] = $httpCode; - self::$lastError['message'] = $friendlyMessage; - self::$lastError['number'] = 0; - self::$lastError['file'] = ''; - self::$lastError['line'] = 0; - self::$lastError['trace'] = ''; - - if (\Nf\Registry::isRegistered('config')) { - $config = \Nf\Registry::get('config'); - $front = \Nf\Front::getInstance(); - $response = $front->getResponse(); - if ((isset($config->error->clearResponse) && $config->error->clearResponse) || (! isset($config->error->clearResponse))) { - $response->clearBody(); - $response->clearBuffer(); - } - try { - $response->setHttpResponseCode($httpCode); - $response->sendHeaders(); - } catch (Exception $e) {} - - $configName = strtolower($type); - - if (isset($config->error->displayMethod)) { - if ($config->error->displayMethod == 'forward') { - // forward - if (! $front->forward($config->$configName->forward->module, $config->$configName->forward->controller, $config->$configName->forward->action)) { - ini_set('display_errors', 'On'); - trigger_error('Error Handler failed to forward to the error controller.', E_USER_ERROR); - } - return true; - } else { - $response->addBodyPart('http error: ' . $httpCode); - } - } - } - } - - public static function displayAndLogError($exception = null) - { - $err = self::getLastError(); - - if (\Nf\Registry::isRegistered('config')) { - $config = \Nf\Registry::get('config'); - $front = \Nf\Front::getInstance(); - $response = $front->getResponse(); - - // optional error logging - if ((isset($exception->doLog) && $exception->doLog || ! isset($exception->doLog))) { - if (isset($config->error->logger->class) && strtolower($config->error->logger->class) != 'syslog') { - $className = $config->error->logger->class; - $logger = new $className(); - if (! $logger->log($err)) {} - } else { - $logger = new \Nf\Error\Logger\Syslog(); - if (! $logger->log($err)) {} - } - } - - if ($response->isBinary()) { - $response->setContentType('html'); - } - if ((isset($config->error->clearResponse) && $config->error->clearResponse) || (! isset($config->error->clearResponse))) { - $response->clearBody(); - $response->clearBuffer(); - } - try { - $response->setHttpResponseCode($err['httpCode']); - $response->sendHeaders(); - } catch (Exception $e) {} - - if (isset($config->error->displayMethod)) { - if ($config->error->displayMethod == 'forward') { - // forward - if (! $front->forward($config->error->forward->module, $config->error->forward->controller, $config->error->forward->action)) { - echo '** Nf: Cannot instantiate error module, printing error message **' . PHP_EOL . PHP_EOL; - $response->displayError($err); - echo PHP_EOL; - } else { - $response->sendResponse(); - } - return true; - } else { - if (method_exists($exception, 'display')) { - $response->setHttpResponseCode($err['httpCode']); - $exception->display(); - } else { - // default : display (if xhr, use alternative display) - $response->displayError($err, $front->getRequest() - ->isXhr()); - } - } - } - - return true; - } else { - @header('HTTP/1.1 500 Internal Server Error'); - print_r($err); - error_log(print_r($err, true)); - return true; - } - } - - public static function setErrorHandler() - { - set_error_handler(array( - 'Nf\Error\Handler', - 'handleError' - )); - set_exception_handler(array( - 'Nf\Error\Handler', - 'handleException' - )); - register_shutdown_function(array( - 'Nf\Error\Handler', - 'handleFatal' - )); - } - - public static function setErrorDisplaying() - { - if (\Nf\Registry::isRegistered('config')) { - $config = \Nf\Registry::get('config'); - if (isset($config->error->displayPHPErrors) && (strtolower($config->error->displayPHPErrors) == 'off' || $config->error->displayPHPErrors == 0)) { - ini_set('display_errors', 0); // don't display the errors - } else { - ini_set('display_errors', 1); // display the errors - } - } else { - ini_set('display_errors', 1); - } - } - - public static function recursiveArrayToString($arr) - { - if (! is_string($arr)) { - return json_encode($arr); - } else { - return $arr; - } - } -} - - - -namespace Nf\Session; - -use Nf\Session; -use Nf\Db; -use Nf\Date; - -class Mysqli extends Session -{ - protected static $_instance=null; - - private $_lifeTime; - private $_connection; - private $_params; - - function __construct($params, $lifetime) - { - register_shutdown_function('session_write_close'); - $db = Db::getConnection($params->db_adapter); - $this->_params=$params; - $this->_connection=$db; - $this->_lifeTime = $lifetime; - } - - function open($savePath, $sessionName) - { - - } - - function close() - { - $this->_connection->closeConnection(); - return true; - } - - function read($sessionId) - { - if ($sessionId !== '') { - $sql="SELECT data FROM " . $this->_params->db_table . " WHERE id=" . $this->_connection->quote($sessionId) . " LIMIT 1"; - $res=$this->_connection->query($sql); - if ($res->rowCount()>0) { - $row=$res->fetch(); - return $row['data']; - } - } - } - - function write($sessionId, $data) - { - // This is called upon script termination or when session_write_close() is called, which ever is first. - $values=array( - 'data' => $data, - 'id' => $sessionId, - 'modified' => date('Y-m-d H:i:s'), - 'lifetime' => $this->_lifeTime - ); - $sql="INSERT INTO " . $this->_params->db_table . " (id, data, modified, lifetime) VALUES(" . $this->_connection->quote($values['id']) . ", " . $this->_connection->quote($values['data']) . ", " . $this->_connection->quote($values['modified']) . ", " . $this->_connection->quote($values['lifetime']) . ") - ON DUPLICATE KEY UPDATE data=" . $this->_connection->quote($values['data']) . ", modified=" . $this->_connection->quote($values['modified']); - $this->_connection->query($sql); - return true; - } - - function destroy($sessionId) - { - $sql="DELETE FROM " . $this->_params->db_table . " WHERE id=" . $sessionId; - $this->_connection->query($sql); - return true; - } - - function gc() - { - $sql="DELETE FROM " . $this->_params->db_table . " WHERE modified < DATE_SUB('" . date('Y-m-d H:i:s') . "',INTERVAL lifetime SECOND)"; - $this->_connection->query($sql); - return true; - } -} - - - -namespace Nf\Front; - -class Controller -{ - - protected $_front; - protected $_view; - - public function __construct($front) - { - $this->_front=$front; - } - - public function getParams() - { - return $this->_front->getParams(); - } - - public function __get($var) - { - if ($var=='view') { - if (is_null($this->_view)) { - $this->_view=$this->_front->getView(); - } - return $this->_view; - } elseif ($var=='front') { - return $this->_front; - } elseif ($var=='session') { - return $this->_front->getSession(); - } elseif ($var=='request') { - return $this->_front->getRequest(); - } elseif ($var=='response') { - return $this->_front->getResponse(); - } else { - return $this->$var; - } - } - - public function getRequest() - { - return $this->_front->getRequest(); - } - - public function getResponse() - { - return $this->_front->getResponse(); - } - - // called after dispatch - public function init() - { - return true; - } - - // called after action - public function postAction() - { - - } - - public function getLabel($lbl) - { - return \Nf\LabelManager::get($lbl); - } -} - - -namespace Nf\Front\Request; - -class Http extends AbstractRequest -{ - - protected $_params = array(); - - private $_put = null; - - public function __construct() - { - if (! empty($_SERVER['REDIRECT_URL'])) { - $uri = ltrim($_SERVER['REDIRECT_URL'], '/'); - if (! empty($_SERVER['REDIRECT_QUERY_STRING'])) { - $uri .= '?' . $_SERVER['REDIRECT_QUERY_STRING']; - } - } else { - $uri = ltrim($_SERVER['REQUEST_URI'], '/'); - } - $this->_uri = $uri; - } - - public function sanitizeUri() - { - // filter the uri according to the config of security.restrictCharactersInUrl - // this option only allows us to use Alpha-numeric text, Tilde: ~, Period: ., Colon: :, Underscore: _, Dash: - - $config = \Nf\Registry::get('config'); - if (isset($config->security->restrictCharactersInUrl) && $config->security->restrictCharactersInUrl) { - if (preg_match('%[\w0-9~.,/@\-=:[\]{}|&?!\%]*%i', $this->_uri, $regs)) { - if ($this->_uri == $regs[0]) { - return true; - } - } - return false; - } else { - return true; - } - } - - public function getMethod() - { - return $_SERVER['REQUEST_METHOD']; - } - - public function isPost() - { - if ('POST' == $this->getMethod()) { - return true; - } - return false; - } - - public function isGet() - { - if ('GET' == $this->getMethod()) { - return true; - } - return false; - } - - public function isXhr() - { - return (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'); - } - - public function getUri() - { - return $this->_uri; - } - - public function getParams() - { - $return = $this->_params; - $paramSources = $this->getParamSources(); - if (in_array('_GET', $paramSources) && isset($_GET) && is_array($_GET)) { - $return += $_GET; - } - if (in_array('_POST', $paramSources) && isset($_POST) && is_array($_POST)) { - $return += $_POST; - } - return $return; - } - - // get the string sent as put - public function setPutFromRequest() - { - if ($this->_put === null) { - if ($_SERVER['REQUEST_METHOD'] == 'PUT') { - $this->_put = file_get_contents("php://input"); - } - } else { - $this->_put = ''; - } - } - - public function getPost($jsonDecode = 'assoc') - { - $post = ''; - if ($_SERVER['REQUEST_METHOD'] == 'POST') { - $post = file_get_contents("php://input"); - } - - if ($jsonDecode == 'assoc') { - return json_decode($post, true); - } else { - return $post; - } - } - - public function getPut($jsonDecode = 'assoc') - { - if ($jsonDecode == 'assoc') { - return json_decode($this->_put, true); - } else { - return $this->_put; - } - } - - // handle the redirection according to the trailing slash configuration - public function redirectForTrailingSlash() - { - $config = \Nf\Registry::get('config'); - $redirectionUrl = false; - $requestParams = ''; - $requestPage = '/' . $this->_uri; - - // we don't redirect for the home page... - if ($requestPage != '/' && mb_strpos($requestPage, '/?') !== 0) { - // the url without the params is : - if (mb_strpos($requestPage, '?') !== false) { - $requestParams = mb_substr($requestPage, mb_strpos($requestPage, '?'), mb_strlen($requestPage) - mb_strpos($requestPage, '?')); - $requestPage = mb_substr($requestPage, 0, mb_strpos($requestPage, '?')); - } - - if (isset($config->trailingSlash->needed) && $config->trailingSlash->needed==true) { - if (mb_substr($requestPage, - 1, 1) != '/') { - $redirectionUrl = 'http://' . $_SERVER['HTTP_HOST'] . $requestPage . '/' . $requestParams; - } - } else { - if (mb_substr($requestPage, - 1, 1) == '/') { - $redirectionUrl = 'http://' . $_SERVER['HTTP_HOST'] . rtrim($requestPage, '/') . $requestParams; - } - } - - if ($redirectionUrl !== false) { - $response = new \Nf\Front\Response\Http(); - $response->redirect($redirectionUrl, 301); - $response->sendHeaders(); - return true; - } - } - - return false; - } -} - - -namespace Nf\Front\Response; - -class Http extends AbstractResponse -{ - - const SEPARATOR = 'separator'; - - const SEPARATOR_ALT = "\n"; - - const NEWLINE = '<br>'; - - const NEWLINE_ALT = "\n"; - - const TAB = " "; - - const TAB_ALT = " "; - - private $contentType = 'html'; - - private $isBinaryContent = false; - - private $encoding = 'utf-8'; - - protected $_headers = array(); - - protected $_headersRaw = array(); - - protected $_httpResponseCode = 200; - - protected $_isRedirect = false; - - protected function _normalizeHeader($name) - { - $filtered = str_replace(array( - '-', - '_' - ), ' ', (string) $name); - $filtered = ucwords(strtolower($filtered)); - $filtered = str_replace(' ', '-', $filtered); - return $filtered; - } - - public function setHeader($name, $value, $replace = false) - { - $this->canSendHeaders(true); - $name = $this->_normalizeHeader($name); - $value = (string) $value; - - if ($replace) { - foreach ($this->_headers as $key => $header) { - if ($name == $header['name']) { - unset($this->_headers[$key]); - } - } - } - $this->_headers[] = array( - 'name' => $name, - 'value' => $value, - 'replace' => $replace - ); - return $this; - } - - public function redirect($url, $code = 302, $exit = true) - { - $this->canSendHeaders(); - $this->setHeader('Location', $url, true)->setHttpResponseCode($code); - if ($exit) { - $front = \Nf\Front::getInstance(); - $front->postLaunchAction(); - $this->clearBuffer(); - $this->clearBody(); - $this->sendHeaders(); - exit(); - } - return $this; - } - - public function isRedirect() - { - return $this->_isRedirect; - } - - public function getHeaders() - { - return $this->_headers; - } - - public function clearHeaders() - { - $this->_headers = array(); - - return $this; - } - - public function clearHeader($name) - { - if (! count($this->_headers)) { - return $this; - } - foreach ($this->_headers as $index => $header) { - if ($name == $header['name']) { - unset($this->_headers[$index]); - } - } - return $this; - } - - public function setRawHeader($value) - { - $this->canSendHeaders(); - if ('Location' == substr($value, 0, 8)) { - $this->_isRedirect = true; - } - $this->_headersRaw[] = (string) $value; - return $this; - } - - public function clearRawHeaders() - { - $this->_headersRaw = array(); - return $this; - } - - public function clearRawHeader($headerRaw) - { - if (! count($this->_headersRaw)) { - return $this; - } - $key = array_search($headerRaw, $this->_headersRaw); - unset($this->_headersRaw[$key]); - return $this; - } - - public function clearAllHeaders() - { - return $this->clearHeaders()->clearRawHeaders(); - } - - public function setHttpResponseCode($code) - { - if (! is_int($code) || (100 > $code) || (599 < $code)) { - throw new \Exception('Invalid HTTP response code'); - } - if ((300 <= $code) && (307 >= $code)) { - $this->_isRedirect = true; - } else { - $this->_isRedirect = false; - } - $this->_httpResponseCode = $code; - return $this; - } - - public function canSendHeaders() - { - $headersSent = headers_sent($file, $line); - if ($headersSent) { - trigger_error('Cannot send headers; headers already sent in ' . $file . ', line ' . $line); - } - return ! $headersSent; - } - - public function sendHeaders() - { - // Only check if we can send headers if we have headers to send - if (count($this->_headersRaw) || count($this->_headers) || (200 != $this->_httpResponseCode)) { - $this->canSendHeaders(); - } elseif (200 == $this->_httpResponseCode) { - // Haven't changed the response code, and we have no headers - return $this; - } - - $httpCodeSent = false; - - foreach ($this->_headersRaw as $header) { - if (! $httpCodeSent && $this->_httpResponseCode) { - header($header, true, $this->_httpResponseCode); - $httpCodeSent = true; - } else { - header($header); - } - } - - foreach ($this->_headers as $header) { - if (! $httpCodeSent && $this->_httpResponseCode) { - header($header['name'] . ': ' . $header['value'], $header['replace'], $this->_httpResponseCode); - $httpCodeSent = true; - } else { - header($header['name'] . ': ' . $header['value'], $header['replace']); - } - } - - if (! $httpCodeSent) { - header('HTTP/1.1 ' . $this->_httpResponseCode); - $httpCodeSent = true; - } - - return $this; - } - - public function displayError($err, $isXhr = false) - { - // removes the cache headers if there is an error - $this->setCacheable(0); - if ($isXhr || $this->contentType!='html') { - $this->setContentType('text'); - echo 'Error' . self::NEWLINE_ALT; - echo strip_tags(self::displayErrorHelper($err, true)); - echo 'Error' . self::NEWLINE_ALT; - } else { - echo '<pre style="color:#555; line-height:16px;"><span style="color:red;">Error</span><br />'; - echo self::displayErrorHelper($err, false); - echo '</pre>'; - } - } - - protected static function boldText($text, $alternativeSeparator = false) - { - if ($alternativeSeparator) { - return '* ' . $text . ' *'; - } else { - return '<b>' . $text . '</b>'; - } - } - - protected static function preFormatErrorText($beginOrEnd, $alternativeSeparator) - { - if ($alternativeSeparator) { - return ($beginOrEnd == 0) ? '' : ''; - } else { - return ($beginOrEnd == 0) ? '<pre>' : '</pre>'; - } - } - - // sends header to allow the browser to cache the response a given time - public function setCacheable($minutes) - { - $this->setHeader('Expires', gmdate('D, d M Y H:i:s', time() + $minutes * 60) . ' GMT', true); - $this->setHeader('Cache-Control', 'max-age=' . $minutes * 60, true); - $this->setHeader('Pragma', 'public', true); - } - - public function getContentType() - { - return $this->contentType; - } - - public function isBinary() - { - return $this->isBinaryContent; - } - - public function setContentType($type = 'html') - { - $this->contentType = $type; - $this->isBinaryContent = false; - $type = strtolower($type); - switch ($type) { - case 'atom': - $this->setHeader('content-type', 'application/atom+xml'); - break; - case 'css': - $this->setHeader('content-type', 'text/css'); - break; - case 'gif': - $this->setHeader('content-type', 'image/gif'); - $this->isBinaryContent = true; - break; - case 'jpeg': - case 'jpg': - $this->setHeader('content-type', 'image/jpeg'); - $this->isBinaryContent = true; - break; - case 'png': - $this->setHeader('content-type', 'image/png'); - $this->isBinaryContent = true; - break; - case 'js': - case 'javascript': - $this->setHeader('content-type', 'text/javascript'); - break; - case 'json': - $this->setHeader('content-type', 'application/json'); - break; - case 'pdf': - $this->setHeader('content-type', 'application/pdf'); - $this->isBinaryContent = true; - break; - case 'rss': - $this->setHeader('content-type', 'application/rss+xml'); - break; - case 'text': - $this->setHeader('content-type', 'text/plain'); - break; - case 'xml': - $this->setHeader('content-type', 'text/xml'); - break; - case 'html': - $this->setHeader('content-type', 'text/html'); - break; - default: - throw new \Exception('This content type was not found: "' . $type . '"'); - } - } - - public function getEncoding() - { - return $this->encoding; - } - - public function setEncoding($encoding) - { - $this->encoding = $encoding; - } - - public static function colorText($text, $color, $alternativeSeparator = false) - { - if(!$alternativeSeparator) { - return '<span style="color:' . $color . '">' . $text . '</span>'; - } - else { - return $text; - } - } - - protected static function escape($str) - { - return strip_tags($str); - } -} - - -namespace Nf\Db\Adapter; - -abstract class AbstractAdapter -{ - - const PROFILER_NAMESPACE_ROOT = '\Nf\Db\Profiler'; - - protected $_config = array(); - - protected $_connection = null; - - protected $_autoQuoteIdentifiers = true; - - protected $_cache = false; - - protected $profiler = false; - - public function __construct($config) - { - if (! is_array($config)) { - throw new \Exception('Adapter parameters must be in an array'); - } - if (! isset($config['charset'])) { - $config['charset'] = null; - } - $this->_config = $config; - } - - public function getConnection() - { - $this->_connect(); - return $this->_connection; - } - - public function query($sql) - { - $this->_connect(); - $res = new $this->_resourceClass($sql, $this); - - $beginTime = microtime(true); - - $res->execute(); - - $endTime = microtime(true); - - if ($this->profiler) { - $this->profiler->afterQuery($res, $sql, $endTime-$beginTime); - } - - return $res; - } - - public function fetchAll($sql) - { - $cacheKey = md5($sql) . 'All'; - - if (($result = $this->_getCachedResult($cacheKey)) === false) { - $stmt = $this->query($sql); - $result = $stmt->fetchAll(\Nf\Db::FETCH_ASSOC); - $this->_setCachedResult($cacheKey, $result); - } - $this->disableCache(); - return $result; - } - - public function fetchAssoc($sql) - { - $cacheKey = md5($sql) . 'Assoc'; - - if (($result = $this->_getCachedResult($cacheKey)) === false) { - $stmt = $this->query($sql); - $result = array(); - while ($row = $stmt->fetch(\Nf\Db::FETCH_ASSOC)) { - $tmp = array_values(array_slice($row, 0, 1)); - $result[$tmp[0]] = $row; - } - $this->_setCachedResult($cacheKey, $result); - } - $this->disableCache(); - return $result; - } - - public function fetchRow($sql) - { - $cacheKey = md5($sql) . 'Row'; - - if (($result = $this->_getCachedResult($cacheKey)) === false) { - $stmt = $this->query($sql); - $result = $stmt->fetch(); - $this->_setCachedResult($cacheKey, $result); - } - $this->disableCache(); - return $result; - } - - public function fetchCol($sql) - { - $cacheKey = md5($sql) . 'Col'; - - if (($result = $this->_getCachedResult($cacheKey)) === false) { - $stmt = $this->query($sql); - $result = $stmt->fetchAll(\Nf\Db::FETCH_COLUMN, 0); - $this->_setCachedResult($cacheKey, $result); - } - $this->disableCache(); - return $result; - } - - public function fetchOne($sql) - { - $cacheKey = md5($sql) . 'One'; - - if (($result = $this->_getCachedResult($cacheKey)) === false) { - $stmt = $this->query($sql); - $result = $stmt->fetchColumn(0); - $this->_setCachedResult($cacheKey, $result); - } - $this->disableCache(); - return $result; - } - - public function fetchPairs($sql) - { - $cacheKey = md5($sql) . 'Pairs'; - - if (($result = $this->_getCachedResult($cacheKey)) === false) { - $stmt = $this->query($sql); - $result = array(); - while ($row = $stmt->fetch(\Nf\Db::FETCH_NUM)) { - $result[$row[0]] = $row[1]; - } - $this->_setCachedResult($cacheKey, $result); - } - $this->disableCache(); - return $result; - } - - public function beginTransaction() - { - $this->_beginTransaction(); - return $this; - } - - public function commit() - { - $this->_commit(); - return $this; - } - - public function rollback() - { - $this->_rollback(); - return $this; - } - - public function enableCache($lifetime = \Nf\Cache::DEFAULT_LIFETIME, $cacheKey = null) - { - $this->_cache = array( - 'lifetime' => $lifetime - ); - if ($cacheKey !== null) { - $this->_cache['key'] = $cacheKey; - } - return $this; - } - - public function disableCache() - { - $this->_cache = false; - return $this; - } - - protected function _getCachedResult($cacheKey) - { - if ($this->_cache !== false) { - $cache = \Nf\Front::getInstance()->getCache('global'); - $cacheKey = isset($this->_cache['key']) ? $this->_cache['key'] : $cacheKey; - return $cache->load('sql', $cacheKey); - } - return false; - } - - protected function _setCachedResult($cacheKey, $result) - { - if ($this->_cache !== false) { - $cache = \Nf\Front::getInstance()->getCache('global'); - $cacheKey = isset($this->_cache['key']) ? $this->_cache['key'] : $cacheKey; - return $cache->save('sql', $cacheKey, $result, $this->_cache['lifetime']); - } - return false; - } - - protected function _quote($value) - { - if (null === $value) { - return 'NULL'; - } elseif (is_int($value) || $value instanceof \Nf\Db\Expression) { - return $value; - } elseif (is_float($value)) { - return sprintf('%F', $value); - } else { - return "'" . addcslashes($value, "\000\n\r\\'\"\032") . "'"; - } - } - - public function quote($value, $type = null) - { - $this->_connect(); - return $this->_quote($value); - } - - public function quoteIdentifier($ident, $auto = false) - { - return $this->_quoteIdentifierAs($ident, null, $auto); - } - - public function quoteColumnAs($ident, $alias, $auto = false) - { - return $this->_quoteIdentifierAs($ident, $alias, $auto); - } - - protected function _quoteIdentifierAs($ident, $alias = null, $auto = false, $as = ' AS ') - { - if (is_string($ident)) { - $ident = explode('.', $ident); - } - if (is_array($ident)) { - $segments = array(); - foreach ($ident as $segment) { - $segments[] = $this->_quoteIdentifier($segment, $auto); - } - if ($alias !== null && end($ident) == $alias) { - $alias = null; - } - $quoted = implode('.', $segments); - } else { - $quoted = $this->_quoteIdentifier($ident, $auto); - } - - if ($alias !== null) { - $quoted .= $as . $this->_quoteIdentifier($alias, $auto); - } - return $quoted; - } - - protected function _quoteIdentifier($value, $auto = false) - { - if ($auto === false || $this->_autoQuoteIdentifiers === true) { - $q = $this->getQuoteIdentifierSymbol(); - return ($q . str_replace("$q", "$q$q", $value) . $q); - } - return $value; - } - - public function getQuoteIdentifierSymbol() - { - return '"'; - } - - public function setProfilerConfig($profilerConfig) - { - if ($profilerConfig!=null) { - if (isset($profilerConfig['class'])) { - if (!empty($profilerConfig['class'])) { - $profilerClass = $profilerConfig['class']; - unset($profilerConfig['class']); - $optionalConfig = $profilerConfig; - $profilerFullClassName = self::PROFILER_NAMESPACE_ROOT . '\\' . $profilerClass; - $profilerInstance = new $profilerFullClassName($optionalConfig); - $this->profiler = $profilerInstance; - } - } else { - throw new \Exception('You must set the profiler class name in the config.ini file'); - } - } - } - - abstract protected function _connect(); - - abstract public function isConnected(); - - abstract public function closeConnection(); - - abstract public function lastInsertId($tableName = null, $primaryKey = null); -} - - -namespace Nf\Db\Adapter; - -use Nf\Localization; - -class Mysqli extends AbstractAdapter -{ - - protected $_resourceClass = '\\Nf\\Db\\Resource\\Mysqli'; - - protected function _connect() - { - if ($this->_connection) { - return; - } - - if (! extension_loaded('mysqli')) { - throw new \Exception('The Mysqli extension is required for this adapter but the extension is not loaded'); - } - - if (isset($this->_config['port'])) { - $port = (integer) $this->_config['port']; - } else { - $port = null; - } - - $this->_connection = mysqli_init(); - - if (! empty($this->_config['driver_options'])) { - foreach ($this->_config['driver_options'] as $option => $value) { - if (is_string($option)) { - // Suppress warnings here - // Ignore it if it's not a valid constant - $option = @constant(strtoupper($option)); - if ($option === null) { - continue; - } - } - @mysqli_options($this->_connection, $option, $value); - } - } - - // Suppress connection warnings here. - // Throw an exception instead. - try { - $_isConnected = mysqli_real_connect($this->_connection, $this->_config['hostname'], $this->_config['username'], $this->_config['password'], $this->_config['database'], $port); - } catch (Exception $e) { - $_isConnected = false; - } - - if ($_isConnected === false || mysqli_connect_errno()) { - $this->closeConnection(); - throw new \Exception(mysqli_connect_error()); - } - - if ($_isConnected && ! empty($this->_config['charset'])) { - mysqli_set_charset($this->_connection, $this->_config['charset']); - } - } - - public function isConnected() - { - return ((bool) ($this->_connection instanceof mysqli)); - } - - public function closeConnection() - { - if ($this->isConnected()) { - $this->_connection->close(); - } - $this->_connection = null; - } - - public function getQuoteIdentifierSymbol() - { - return "`"; - } - - protected function _quote($value) - { - if (null === $value) { - return 'NULL'; - } elseif (is_int($value) || is_float($value) || $value instanceof \Nf\Db\Expression) { - return $value; - } - $this->_connect(); - return "'" . $this->_connection->real_escape_string($value) . "'"; - } - - public function lastInsertId($tableName = null, $primaryKey = null) - { - $mysqli = $this->_connection; - return (string) $mysqli->insert_id; - } - - public function insert($tableName, array $bind) - { - $sql = "INSERT INTO " . $this->quoteIdentifier($tableName, true); - if (! count($bind)) { - // allows for inserting a row without values to get an auto increment id - $sql .= " VALUES()"; - } else { - $sql .= " SET "; - $insertFields = array(); - foreach ($bind as $key => $value) { - $insertFields[] = $this->quoteIdentifier($key) . "=" . $this->quote($value); - } - $sql .= " " . implode(', ', $insertFields); - } - - $res = new $this->_resourceClass($sql, $this); - $res->execute(); - - return $this->getConnection()->affected_rows; - } - - public function insertIgnore($tableName, array $bind) - { - $sql = "INSERT IGNORE INTO " . $this->quoteIdentifier($tableName, true) . " SET "; - $updateFields = array(); - foreach ($bind as $key => $value) { - $updateFields[] = $this->quoteIdentifier($key) . "=" . $this->quote($value); - } - $sql .= " " . implode(', ', $updateFields); - - $res = new $this->_resourceClass($sql, $this); - $res->execute(); - - return $this->getConnection()->affected_rows; - } - - public function upsert($tableName, array $bind, array $where) - { - $sql = "INSERT INTO " . $this->quoteIdentifier($tableName, true) . " SET "; - $updateFields = array(); - foreach ($bind as $key => $value) { - $updateFields[] = $this->quoteIdentifier($key) . "=" . $this->quote($value); - } - foreach ($where as $key => $value) { - $updateFields[] = $this->quoteIdentifier($key) . "=" . $this->quote($value); - } - $sql .= " " . implode(', ', $updateFields); - - $sqlOnDuplicate = " ON DUPLICATE KEY UPDATE "; - $onDuplicateFields = array(); - foreach ($bind as $key => $value) { - $onDuplicateFields[] = $this->quoteIdentifier($key) . "=" . $this->quote($value); - } - $sqlOnDuplicate .= " " . implode(', ', $onDuplicateFields); - - $sql .= $sqlOnDuplicate; - - $res = new $this->_resourceClass($sql, $this); - $res->execute(); - - return $this->getConnection()->affected_rows; - } - - public function update($tableName, array $bind, $where = '') - { - $sql = "UPDATE " . $this->quoteIdentifier($tableName, true) . " SET "; - $updateFields = array(); - foreach ($bind as $key => $value) { - $updateFields[] = $this->quoteIdentifier($key) . "=" . $this->quote($value); - } - $sql .= " " . implode(', ', $updateFields); - if ($where != '') { - $sql .= " WHERE " . $where; - } - - $res = new $this->_resourceClass($sql, $this); - $res->execute(); - - return $this->getConnection()->affected_rows; - } - - public function delete($tableName, $where = '') - { - if ($where != '') { - $sql = "DELETE FROM " . $this->quoteIdentifier($tableName, true) . " WHERE " . $where; - } else { - $sql = "TRUNCATE TABLE" . $this->quoteIdentifier($tableName, true); - } - - $res = new $this->_resourceClass($sql, $this); - $res->execute(); - - return $this->getConnection()->affected_rows; - } - - function cleanConnection() - { - $mysqli = $this->_connect(); - $mysqli = $this->_connection; - - while ($mysqli->more_results()) { - if ($mysqli->next_result()) { - $res = $mysqli->use_result(); - if (is_object($res)) { - $res->free_result(); - } - } - } - } - - public function multiQuery($queries) - { - $mysqli = $this->_connect(); - $mysqli = $this->_connection; - - if (is_array($queries)) { - $queries = implode(';', $queries); - } - - $ret = $mysqli->multi_query($queries); - - if ($ret === false) { - throw new \Exception($mysqli->error); - } - } - - public static function formatDate($inShortFormatDateOrTimestamp, $hasMinutes = false) - { - $tstp = Localization::dateToTimestamp($inShortFormatDateOrTimestamp, Localization::SHORT, ($hasMinutes ? Localization::SHORT : Localization::NONE), true); - if ($hasMinutes) { - return date('Y-m-d', $tstp); - } else { - return date('Y-m-d H:i:s', $tstp); - } - } - - /** - * Begin a transaction. - * - * @return void - */ - protected function _beginTransaction() - { - $this->_connect(); - $this->_connection->autocommit(false); - } - - /** - * Commit a transaction. - * - * @return void - */ - protected function _commit() - { - $this->_connect(); - $this->_connection->commit(); - $this->_connection->autocommit(true); - } - - /** - * Roll-back a transaction. - * - * @return void - */ - protected function _rollBack() - { - $this->_connect(); - $this->_connection->rollback(); - $this->_connection->autocommit(true); - } -} - - -namespace Nf\Db\Profiler; - -class File extends \Nf\Profiler\File -{ - - public function afterQuery($resource, $sql, $duration) - { - fputs($this->handle, date('Y-m-d H:i:s') . PHP_EOL . str_replace(array( - "\n", - "\t" - ), ' ', $sql) . PHP_EOL . round($duration * 10000, 2) . ' ms' . PHP_EOL . '--' . PHP_EOL); - } -} - - -namespace Nf\Error\Exception; - -class ClientException extends \Exception -{ -} - - -namespace Nf\Db\Profiler; - -class Firephp extends \Nf\Profiler\Firephp -{ - - const LABEL_TEMPLATE = '#dbName# (#nbQueries# @ #totalDuration# ms)'; - - public function afterQuery($resource, $sql, $duration) - { - $this->payload[] = array( - '' . round($duration * 10000, 2), - str_replace(array( - "\n", - "\t" - ), ' ', $sql), - date('Y-m-d H:i:s') - ); - - $this->totalDuration += $duration * 10000; - } - - // outputs the payload - public function execute() - { - $this->label = str_replace(array( - '#dbName#', - '#nbQueries#', - '#totalDuration#' - ), array( - $this->dbName, - count($this->payload) - 1, - round($this->totalDuration, 2) - ), $this->label); - - $this->firephp->fb(array( - $this->label, - $this->payload - ), \FirePHP::TABLE); - } -} - - -namespace Nf\Error\Exception; - -class Http extends \Exception -{ - - protected $_httpStatus = 500; - - public $doLog = true; - - public function getHttpStatus() - { - return $this->_httpStatus; - } - - public function display() - { - $front = \Nf\Front::getInstance(); - $response = $front->getResponse(); - $response->sendResponse(); - } -} - - -namespace Nf\Error\Logger; - -use \Nf\Registry; -use \Nf\Error\Handler; - -class Gelf -{ - - public function log($err) - { - $config = Registry::get('config'); - - // We need a transport - UDP via port 12201 is standard. - $transport = new \Gelf\Transport\UdpTransport($config->error->logger->gelf->ip, $config->error->logger->gelf->port, \Gelf\Transport\UdpTransport::CHUNK_SIZE_LAN); - - // While the UDP transport is itself a publisher, we wrap it in a real Publisher for convenience - // A publisher allows for message validation before transmission, and it calso supports to send messages - // to multiple backends at once - $publisher = new \Gelf\Publisher(); - $publisher->addTransport($transport); - - $fullMessage = \Nf\Front\Response\Cli::displayErrorHelper($err); - - // Now we can create custom messages and publish them - $message = new \Gelf\Message(); - $message->setShortMessage(Handler::recursiveArrayToString($err['message'])) - ->setLevel(\Psr\Log\LogLevel::ERROR) - ->setFile($err['file']) - ->setLine($err['line']) - ->setFullMessage($fullMessage); - - if (php_sapi_name() == 'cli') { - global $argv; - $message->setAdditional('url', 'su ' . $_SERVER['LOGNAME'] . ' -c "php ' . Registry::get('applicationPath') . '/html/' . implode(' ', $argv) . '"'); - } else { - $message->setAdditional('url', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); - } - - if (isset($config->error->logger->additionals)) { - foreach ($config->error->logger->additionals as $additionalName => $additionalValue) { - $message->setAdditional($additionalName, $additionalValue); - } - } - - if ($publisher->publish($message)) { - return true; - } else { - return false; - } - } -} - - -namespace Nf\Front\Response; - -abstract class AbstractResponse -{ - - protected $_bodyParts = array(); - - public function addBodyPart($bodyPart) - { - $this->_bodyParts[] = $bodyPart; - } - - public function clearBody() - { - $this->_bodyParts = array(); - } - - public function clearBuffer() - { - $maxObLevel = \Nf\Front::$obLevel; - $curObLevel = ob_get_level(); - if ($curObLevel > $maxObLevel) { - do { - ob_end_clean(); - $curObLevel = ob_get_level(); - } while ($curObLevel > $maxObLevel); - } - } - - public function output() - { - echo implode('', $this->_bodyParts); - } - - public function sendResponse() - { - $this->sendHeaders(); - $this->output(); - } - - public function setHttpResponseCode($code) - {} - - public function isBinary() - { - return false; - } - - public function getContentType() - { - return false; - } - - public function setContentType($type = 'html') - {} - - public static function displayErrorHelper($err, $alternativeSeparator = false) - { - $output = ''; - - $separator = $alternativeSeparator ? static::NEWLINE_ALT : static::NEWLINE; - - if ($err['type'] != 'fatal') { - $output .= static::colorText($err['type'] . ': ' . \Nf\Error\Handler::recursiveArrayToString(static::escape($err['message'])), 'red'); - $output .= $separator; - $output .= static::colorText($err['file'] . ' (line ' . $err['line'] . ')', 'green', $alternativeSeparator); - $output .= $separator . '-----' . $separator; - $output .= implode($separator, self::getFileSample($err['file'], $err['line'])); - $output .= $separator . '-----' . $separator; - $trace = $err['fullException']->getTrace(); - foreach ($trace as $entry) { - $output .= self::stackTracePrintEntry($entry); - if(isset($entry['file']) && isset($entry['line'])) { - $output .= '-----' . $separator; - $output .= implode($separator, self::getFileSample($entry['file'], $entry['line'], 2)); - $output .= $separator . '-----' . $separator; - } - } - } else { - $output .= $err['message'] . $separator; - $output .= static::preFormatErrorText(0, $alternativeSeparator); - $output .= self::stackTracePrintEntry($err, 2, $alternativeSeparator); - $output .= static::preFormatErrorText(1, $alternativeSeparator); - } - return $output; - } - - protected static function stackTracePrintEntry($entry, $displayArgsType = 1, $alternativeSeparator = false) - { - $output = ''; - - if (isset($entry['file'])) { - $output .= static::colorText($entry['file'] . ' (line ' . $entry['line'] . ')', 'green', $alternativeSeparator); - $output .= ($alternativeSeparator ? static::NEWLINE_ALT : static::NEWLINE); - } - if (isset($entry['class'])) { - if ($entry['class'] != 'Nf\Error\Handler') { - $output .= 'call: ' . $entry['class'] . '::'; - if (isset($entry['function'])) { - $output .= $entry['function']; - $output .= ($alternativeSeparator ? static::NEWLINE_ALT : static::NEWLINE); - } - } - } - - if ($displayArgsType > 0 && isset($entry['args']) && count($entry['args'])) { - $output .= static::stackTracePrintArgs($entry['args'], $alternativeSeparator); - $output .= ($alternativeSeparator ? static::NEWLINE_ALT : static::NEWLINE); - } - return $output; - } - - protected static function stackTracePrintArgs($args, $alternativeSeparator) - { - $output = ''; - $output .= 'arguments: '; - $out = array(); - - if (is_array($args)) { - foreach ($args as $k => $v) { - $forOut = ''; - $forOut = $k . ' = '; - if (is_array($v) || is_object($v)) { - $strV = print_r($v, true); - if (strlen($strV) > 50) { - $strV = substr($strV, 0, 50) . '...'; - } - $forReplace = [ - "\n", - "\r" - ]; - $forOut .= str_replace($forReplace, '', $strV); - } else { - $forOut .= $v; - } - $out[] = $forOut; - } - } - - $output .= static::escape($alternativeSeparator ? static::TAB_ALT : static::TAB . '[ ' . implode(', ', $out) . ' ]'); - return $output; - } - - protected static function getFileSample($filename, $line, $linesAround = 3) - { - $file = new \SplFileObject($filename); - $currentLine = $line - $linesAround - 1; - $sample = []; - while ($currentLine >= 0 && ! $file->eof() && $currentLine < $line + $linesAround) { - $file->seek($currentLine); - $currentText = trim($file->current(), "\n\r"); - if ($currentLine == $line - 1) { - $sample[] = $currentText; - } else { - $sample[] = static::colorText($currentText, 'bold_gray'); - } - - $currentLine ++; - } - return $sample; - } -} - - -namespace Nf\Front\Response; - -class Cli extends AbstractResponse -{ - - const SEPARATOR = "\r\n"; - - const NEWLINE = "\r\n"; - - const TAB = "\t"; - - public function setHeader($name, $value, $replace = false) - { - return true; - } - - public function redirect($url, $code = 302) - { - throw new Exception('cannot redirect in cli version'); - } - - public function clearHeaders() - { - return false; - } - - public function canSendHeaders() - { - return true; - } - - public function sendHeaders() - { - return false; - } - - public function displayError($err, $isXhr = false) - { - echo static::colorText('Error', 'red') . static::NEWLINE; - echo self::displayErrorHelper($err); - } - - protected static function boldText($text) - { - return self::colorText($text, 'green'); - } - - protected static function preFormatErrorText($beginOrEnd) - { - return ''; - } - - public static function colorText($text, $color = 'black') - { - $colors = array( - 'black' => '0;30', - 'dark_gray' => '1;30', - 'red' => '0;31', - 'bold_red' => '1;31', - 'green' => '0;32', - 'bold_green' => '1;32', - 'brown' => '0;33', - 'yellow' => '1;33', - 'blue' => '0;34', - 'bold_blue' => '1;34', - 'purple' => '0;35', - 'bold_purple' => '1;35', - 'cyan' => '0;36', - 'bold_cyan' => '1;36', - 'white' => '1;37', - 'bold_gray' => '0;37' - ); - if (isset($colors[$color])) { - return "\033[" . $colors[$color] . 'm' . $text . "\033[0m"; - } - } - - protected static function escape($str) - { - return $str; - } -} - - -namespace Nf\Front\Request; - -class Cli extends AbstractRequest -{ - - // cli parameters that are already used by the framework - const RESERVED_CLI_PARAMS = 'e,environment,l,locale,a,action,m,make'; - - protected $_params = array(); - - public function __construct($uri) - { - $this->_uri = $uri; - } - - public function getUri() - { - return $this->_uri; - } - - public function isXhr() - { - return false; - } - - // sets additional parameters from the command line from the arguments - public function setAdditionalCliParams() - { - $reservedParams = explode(',', self::RESERVED_CLI_PARAMS); - - $params = []; - - $ac = 1; - while ($ac < (count($_SERVER['argv']))) { - $paramName = substr($_SERVER['argv'][$ac], 1); - if (! in_array($paramName, $reservedParams)) { - $params[$paramName] = $_SERVER['argv'][$ac + 1]; - } - $ac += 2; - } - - foreach ($params as $param => $value) { - $this->setParam($param, $value); - } - } - - public function getParams() - { - $return = $this->_params; - return $return; - } -} - - - -namespace Nf\Front\Request; - -class AbstractRequest -{ - - private $_paramSources=array('_GET', '_POST'); - - public function setParam($name, $value) - { - $this->_params[$name]=$value; - } - - public function getParams() - { - return $this->_params; - } - - protected function getParamSources() - { - return $this->_paramSources; - } -} - - -namespace Nf\Error\Logger; - -use \Nf\Registry; - -class Syslog -{ - - public function log($err) - { - if(!is_string($err['message'])) { - $err['message'] = print_r($err['message'], true); - } - syslog(LOG_WARNING, 'error in file: ' . $err['file'] . ' (line ' . $err['line'] . '). ' . $err['message']); - } -} - - -namespace Nf\Db\Resource; - -class Mysqli -{ - - private $_sql; - - private $_res; - - private $_adapter; - - public function __construct($sql, $adapter) - { - $this->_sql = $sql; - $this->_adapter = $adapter; - } - - public function execute() - { - $this->_res = $this->_adapter->getConnection()->query($this->_sql); - if ($this->_res === false) { - throw new \Exception('The query you tried to execute raised an exception: ' . $this->_sql . ' - ' . $this->_adapter->getConnection()->error); - } - } - - public function fetch($mode = null) - { - if (! $this->_res) { - return false; - } - - switch ($mode) { - case \Nf\Db::FETCH_NUM: - return $this->_res->fetch_row(); - break; - case \Nf\Db::FETCH_OBJ: - return $this->_res->fetch_object(); - break; - default: - return $this->_res->fetch_assoc(); - } - } - - public function fetchAll() - { - $data = array(); - while ($row = $this->fetch()) { - $data[] = $row; - } - return $data; - } - - public function fetchColumn($col = 0) - { - $data = array(); - $col = (int) $col; - $row = $this->fetch(\Nf\Db::FETCH_NUM); - if (! is_array($row)) { - return false; - } - return $row[$col]; - } - - public function rowCount() - { - if (! $this->_adapter) { - return false; - } - $mysqli = $this->_adapter->getConnection(); - return $mysqli->affected_rows; - } -} - - -namespace Nf\Error\Exception\Http; - -use Nf\Error\Exception\Http; - -class NotFound extends Http -{ - - public $doLog = false; - - protected $_httpStatus = 404; - - public function getErrors() - { - return ''; - } -} - - -namespace Nf\Error\Exception\Http; - -use Nf\Error\Exception\Http; - -class Unauthorized extends Http -{ - - public $doLog = false; - - protected $_httpStatus = 401; - - public function getErrors() - { - return ''; - } -} - - -namespace Nf\Error\Exception\Http; - -use Nf\Error\Exception\Http; - -class NoContent extends Http -{ - public $doLog = false; - - protected $_httpStatus = 204; - - public function getErrors() - { - return ''; - } -} - - -namespace Nf\Error\Exception\Http; - -use Nf\Error\Exception\Http; - -class Forbidden extends Http -{ - - public $doLog = false; - - protected $_httpStatus = 403; -} - - -namespace Nf\Error\Exception\Http; - -use Nf\Error\Exception\Http; - -/** - * Gestion des exceptions pour le client avec passage d'array - */ -class BadRequest extends Http -{ - - public $doLog = false; - - protected $_httpStatus = 400; - - private $_errors = null; - - /** - * - * @param array $errors - */ - public function __construct($errors) - { - if (is_string($errors)) { - $errors = array( - $errors - ); - } - - $this->_errors = $errors; - parent::__construct(); - } - - public function getErrors() - { - return $this->_errors; - } - - public function display() - { - $front = \Nf\Front::getInstance(); - $response = $front->getResponse(); - $response->addBodyPart(json_encode($this->_errors)); - $response->sendResponse(); - } -} diff --git a/nofuss-1.2/cache/routes.all.php b/nofuss-1.2/cache/routes.all.php deleted file mode 100644 index d300f6c79..000000000 --- a/nofuss-1.2/cache/routes.all.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - return array ( - 'web' => - array ( - '*' => - array ( - 'home' => - array ( - 'name' => 'home', - 'regexp' => 'php-framework-benchmark/nofuss-1.2/html/index.php/hello/index', - 'controller' => 'home/index/index', - 'inheritableRegexp' => 'nofuss-1.2/html/index.php/hello/index', - ), - ), - ), -); \ No newline at end of file diff --git a/staticphp-0.9/Application/Cache/.gitkeep b/staticphp-0.9/Application/Cache/.gitkeep old mode 100644 new mode 100755 From ef9a4c849c1a191191e71d2bca46be03fffaf9f6 Mon Sep 17 00:00:00 2001 From: Anton Minin <anton.a.minin@gmail.com> Date: Thu, 27 Jul 2017 03:38:41 +0300 Subject: [PATCH 2/5] Add symfony-3.3 and symfony-3.3 with micro kernel --- list.sh | 2 + symfony-3.3-micro/.gitignore | 16 + symfony-3.3-micro/README.md | 4 + symfony-3.3-micro/_benchmark/hello_world.sh | 3 + symfony-3.3-micro/_benchmark/setup.sh | 8 + symfony-3.3-micro/app/AppCache.php | 7 + symfony-3.3-micro/app/AppKernel.php | 47 + symfony-3.3-micro/app/autoload.php | 13 + symfony-3.3-micro/app/config/config.yml | 24 + symfony-3.3-micro/app/config/config_dev.yml | 27 + symfony-3.3-micro/app/config/config_prod.yml | 27 + symfony-3.3-micro/app/config/config_test.yml | 9 + .../app/config/parameters.yml.dist | 19 + symfony-3.3-micro/app/config/services.yml | 9 + symfony-3.3-micro/bin/console | 29 + symfony-3.3-micro/bin/symfony_requirements | 146 ++ symfony-3.3-micro/composer.json | 48 + symfony-3.3-micro/composer.lock | 1729 ++++++++++++ symfony-3.3-micro/phpunit.xml.dist | 31 + .../src/App/Controller/HelloController.php | 17 + symfony-3.3-micro/var/SymfonyRequirements.php | 817 ++++++ symfony-3.3-micro/var/cache/.gitkeep | 0 symfony-3.3-micro/var/logs/.gitkeep | 0 symfony-3.3-micro/var/sessions/.gitkeep | 0 symfony-3.3-micro/web/micro.php | 19 + symfony-3.3/.gitignore | 16 + symfony-3.3/README.md | 4 + symfony-3.3/_benchmark/hello_world.sh | 3 + symfony-3.3/_benchmark/setup.sh | 8 + symfony-3.3/app/AppCache.php | 7 + symfony-3.3/app/AppKernel.php | 50 + .../app/Resources/views/base.html.twig | 13 + .../Resources/views/default/index.html.twig | 76 + symfony-3.3/app/autoload.php | 13 + symfony-3.3/app/config/config.yml | 68 + symfony-3.3/app/config/config_dev.yml | 34 + symfony-3.3/app/config/config_prod.yml | 27 + symfony-3.3/app/config/config_test.yml | 16 + symfony-3.3/app/config/parameters.yml.dist | 19 + symfony-3.3/app/config/routing.yml | 3 + symfony-3.3/app/config/routing_dev.yml | 14 + symfony-3.3/app/config/security.yml | 24 + symfony-3.3/app/config/services.yml | 9 + symfony-3.3/bin/console | 29 + symfony-3.3/bin/symfony_requirements | 146 ++ symfony-3.3/composer.json | 69 + symfony-3.3/composer.lock | 2329 +++++++++++++++++ symfony-3.3/phpunit.xml.dist | 31 + symfony-3.3/src/AppBundle/AppBundle.php | 9 + .../Controller/DefaultController.php | 21 + .../AppBundle/Controller/HelloController.php | 18 + .../Controller/DefaultControllerTest.php | 18 + symfony-3.3/var/SymfonyRequirements.php | 817 ++++++ symfony-3.3/var/cache/.gitkeep | 0 symfony-3.3/var/logs/.gitkeep | 0 symfony-3.3/var/sessions/.gitkeep | 0 symfony-3.3/web/app.php | 32 + symfony-3.3/web/app_dev.php | 32 + symfony-3.3/web/apple-touch-icon.png | Bin 0 -> 10784 bytes symfony-3.3/web/config.php | 422 +++ symfony-3.3/web/favicon.ico | Bin 0 -> 6518 bytes symfony-3.3/web/robots.txt | 5 + 62 files changed, 7433 insertions(+) create mode 100644 symfony-3.3-micro/.gitignore create mode 100644 symfony-3.3-micro/README.md create mode 100644 symfony-3.3-micro/_benchmark/hello_world.sh create mode 100644 symfony-3.3-micro/_benchmark/setup.sh create mode 100644 symfony-3.3-micro/app/AppCache.php create mode 100644 symfony-3.3-micro/app/AppKernel.php create mode 100644 symfony-3.3-micro/app/autoload.php create mode 100644 symfony-3.3-micro/app/config/config.yml create mode 100644 symfony-3.3-micro/app/config/config_dev.yml create mode 100644 symfony-3.3-micro/app/config/config_prod.yml create mode 100644 symfony-3.3-micro/app/config/config_test.yml create mode 100644 symfony-3.3-micro/app/config/parameters.yml.dist create mode 100644 symfony-3.3-micro/app/config/services.yml create mode 100755 symfony-3.3-micro/bin/console create mode 100755 symfony-3.3-micro/bin/symfony_requirements create mode 100644 symfony-3.3-micro/composer.json create mode 100644 symfony-3.3-micro/composer.lock create mode 100644 symfony-3.3-micro/phpunit.xml.dist create mode 100644 symfony-3.3-micro/src/App/Controller/HelloController.php create mode 100755 symfony-3.3-micro/var/SymfonyRequirements.php create mode 100644 symfony-3.3-micro/var/cache/.gitkeep create mode 100644 symfony-3.3-micro/var/logs/.gitkeep create mode 100644 symfony-3.3-micro/var/sessions/.gitkeep create mode 100644 symfony-3.3-micro/web/micro.php create mode 100644 symfony-3.3/.gitignore create mode 100644 symfony-3.3/README.md create mode 100644 symfony-3.3/_benchmark/hello_world.sh create mode 100644 symfony-3.3/_benchmark/setup.sh create mode 100644 symfony-3.3/app/AppCache.php create mode 100644 symfony-3.3/app/AppKernel.php create mode 100644 symfony-3.3/app/Resources/views/base.html.twig create mode 100644 symfony-3.3/app/Resources/views/default/index.html.twig create mode 100644 symfony-3.3/app/autoload.php create mode 100644 symfony-3.3/app/config/config.yml create mode 100644 symfony-3.3/app/config/config_dev.yml create mode 100644 symfony-3.3/app/config/config_prod.yml create mode 100644 symfony-3.3/app/config/config_test.yml create mode 100644 symfony-3.3/app/config/parameters.yml.dist create mode 100644 symfony-3.3/app/config/routing.yml create mode 100644 symfony-3.3/app/config/routing_dev.yml create mode 100644 symfony-3.3/app/config/security.yml create mode 100644 symfony-3.3/app/config/services.yml create mode 100755 symfony-3.3/bin/console create mode 100755 symfony-3.3/bin/symfony_requirements create mode 100644 symfony-3.3/composer.json create mode 100644 symfony-3.3/composer.lock create mode 100644 symfony-3.3/phpunit.xml.dist create mode 100644 symfony-3.3/src/AppBundle/AppBundle.php create mode 100644 symfony-3.3/src/AppBundle/Controller/DefaultController.php create mode 100644 symfony-3.3/src/AppBundle/Controller/HelloController.php create mode 100644 symfony-3.3/tests/AppBundle/Controller/DefaultControllerTest.php create mode 100755 symfony-3.3/var/SymfonyRequirements.php create mode 100644 symfony-3.3/var/cache/.gitkeep create mode 100644 symfony-3.3/var/logs/.gitkeep create mode 100644 symfony-3.3/var/sessions/.gitkeep create mode 100644 symfony-3.3/web/app.php create mode 100644 symfony-3.3/web/app_dev.php create mode 100644 symfony-3.3/web/apple-touch-icon.png create mode 100644 symfony-3.3/web/config.php create mode 100644 symfony-3.3/web/favicon.ico create mode 100644 symfony-3.3/web/robots.txt diff --git a/list.sh b/list.sh index f2bf65c73..18c1054db 100755 --- a/list.sh +++ b/list.sh @@ -40,6 +40,8 @@ staticphp-0.9 #symfony-2.6 #symfony-2.7 symfony-3.0 +symfony-3.3 +symfony-3.3-micro tipsy-0.10 #typo3f-2.3 # does not work #typo3f-3.0 # Catchable Fatal Error: Argument 1 passed to TYPO3\Flow\Object\ObjectManager::setObjects() must be of the type array, null given diff --git a/symfony-3.3-micro/.gitignore b/symfony-3.3-micro/.gitignore new file mode 100644 index 000000000..93821ad1c --- /dev/null +++ b/symfony-3.3-micro/.gitignore @@ -0,0 +1,16 @@ +/app/config/parameters.yml +/build/ +/phpunit.xml +/var/* +!/var/cache +/var/cache/* +!var/cache/.gitkeep +!/var/logs +/var/logs/* +!var/logs/.gitkeep +!/var/sessions +/var/sessions/* +!var/sessions/.gitkeep +!var/SymfonyRequirements.php +/vendor/ +/web/bundles/ diff --git a/symfony-3.3-micro/README.md b/symfony-3.3-micro/README.md new file mode 100644 index 000000000..5d656566e --- /dev/null +++ b/symfony-3.3-micro/README.md @@ -0,0 +1,4 @@ +symfony-3.3 +=========== + +A Symfony project with [micro kernel](https://symfony.com/doc/current/configuration/micro_kernel_trait.html) diff --git a/symfony-3.3-micro/_benchmark/hello_world.sh b/symfony-3.3-micro/_benchmark/hello_world.sh new file mode 100644 index 000000000..bfcc348cc --- /dev/null +++ b/symfony-3.3-micro/_benchmark/hello_world.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +url="$base/$fw/web/micro.php/hello/index" diff --git a/symfony-3.3-micro/_benchmark/setup.sh b/symfony-3.3-micro/_benchmark/setup.sh new file mode 100644 index 000000000..0244cd4d5 --- /dev/null +++ b/symfony-3.3-micro/_benchmark/setup.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +export SYMFONY_ENV=prod +composer install --no-dev --optimize-autoloader +php bin/console cache:clear --env=prod --no-debug --no-warmup +php bin/console cache:warmup --env=prod --no-debug +chmod o+w var/cache/ var/logs/ +chmod -R o+w var/cache/* diff --git a/symfony-3.3-micro/app/AppCache.php b/symfony-3.3-micro/app/AppCache.php new file mode 100644 index 000000000..639ec2cd7 --- /dev/null +++ b/symfony-3.3-micro/app/AppCache.php @@ -0,0 +1,7 @@ +<?php + +use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache; + +class AppCache extends HttpCache +{ +} diff --git a/symfony-3.3-micro/app/AppKernel.php b/symfony-3.3-micro/app/AppKernel.php new file mode 100644 index 000000000..04f982269 --- /dev/null +++ b/symfony-3.3-micro/app/AppKernel.php @@ -0,0 +1,47 @@ +<?php + +use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\Routing\RouteCollectionBuilder; + +class AppKernel extends Kernel +{ + use MicroKernelTrait; + + public function registerBundles() + { + $bundles = [ + new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), + new Symfony\Bundle\MonologBundle\MonologBundle(), + ]; + + return $bundles; + } + + protected function configureRoutes(RouteCollectionBuilder $routes) + { + $routes->add('/hello/index', \App\Controller\HelloController::class . '::indexAction'); + } + + public function getRootDir() + { + return __DIR__; + } + + public function getCacheDir() + { + return dirname(__DIR__).'/var/cache/'.$this->getEnvironment(); + } + + public function getLogDir() + { + return dirname(__DIR__).'/var/logs'; + } + + protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader) + { + $loader->load($this->getRootDir() . '/config/config_'.$this->getEnvironment().'.yml'); + } +} diff --git a/symfony-3.3-micro/app/autoload.php b/symfony-3.3-micro/app/autoload.php new file mode 100644 index 000000000..545c536b9 --- /dev/null +++ b/symfony-3.3-micro/app/autoload.php @@ -0,0 +1,13 @@ +<?php + +//use Doctrine\Common\Annotations\AnnotationRegistry; +use Composer\Autoload\ClassLoader; + +/** + * @var ClassLoader $loader + */ +$loader = require __DIR__.'/../vendor/autoload.php'; + +//AnnotationRegistry::registerLoader([$loader, 'loadClass']); + +return $loader; diff --git a/symfony-3.3-micro/app/config/config.yml b/symfony-3.3-micro/app/config/config.yml new file mode 100644 index 000000000..5e5fd8c63 --- /dev/null +++ b/symfony-3.3-micro/app/config/config.yml @@ -0,0 +1,24 @@ +imports: + - { resource: parameters.yml } +# - { resource: security.yml } + - { resource: services.yml } + +# Put parameters here that don't need to change on each machine where the app is deployed +# http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration +parameters: + locale: en + +framework: + #esi: ~ + #translator: { fallbacks: ["%locale%"] } + secret: "%secret%" + #serializer: { enable_annotations: true } + default_locale: "%locale%" + trusted_hosts: ~ + trusted_proxies: ~ + session: + # http://symfony.com/doc/current/reference/configuration/framework.html#handler-id + handler_id: session.handler.native_file + save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%" + fragments: ~ + http_method_override: true diff --git a/symfony-3.3-micro/app/config/config_dev.yml b/symfony-3.3-micro/app/config/config_dev.yml new file mode 100644 index 000000000..071e9def6 --- /dev/null +++ b/symfony-3.3-micro/app/config/config_dev.yml @@ -0,0 +1,27 @@ +imports: + - { resource: config.yml } + +framework: + profiler: { only_exceptions: false } + +monolog: + handlers: + main: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug + channels: [!event] + console: + type: console + channels: [!event, !doctrine] + # uncomment to get logging in your browser + # you may have to allow bigger header sizes in your Web server configuration + #firephp: + # type: firephp + # level: info + #chromephp: + # type: chromephp + # level: info + +#swiftmailer: +# delivery_address: me@example.com diff --git a/symfony-3.3-micro/app/config/config_prod.yml b/symfony-3.3-micro/app/config/config_prod.yml new file mode 100644 index 000000000..83ef6d6e5 --- /dev/null +++ b/symfony-3.3-micro/app/config/config_prod.yml @@ -0,0 +1,27 @@ +imports: + - { resource: config.yml } + +#framework: +# validation: +# cache: validator.mapping.cache.doctrine.apc +# serializer: +# cache: serializer.mapping.cache.doctrine.apc + +#doctrine: +# orm: +# metadata_cache_driver: apc +# result_cache_driver: apc +# query_cache_driver: apc + +monolog: + handlers: + main: + type: fingers_crossed + action_level: error + handler: nested + nested: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug + console: + type: console diff --git a/symfony-3.3-micro/app/config/config_test.yml b/symfony-3.3-micro/app/config/config_test.yml new file mode 100644 index 000000000..ec3dfbe5b --- /dev/null +++ b/symfony-3.3-micro/app/config/config_test.yml @@ -0,0 +1,9 @@ +imports: + - { resource: config_dev.yml } + +framework: + test: ~ + session: + storage_id: session.storage.mock_file + profiler: + collect: false diff --git a/symfony-3.3-micro/app/config/parameters.yml.dist b/symfony-3.3-micro/app/config/parameters.yml.dist new file mode 100644 index 000000000..886c92bb8 --- /dev/null +++ b/symfony-3.3-micro/app/config/parameters.yml.dist @@ -0,0 +1,19 @@ +# This file is a "template" of what your parameters.yml file should look like +# Set parameters here that may be different on each deployment target of the app, e.g. development, staging, production. +# http://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration +parameters: + database_host: 127.0.0.1 + database_port: ~ + database_name: symfony + database_user: root + database_password: ~ + # You should uncomment this if you want use pdo_sqlite + # database_path: "%kernel.root_dir%/data.db3" + + mailer_transport: smtp + mailer_host: 127.0.0.1 + mailer_user: ~ + mailer_password: ~ + + # A secret key that's used to generate certain security-related tokens + secret: ThisTokenIsNotSoSecretChangeIt diff --git a/symfony-3.3-micro/app/config/services.yml b/symfony-3.3-micro/app/config/services.yml new file mode 100644 index 000000000..5c76fc598 --- /dev/null +++ b/symfony-3.3-micro/app/config/services.yml @@ -0,0 +1,9 @@ +# Learn more about services, parameters and containers at +# http://symfony.com/doc/current/book/service_container.html +parameters: +# parameter_name: value + +services: +# service_name: +# class: AppBundle\Directory\ClassName +# arguments: ["@another_service_name", "plain_value", "%parameter_name%"] diff --git a/symfony-3.3-micro/bin/console b/symfony-3.3-micro/bin/console new file mode 100755 index 000000000..49247c94d --- /dev/null +++ b/symfony-3.3-micro/bin/console @@ -0,0 +1,29 @@ +#!/usr/bin/env php +<?php + +use Symfony\Bundle\FrameworkBundle\Console\Application; +use Symfony\Component\Console\Input\ArgvInput; +use Symfony\Component\Debug\Debug; + +// if you don't want to setup permissions the proper way, just uncomment the following PHP line +// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information +//umask(0000); + +set_time_limit(0); + +/** + * @var Composer\Autoload\ClassLoader $loader + */ +$loader = require __DIR__.'/../app/autoload.php'; + +$input = new ArgvInput(); +$env = $input->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($kernel); +$application->run($input); diff --git a/symfony-3.3-micro/bin/symfony_requirements b/symfony-3.3-micro/bin/symfony_requirements new file mode 100755 index 000000000..a7bf65a1b --- /dev/null +++ b/symfony-3.3-micro/bin/symfony_requirements @@ -0,0 +1,146 @@ +#!/usr/bin/env php +<?php + +require_once dirname(__FILE__).'/../var/SymfonyRequirements.php'; + +$lineSize = 70; +$symfonyRequirements = new SymfonyRequirements(); +$iniPath = $symfonyRequirements->getPhpIniConfigPath(); + +echo_title('Symfony Requirements Checker'); + +echo '> PHP is using the following php.ini file:'.PHP_EOL; +if ($iniPath) { + echo_style('green', ' '.$iniPath); +} else { + echo_style('yellow', ' WARNING: No configuration file (php.ini) used by PHP!'); +} + +echo PHP_EOL.PHP_EOL; + +echo '> Checking Symfony requirements:'.PHP_EOL.' '; + +$messages = array(); +foreach ($symfonyRequirements->getRequirements() as $req) { + if ($helpText = get_error_message($req, $lineSize)) { + echo_style('red', 'E'); + $messages['error'][] = $helpText; + } else { + echo_style('green', '.'); + } +} + +$checkPassed = empty($messages['error']); + +foreach ($symfonyRequirements->getRecommendations() as $req) { + if ($helpText = get_error_message($req, $lineSize)) { + echo_style('yellow', 'W'); + $messages['warning'][] = $helpText; + } else { + echo_style('green', '.'); + } +} + +if ($checkPassed) { + echo_block('success', 'OK', 'Your system is ready to run Symfony projects'); +} else { + echo_block('error', 'ERROR', 'Your system is not ready to run Symfony projects'); + + echo_title('Fix the following mandatory requirements', 'red'); + + foreach ($messages['error'] as $helpText) { + echo ' * '.$helpText.PHP_EOL; + } +} + +if (!empty($messages['warning'])) { + echo_title('Optional recommendations to improve your setup', 'yellow'); + + foreach ($messages['warning'] as $helpText) { + echo ' * '.$helpText.PHP_EOL; + } +} + +echo PHP_EOL; +echo_style('title', 'Note'); +echo ' The command console could use a different php.ini file'.PHP_EOL; +echo_style('title', '~~~~'); +echo ' than the one used with your web server. To be on the'.PHP_EOL; +echo ' safe side, please check the requirements from your web'.PHP_EOL; +echo ' server using the '; +echo_style('yellow', 'web/config.php'); +echo ' script.'.PHP_EOL; +echo PHP_EOL; + +exit($checkPassed ? 0 : 1); + +function get_error_message(Requirement $requirement, $lineSize) +{ + if ($requirement->isFulfilled()) { + return; + } + + $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL; + $errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL; + + return $errorMessage; +} + +function echo_title($title, $style = null) +{ + $style = $style ?: 'title'; + + echo PHP_EOL; + echo_style($style, $title.PHP_EOL); + echo_style($style, str_repeat('~', strlen($title)).PHP_EOL); + echo PHP_EOL; +} + +function echo_style($style, $message) +{ + // ANSI color codes + $styles = array( + 'reset' => "\033[0m", + 'red' => "\033[31m", + 'green' => "\033[32m", + 'yellow' => "\033[33m", + 'error' => "\033[37;41m", + 'success' => "\033[37;42m", + 'title' => "\033[34m", + ); + $supports = has_color_support(); + + echo($supports ? $styles[$style] : '').$message.($supports ? $styles['reset'] : ''); +} + +function echo_block($style, $title, $message) +{ + $message = ' '.trim($message).' '; + $width = strlen($message); + + echo PHP_EOL.PHP_EOL; + + echo_style($style, str_repeat(' ', $width)); + echo PHP_EOL; + echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT)); + echo PHP_EOL; + echo_style($style, $message); + echo PHP_EOL; + echo_style($style, str_repeat(' ', $width)); + echo PHP_EOL; +} + +function has_color_support() +{ + static $support; + + if (null === $support) { + if (DIRECTORY_SEPARATOR == '\\') { + $support = false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); + } else { + $support = function_exists('posix_isatty') && @posix_isatty(STDOUT); + } + } + + return $support; +} diff --git a/symfony-3.3-micro/composer.json b/symfony-3.3-micro/composer.json new file mode 100644 index 000000000..1e6cb190d --- /dev/null +++ b/symfony-3.3-micro/composer.json @@ -0,0 +1,48 @@ +{ + "name": "kenji/symfony-3.3-micro", + "license": "proprietary", + "type": "project", + "autoload": { + "psr-4": { + "": "src/" + }, + "classmap": [ + "app/AppKernel.php", + "app/AppCache.php" + ] + }, + "require": { + "php": ">=5.5.9", + "sensio/distribution-bundle": "^5.0", + "symfony/framework-bundle": "3.3.*", + "symfony/monolog-bundle": "^2.8", + "symfony/yaml": "^3.3" + }, + "scripts": { + "post-install-cmd": [ + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache" + ], + "post-update-cmd": [ + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache" + ] + }, + "config": { + "platform": { + "php": "5.5.9" + }, + "sort-packages": true + }, + "extra": { + "symfony-app-dir": "app", + "symfony-bin-dir": "bin", + "symfony-var-dir": "var", + "symfony-web-dir": "web", + "symfony-tests-dir": "tests", + "symfony-assets-install": "relative", + "incenteev-parameters": { + "file": "app/config/parameters.yml" + } + } +} diff --git a/symfony-3.3-micro/composer.lock b/symfony-3.3-micro/composer.lock new file mode 100644 index 000000000..0b3e91058 --- /dev/null +++ b/symfony-3.3-micro/composer.lock @@ -0,0 +1,1729 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "33c03bcc493aefd4dc6f10c978c0f7d9", + "packages": [ + { + "name": "composer/ca-bundle", + "version": "1.0.7", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/b17e6153cb7f33c7e44eb59578dc12eee5dc8e12", + "reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5", + "psr/log": "^1.0", + "symfony/process": "^2.5 || ^3.0" + }, + "suggest": { + "symfony/process": "This is necessary to reliably check whether openssl_x509_parse is vulnerable on older php versions, but can be ignored on PHP 5.5.6+" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "time": "2017-03-06T11:59:08+00:00" + }, + { + "name": "doctrine/cache", + "version": "v1.6.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/eb152c5100571c7a45470ff2a35095ab3f3b900b", + "reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b", + "shasum": "" + }, + "require": { + "php": "~5.5|~7.0" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "phpunit/phpunit": "~4.8|~5.0", + "predis/predis": "~1.0", + "satooshi/php-coveralls": "~0.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Caching library offering an object-oriented API for many cache backends", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "cache", + "caching" + ], + "time": "2017-07-22T12:49:21+00:00" + }, + { + "name": "monolog/monolog", + "version": "1.23.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4", + "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4", + "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 || ^3.0", + "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|^6.0" + }, + "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": "2017-06-19T01:22:40+00:00" + }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "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": "2016-08-06T20:24:11+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "psr/log", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-10-10T12:19:37+00:00" + }, + { + "name": "psr/simple-cache", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/753fa598e8f3b9966c886fe13f370baa45ef0e24", + "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-01-02T13:31:39+00:00" + }, + { + "name": "sensio/distribution-bundle", + "version": "v5.0.20", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", + "reference": "4b019d4c0bd64438c42e4b6b0726085b409be8d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/4b019d4c0bd64438c42e4b6b0726085b409be8d9", + "reference": "4b019d4c0bd64438c42e4b6b0726085b409be8d9", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "sensiolabs/security-checker": "~3.0|~4.0", + "symfony/class-loader": "~2.3|~3.0", + "symfony/config": "~2.3|~3.0", + "symfony/dependency-injection": "~2.3|~3.0", + "symfony/filesystem": "~2.3|~3.0", + "symfony/http-kernel": "~2.3|~3.0", + "symfony/process": "~2.3|~3.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Sensio\\Bundle\\DistributionBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Base bundle for Symfony Distributions", + "keywords": [ + "configuration", + "distribution" + ], + "time": "2017-05-11T16:21:03+00:00" + }, + { + "name": "sensiolabs/security-checker", + "version": "v4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/security-checker.git", + "reference": "6a3b0c3b42e41c777b1ad75032d8177863fdc5e1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/6a3b0c3b42e41c777b1ad75032d8177863fdc5e1", + "reference": "6a3b0c3b42e41c777b1ad75032d8177863fdc5e1", + "shasum": "" + }, + "require": { + "composer/ca-bundle": "^1.0", + "symfony/console": "~2.7|~3.0" + }, + "bin": [ + "security-checker" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-0": { + "SensioLabs\\Security": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien.potencier@gmail.com" + } + ], + "description": "A security checker for your composer.lock", + "time": "2017-07-24T11:42:56+00:00" + }, + { + "name": "symfony/cache", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache.git", + "reference": "265987c7f524b9ad17d0a0b8819ac53ce1bb8054" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache/zipball/265987c7f524b9ad17d0a0b8819ac53ce1bb8054", + "reference": "265987c7f524b9ad17d0a0b8819ac53ce1bb8054", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/cache": "~1.0", + "psr/log": "~1.0", + "psr/simple-cache": "^1.0" + }, + "conflict": { + "symfony/var-dumper": "<3.3" + }, + "provide": { + "psr/cache-implementation": "1.0", + "psr/simple-cache-implementation": "1.0" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/cache": "~1.6", + "doctrine/dbal": "~2.4", + "predis/predis": "~1.0" + }, + "suggest": { + "symfony/polyfill-apcu": "For using ApcuAdapter on HHVM" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-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 Cache component with PSR-6, PSR-16, and tags", + "homepage": "https://symfony.com", + "keywords": [ + "caching", + "psr6" + ], + "time": "2017-07-17T17:27:31+00:00" + }, + { + "name": "symfony/class-loader", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/class-loader.git", + "reference": "386a294d621576302e7cc36965d6ed53b8c73c4f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/class-loader/zipball/386a294d621576302e7cc36965d6ed53b8c73c4f", + "reference": "386a294d621576302e7cc36965d6ed53b8c73c4f", + "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.3-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": "2017-06-02T09:51:43+00:00" + }, + { + "name": "symfony/config", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "a094618deb9a3fe1c3cf500a796e167d0495a274" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/a094618deb9a3fe1c3cf500a796e167d0495a274", + "reference": "a094618deb9a3fe1c3cf500a796e167d0495a274", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/filesystem": "~2.8|~3.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.3", + "symfony/finder": "<3.3" + }, + "require-dev": { + "symfony/dependency-injection": "~3.3", + "symfony/finder": "~3.3", + "symfony/yaml": "~3.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "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 Config Component", + "homepage": "https://symfony.com", + "time": "2017-06-16T12:40:34+00:00" + }, + { + "name": "symfony/console", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "a97e45d98c59510f085fa05225a1acb74dfe0546" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/a97e45d98c59510f085fa05225a1acb74dfe0546", + "reference": "a97e45d98c59510f085fa05225a1acb74dfe0546", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/debug": "~2.8|~3.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.3", + "symfony/dependency-injection": "~3.3", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/filesystem": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/filesystem": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "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 Console Component", + "homepage": "https://symfony.com", + "time": "2017-07-03T13:19:36+00:00" + }, + { + "name": "symfony/debug", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "63b85a968486d95ff9542228dc2e4247f16f9743" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/63b85a968486d95ff9542228dc2e4247f16f9743", + "reference": "63b85a968486d95ff9542228dc2e4247f16f9743", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/http-kernel": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "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 Debug Component", + "homepage": "https://symfony.com", + "time": "2017-07-05T13:02:37+00:00" + }, + { + "name": "symfony/dependency-injection", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "761e51a86f35f5b3e213e9b7f554fd91f9bffae4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/761e51a86f35f5b3e213e9b7f554fd91f9bffae4", + "reference": "761e51a86f35f5b3e213e9b7f554fd91f9bffae4", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/container": "^1.0" + }, + "conflict": { + "symfony/config": "<3.3.1", + "symfony/finder": "<3.3", + "symfony/yaml": "<3.3" + }, + "provide": { + "psr/container-implementation": "1.0" + }, + "require-dev": { + "symfony/config": "~3.3", + "symfony/expression-language": "~2.8|~3.0", + "symfony/yaml": "~3.3" + }, + "suggest": { + "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", + "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", + "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-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": "2017-07-17T14:07:10+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "67535f1e3fd662bdc68d7ba317c93eecd973617e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/67535f1e3fd662bdc68d7ba317c93eecd973617e", + "reference": "67535f1e3fd662bdc68d7ba317c93eecd973617e", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "conflict": { + "symfony/dependency-injection": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~3.3", + "symfony/expression-language": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "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 EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2017-06-09T14:53:08+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "427987eb4eed764c3b6e38d52a0f87989e010676" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/427987eb4eed764c3b6e38d52a0f87989e010676", + "reference": "427987eb4eed764c3b6e38d52a0f87989e010676", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "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 Filesystem Component", + "homepage": "https://symfony.com", + "time": "2017-07-11T07:17:58+00:00" + }, + { + "name": "symfony/finder", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/baea7f66d30854ad32988c11a09d7ffd485810c4", + "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "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 Finder Component", + "homepage": "https://symfony.com", + "time": "2017-06-01T21:01:25+00:00" + }, + { + "name": "symfony/framework-bundle", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/framework-bundle.git", + "reference": "678bc1b17ae351ba98a492f31d57c0011281334a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/678bc1b17ae351ba98a492f31d57c0011281334a", + "reference": "678bc1b17ae351ba98a492f31d57c0011281334a", + "shasum": "" + }, + "require": { + "doctrine/cache": "~1.0", + "ext-xml": "*", + "php": ">=5.5.9", + "symfony/cache": "~3.3", + "symfony/class-loader": "~3.2", + "symfony/config": "~3.3", + "symfony/dependency-injection": "~3.3", + "symfony/event-dispatcher": "^3.3.1", + "symfony/filesystem": "~2.8|~3.0", + "symfony/finder": "~2.8|~3.0", + "symfony/http-foundation": "~3.3", + "symfony/http-kernel": "~3.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/routing": "~3.3", + "symfony/stopwatch": "~2.8|~3.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<3.0", + "phpdocumentor/type-resolver": "<0.2.0", + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", + "symfony/asset": "<3.3", + "symfony/console": "<3.3", + "symfony/form": "<3.3", + "symfony/property-info": "<3.3", + "symfony/serializer": "<3.3", + "symfony/translation": "<3.2", + "symfony/validator": "<3.3", + "symfony/workflow": "<3.3" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "fig/link-util": "^1.0", + "phpdocumentor/reflection-docblock": "^3.0", + "sensio/framework-extra-bundle": "^3.0.2", + "symfony/asset": "~3.3", + "symfony/browser-kit": "~2.8|~3.0", + "symfony/console": "~3.3", + "symfony/css-selector": "~2.8|~3.0", + "symfony/dom-crawler": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/form": "~3.3", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/process": "~2.8|~3.0", + "symfony/property-info": "~3.3", + "symfony/security": "~2.8|~3.0", + "symfony/security-core": "~3.2", + "symfony/security-csrf": "~2.8|~3.0", + "symfony/serializer": "~3.3", + "symfony/templating": "~2.8|~3.0", + "symfony/translation": "~3.2", + "symfony/validator": "~3.3", + "symfony/web-link": "~3.3", + "symfony/workflow": "~3.3", + "symfony/yaml": "~3.2", + "twig/twig": "~1.34|~2.4" + }, + "suggest": { + "ext-apcu": "For best performance of the system caches", + "symfony/console": "For using the console commands", + "symfony/form": "For using forms", + "symfony/property-info": "For using the property_info service", + "symfony/serializer": "For using the serializer service", + "symfony/validator": "For using validation", + "symfony/web-link": "For using web links, features such as preloading, prefetching or prerendering", + "symfony/yaml": "For using the debug:config and lint:yaml commands" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.3-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": "2017-07-17T11:48:40+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "e307abe4b79ccbbfdced9b91c132fd128f456bc5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e307abe4b79ccbbfdced9b91c132fd128f456bc5", + "reference": "e307abe4b79ccbbfdced9b91c132fd128f456bc5", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "symfony/expression-language": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "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 HttpFoundation Component", + "homepage": "https://symfony.com", + "time": "2017-07-17T14:07:10+00:00" + }, + { + "name": "symfony/http-kernel", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "16ceea64d23abddf58797a782ae96a5242282cd8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/16ceea64d23abddf58797a782ae96a5242282cd8", + "reference": "16ceea64d23abddf58797a782ae96a5242282cd8", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "psr/log": "~1.0", + "symfony/debug": "~2.8|~3.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/http-foundation": "~3.3" + }, + "conflict": { + "symfony/config": "<2.8", + "symfony/dependency-injection": "<3.3", + "symfony/var-dumper": "<3.3", + "twig/twig": "<1.34|<2.4,>=2" + }, + "require-dev": { + "psr/cache": "~1.0", + "symfony/browser-kit": "~2.8|~3.0", + "symfony/class-loader": "~2.8|~3.0", + "symfony/config": "~2.8|~3.0", + "symfony/console": "~2.8|~3.0", + "symfony/css-selector": "~2.8|~3.0", + "symfony/dependency-injection": "~3.3", + "symfony/dom-crawler": "~2.8|~3.0", + "symfony/expression-language": "~2.8|~3.0", + "symfony/finder": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0", + "symfony/routing": "~2.8|~3.0", + "symfony/stopwatch": "~2.8|~3.0", + "symfony/templating": "~2.8|~3.0", + "symfony/translation": "~2.8|~3.0", + "symfony/var-dumper": "~3.3" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/class-loader": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "", + "symfony/var-dumper": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "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 HttpKernel Component", + "homepage": "https://symfony.com", + "time": "2017-07-17T19:08:23+00:00" + }, + { + "name": "symfony/monolog-bridge", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/monolog-bridge.git", + "reference": "b2e5cf7959432161c2816a20508f384200c995a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/monolog-bridge/zipball/b2e5cf7959432161c2816a20508f384200c995a3", + "reference": "b2e5cf7959432161c2816a20508f384200c995a3", + "shasum": "" + }, + "require": { + "monolog/monolog": "~1.19", + "php": ">=5.5.9", + "symfony/http-kernel": "~2.8|~3.0" + }, + "conflict": { + "symfony/http-foundation": "<3.3" + }, + "require-dev": { + "symfony/console": "~2.8|~3.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/var-dumper": "~3.3" + }, + "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.3-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": "2017-06-06T15:10:52+00:00" + }, + { + "name": "symfony/monolog-bundle", + "version": "v2.12.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/monolog-bundle.git", + "reference": "b0146bdca7ba2a65f3bbe7010423c7393b29ec3f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/b0146bdca7ba2a65f3bbe7010423c7393b29ec3f", + "reference": "b0146bdca7ba2a65f3bbe7010423c7393b29ec3f", + "shasum": "" + }, + "require": { + "monolog/monolog": "~1.18", + "php": ">=5.3.2", + "symfony/config": "~2.3|~3.0", + "symfony/dependency-injection": "~2.3|~3.0", + "symfony/http-kernel": "~2.3|~3.0", + "symfony/monolog-bridge": "~2.3|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8", + "symfony/console": "~2.3|~3.0", + "symfony/yaml": "~2.3|~3.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bundle\\MonologBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony MonologBundle", + "homepage": "http://symfony.com", + "keywords": [ + "log", + "logging" + ], + "time": "2017-01-02T19:04:26+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "f29dca382a6485c3cbe6379f0c61230167681937" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937", + "reference": "f29dca382a6485c3cbe6379f0c61230167681937", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2017-06-09T14:24:12+00:00" + }, + { + "name": "symfony/process", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "07432804942b9f6dd7b7377faf9920af5f95d70a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/07432804942b9f6dd7b7377faf9920af5f95d70a", + "reference": "07432804942b9f6dd7b7377faf9920af5f95d70a", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "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 Process Component", + "homepage": "https://symfony.com", + "time": "2017-07-13T13:05:09+00:00" + }, + { + "name": "symfony/routing", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "dc70bbd0ca7b19259f63cdacc8af370bc32a4728" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/dc70bbd0ca7b19259f63cdacc8af370bc32a4728", + "reference": "dc70bbd0ca7b19259f63cdacc8af370bc32a4728", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "conflict": { + "symfony/config": "<2.8", + "symfony/dependency-injection": "<3.3", + "symfony/yaml": "<3.3" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "doctrine/common": "~2.2", + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~3.3", + "symfony/expression-language": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/yaml": "~3.3" + }, + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/dependency-injection": "For loading routes from a service", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "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 Routing Component", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "time": "2017-06-24T09:29:48+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "602a15299dc01556013b07167d4f5d3a60e90d15" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/602a15299dc01556013b07167d4f5d3a60e90d15", + "reference": "602a15299dc01556013b07167d4f5d3a60e90d15", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-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": "2017-04-12T14:14:56+00:00" + }, + { + "name": "symfony/yaml", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "1f93a8d19b8241617f5074a123e282575b821df8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/1f93a8d19b8241617f5074a123e282575b821df8", + "reference": "1f93a8d19b8241617f5074a123e282575b821df8", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "symfony/console": "~2.8|~3.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "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 Yaml Component", + "homepage": "https://symfony.com", + "time": "2017-06-15T12:58:50+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.5.9" + }, + "platform-dev": [], + "platform-overrides": { + "php": "5.5.9" + } +} diff --git a/symfony-3.3-micro/phpunit.xml.dist b/symfony-3.3-micro/phpunit.xml.dist new file mode 100644 index 000000000..b115bb395 --- /dev/null +++ b/symfony-3.3-micro/phpunit.xml.dist @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- http://phpunit.de/manual/4.1/en/appendixes.configuration.html --> +<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd" + backupGlobals="false" + colors="true" + bootstrap="app/autoload.php" +> + <php> + <ini name="error_reporting" value="-1" /> + <server name="KERNEL_DIR" value="app/" /> + </php> + + <testsuites> + <testsuite name="Project Test Suite"> + <directory>tests</directory> + </testsuite> + </testsuites> + + <filter> + <whitelist> + <directory>src</directory> + <exclude> + <directory>src/*Bundle/Resources</directory> + <directory>src/*/*Bundle/Resources</directory> + <directory>src/*/Bundle/*Bundle/Resources</directory> + </exclude> + </whitelist> + </filter> +</phpunit> diff --git a/symfony-3.3-micro/src/App/Controller/HelloController.php b/symfony-3.3-micro/src/App/Controller/HelloController.php new file mode 100644 index 000000000..e127625af --- /dev/null +++ b/symfony-3.3-micro/src/App/Controller/HelloController.php @@ -0,0 +1,17 @@ +<?php + +namespace App\Controller; + +use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Component\HttpFoundation\Response; + +class HelloController extends Controller +{ + /** + * @return Response + */ + public function indexAction() + { + return new Response('Hello World!'); + } +} diff --git a/symfony-3.3-micro/var/SymfonyRequirements.php b/symfony-3.3-micro/var/SymfonyRequirements.php new file mode 100755 index 000000000..3b14a4022 --- /dev/null +++ b/symfony-3.3-micro/var/SymfonyRequirements.php @@ -0,0 +1,817 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Users of PHP 5.2 should be able to run the requirements checks. + * This is why the file and all classes must be compatible with PHP 5.2+ + * (e.g. not using namespaces and closures). + * + * ************** CAUTION ************** + * + * DO NOT EDIT THIS FILE as it will be overridden by Composer as part of + * the installation/update process. The original file resides in the + * SensioDistributionBundle. + * + * ************** CAUTION ************** + */ + +/** + * Represents a single PHP requirement, e.g. an installed extension. + * It can be a mandatory requirement or an optional recommendation. + * There is a special subclass, named PhpIniRequirement, to check a php.ini configuration. + * + * @author Tobias Schultze <http://tobion.de> + */ +class Requirement +{ + private $fulfilled; + private $testMessage; + private $helpText; + private $helpHtml; + private $optional; + + /** + * Constructor that initializes the requirement. + * + * @param bool $fulfilled Whether the requirement is fulfilled + * @param string $testMessage The message for testing the requirement + * @param string $helpHtml The help text formatted in HTML for resolving the problem + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + * @param bool $optional Whether this is only an optional recommendation not a mandatory requirement + */ + public function __construct($fulfilled, $testMessage, $helpHtml, $helpText = null, $optional = false) + { + $this->fulfilled = (bool) $fulfilled; + $this->testMessage = (string) $testMessage; + $this->helpHtml = (string) $helpHtml; + $this->helpText = null === $helpText ? strip_tags($this->helpHtml) : (string) $helpText; + $this->optional = (bool) $optional; + } + + /** + * Returns whether the requirement is fulfilled. + * + * @return bool true if fulfilled, otherwise false + */ + public function isFulfilled() + { + return $this->fulfilled; + } + + /** + * Returns the message for testing the requirement. + * + * @return string The test message + */ + public function getTestMessage() + { + return $this->testMessage; + } + + /** + * Returns the help text for resolving the problem. + * + * @return string The help text + */ + public function getHelpText() + { + return $this->helpText; + } + + /** + * Returns the help text formatted in HTML. + * + * @return string The HTML help + */ + public function getHelpHtml() + { + return $this->helpHtml; + } + + /** + * Returns whether this is only an optional recommendation and not a mandatory requirement. + * + * @return bool true if optional, false if mandatory + */ + public function isOptional() + { + return $this->optional; + } +} + +/** + * Represents a PHP requirement in form of a php.ini configuration. + * + * @author Tobias Schultze <http://tobion.de> + */ +class PhpIniRequirement extends Requirement +{ + /** + * Constructor that initializes the requirement. + * + * @param string $cfgName The configuration name used for ini_get() + * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, + * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement + * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. + * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. + * Example: You require a config to be true but PHP later removes this config and defaults it to true internally. + * @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) + * @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + * @param bool $optional Whether this is only an optional recommendation not a mandatory requirement + */ + public function __construct($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null, $optional = false) + { + $cfgValue = ini_get($cfgName); + + if (is_callable($evaluation)) { + if (null === $testMessage || null === $helpHtml) { + throw new InvalidArgumentException('You must provide the parameters testMessage and helpHtml for a callback evaluation.'); + } + + $fulfilled = call_user_func($evaluation, $cfgValue); + } else { + if (null === $testMessage) { + $testMessage = sprintf('%s %s be %s in php.ini', + $cfgName, + $optional ? 'should' : 'must', + $evaluation ? 'enabled' : 'disabled' + ); + } + + if (null === $helpHtml) { + $helpHtml = sprintf('Set <strong>%s</strong> to <strong>%s</strong> in php.ini<a href="#phpini">*</a>.', + $cfgName, + $evaluation ? 'on' : 'off' + ); + } + + $fulfilled = $evaluation == $cfgValue; + } + + parent::__construct($fulfilled || ($approveCfgAbsence && false === $cfgValue), $testMessage, $helpHtml, $helpText, $optional); + } +} + +/** + * A RequirementCollection represents a set of Requirement instances. + * + * @author Tobias Schultze <http://tobion.de> + */ +class RequirementCollection implements IteratorAggregate +{ + /** + * @var Requirement[] + */ + private $requirements = array(); + + /** + * Gets the current RequirementCollection as an Iterator. + * + * @return Traversable A Traversable interface + */ + public function getIterator() + { + return new ArrayIterator($this->requirements); + } + + /** + * Adds a Requirement. + * + * @param Requirement $requirement A Requirement instance + */ + public function add(Requirement $requirement) + { + $this->requirements[] = $requirement; + } + + /** + * Adds a mandatory requirement. + * + * @param bool $fulfilled Whether the requirement is fulfilled + * @param string $testMessage The message for testing the requirement + * @param string $helpHtml The help text formatted in HTML for resolving the problem + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + */ + public function addRequirement($fulfilled, $testMessage, $helpHtml, $helpText = null) + { + $this->add(new Requirement($fulfilled, $testMessage, $helpHtml, $helpText, false)); + } + + /** + * Adds an optional recommendation. + * + * @param bool $fulfilled Whether the recommendation is fulfilled + * @param string $testMessage The message for testing the recommendation + * @param string $helpHtml The help text formatted in HTML for resolving the problem + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + */ + public function addRecommendation($fulfilled, $testMessage, $helpHtml, $helpText = null) + { + $this->add(new Requirement($fulfilled, $testMessage, $helpHtml, $helpText, true)); + } + + /** + * Adds a mandatory requirement in form of a php.ini configuration. + * + * @param string $cfgName The configuration name used for ini_get() + * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, + * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement + * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. + * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. + * Example: You require a config to be true but PHP later removes this config and defaults it to true internally. + * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) + * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + */ + public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null) + { + $this->add(new PhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence, $testMessage, $helpHtml, $helpText, false)); + } + + /** + * Adds an optional recommendation in form of a php.ini configuration. + * + * @param string $cfgName The configuration name used for ini_get() + * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, + * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement + * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. + * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. + * Example: You require a config to be true but PHP later removes this config and defaults it to true internally. + * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) + * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + */ + public function addPhpIniRecommendation($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null) + { + $this->add(new PhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence, $testMessage, $helpHtml, $helpText, true)); + } + + /** + * Adds a requirement collection to the current set of requirements. + * + * @param RequirementCollection $collection A RequirementCollection instance + */ + public function addCollection(RequirementCollection $collection) + { + $this->requirements = array_merge($this->requirements, $collection->all()); + } + + /** + * Returns both requirements and recommendations. + * + * @return Requirement[] + */ + public function all() + { + return $this->requirements; + } + + /** + * Returns all mandatory requirements. + * + * @return Requirement[] + */ + public function getRequirements() + { + $array = array(); + foreach ($this->requirements as $req) { + if (!$req->isOptional()) { + $array[] = $req; + } + } + + return $array; + } + + /** + * Returns the mandatory requirements that were not met. + * + * @return Requirement[] + */ + public function getFailedRequirements() + { + $array = array(); + foreach ($this->requirements as $req) { + if (!$req->isFulfilled() && !$req->isOptional()) { + $array[] = $req; + } + } + + return $array; + } + + /** + * Returns all optional recommendations. + * + * @return Requirement[] + */ + public function getRecommendations() + { + $array = array(); + foreach ($this->requirements as $req) { + if ($req->isOptional()) { + $array[] = $req; + } + } + + return $array; + } + + /** + * Returns the recommendations that were not met. + * + * @return Requirement[] + */ + public function getFailedRecommendations() + { + $array = array(); + foreach ($this->requirements as $req) { + if (!$req->isFulfilled() && $req->isOptional()) { + $array[] = $req; + } + } + + return $array; + } + + /** + * Returns whether a php.ini configuration is not correct. + * + * @return bool php.ini configuration problem? + */ + public function hasPhpIniConfigIssue() + { + foreach ($this->requirements as $req) { + if (!$req->isFulfilled() && $req instanceof PhpIniRequirement) { + return true; + } + } + + return false; + } + + /** + * Returns the PHP configuration file (php.ini) path. + * + * @return string|false php.ini file path + */ + public function getPhpIniConfigPath() + { + return get_cfg_var('cfg_file_path'); + } +} + +/** + * This class specifies all requirements and optional recommendations that + * are necessary to run the Symfony Standard Edition. + * + * @author Tobias Schultze <http://tobion.de> + * @author Fabien Potencier <fabien@symfony.com> + */ +class SymfonyRequirements extends RequirementCollection +{ + const LEGACY_REQUIRED_PHP_VERSION = '5.3.3'; + const REQUIRED_PHP_VERSION = '5.5.9'; + + /** + * Constructor that initializes the requirements. + */ + public function __construct() + { + /* mandatory requirements follow */ + + $installedPhpVersion = phpversion(); + $requiredPhpVersion = $this->getPhpRequiredVersion(); + + $this->addRecommendation( + $requiredPhpVersion, + 'Vendors should be installed in order to check all requirements.', + 'Run the <code>composer install</code> command.', + 'Run the "composer install" command.' + ); + + if (false !== $requiredPhpVersion) { + $this->addRequirement( + version_compare($installedPhpVersion, $requiredPhpVersion, '>='), + sprintf('PHP version must be at least %s (%s installed)', $requiredPhpVersion, $installedPhpVersion), + sprintf('You are running PHP version "<strong>%s</strong>", but Symfony needs at least PHP "<strong>%s</strong>" to run. + Before using Symfony, upgrade your PHP installation, preferably to the latest version.', + $installedPhpVersion, $requiredPhpVersion), + sprintf('Install PHP %s or newer (installed version is %s)', $requiredPhpVersion, $installedPhpVersion) + ); + } + + $this->addRequirement( + version_compare($installedPhpVersion, '5.3.16', '!='), + 'PHP version must not be 5.3.16 as Symfony won\'t work properly with it', + 'Install PHP 5.3.17 or newer (or downgrade to an earlier PHP version)' + ); + + $this->addRequirement( + is_dir(__DIR__.'/../vendor/composer'), + 'Vendor libraries must be installed', + 'Vendor libraries are missing. Install composer following instructions from <a href="http://getcomposer.org/">http://getcomposer.org/</a>. '. + 'Then run "<strong>php composer.phar install</strong>" to install them.' + ); + + $cacheDir = is_dir(__DIR__.'/../var/cache') ? __DIR__.'/../var/cache' : __DIR__.'/cache'; + + $this->addRequirement( + is_writable($cacheDir), + 'app/cache/ or var/cache/ directory must be writable', + 'Change the permissions of either "<strong>app/cache/</strong>" or "<strong>var/cache/</strong>" directory so that the web server can write into it.' + ); + + $logsDir = is_dir(__DIR__.'/../var/logs') ? __DIR__.'/../var/logs' : __DIR__.'/logs'; + + $this->addRequirement( + is_writable($logsDir), + 'app/logs/ or var/logs/ directory must be writable', + 'Change the permissions of either "<strong>app/logs/</strong>" or "<strong>var/logs/</strong>" directory so that the web server can write into it.' + ); + + if (version_compare($installedPhpVersion, '7.0.0', '<')) { + $this->addPhpIniRequirement( + 'date.timezone', true, false, + 'date.timezone setting must be set', + 'Set the "<strong>date.timezone</strong>" setting in php.ini<a href="#phpini">*</a> (like Europe/Paris).' + ); + } + + if (false !== $requiredPhpVersion && version_compare($installedPhpVersion, $requiredPhpVersion, '>=')) { + $timezones = array(); + foreach (DateTimeZone::listAbbreviations() as $abbreviations) { + foreach ($abbreviations as $abbreviation) { + $timezones[$abbreviation['timezone_id']] = true; + } + } + + $this->addRequirement( + isset($timezones[@date_default_timezone_get()]), + sprintf('Configured default timezone "%s" must be supported by your installation of PHP', @date_default_timezone_get()), + 'Your default timezone is not supported by PHP. Check for typos in your <strong>php.ini</strong> file and have a look at the list of deprecated timezones at <a href="http://php.net/manual/en/timezones.others.php">http://php.net/manual/en/timezones.others.php</a>.' + ); + } + + $this->addRequirement( + function_exists('iconv'), + 'iconv() must be available', + 'Install and enable the <strong>iconv</strong> extension.' + ); + + $this->addRequirement( + function_exists('json_encode'), + 'json_encode() must be available', + 'Install and enable the <strong>JSON</strong> extension.' + ); + + $this->addRequirement( + function_exists('session_start'), + 'session_start() must be available', + 'Install and enable the <strong>session</strong> extension.' + ); + + $this->addRequirement( + function_exists('ctype_alpha'), + 'ctype_alpha() must be available', + 'Install and enable the <strong>ctype</strong> extension.' + ); + + $this->addRequirement( + function_exists('token_get_all'), + 'token_get_all() must be available', + 'Install and enable the <strong>Tokenizer</strong> extension.' + ); + + $this->addRequirement( + function_exists('simplexml_import_dom'), + 'simplexml_import_dom() must be available', + 'Install and enable the <strong>SimpleXML</strong> extension.' + ); + + if (function_exists('apc_store') && ini_get('apc.enabled')) { + if (version_compare($installedPhpVersion, '5.4.0', '>=')) { + $this->addRequirement( + version_compare(phpversion('apc'), '3.1.13', '>='), + 'APC version must be at least 3.1.13 when using PHP 5.4', + 'Upgrade your <strong>APC</strong> extension (3.1.13+).' + ); + } else { + $this->addRequirement( + version_compare(phpversion('apc'), '3.0.17', '>='), + 'APC version must be at least 3.0.17', + 'Upgrade your <strong>APC</strong> extension (3.0.17+).' + ); + } + } + + $this->addPhpIniRequirement('detect_unicode', false); + + if (extension_loaded('suhosin')) { + $this->addPhpIniRequirement( + 'suhosin.executor.include.whitelist', + create_function('$cfgValue', 'return false !== stripos($cfgValue, "phar");'), + false, + 'suhosin.executor.include.whitelist must be configured correctly in php.ini', + 'Add "<strong>phar</strong>" to <strong>suhosin.executor.include.whitelist</strong> in php.ini<a href="#phpini">*</a>.' + ); + } + + if (extension_loaded('xdebug')) { + $this->addPhpIniRequirement( + 'xdebug.show_exception_trace', false, true + ); + + $this->addPhpIniRequirement( + 'xdebug.scream', false, true + ); + + $this->addPhpIniRecommendation( + 'xdebug.max_nesting_level', + create_function('$cfgValue', 'return $cfgValue > 100;'), + true, + 'xdebug.max_nesting_level should be above 100 in php.ini', + 'Set "<strong>xdebug.max_nesting_level</strong>" to e.g. "<strong>250</strong>" in php.ini<a href="#phpini">*</a> to stop Xdebug\'s infinite recursion protection erroneously throwing a fatal error in your project.' + ); + } + + $pcreVersion = defined('PCRE_VERSION') ? (float) PCRE_VERSION : null; + + $this->addRequirement( + null !== $pcreVersion, + 'PCRE extension must be available', + 'Install the <strong>PCRE</strong> extension (version 8.0+).' + ); + + if (extension_loaded('mbstring')) { + $this->addPhpIniRequirement( + 'mbstring.func_overload', + create_function('$cfgValue', 'return (int) $cfgValue === 0;'), + true, + 'string functions should not be overloaded', + 'Set "<strong>mbstring.func_overload</strong>" to <strong>0</strong> in php.ini<a href="#phpini">*</a> to disable function overloading by the mbstring extension.' + ); + } + + /* optional recommendations follow */ + + if (file_exists(__DIR__.'/../vendor/composer')) { + require_once __DIR__.'/../vendor/autoload.php'; + + try { + $r = new ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle'); + + $contents = file_get_contents(dirname($r->getFileName()).'/Resources/skeleton/app/SymfonyRequirements.php'); + } catch (ReflectionException $e) { + $contents = ''; + } + $this->addRecommendation( + file_get_contents(__FILE__) === $contents, + 'Requirements file should be up-to-date', + 'Your requirements file is outdated. Run composer install and re-check your configuration.' + ); + } + + $this->addRecommendation( + version_compare($installedPhpVersion, '5.3.4', '>='), + 'You should use at least PHP 5.3.4 due to PHP bug #52083 in earlier versions', + 'Your project might malfunction randomly due to PHP bug #52083 ("Notice: Trying to get property of non-object"). Install PHP 5.3.4 or newer.' + ); + + $this->addRecommendation( + version_compare($installedPhpVersion, '5.3.8', '>='), + 'When using annotations you should have at least PHP 5.3.8 due to PHP bug #55156', + 'Install PHP 5.3.8 or newer if your project uses annotations.' + ); + + $this->addRecommendation( + version_compare($installedPhpVersion, '5.4.0', '!='), + 'You should not use PHP 5.4.0 due to the PHP bug #61453', + 'Your project might not work properly due to the PHP bug #61453 ("Cannot dump definitions which have method calls"). Install PHP 5.4.1 or newer.' + ); + + $this->addRecommendation( + version_compare($installedPhpVersion, '5.4.11', '>='), + 'When using the logout handler from the Symfony Security Component, you should have at least PHP 5.4.11 due to PHP bug #63379 (as a workaround, you can also set invalidate_session to false in the security logout handler configuration)', + 'Install PHP 5.4.11 or newer if your project uses the logout handler from the Symfony Security Component.' + ); + + $this->addRecommendation( + (version_compare($installedPhpVersion, '5.3.18', '>=') && version_compare($installedPhpVersion, '5.4.0', '<')) + || + version_compare($installedPhpVersion, '5.4.8', '>='), + 'You should use PHP 5.3.18+ or PHP 5.4.8+ to always get nice error messages for fatal errors in the development environment due to PHP bug #61767/#60909', + 'Install PHP 5.3.18+ or PHP 5.4.8+ if you want nice error messages for all fatal errors in the development environment.' + ); + + if (null !== $pcreVersion) { + $this->addRecommendation( + $pcreVersion >= 8.0, + sprintf('PCRE extension should be at least version 8.0 (%s installed)', $pcreVersion), + '<strong>PCRE 8.0+</strong> is preconfigured in PHP since 5.3.2 but you are using an outdated version of it. Symfony probably works anyway but it is recommended to upgrade your PCRE extension.' + ); + } + + $this->addRecommendation( + class_exists('DomDocument'), + 'PHP-DOM and PHP-XML modules should be installed', + 'Install and enable the <strong>PHP-DOM</strong> and the <strong>PHP-XML</strong> modules.' + ); + + $this->addRecommendation( + function_exists('mb_strlen'), + 'mb_strlen() should be available', + 'Install and enable the <strong>mbstring</strong> extension.' + ); + + $this->addRecommendation( + function_exists('utf8_decode'), + 'utf8_decode() should be available', + 'Install and enable the <strong>XML</strong> extension.' + ); + + $this->addRecommendation( + function_exists('filter_var'), + 'filter_var() should be available', + 'Install and enable the <strong>filter</strong> extension.' + ); + + if (!defined('PHP_WINDOWS_VERSION_BUILD')) { + $this->addRecommendation( + function_exists('posix_isatty'), + 'posix_isatty() should be available', + 'Install and enable the <strong>php_posix</strong> extension (used to colorize the CLI output).' + ); + } + + $this->addRecommendation( + extension_loaded('intl'), + 'intl extension should be available', + 'Install and enable the <strong>intl</strong> extension (used for validators).' + ); + + if (extension_loaded('intl')) { + // in some WAMP server installations, new Collator() returns null + $this->addRecommendation( + null !== new Collator('fr_FR'), + 'intl extension should be correctly configured', + 'The intl extension does not behave properly. This problem is typical on PHP 5.3.X x64 WIN builds.' + ); + + // check for compatible ICU versions (only done when you have the intl extension) + if (defined('INTL_ICU_VERSION')) { + $version = INTL_ICU_VERSION; + } else { + $reflector = new ReflectionExtension('intl'); + + ob_start(); + $reflector->info(); + $output = strip_tags(ob_get_clean()); + + preg_match('/^ICU version +(?:=> )?(.*)$/m', $output, $matches); + $version = $matches[1]; + } + + $this->addRecommendation( + version_compare($version, '4.0', '>='), + 'intl ICU version should be at least 4+', + 'Upgrade your <strong>intl</strong> extension with a newer ICU version (4+).' + ); + + if (class_exists('Symfony\Component\Intl\Intl')) { + $this->addRecommendation( + \Symfony\Component\Intl\Intl::getIcuDataVersion() <= \Symfony\Component\Intl\Intl::getIcuVersion(), + sprintf('intl ICU version installed on your system is outdated (%s) and does not match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()), + 'To get the latest internationalization data upgrade the ICU system package and the intl PHP extension.' + ); + if (\Symfony\Component\Intl\Intl::getIcuDataVersion() <= \Symfony\Component\Intl\Intl::getIcuVersion()) { + $this->addRecommendation( + \Symfony\Component\Intl\Intl::getIcuDataVersion() === \Symfony\Component\Intl\Intl::getIcuVersion(), + sprintf('intl ICU version installed on your system (%s) does not match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()), + 'To avoid internationalization data inconsistencies upgrade the symfony/intl component.' + ); + } + } + + $this->addPhpIniRecommendation( + 'intl.error_level', + create_function('$cfgValue', 'return (int) $cfgValue === 0;'), + true, + 'intl.error_level should be 0 in php.ini', + 'Set "<strong>intl.error_level</strong>" to "<strong>0</strong>" in php.ini<a href="#phpini">*</a> to inhibit the messages when an error occurs in ICU functions.' + ); + } + + $accelerator = + (extension_loaded('eaccelerator') && ini_get('eaccelerator.enable')) + || + (extension_loaded('apc') && ini_get('apc.enabled')) + || + (extension_loaded('Zend Optimizer+') && ini_get('zend_optimizerplus.enable')) + || + (extension_loaded('Zend OPcache') && ini_get('opcache.enable')) + || + (extension_loaded('xcache') && ini_get('xcache.cacher')) + || + (extension_loaded('wincache') && ini_get('wincache.ocenabled')) + ; + + $this->addRecommendation( + $accelerator, + 'a PHP accelerator should be installed', + 'Install and/or enable a <strong>PHP accelerator</strong> (highly recommended).' + ); + + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $this->addRecommendation( + $this->getRealpathCacheSize() >= 5 * 1024 * 1024, + 'realpath_cache_size should be at least 5M in php.ini', + 'Setting "<strong>realpath_cache_size</strong>" to e.g. "<strong>5242880</strong>" or "<strong>5M</strong>" in php.ini<a href="#phpini">*</a> may improve performance on Windows significantly in some cases.' + ); + } + + $this->addPhpIniRecommendation('short_open_tag', false); + + $this->addPhpIniRecommendation('magic_quotes_gpc', false, true); + + $this->addPhpIniRecommendation('register_globals', false, true); + + $this->addPhpIniRecommendation('session.auto_start', false); + + $this->addRecommendation( + class_exists('PDO'), + 'PDO should be installed', + 'Install <strong>PDO</strong> (mandatory for Doctrine).' + ); + + if (class_exists('PDO')) { + $drivers = PDO::getAvailableDrivers(); + $this->addRecommendation( + count($drivers) > 0, + sprintf('PDO should have some drivers installed (currently available: %s)', count($drivers) ? implode(', ', $drivers) : 'none'), + 'Install <strong>PDO drivers</strong> (mandatory for Doctrine).' + ); + } + } + + /** + * Loads realpath_cache_size from php.ini and converts it to int. + * + * (e.g. 16k is converted to 16384 int) + * + * @return int + */ + protected function getRealpathCacheSize() + { + $size = ini_get('realpath_cache_size'); + $size = trim($size); + $unit = ''; + if (!ctype_digit($size)) { + $unit = strtolower(substr($size, -1, 1)); + $size = (int) substr($size, 0, -1); + } + switch ($unit) { + case 'g': + return $size * 1024 * 1024 * 1024; + case 'm': + return $size * 1024 * 1024; + case 'k': + return $size * 1024; + default: + return (int) $size; + } + } + + /** + * Defines PHP required version from Symfony version. + * + * @return string|false The PHP required version or false if it could not be guessed + */ + protected function getPhpRequiredVersion() + { + if (!file_exists($path = __DIR__.'/../composer.lock')) { + return false; + } + + $composerLock = json_decode(file_get_contents($path), true); + foreach ($composerLock['packages'] as $package) { + $name = $package['name']; + if ('symfony/symfony' !== $name && 'symfony/http-kernel' !== $name) { + continue; + } + + return (int) $package['version'][1] > 2 ? self::REQUIRED_PHP_VERSION : self::LEGACY_REQUIRED_PHP_VERSION; + } + + return false; + } +} diff --git a/symfony-3.3-micro/var/cache/.gitkeep b/symfony-3.3-micro/var/cache/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/symfony-3.3-micro/var/logs/.gitkeep b/symfony-3.3-micro/var/logs/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/symfony-3.3-micro/var/sessions/.gitkeep b/symfony-3.3-micro/var/sessions/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/symfony-3.3-micro/web/micro.php b/symfony-3.3-micro/web/micro.php new file mode 100644 index 000000000..37af6654d --- /dev/null +++ b/symfony-3.3-micro/web/micro.php @@ -0,0 +1,19 @@ +<?php + +use Symfony\Component\HttpFoundation\Request; + +/** + * @var Composer\Autoload\ClassLoader + */ +$loader = require __DIR__ . '/../app/autoload.php'; +include_once __DIR__ . '/../var/bootstrap.php.cache'; + +$kernel = new AppKernel('prod', false); +$kernel->loadClassCache(); + +$request = Request::createFromGlobals(); +$response = $kernel->handle($request); +$response->send(); +$kernel->terminate($request, $response); + +require __DIR__ . '/../../libs/output_data.php'; diff --git a/symfony-3.3/.gitignore b/symfony-3.3/.gitignore new file mode 100644 index 000000000..93821ad1c --- /dev/null +++ b/symfony-3.3/.gitignore @@ -0,0 +1,16 @@ +/app/config/parameters.yml +/build/ +/phpunit.xml +/var/* +!/var/cache +/var/cache/* +!var/cache/.gitkeep +!/var/logs +/var/logs/* +!var/logs/.gitkeep +!/var/sessions +/var/sessions/* +!var/sessions/.gitkeep +!var/SymfonyRequirements.php +/vendor/ +/web/bundles/ diff --git a/symfony-3.3/README.md b/symfony-3.3/README.md new file mode 100644 index 000000000..839b7e5f8 --- /dev/null +++ b/symfony-3.3/README.md @@ -0,0 +1,4 @@ +symfony-3.3 +=========== + +A Symfony project diff --git a/symfony-3.3/_benchmark/hello_world.sh b/symfony-3.3/_benchmark/hello_world.sh new file mode 100644 index 000000000..9e6369133 --- /dev/null +++ b/symfony-3.3/_benchmark/hello_world.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +url="$base/$fw/web/app.php/hello/index" diff --git a/symfony-3.3/_benchmark/setup.sh b/symfony-3.3/_benchmark/setup.sh new file mode 100644 index 000000000..0244cd4d5 --- /dev/null +++ b/symfony-3.3/_benchmark/setup.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +export SYMFONY_ENV=prod +composer install --no-dev --optimize-autoloader +php bin/console cache:clear --env=prod --no-debug --no-warmup +php bin/console cache:warmup --env=prod --no-debug +chmod o+w var/cache/ var/logs/ +chmod -R o+w var/cache/* diff --git a/symfony-3.3/app/AppCache.php b/symfony-3.3/app/AppCache.php new file mode 100644 index 000000000..639ec2cd7 --- /dev/null +++ b/symfony-3.3/app/AppCache.php @@ -0,0 +1,7 @@ +<?php + +use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache; + +class AppCache extends HttpCache +{ +} diff --git a/symfony-3.3/app/AppKernel.php b/symfony-3.3/app/AppKernel.php new file mode 100644 index 000000000..3789b326e --- /dev/null +++ b/symfony-3.3/app/AppKernel.php @@ -0,0 +1,50 @@ +<?php + +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\Config\Loader\LoaderInterface; + +class AppKernel extends Kernel +{ + public function registerBundles() + { + $bundles = [ + new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), + new Symfony\Bundle\SecurityBundle\SecurityBundle(), + new Symfony\Bundle\TwigBundle\TwigBundle(), + new Symfony\Bundle\MonologBundle\MonologBundle(), + new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), + new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), + new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), + new AppBundle\AppBundle(), + ]; + + if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { + $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); + $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); + $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); + $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); + } + + return $bundles; + } + + public function getRootDir() + { + return __DIR__; + } + + public function getCacheDir() + { + return dirname(__DIR__).'/var/cache/'.$this->getEnvironment(); + } + + public function getLogDir() + { + return dirname(__DIR__).'/var/logs'; + } + + public function registerContainerConfiguration(LoaderInterface $loader) + { + $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); + } +} diff --git a/symfony-3.3/app/Resources/views/base.html.twig b/symfony-3.3/app/Resources/views/base.html.twig new file mode 100644 index 000000000..bafd28d3b --- /dev/null +++ b/symfony-3.3/app/Resources/views/base.html.twig @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="UTF-8" /> + <title>{% block title %}Welcome!{% endblock %}</title> + {% block stylesheets %}{% endblock %} + <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" /> + </head> + <body> + {% block body %}{% endblock %} + {% block javascripts %}{% endblock %} + </body> +</html> diff --git a/symfony-3.3/app/Resources/views/default/index.html.twig b/symfony-3.3/app/Resources/views/default/index.html.twig new file mode 100644 index 000000000..7319df7f8 --- /dev/null +++ b/symfony-3.3/app/Resources/views/default/index.html.twig @@ -0,0 +1,76 @@ +{% extends 'base.html.twig' %} + +{% block body %} + <div id="wrapper"> + <div id="container"> + <div id="welcome"> + <h1><span>Welcome to</span> Symfony {{ constant('Symfony\\Component\\HttpKernel\\Kernel::VERSION') }}</h1> + </div> + + <div id="status"> + <p> + <svg id="icon-status" width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1671 566q0 40-28 68l-724 724-136 136q-28 28-68 28t-68-28l-136-136-362-362q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 295 656-657q28-28 68-28t68 28l136 136q28 28 28 68z" fill="#759E1A"/></svg> + + Your application is now ready. You can start working on it at: + <code>{{ base_dir }}/</code> + </p> + </div> + + <div id="next"> + <h2>What's next?</h2> + <p> + <svg id="icon-book" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="-12.5 9 64 64" enable-background="new -12.5 9 64 64" xml:space="preserve"> + <path fill="#AAA" d="M6.8,40.8c2.4,0.8,4.5-0.7,4.9-2.5c0.2-1.2-0.3-2.1-1.3-3.2l-0.8-0.8c-0.4-0.5-0.6-1.3-0.2-1.9 + c0.4-0.5,0.9-0.8,1.8-0.5c1.3,0.4,1.9,1.3,2.9,2.2c-0.4,1.4-0.7,2.9-0.9,4.2l-0.2,1c-0.7,4-1.3,6.2-2.7,7.5 + c-0.3,0.3-0.7,0.5-1.3,0.6c-0.3,0-0.4-0.3-0.4-0.3c0-0.3,0.2-0.3,0.3-0.4c0.2-0.1,0.5-0.3,0.4-0.8c0-0.7-0.6-1.3-1.3-1.3 + c-0.6,0-1.4,0.6-1.4,1.7s1,1.9,2.4,1.8c0.8,0,2.5-0.3,4.2-2.5c2-2.5,2.5-5.4,2.9-7.4l0.5-2.8c0.3,0,0.5,0.1,0.8,0.1 + c2.4,0.1,3.7-1.3,3.7-2.3c0-0.6-0.3-1.2-0.9-1.2c-0.4,0-0.8,0.3-1,0.8c-0.1,0.6,0.8,1.1,0.1,1.5c-0.5,0.3-1.4,0.6-2.7,0.4l0.3-1.3 + c0.5-2.6,1-5.7,3.2-5.8c0.2,0,0.8,0,0.8,0.4c0,0.2,0,0.2-0.2,0.5c-0.2,0.3-0.3,0.4-0.2,0.7c0,0.7,0.5,1.1,1.2,1.1 + c0.9,0,1.2-1,1.2-1.4c0-1.2-1.2-1.8-2.6-1.8c-1.5,0.1-2.8,0.9-3.7,2.1c-1.1,1.3-1.8,2.9-2.3,4.5c-0.9-0.8-1.6-1.8-3.1-2.3 + c-1.1-0.7-2.3-0.5-3.4,0.3c-0.5,0.4-0.8,1-1,1.6c-0.4,1.5,0.4,2.9,0.8,3.4l0.9,1c0.2,0.2,0.6,0.8,0.4,1.5c-0.3,0.8-1.2,1.3-2.1,1 + c-0.4-0.2-1-0.5-0.9-0.9c0.1-0.2,0.2-0.3,0.3-0.5s0.1-0.3,0.1-0.3c0.2-0.6-0.1-1.4-0.7-1.6c-0.6-0.2-1.2,0-1.3,0.8 + C4.3,38.4,4.7,40,6.8,40.8z M46.1,20.9c0-4.2-3.2-7.5-7.1-7.5h-3.8C34.8,10.8,32.7,9,30.2,9L-2.3,9.1c-2.8,0.1-4.9,2.4-4.9,5.4 + L-7,58.6c0,4.8,8.1,13.9,11.6,14.1l34.7-0.1c3.9,0,7-3.4,7-7.6L46.1,20.9z M-0.3,36.4c0-8.6,6.5-15.6,14.5-15.6 + c8,0,14.5,7,14.5,15.6S22.1,52,14.2,52C6.1,52-0.3,45-0.3,36.4z M42.1,65.1c0,1.8-1.5,3.1-3.1,3.1H4.6c-0.7,0-3-1.8-4.5-4.4h30.4 + c2.8,0,5-2.4,5-5.4V17.9h3.7c1.6,0,2.9,1.4,2.9,3.1V65.1L42.1,65.1z"/> + </svg> + + Read the documentation to learn + <a href="http://symfony.com/doc/{{ constant('Symfony\\Component\\HttpKernel\\Kernel::VERSION')[:3] }}/book/page_creation.html"> + How to create your first page in Symfony + </a> + </p> + </div> + + </div> + </div> +{% endblock %} + +{% block stylesheets %} +<style> + body { background: #F5F5F5; font: 18px/1.5 sans-serif; } + h1, h2 { line-height: 1.2; margin: 0 0 .5em; } + h1 { font-size: 36px; } + h2 { font-size: 21px; margin-bottom: 1em; } + p { margin: 0 0 1em 0; } + a { color: #0000F0; } + a:hover { text-decoration: none; } + code { background: #F5F5F5; max-width: 100px; padding: 2px 6px; word-wrap: break-word; } + #wrapper { background: #FFF; margin: 1em auto; max-width: 800px; width: 95%; } + #container { padding: 2em; } + #welcome, #status { margin-bottom: 2em; } + #welcome h1 span { display: block; font-size: 75%; } + #icon-status, #icon-book { float: left; height: 64px; margin-right: 1em; margin-top: -4px; width: 64px; } + #icon-book { display: none; } + + @media (min-width: 768px) { + #wrapper { width: 80%; margin: 2em auto; } + #icon-book { display: inline-block; } + #status a, #next a { display: block; } + + @-webkit-keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } + @keyframes fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } + .sf-toolbar { opacity: 0; -webkit-animation: fade-in 1s .2s forwards; animation: fade-in 1s .2s forwards;} + } +</style> +{% endblock %} diff --git a/symfony-3.3/app/autoload.php b/symfony-3.3/app/autoload.php new file mode 100644 index 000000000..fa582ecd0 --- /dev/null +++ b/symfony-3.3/app/autoload.php @@ -0,0 +1,13 @@ +<?php + +use Doctrine\Common\Annotations\AnnotationRegistry; +use Composer\Autoload\ClassLoader; + +/** + * @var ClassLoader $loader + */ +$loader = require __DIR__.'/../vendor/autoload.php'; + +AnnotationRegistry::registerLoader([$loader, 'loadClass']); + +return $loader; diff --git a/symfony-3.3/app/config/config.yml b/symfony-3.3/app/config/config.yml new file mode 100644 index 000000000..3292445f9 --- /dev/null +++ b/symfony-3.3/app/config/config.yml @@ -0,0 +1,68 @@ +imports: + - { resource: parameters.yml } + - { resource: security.yml } + - { resource: services.yml } + +# Put parameters here that don't need to change on each machine where the app is deployed +# http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration +parameters: + locale: en + +framework: + #esi: ~ + #translator: { fallbacks: ["%locale%"] } + secret: "%secret%" + router: + resource: "%kernel.root_dir%/config/routing.yml" + strict_requirements: ~ + form: ~ + csrf_protection: ~ + validation: { enable_annotations: true } + #serializer: { enable_annotations: true } + templating: + engines: ['twig'] + default_locale: "%locale%" + trusted_hosts: ~ + trusted_proxies: ~ + session: + # http://symfony.com/doc/current/reference/configuration/framework.html#handler-id + handler_id: session.handler.native_file + save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%" + fragments: ~ + http_method_override: true + assets: ~ + +# Twig Configuration +twig: + debug: "%kernel.debug%" + strict_variables: "%kernel.debug%" + +# Doctrine Configuration +doctrine: + dbal: + driver: pdo_mysql + host: "%database_host%" + port: "%database_port%" + dbname: "%database_name%" + user: "%database_user%" + password: "%database_password%" + charset: UTF8 + # if using pdo_sqlite as your database driver: + # 1. add the path in parameters.yml + # e.g. database_path: "%kernel.root_dir%/data/data.db3" + # 2. Uncomment database_path in parameters.yml.dist + # 3. Uncomment next line: + # path: "%database_path%" + + orm: + auto_generate_proxy_classes: "%kernel.debug%" + naming_strategy: doctrine.orm.naming_strategy.underscore + auto_mapping: true + +# Swiftmailer Configuration +swiftmailer: + transport: "%mailer_transport%" + host: "%mailer_host%" + username: "%mailer_user%" + password: "%mailer_password%" + spool: { type: memory } diff --git a/symfony-3.3/app/config/config_dev.yml b/symfony-3.3/app/config/config_dev.yml new file mode 100644 index 000000000..7eb4739c0 --- /dev/null +++ b/symfony-3.3/app/config/config_dev.yml @@ -0,0 +1,34 @@ +imports: + - { resource: config.yml } + +framework: + router: + resource: "%kernel.root_dir%/config/routing_dev.yml" + strict_requirements: true + profiler: { only_exceptions: false } + +web_profiler: + toolbar: true + intercept_redirects: false + +monolog: + handlers: + main: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug + channels: [!event] + console: + type: console + channels: [!event, !doctrine] + # uncomment to get logging in your browser + # you may have to allow bigger header sizes in your Web server configuration + #firephp: + # type: firephp + # level: info + #chromephp: + # type: chromephp + # level: info + +#swiftmailer: +# delivery_address: me@example.com diff --git a/symfony-3.3/app/config/config_prod.yml b/symfony-3.3/app/config/config_prod.yml new file mode 100644 index 000000000..83ef6d6e5 --- /dev/null +++ b/symfony-3.3/app/config/config_prod.yml @@ -0,0 +1,27 @@ +imports: + - { resource: config.yml } + +#framework: +# validation: +# cache: validator.mapping.cache.doctrine.apc +# serializer: +# cache: serializer.mapping.cache.doctrine.apc + +#doctrine: +# orm: +# metadata_cache_driver: apc +# result_cache_driver: apc +# query_cache_driver: apc + +monolog: + handlers: + main: + type: fingers_crossed + action_level: error + handler: nested + nested: + type: stream + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: debug + console: + type: console diff --git a/symfony-3.3/app/config/config_test.yml b/symfony-3.3/app/config/config_test.yml new file mode 100644 index 000000000..2f6d92503 --- /dev/null +++ b/symfony-3.3/app/config/config_test.yml @@ -0,0 +1,16 @@ +imports: + - { resource: config_dev.yml } + +framework: + test: ~ + session: + storage_id: session.storage.mock_file + profiler: + collect: false + +web_profiler: + toolbar: false + intercept_redirects: false + +swiftmailer: + disable_delivery: true diff --git a/symfony-3.3/app/config/parameters.yml.dist b/symfony-3.3/app/config/parameters.yml.dist new file mode 100644 index 000000000..886c92bb8 --- /dev/null +++ b/symfony-3.3/app/config/parameters.yml.dist @@ -0,0 +1,19 @@ +# This file is a "template" of what your parameters.yml file should look like +# Set parameters here that may be different on each deployment target of the app, e.g. development, staging, production. +# http://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration +parameters: + database_host: 127.0.0.1 + database_port: ~ + database_name: symfony + database_user: root + database_password: ~ + # You should uncomment this if you want use pdo_sqlite + # database_path: "%kernel.root_dir%/data.db3" + + mailer_transport: smtp + mailer_host: 127.0.0.1 + mailer_user: ~ + mailer_password: ~ + + # A secret key that's used to generate certain security-related tokens + secret: ThisTokenIsNotSoSecretChangeIt diff --git a/symfony-3.3/app/config/routing.yml b/symfony-3.3/app/config/routing.yml new file mode 100644 index 000000000..8eadc31ae --- /dev/null +++ b/symfony-3.3/app/config/routing.yml @@ -0,0 +1,3 @@ +app: + resource: "@AppBundle/Controller/" + type: annotation diff --git a/symfony-3.3/app/config/routing_dev.yml b/symfony-3.3/app/config/routing_dev.yml new file mode 100644 index 000000000..404f6a3bc --- /dev/null +++ b/symfony-3.3/app/config/routing_dev.yml @@ -0,0 +1,14 @@ +_wdt: + resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" + prefix: /_wdt + +_profiler: + resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" + prefix: /_profiler + +_errors: + resource: "@TwigBundle/Resources/config/routing/errors.xml" + prefix: /_error + +_main: + resource: routing.yml diff --git a/symfony-3.3/app/config/security.yml b/symfony-3.3/app/config/security.yml new file mode 100644 index 000000000..8072372c4 --- /dev/null +++ b/symfony-3.3/app/config/security.yml @@ -0,0 +1,24 @@ +# To get started with security, check out the documentation: +# http://symfony.com/doc/current/book/security.html +security: + + # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers + providers: + in_memory: + memory: ~ + + firewalls: + # disables authentication for assets and the profiler, adapt it according to your needs + dev: + pattern: ^/(_(profiler|wdt)|css|images|js)/ + security: false + + main: + anonymous: ~ + # activate different ways to authenticate + + # http_basic: ~ + # http://symfony.com/doc/current/book/security.html#a-configuring-how-your-users-will-authenticate + + # form_login: ~ + # http://symfony.com/doc/current/cookbook/security/form_login_setup.html diff --git a/symfony-3.3/app/config/services.yml b/symfony-3.3/app/config/services.yml new file mode 100644 index 000000000..5c76fc598 --- /dev/null +++ b/symfony-3.3/app/config/services.yml @@ -0,0 +1,9 @@ +# Learn more about services, parameters and containers at +# http://symfony.com/doc/current/book/service_container.html +parameters: +# parameter_name: value + +services: +# service_name: +# class: AppBundle\Directory\ClassName +# arguments: ["@another_service_name", "plain_value", "%parameter_name%"] diff --git a/symfony-3.3/bin/console b/symfony-3.3/bin/console new file mode 100755 index 000000000..49247c94d --- /dev/null +++ b/symfony-3.3/bin/console @@ -0,0 +1,29 @@ +#!/usr/bin/env php +<?php + +use Symfony\Bundle\FrameworkBundle\Console\Application; +use Symfony\Component\Console\Input\ArgvInput; +use Symfony\Component\Debug\Debug; + +// if you don't want to setup permissions the proper way, just uncomment the following PHP line +// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information +//umask(0000); + +set_time_limit(0); + +/** + * @var Composer\Autoload\ClassLoader $loader + */ +$loader = require __DIR__.'/../app/autoload.php'; + +$input = new ArgvInput(); +$env = $input->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($kernel); +$application->run($input); diff --git a/symfony-3.3/bin/symfony_requirements b/symfony-3.3/bin/symfony_requirements new file mode 100755 index 000000000..a7bf65a1b --- /dev/null +++ b/symfony-3.3/bin/symfony_requirements @@ -0,0 +1,146 @@ +#!/usr/bin/env php +<?php + +require_once dirname(__FILE__).'/../var/SymfonyRequirements.php'; + +$lineSize = 70; +$symfonyRequirements = new SymfonyRequirements(); +$iniPath = $symfonyRequirements->getPhpIniConfigPath(); + +echo_title('Symfony Requirements Checker'); + +echo '> PHP is using the following php.ini file:'.PHP_EOL; +if ($iniPath) { + echo_style('green', ' '.$iniPath); +} else { + echo_style('yellow', ' WARNING: No configuration file (php.ini) used by PHP!'); +} + +echo PHP_EOL.PHP_EOL; + +echo '> Checking Symfony requirements:'.PHP_EOL.' '; + +$messages = array(); +foreach ($symfonyRequirements->getRequirements() as $req) { + if ($helpText = get_error_message($req, $lineSize)) { + echo_style('red', 'E'); + $messages['error'][] = $helpText; + } else { + echo_style('green', '.'); + } +} + +$checkPassed = empty($messages['error']); + +foreach ($symfonyRequirements->getRecommendations() as $req) { + if ($helpText = get_error_message($req, $lineSize)) { + echo_style('yellow', 'W'); + $messages['warning'][] = $helpText; + } else { + echo_style('green', '.'); + } +} + +if ($checkPassed) { + echo_block('success', 'OK', 'Your system is ready to run Symfony projects'); +} else { + echo_block('error', 'ERROR', 'Your system is not ready to run Symfony projects'); + + echo_title('Fix the following mandatory requirements', 'red'); + + foreach ($messages['error'] as $helpText) { + echo ' * '.$helpText.PHP_EOL; + } +} + +if (!empty($messages['warning'])) { + echo_title('Optional recommendations to improve your setup', 'yellow'); + + foreach ($messages['warning'] as $helpText) { + echo ' * '.$helpText.PHP_EOL; + } +} + +echo PHP_EOL; +echo_style('title', 'Note'); +echo ' The command console could use a different php.ini file'.PHP_EOL; +echo_style('title', '~~~~'); +echo ' than the one used with your web server. To be on the'.PHP_EOL; +echo ' safe side, please check the requirements from your web'.PHP_EOL; +echo ' server using the '; +echo_style('yellow', 'web/config.php'); +echo ' script.'.PHP_EOL; +echo PHP_EOL; + +exit($checkPassed ? 0 : 1); + +function get_error_message(Requirement $requirement, $lineSize) +{ + if ($requirement->isFulfilled()) { + return; + } + + $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL; + $errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL; + + return $errorMessage; +} + +function echo_title($title, $style = null) +{ + $style = $style ?: 'title'; + + echo PHP_EOL; + echo_style($style, $title.PHP_EOL); + echo_style($style, str_repeat('~', strlen($title)).PHP_EOL); + echo PHP_EOL; +} + +function echo_style($style, $message) +{ + // ANSI color codes + $styles = array( + 'reset' => "\033[0m", + 'red' => "\033[31m", + 'green' => "\033[32m", + 'yellow' => "\033[33m", + 'error' => "\033[37;41m", + 'success' => "\033[37;42m", + 'title' => "\033[34m", + ); + $supports = has_color_support(); + + echo($supports ? $styles[$style] : '').$message.($supports ? $styles['reset'] : ''); +} + +function echo_block($style, $title, $message) +{ + $message = ' '.trim($message).' '; + $width = strlen($message); + + echo PHP_EOL.PHP_EOL; + + echo_style($style, str_repeat(' ', $width)); + echo PHP_EOL; + echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT)); + echo PHP_EOL; + echo_style($style, $message); + echo PHP_EOL; + echo_style($style, str_repeat(' ', $width)); + echo PHP_EOL; +} + +function has_color_support() +{ + static $support; + + if (null === $support) { + if (DIRECTORY_SEPARATOR == '\\') { + $support = false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); + } else { + $support = function_exists('posix_isatty') && @posix_isatty(STDOUT); + } + } + + return $support; +} diff --git a/symfony-3.3/composer.json b/symfony-3.3/composer.json new file mode 100644 index 000000000..e6fc6a14a --- /dev/null +++ b/symfony-3.3/composer.json @@ -0,0 +1,69 @@ +{ + "name": "kenji/symfony.3.3", + "license": "proprietary", + "type": "project", + "autoload": { + "psr-4": { + "": "src/" + }, + "classmap": [ + "app/AppKernel.php", + "app/AppCache.php" + ] + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + } + }, + "require": { + "php": ">=5.5.9", + "symfony/symfony": "3.3.*", + "doctrine/orm": "^2.5", + "doctrine/doctrine-bundle": "^1.6", + "doctrine/doctrine-cache-bundle": "^1.2", + "symfony/swiftmailer-bundle": "^2.3", + "symfony/monolog-bundle": "^2.8", + "sensio/distribution-bundle": "^5.0", + "sensio/framework-extra-bundle": "^3.0.2", + "incenteev/composer-parameter-handler": "^2.0" + }, + "require-dev": { + "sensio/generator-bundle": "^3.0", + "symfony/phpunit-bridge": "^3.0" + }, + "scripts": { + "post-install-cmd": [ + "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" + ], + "post-update-cmd": [ + "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget" + ] + }, + "config": { + "platform": { + "php": "5.5.9" + } + }, + "extra": { + "symfony-app-dir": "app", + "symfony-bin-dir": "bin", + "symfony-var-dir": "var", + "symfony-web-dir": "web", + "symfony-tests-dir": "tests", + "symfony-assets-install": "relative", + "incenteev-parameters": { + "file": "app/config/parameters.yml" + } + } +} diff --git a/symfony-3.3/composer.lock b/symfony-3.3/composer.lock new file mode 100644 index 000000000..1b35b6c45 --- /dev/null +++ b/symfony-3.3/composer.lock @@ -0,0 +1,2329 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "a723c0e8603b9ee3cc29461e54e74279", + "packages": [ + { + "name": "composer/ca-bundle", + "version": "1.0.7", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/b17e6153cb7f33c7e44eb59578dc12eee5dc8e12", + "reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5", + "psr/log": "^1.0", + "symfony/process": "^2.5 || ^3.0" + }, + "suggest": { + "symfony/process": "This is necessary to reliably check whether openssl_x509_parse is vulnerable on older php versions, but can be ignored on PHP 5.5.6+" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "time": "2017-03-06T11:59:08+00:00" + }, + { + "name": "doctrine/annotations", + "version": "v1.2.7", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "php": ">=5.3.2" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Annotations\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2015-08-31T12:32:49+00:00" + }, + { + "name": "doctrine/cache", + "version": "v1.6.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/eb152c5100571c7a45470ff2a35095ab3f3b900b", + "reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b", + "shasum": "" + }, + "require": { + "php": "~5.5|~7.0" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "phpunit/phpunit": "~4.8|~5.0", + "predis/predis": "~1.0", + "satooshi/php-coveralls": "~0.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Caching library offering an object-oriented API for many cache backends", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "cache", + "caching" + ], + "time": "2017-07-22T12:49:21+00:00" + }, + { + "name": "doctrine/collections", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/collections.git", + "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/collections/zipball/6c1e4eef75f310ea1b3e30945e9f06e652128b8a", + "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Collections\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Collections Abstraction library", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "array", + "collections", + "iterator" + ], + "time": "2015-04-14T22:21:58+00:00" + }, + { + "name": "doctrine/common", + "version": "v2.6.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/common.git", + "reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/7bce00698899aa2c06fe7365c76e4d78ddb15fa3", + "reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3", + "shasum": "" + }, + "require": { + "doctrine/annotations": "1.*", + "doctrine/cache": "1.*", + "doctrine/collections": "1.*", + "doctrine/inflector": "1.*", + "doctrine/lexer": "1.*", + "php": "~5.5|~7.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8|~5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common Library for Doctrine projects", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "collections", + "eventmanager", + "persistence", + "spl" + ], + "time": "2016-11-30T16:50:46+00:00" + }, + { + "name": "doctrine/dbal", + "version": "v2.5.13", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "729340d8d1eec8f01bff708e12e449a3415af873" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/729340d8d1eec8f01bff708e12e449a3415af873", + "reference": "729340d8d1eec8f01bff708e12e449a3415af873", + "shasum": "" + }, + "require": { + "doctrine/common": ">=2.4,<2.8-dev", + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*", + "symfony/console": "2.*||^3.0" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "bin": [ + "bin/doctrine-dbal" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\DBAL\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Database Abstraction Layer", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "dbal", + "persistence", + "queryobject" + ], + "time": "2017-07-22T20:44:48+00:00" + }, + { + "name": "doctrine/doctrine-bundle", + "version": "1.6.8", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineBundle.git", + "reference": "6e96577cbbdbb5b6dcca2ff203d665976b51beb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/6e96577cbbdbb5b6dcca2ff203d665976b51beb0", + "reference": "6e96577cbbdbb5b6dcca2ff203d665976b51beb0", + "shasum": "" + }, + "require": { + "doctrine/dbal": "~2.3", + "doctrine/doctrine-cache-bundle": "~1.2", + "jdorn/sql-formatter": "~1.1", + "php": ">=5.5.9", + "symfony/console": "~2.7|~3.0|~4.0", + "symfony/dependency-injection": "~2.7|~3.0|~4.0", + "symfony/doctrine-bridge": "~2.7|~3.0|~4.0", + "symfony/framework-bundle": "~2.7|~3.0|~4.0" + }, + "require-dev": { + "doctrine/orm": "~2.3", + "phpunit/phpunit": "~4", + "satooshi/php-coveralls": "^1.0", + "symfony/phpunit-bridge": "~2.7|~3.0|~4.0", + "symfony/property-info": "~2.8|~3.0|~4.0", + "symfony/validator": "~2.7|~3.0|~4.0", + "symfony/yaml": "~2.7|~3.0|~4.0", + "twig/twig": "~1.12|~2.0" + }, + "suggest": { + "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", + "symfony/web-profiler-bundle": "To use the data collector." + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\DoctrineBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Doctrine Project", + "homepage": "http://www.doctrine-project.org/" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony DoctrineBundle", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "dbal", + "orm", + "persistence" + ], + "time": "2017-05-18T08:15:18+00:00" + }, + { + "name": "doctrine/doctrine-cache-bundle", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineCacheBundle.git", + "reference": "18c600a9b82f6454d2e81ca4957cdd56a1cf3504" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineCacheBundle/zipball/18c600a9b82f6454d2e81ca4957cdd56a1cf3504", + "reference": "18c600a9b82f6454d2e81ca4957cdd56a1cf3504", + "shasum": "" + }, + "require": { + "doctrine/cache": "^1.4.2", + "doctrine/inflector": "~1.0", + "php": ">=5.3.2", + "symfony/doctrine-bridge": "~2.2|~3.0" + }, + "require-dev": { + "instaclick/coding-standard": "~1.1", + "instaclick/object-calisthenics-sniffs": "dev-master", + "instaclick/symfony2-coding-standard": "dev-remaster", + "phpunit/phpunit": "~4", + "predis/predis": "~0.8", + "satooshi/php-coveralls": "~0.6.1", + "squizlabs/php_codesniffer": "~1.5", + "symfony/console": "~2.2|~3.0", + "symfony/finder": "~2.2|~3.0", + "symfony/framework-bundle": "~2.2|~3.0", + "symfony/phpunit-bridge": "~2.7|~3.0", + "symfony/security-acl": "~2.3|~3.0", + "symfony/validator": "~2.2|~3.0", + "symfony/yaml": "~2.2|~3.0" + }, + "suggest": { + "symfony/security-acl": "For using this bundle to cache ACLs" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\DoctrineCacheBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Fabio B. Silva", + "email": "fabio.bat.silva@gmail.com" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@hotmail.com" + }, + { + "name": "Doctrine Project", + "homepage": "http://www.doctrine-project.org/" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Bundle for Doctrine Cache", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "cache", + "caching" + ], + "time": "2016-01-26T17:28:51+00:00" + }, + { + "name": "doctrine/inflector", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Inflector\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common String Manipulations with regard to casing and singular/plural rules.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string" + ], + "time": "2015-11-06T14:35:42+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14T21:17:01+00:00" + }, + { + "name": "doctrine/lexer", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "lexer", + "parser" + ], + "time": "2014-09-09T13:34:57+00:00" + }, + { + "name": "doctrine/orm", + "version": "v2.5.6", + "source": { + "type": "git", + "url": "https://github.com/doctrine/doctrine2.git", + "reference": "e6c434196c8ef058239aaa0724b4aadb0107940b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/e6c434196c8ef058239aaa0724b4aadb0107940b", + "reference": "e6c434196c8ef058239aaa0724b4aadb0107940b", + "shasum": "" + }, + "require": { + "doctrine/cache": "~1.4", + "doctrine/collections": "~1.2", + "doctrine/common": ">=2.5-dev,<2.8-dev", + "doctrine/dbal": ">=2.5-dev,<2.6-dev", + "doctrine/instantiator": "~1.0.1", + "ext-pdo": "*", + "php": ">=5.4", + "symfony/console": "~2.5|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "symfony/yaml": "~2.3|~3.0" + }, + "suggest": { + "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" + }, + "bin": [ + "bin/doctrine", + "bin/doctrine.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\ORM\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Object-Relational-Mapper for PHP", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "orm" + ], + "time": "2016-12-18T15:42:34+00:00" + }, + { + "name": "fig/link-util", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/link-util.git", + "reference": "1a07821801a148be4add11ab0603e4af55a72fac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/link-util/zipball/1a07821801a148be4add11ab0603e4af55a72fac", + "reference": "1a07821801a148be4add11ab0603e4af55a72fac", + "shasum": "" + }, + "require": { + "php": ">=5.5.0", + "psr/link": "~1.0@dev" + }, + "require-dev": { + "phpunit/phpunit": "^5.1", + "squizlabs/php_codesniffer": "^2.3.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Fig\\Link\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common utility implementations for HTTP links", + "keywords": [ + "http", + "http-link", + "link", + "psr", + "psr-13", + "rest" + ], + "time": "2016-10-17T18:31:11+00:00" + }, + { + "name": "incenteev/composer-parameter-handler", + "version": "v2.1.2", + "source": { + "type": "git", + "url": "https://github.com/Incenteev/ParameterHandler.git", + "reference": "d7ce7f06136109e81d1cb9d57066c4d4a99cf1cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Incenteev/ParameterHandler/zipball/d7ce7f06136109e81d1cb9d57066c4d4a99cf1cc", + "reference": "d7ce7f06136109e81d1cb9d57066c4d4a99cf1cc", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/yaml": "~2.3|~3.0" + }, + "require-dev": { + "composer/composer": "1.0.*@dev", + "phpspec/prophecy-phpunit": "~1.0", + "symfony/filesystem": "~2.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Incenteev\\ParameterHandler\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christophe Coevoet", + "email": "stof@notk.org" + } + ], + "description": "Composer script handling your ignored parameter file", + "homepage": "https://github.com/Incenteev/ParameterHandler", + "keywords": [ + "parameters management" + ], + "time": "2015-11-10T17:04:01+00:00" + }, + { + "name": "jdorn/sql-formatter", + "version": "v1.2.17", + "source": { + "type": "git", + "url": "https://github.com/jdorn/sql-formatter.git", + "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jdorn/sql-formatter/zipball/64990d96e0959dff8e059dfcdc1af130728d92bc", + "reference": "64990d96e0959dff8e059dfcdc1af130728d92bc", + "shasum": "" + }, + "require": { + "php": ">=5.2.4" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "lib" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Dorn", + "email": "jeremy@jeremydorn.com", + "homepage": "http://jeremydorn.com/" + } + ], + "description": "a PHP SQL highlighting library", + "homepage": "https://github.com/jdorn/sql-formatter/", + "keywords": [ + "highlight", + "sql" + ], + "time": "2014-01-12T16:20:24+00:00" + }, + { + "name": "monolog/monolog", + "version": "1.23.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4", + "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4", + "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 || ^3.0", + "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|^6.0" + }, + "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": "2017-06-19T01:22:40+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v2.0.10", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "pseudorandom", + "random" + ], + "time": "2017-03-13T16:27:32+00:00" + }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "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": "2016-08-06T20:24:11+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "psr/link", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/link.git", + "reference": "eea8e8662d5cd3ae4517c9b864493f59fca95562" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/link/zipball/eea8e8662d5cd3ae4517c9b864493f59fca95562", + "reference": "eea8e8662d5cd3ae4517c9b864493f59fca95562", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Link\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for HTTP links", + "keywords": [ + "http", + "http-link", + "link", + "psr", + "psr-13", + "rest" + ], + "time": "2016-10-28T16:06:13+00:00" + }, + { + "name": "psr/log", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-10-10T12:19:37+00:00" + }, + { + "name": "psr/simple-cache", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/753fa598e8f3b9966c886fe13f370baa45ef0e24", + "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-01-02T13:31:39+00:00" + }, + { + "name": "sensio/distribution-bundle", + "version": "v5.0.20", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", + "reference": "4b019d4c0bd64438c42e4b6b0726085b409be8d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/4b019d4c0bd64438c42e4b6b0726085b409be8d9", + "reference": "4b019d4c0bd64438c42e4b6b0726085b409be8d9", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "sensiolabs/security-checker": "~3.0|~4.0", + "symfony/class-loader": "~2.3|~3.0", + "symfony/config": "~2.3|~3.0", + "symfony/dependency-injection": "~2.3|~3.0", + "symfony/filesystem": "~2.3|~3.0", + "symfony/http-kernel": "~2.3|~3.0", + "symfony/process": "~2.3|~3.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Sensio\\Bundle\\DistributionBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Base bundle for Symfony Distributions", + "keywords": [ + "configuration", + "distribution" + ], + "time": "2017-05-11T16:21:03+00:00" + }, + { + "name": "sensio/framework-extra-bundle", + "version": "v3.0.26", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", + "reference": "6d6cbe971554f0a2cc84965850481eb04a2a0059" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/6d6cbe971554f0a2cc84965850481eb04a2a0059", + "reference": "6d6cbe971554f0a2cc84965850481eb04a2a0059", + "shasum": "" + }, + "require": { + "doctrine/common": "~2.2", + "symfony/dependency-injection": "~2.3|~3.0", + "symfony/framework-bundle": "~2.3|~3.0" + }, + "require-dev": { + "doctrine/doctrine-bundle": "~1.5", + "doctrine/orm": "~2.4,>=2.4.5", + "symfony/asset": "~2.7|~3.0", + "symfony/browser-kit": "~2.3|~3.0", + "symfony/dom-crawler": "~2.3|~3.0", + "symfony/expression-language": "~2.4|~3.0", + "symfony/finder": "~2.3|~3.0", + "symfony/phpunit-bridge": "~3.2", + "symfony/psr-http-message-bridge": "^0.3", + "symfony/security-bundle": "~2.4|~3.0", + "symfony/templating": "~2.3|~3.0", + "symfony/translation": "~2.3|~3.0", + "symfony/twig-bundle": "~2.3|~3.0", + "symfony/yaml": "~2.3|~3.0", + "twig/twig": "~1.12|~2.0", + "zendframework/zend-diactoros": "^1.3" + }, + "suggest": { + "symfony/expression-language": "", + "symfony/psr-http-message-bridge": "To use the PSR-7 converters", + "symfony/security-bundle": "" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Sensio\\Bundle\\FrameworkExtraBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "This bundle provides a way to configure your controllers with annotations", + "keywords": [ + "annotations", + "controllers" + ], + "time": "2017-05-11T17:01:57+00:00" + }, + { + "name": "sensiolabs/security-checker", + "version": "v4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/security-checker.git", + "reference": "6a3b0c3b42e41c777b1ad75032d8177863fdc5e1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/6a3b0c3b42e41c777b1ad75032d8177863fdc5e1", + "reference": "6a3b0c3b42e41c777b1ad75032d8177863fdc5e1", + "shasum": "" + }, + "require": { + "composer/ca-bundle": "^1.0", + "symfony/console": "~2.7|~3.0" + }, + "bin": [ + "security-checker" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-0": { + "SensioLabs\\Security": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien.potencier@gmail.com" + } + ], + "description": "A security checker for your composer.lock", + "time": "2017-07-24T11:42:56+00:00" + }, + { + "name": "swiftmailer/swiftmailer", + "version": "v5.4.8", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "9a06dc570a0367850280eefd3f1dc2da45aef517" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/9a06dc570a0367850280eefd3f1dc2da45aef517", + "reference": "9a06dc570a0367850280eefd3f1dc2da45aef517", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "mockery/mockery": "~0.9.1", + "symfony/phpunit-bridge": "~3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "http://swiftmailer.org", + "keywords": [ + "email", + "mail", + "mailer" + ], + "time": "2017-05-01T15:54:03+00:00" + }, + { + "name": "symfony/monolog-bundle", + "version": "v2.12.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/monolog-bundle.git", + "reference": "b0146bdca7ba2a65f3bbe7010423c7393b29ec3f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/b0146bdca7ba2a65f3bbe7010423c7393b29ec3f", + "reference": "b0146bdca7ba2a65f3bbe7010423c7393b29ec3f", + "shasum": "" + }, + "require": { + "monolog/monolog": "~1.18", + "php": ">=5.3.2", + "symfony/config": "~2.3|~3.0", + "symfony/dependency-injection": "~2.3|~3.0", + "symfony/http-kernel": "~2.3|~3.0", + "symfony/monolog-bridge": "~2.3|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8", + "symfony/console": "~2.3|~3.0", + "symfony/yaml": "~2.3|~3.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bundle\\MonologBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony MonologBundle", + "homepage": "http://symfony.com", + "keywords": [ + "log", + "logging" + ], + "time": "2017-01-02T19:04:26+00:00" + }, + { + "name": "symfony/polyfill-intl-icu", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-icu.git", + "reference": "3191cbe0ce64987bd382daf6724af31c53daae01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/3191cbe0ce64987bd382daf6724af31c53daae01", + "reference": "3191cbe0ce64987bd382daf6724af31c53daae01", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/intl": "~2.3|~3.0|~4.0" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "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 polyfill for intl's ICU-related data and classes", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "icu", + "intl", + "polyfill", + "portable", + "shim" + ], + "time": "2017-06-09T08:25:21+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "f29dca382a6485c3cbe6379f0c61230167681937" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937", + "reference": "f29dca382a6485c3cbe6379f0c61230167681937", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2017-06-09T14:24:12+00:00" + }, + { + "name": "symfony/polyfill-php56", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php56.git", + "reference": "bc0b7d6cb36b10cfabb170a3e359944a95174929" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/bc0b7d6cb36b10cfabb170a3e359944a95174929", + "reference": "bc0b7d6cb36b10cfabb170a3e359944a95174929", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-util": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php56\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 polyfill backporting some PHP 5.6+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2017-06-09T08:25:21+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "032fd647d5c11a9ceab8ee8747e13b5448e93874" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/032fd647d5c11a9ceab8ee8747e13b5448e93874", + "reference": "032fd647d5c11a9ceab8ee8747e13b5448e93874", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "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 polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2017-06-09T14:24:12+00:00" + }, + { + "name": "symfony/polyfill-util", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-util.git", + "reference": "ebccbde4aad410f6438d86d7d261c6b4d2b9a51d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/ebccbde4aad410f6438d86d7d261c6b4d2b9a51d", + "reference": "ebccbde4aad410f6438d86d7d261c6b4d2b9a51d", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Util\\": "" + } + }, + "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 utilities for portability of PHP codes", + "homepage": "https://symfony.com", + "keywords": [ + "compat", + "compatibility", + "polyfill", + "shim" + ], + "time": "2017-06-09T08:25:21+00:00" + }, + { + "name": "symfony/swiftmailer-bundle", + "version": "v2.6.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/swiftmailer-bundle.git", + "reference": "11555c338f3c367b0a1bd2f024a53aa813f4ce00" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/11555c338f3c367b0a1bd2f024a53aa813f4ce00", + "reference": "11555c338f3c367b0a1bd2f024a53aa813f4ce00", + "shasum": "" + }, + "require": { + "php": ">=5.3.2", + "swiftmailer/swiftmailer": "~4.2|~5.0", + "symfony/config": "~2.7|~3.0", + "symfony/dependency-injection": "~2.7|~3.0", + "symfony/http-kernel": "~2.7|~3.0" + }, + "require-dev": { + "symfony/console": "~2.7|~3.0", + "symfony/framework-bundle": "~2.7|~3.0", + "symfony/phpunit-bridge": "~3.3@dev", + "symfony/yaml": "~2.7|~3.0" + }, + "suggest": { + "psr/log": "Allows logging" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bundle\\SwiftmailerBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony SwiftmailerBundle", + "homepage": "http://symfony.com", + "time": "2017-07-22T07:18:13+00:00" + }, + { + "name": "symfony/symfony", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/symfony.git", + "reference": "b9a0d3d2393f683b28043e9dbf83b8bf6b347faa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/symfony/zipball/b9a0d3d2393f683b28043e9dbf83b8bf6b347faa", + "reference": "b9a0d3d2393f683b28043e9dbf83b8bf6b347faa", + "shasum": "" + }, + "require": { + "doctrine/common": "~2.4", + "ext-xml": "*", + "fig/link-util": "^1.0", + "php": ">=5.5.9", + "psr/cache": "~1.0", + "psr/container": "^1.0", + "psr/link": "^1.0", + "psr/log": "~1.0", + "psr/simple-cache": "^1.0", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php56": "~1.0", + "symfony/polyfill-php70": "~1.0", + "symfony/polyfill-util": "~1.0", + "twig/twig": "~1.34|~2.4" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<3.0||>=3.2.0", + "phpdocumentor/type-resolver": "<0.2.0", + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + }, + "provide": { + "psr/cache-implementation": "1.0", + "psr/container-implementation": "1.0", + "psr/simple-cache-implementation": "1.0" + }, + "replace": { + "symfony/asset": "self.version", + "symfony/browser-kit": "self.version", + "symfony/cache": "self.version", + "symfony/class-loader": "self.version", + "symfony/config": "self.version", + "symfony/console": "self.version", + "symfony/css-selector": "self.version", + "symfony/debug": "self.version", + "symfony/debug-bundle": "self.version", + "symfony/dependency-injection": "self.version", + "symfony/doctrine-bridge": "self.version", + "symfony/dom-crawler": "self.version", + "symfony/dotenv": "self.version", + "symfony/event-dispatcher": "self.version", + "symfony/expression-language": "self.version", + "symfony/filesystem": "self.version", + "symfony/finder": "self.version", + "symfony/form": "self.version", + "symfony/framework-bundle": "self.version", + "symfony/http-foundation": "self.version", + "symfony/http-kernel": "self.version", + "symfony/inflector": "self.version", + "symfony/intl": "self.version", + "symfony/ldap": "self.version", + "symfony/monolog-bridge": "self.version", + "symfony/options-resolver": "self.version", + "symfony/process": "self.version", + "symfony/property-access": "self.version", + "symfony/property-info": "self.version", + "symfony/proxy-manager-bridge": "self.version", + "symfony/routing": "self.version", + "symfony/security": "self.version", + "symfony/security-bundle": "self.version", + "symfony/security-core": "self.version", + "symfony/security-csrf": "self.version", + "symfony/security-guard": "self.version", + "symfony/security-http": "self.version", + "symfony/serializer": "self.version", + "symfony/stopwatch": "self.version", + "symfony/templating": "self.version", + "symfony/translation": "self.version", + "symfony/twig-bridge": "self.version", + "symfony/twig-bundle": "self.version", + "symfony/validator": "self.version", + "symfony/var-dumper": "self.version", + "symfony/web-link": "self.version", + "symfony/web-profiler-bundle": "self.version", + "symfony/web-server-bundle": "self.version", + "symfony/workflow": "self.version", + "symfony/yaml": "self.version" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/cache": "~1.6", + "doctrine/data-fixtures": "1.0.*", + "doctrine/dbal": "~2.4", + "doctrine/doctrine-bundle": "~1.4", + "doctrine/orm": "~2.4,>=2.4.5", + "egulias/email-validator": "~1.2,>=1.2.8|~2.0", + "monolog/monolog": "~1.11", + "ocramius/proxy-manager": "~0.4|~1.0|~2.0", + "phpdocumentor/reflection-docblock": "^3.0", + "predis/predis": "~1.0", + "sensio/framework-extra-bundle": "^3.0.2", + "symfony/phpunit-bridge": "~3.2", + "symfony/polyfill-apcu": "~1.1", + "symfony/security-acl": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/", + "Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/", + "Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/", + "Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/", + "Symfony\\Bundle\\": "src/Symfony/Bundle/", + "Symfony\\Component\\": "src/Symfony/Component/" + }, + "classmap": [ + "src/Symfony/Component/Intl/Resources/stubs" + ], + "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": "The Symfony PHP framework", + "homepage": "https://symfony.com", + "keywords": [ + "framework" + ], + "time": "2017-07-17T19:08:46+00:00" + }, + { + "name": "twig/twig", + "version": "v1.34.4", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "f878bab48edb66ad9c6ed626bf817f60c6c096ee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/f878bab48edb66ad9c6ed626bf817f60c6c096ee", + "reference": "f878bab48edb66ad9c6ed626bf817f60c6c096ee", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "psr/container": "^1.0", + "symfony/debug": "~2.7", + "symfony/phpunit-bridge": "~3.3@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.34-dev" + } + }, + "autoload": { + "psr-0": { + "Twig_": "lib/" + }, + "psr-4": { + "Twig\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + }, + { + "name": "Twig Team", + "homepage": "http://twig.sensiolabs.org/contributors", + "role": "Contributors" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "http://twig.sensiolabs.org", + "keywords": [ + "templating" + ], + "time": "2017-07-04T13:19:31+00:00" + } + ], + "packages-dev": [ + { + "name": "sensio/generator-bundle", + "version": "v3.1.6", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/SensioGeneratorBundle.git", + "reference": "128bc5dabc91ca40b7445f094968dd70ccd58305" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/128bc5dabc91ca40b7445f094968dd70ccd58305", + "reference": "128bc5dabc91ca40b7445f094968dd70ccd58305", + "shasum": "" + }, + "require": { + "symfony/console": "~2.7|~3.0", + "symfony/framework-bundle": "~2.7|~3.0", + "symfony/process": "~2.7|~3.0", + "symfony/yaml": "~2.7|~3.0", + "twig/twig": "^1.28.2|^2.0" + }, + "require-dev": { + "doctrine/orm": "~2.4", + "symfony/doctrine-bridge": "~2.7|~3.0", + "symfony/filesystem": "~2.7|~3.0", + "symfony/phpunit-bridge": "^3.3" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Sensio\\Bundle\\GeneratorBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "This bundle generates code for you", + "time": "2017-07-18T07:57:44+00:00" + }, + { + "name": "symfony/phpunit-bridge", + "version": "v3.3.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/phpunit-bridge.git", + "reference": "c2c124b7f9de79f4a64dc011f041a3a2c768b913" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/c2c124b7f9de79f4a64dc011f041a3a2c768b913", + "reference": "c2c124b7f9de79f4a64dc011f041a3a2c768b913", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + }, + "suggest": { + "ext-zip": "Zip support is required when using bin/simple-phpunit", + "symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader" + }, + "bin": [ + "bin/simple-phpunit" + ], + "type": "symfony-bridge", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Bridge\\PhpUnit\\": "" + }, + "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 PHPUnit Bridge", + "homepage": "https://symfony.com", + "time": "2017-06-12T13:35:45+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.5.9" + }, + "platform-dev": [], + "platform-overrides": { + "php": "5.5.9" + } +} diff --git a/symfony-3.3/phpunit.xml.dist b/symfony-3.3/phpunit.xml.dist new file mode 100644 index 000000000..b115bb395 --- /dev/null +++ b/symfony-3.3/phpunit.xml.dist @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- http://phpunit.de/manual/4.1/en/appendixes.configuration.html --> +<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd" + backupGlobals="false" + colors="true" + bootstrap="app/autoload.php" +> + <php> + <ini name="error_reporting" value="-1" /> + <server name="KERNEL_DIR" value="app/" /> + </php> + + <testsuites> + <testsuite name="Project Test Suite"> + <directory>tests</directory> + </testsuite> + </testsuites> + + <filter> + <whitelist> + <directory>src</directory> + <exclude> + <directory>src/*Bundle/Resources</directory> + <directory>src/*/*Bundle/Resources</directory> + <directory>src/*/Bundle/*Bundle/Resources</directory> + </exclude> + </whitelist> + </filter> +</phpunit> diff --git a/symfony-3.3/src/AppBundle/AppBundle.php b/symfony-3.3/src/AppBundle/AppBundle.php new file mode 100644 index 000000000..05123b678 --- /dev/null +++ b/symfony-3.3/src/AppBundle/AppBundle.php @@ -0,0 +1,9 @@ +<?php + +namespace AppBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class AppBundle extends Bundle +{ +} diff --git a/symfony-3.3/src/AppBundle/Controller/DefaultController.php b/symfony-3.3/src/AppBundle/Controller/DefaultController.php new file mode 100644 index 000000000..5d4bb7e85 --- /dev/null +++ b/symfony-3.3/src/AppBundle/Controller/DefaultController.php @@ -0,0 +1,21 @@ +<?php + +namespace AppBundle\Controller; + +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; +use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Component\HttpFoundation\Request; + +class DefaultController extends Controller +{ + /** + * @Route("/", name="homepage") + */ + public function indexAction(Request $request) + { + // replace this example code with whatever you need + return $this->render('default/index.html.twig', [ + 'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..'), + ]); + } +} diff --git a/symfony-3.3/src/AppBundle/Controller/HelloController.php b/symfony-3.3/src/AppBundle/Controller/HelloController.php new file mode 100644 index 000000000..b8b7e924d --- /dev/null +++ b/symfony-3.3/src/AppBundle/Controller/HelloController.php @@ -0,0 +1,18 @@ +<?php + +namespace AppBundle\Controller; + +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; +use Symfony\Bundle\FrameworkBundle\Controller\Controller; +use Symfony\Component\HttpFoundation\Response; + +class HelloController extends Controller +{ + /** + * @Route("/hello/index", name="hello_world") + */ + public function indexAction() + { + return new Response('Hello World!'); + } +} diff --git a/symfony-3.3/tests/AppBundle/Controller/DefaultControllerTest.php b/symfony-3.3/tests/AppBundle/Controller/DefaultControllerTest.php new file mode 100644 index 000000000..594803cce --- /dev/null +++ b/symfony-3.3/tests/AppBundle/Controller/DefaultControllerTest.php @@ -0,0 +1,18 @@ +<?php + +namespace Tests\AppBundle\Controller; + +use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; + +class DefaultControllerTest extends WebTestCase +{ + public function testIndex() + { + $client = static::createClient(); + + $crawler = $client->request('GET', '/'); + + $this->assertEquals(200, $client->getResponse()->getStatusCode()); + $this->assertContains('Welcome to Symfony', $crawler->filter('#container h1')->text()); + } +} diff --git a/symfony-3.3/var/SymfonyRequirements.php b/symfony-3.3/var/SymfonyRequirements.php new file mode 100755 index 000000000..3b14a4022 --- /dev/null +++ b/symfony-3.3/var/SymfonyRequirements.php @@ -0,0 +1,817 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/* + * Users of PHP 5.2 should be able to run the requirements checks. + * This is why the file and all classes must be compatible with PHP 5.2+ + * (e.g. not using namespaces and closures). + * + * ************** CAUTION ************** + * + * DO NOT EDIT THIS FILE as it will be overridden by Composer as part of + * the installation/update process. The original file resides in the + * SensioDistributionBundle. + * + * ************** CAUTION ************** + */ + +/** + * Represents a single PHP requirement, e.g. an installed extension. + * It can be a mandatory requirement or an optional recommendation. + * There is a special subclass, named PhpIniRequirement, to check a php.ini configuration. + * + * @author Tobias Schultze <http://tobion.de> + */ +class Requirement +{ + private $fulfilled; + private $testMessage; + private $helpText; + private $helpHtml; + private $optional; + + /** + * Constructor that initializes the requirement. + * + * @param bool $fulfilled Whether the requirement is fulfilled + * @param string $testMessage The message for testing the requirement + * @param string $helpHtml The help text formatted in HTML for resolving the problem + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + * @param bool $optional Whether this is only an optional recommendation not a mandatory requirement + */ + public function __construct($fulfilled, $testMessage, $helpHtml, $helpText = null, $optional = false) + { + $this->fulfilled = (bool) $fulfilled; + $this->testMessage = (string) $testMessage; + $this->helpHtml = (string) $helpHtml; + $this->helpText = null === $helpText ? strip_tags($this->helpHtml) : (string) $helpText; + $this->optional = (bool) $optional; + } + + /** + * Returns whether the requirement is fulfilled. + * + * @return bool true if fulfilled, otherwise false + */ + public function isFulfilled() + { + return $this->fulfilled; + } + + /** + * Returns the message for testing the requirement. + * + * @return string The test message + */ + public function getTestMessage() + { + return $this->testMessage; + } + + /** + * Returns the help text for resolving the problem. + * + * @return string The help text + */ + public function getHelpText() + { + return $this->helpText; + } + + /** + * Returns the help text formatted in HTML. + * + * @return string The HTML help + */ + public function getHelpHtml() + { + return $this->helpHtml; + } + + /** + * Returns whether this is only an optional recommendation and not a mandatory requirement. + * + * @return bool true if optional, false if mandatory + */ + public function isOptional() + { + return $this->optional; + } +} + +/** + * Represents a PHP requirement in form of a php.ini configuration. + * + * @author Tobias Schultze <http://tobion.de> + */ +class PhpIniRequirement extends Requirement +{ + /** + * Constructor that initializes the requirement. + * + * @param string $cfgName The configuration name used for ini_get() + * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, + * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement + * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. + * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. + * Example: You require a config to be true but PHP later removes this config and defaults it to true internally. + * @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) + * @param string|null $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + * @param bool $optional Whether this is only an optional recommendation not a mandatory requirement + */ + public function __construct($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null, $optional = false) + { + $cfgValue = ini_get($cfgName); + + if (is_callable($evaluation)) { + if (null === $testMessage || null === $helpHtml) { + throw new InvalidArgumentException('You must provide the parameters testMessage and helpHtml for a callback evaluation.'); + } + + $fulfilled = call_user_func($evaluation, $cfgValue); + } else { + if (null === $testMessage) { + $testMessage = sprintf('%s %s be %s in php.ini', + $cfgName, + $optional ? 'should' : 'must', + $evaluation ? 'enabled' : 'disabled' + ); + } + + if (null === $helpHtml) { + $helpHtml = sprintf('Set <strong>%s</strong> to <strong>%s</strong> in php.ini<a href="#phpini">*</a>.', + $cfgName, + $evaluation ? 'on' : 'off' + ); + } + + $fulfilled = $evaluation == $cfgValue; + } + + parent::__construct($fulfilled || ($approveCfgAbsence && false === $cfgValue), $testMessage, $helpHtml, $helpText, $optional); + } +} + +/** + * A RequirementCollection represents a set of Requirement instances. + * + * @author Tobias Schultze <http://tobion.de> + */ +class RequirementCollection implements IteratorAggregate +{ + /** + * @var Requirement[] + */ + private $requirements = array(); + + /** + * Gets the current RequirementCollection as an Iterator. + * + * @return Traversable A Traversable interface + */ + public function getIterator() + { + return new ArrayIterator($this->requirements); + } + + /** + * Adds a Requirement. + * + * @param Requirement $requirement A Requirement instance + */ + public function add(Requirement $requirement) + { + $this->requirements[] = $requirement; + } + + /** + * Adds a mandatory requirement. + * + * @param bool $fulfilled Whether the requirement is fulfilled + * @param string $testMessage The message for testing the requirement + * @param string $helpHtml The help text formatted in HTML for resolving the problem + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + */ + public function addRequirement($fulfilled, $testMessage, $helpHtml, $helpText = null) + { + $this->add(new Requirement($fulfilled, $testMessage, $helpHtml, $helpText, false)); + } + + /** + * Adds an optional recommendation. + * + * @param bool $fulfilled Whether the recommendation is fulfilled + * @param string $testMessage The message for testing the recommendation + * @param string $helpHtml The help text formatted in HTML for resolving the problem + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + */ + public function addRecommendation($fulfilled, $testMessage, $helpHtml, $helpText = null) + { + $this->add(new Requirement($fulfilled, $testMessage, $helpHtml, $helpText, true)); + } + + /** + * Adds a mandatory requirement in form of a php.ini configuration. + * + * @param string $cfgName The configuration name used for ini_get() + * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, + * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement + * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. + * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. + * Example: You require a config to be true but PHP later removes this config and defaults it to true internally. + * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) + * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + */ + public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null) + { + $this->add(new PhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence, $testMessage, $helpHtml, $helpText, false)); + } + + /** + * Adds an optional recommendation in form of a php.ini configuration. + * + * @param string $cfgName The configuration name used for ini_get() + * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, + * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement + * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. + * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. + * Example: You require a config to be true but PHP later removes this config and defaults it to true internally. + * @param string $testMessage The message for testing the requirement (when null and $evaluation is a boolean a default message is derived) + * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a boolean a default help is derived) + * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags) + */ + public function addPhpIniRecommendation($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null) + { + $this->add(new PhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence, $testMessage, $helpHtml, $helpText, true)); + } + + /** + * Adds a requirement collection to the current set of requirements. + * + * @param RequirementCollection $collection A RequirementCollection instance + */ + public function addCollection(RequirementCollection $collection) + { + $this->requirements = array_merge($this->requirements, $collection->all()); + } + + /** + * Returns both requirements and recommendations. + * + * @return Requirement[] + */ + public function all() + { + return $this->requirements; + } + + /** + * Returns all mandatory requirements. + * + * @return Requirement[] + */ + public function getRequirements() + { + $array = array(); + foreach ($this->requirements as $req) { + if (!$req->isOptional()) { + $array[] = $req; + } + } + + return $array; + } + + /** + * Returns the mandatory requirements that were not met. + * + * @return Requirement[] + */ + public function getFailedRequirements() + { + $array = array(); + foreach ($this->requirements as $req) { + if (!$req->isFulfilled() && !$req->isOptional()) { + $array[] = $req; + } + } + + return $array; + } + + /** + * Returns all optional recommendations. + * + * @return Requirement[] + */ + public function getRecommendations() + { + $array = array(); + foreach ($this->requirements as $req) { + if ($req->isOptional()) { + $array[] = $req; + } + } + + return $array; + } + + /** + * Returns the recommendations that were not met. + * + * @return Requirement[] + */ + public function getFailedRecommendations() + { + $array = array(); + foreach ($this->requirements as $req) { + if (!$req->isFulfilled() && $req->isOptional()) { + $array[] = $req; + } + } + + return $array; + } + + /** + * Returns whether a php.ini configuration is not correct. + * + * @return bool php.ini configuration problem? + */ + public function hasPhpIniConfigIssue() + { + foreach ($this->requirements as $req) { + if (!$req->isFulfilled() && $req instanceof PhpIniRequirement) { + return true; + } + } + + return false; + } + + /** + * Returns the PHP configuration file (php.ini) path. + * + * @return string|false php.ini file path + */ + public function getPhpIniConfigPath() + { + return get_cfg_var('cfg_file_path'); + } +} + +/** + * This class specifies all requirements and optional recommendations that + * are necessary to run the Symfony Standard Edition. + * + * @author Tobias Schultze <http://tobion.de> + * @author Fabien Potencier <fabien@symfony.com> + */ +class SymfonyRequirements extends RequirementCollection +{ + const LEGACY_REQUIRED_PHP_VERSION = '5.3.3'; + const REQUIRED_PHP_VERSION = '5.5.9'; + + /** + * Constructor that initializes the requirements. + */ + public function __construct() + { + /* mandatory requirements follow */ + + $installedPhpVersion = phpversion(); + $requiredPhpVersion = $this->getPhpRequiredVersion(); + + $this->addRecommendation( + $requiredPhpVersion, + 'Vendors should be installed in order to check all requirements.', + 'Run the <code>composer install</code> command.', + 'Run the "composer install" command.' + ); + + if (false !== $requiredPhpVersion) { + $this->addRequirement( + version_compare($installedPhpVersion, $requiredPhpVersion, '>='), + sprintf('PHP version must be at least %s (%s installed)', $requiredPhpVersion, $installedPhpVersion), + sprintf('You are running PHP version "<strong>%s</strong>", but Symfony needs at least PHP "<strong>%s</strong>" to run. + Before using Symfony, upgrade your PHP installation, preferably to the latest version.', + $installedPhpVersion, $requiredPhpVersion), + sprintf('Install PHP %s or newer (installed version is %s)', $requiredPhpVersion, $installedPhpVersion) + ); + } + + $this->addRequirement( + version_compare($installedPhpVersion, '5.3.16', '!='), + 'PHP version must not be 5.3.16 as Symfony won\'t work properly with it', + 'Install PHP 5.3.17 or newer (or downgrade to an earlier PHP version)' + ); + + $this->addRequirement( + is_dir(__DIR__.'/../vendor/composer'), + 'Vendor libraries must be installed', + 'Vendor libraries are missing. Install composer following instructions from <a href="http://getcomposer.org/">http://getcomposer.org/</a>. '. + 'Then run "<strong>php composer.phar install</strong>" to install them.' + ); + + $cacheDir = is_dir(__DIR__.'/../var/cache') ? __DIR__.'/../var/cache' : __DIR__.'/cache'; + + $this->addRequirement( + is_writable($cacheDir), + 'app/cache/ or var/cache/ directory must be writable', + 'Change the permissions of either "<strong>app/cache/</strong>" or "<strong>var/cache/</strong>" directory so that the web server can write into it.' + ); + + $logsDir = is_dir(__DIR__.'/../var/logs') ? __DIR__.'/../var/logs' : __DIR__.'/logs'; + + $this->addRequirement( + is_writable($logsDir), + 'app/logs/ or var/logs/ directory must be writable', + 'Change the permissions of either "<strong>app/logs/</strong>" or "<strong>var/logs/</strong>" directory so that the web server can write into it.' + ); + + if (version_compare($installedPhpVersion, '7.0.0', '<')) { + $this->addPhpIniRequirement( + 'date.timezone', true, false, + 'date.timezone setting must be set', + 'Set the "<strong>date.timezone</strong>" setting in php.ini<a href="#phpini">*</a> (like Europe/Paris).' + ); + } + + if (false !== $requiredPhpVersion && version_compare($installedPhpVersion, $requiredPhpVersion, '>=')) { + $timezones = array(); + foreach (DateTimeZone::listAbbreviations() as $abbreviations) { + foreach ($abbreviations as $abbreviation) { + $timezones[$abbreviation['timezone_id']] = true; + } + } + + $this->addRequirement( + isset($timezones[@date_default_timezone_get()]), + sprintf('Configured default timezone "%s" must be supported by your installation of PHP', @date_default_timezone_get()), + 'Your default timezone is not supported by PHP. Check for typos in your <strong>php.ini</strong> file and have a look at the list of deprecated timezones at <a href="http://php.net/manual/en/timezones.others.php">http://php.net/manual/en/timezones.others.php</a>.' + ); + } + + $this->addRequirement( + function_exists('iconv'), + 'iconv() must be available', + 'Install and enable the <strong>iconv</strong> extension.' + ); + + $this->addRequirement( + function_exists('json_encode'), + 'json_encode() must be available', + 'Install and enable the <strong>JSON</strong> extension.' + ); + + $this->addRequirement( + function_exists('session_start'), + 'session_start() must be available', + 'Install and enable the <strong>session</strong> extension.' + ); + + $this->addRequirement( + function_exists('ctype_alpha'), + 'ctype_alpha() must be available', + 'Install and enable the <strong>ctype</strong> extension.' + ); + + $this->addRequirement( + function_exists('token_get_all'), + 'token_get_all() must be available', + 'Install and enable the <strong>Tokenizer</strong> extension.' + ); + + $this->addRequirement( + function_exists('simplexml_import_dom'), + 'simplexml_import_dom() must be available', + 'Install and enable the <strong>SimpleXML</strong> extension.' + ); + + if (function_exists('apc_store') && ini_get('apc.enabled')) { + if (version_compare($installedPhpVersion, '5.4.0', '>=')) { + $this->addRequirement( + version_compare(phpversion('apc'), '3.1.13', '>='), + 'APC version must be at least 3.1.13 when using PHP 5.4', + 'Upgrade your <strong>APC</strong> extension (3.1.13+).' + ); + } else { + $this->addRequirement( + version_compare(phpversion('apc'), '3.0.17', '>='), + 'APC version must be at least 3.0.17', + 'Upgrade your <strong>APC</strong> extension (3.0.17+).' + ); + } + } + + $this->addPhpIniRequirement('detect_unicode', false); + + if (extension_loaded('suhosin')) { + $this->addPhpIniRequirement( + 'suhosin.executor.include.whitelist', + create_function('$cfgValue', 'return false !== stripos($cfgValue, "phar");'), + false, + 'suhosin.executor.include.whitelist must be configured correctly in php.ini', + 'Add "<strong>phar</strong>" to <strong>suhosin.executor.include.whitelist</strong> in php.ini<a href="#phpini">*</a>.' + ); + } + + if (extension_loaded('xdebug')) { + $this->addPhpIniRequirement( + 'xdebug.show_exception_trace', false, true + ); + + $this->addPhpIniRequirement( + 'xdebug.scream', false, true + ); + + $this->addPhpIniRecommendation( + 'xdebug.max_nesting_level', + create_function('$cfgValue', 'return $cfgValue > 100;'), + true, + 'xdebug.max_nesting_level should be above 100 in php.ini', + 'Set "<strong>xdebug.max_nesting_level</strong>" to e.g. "<strong>250</strong>" in php.ini<a href="#phpini">*</a> to stop Xdebug\'s infinite recursion protection erroneously throwing a fatal error in your project.' + ); + } + + $pcreVersion = defined('PCRE_VERSION') ? (float) PCRE_VERSION : null; + + $this->addRequirement( + null !== $pcreVersion, + 'PCRE extension must be available', + 'Install the <strong>PCRE</strong> extension (version 8.0+).' + ); + + if (extension_loaded('mbstring')) { + $this->addPhpIniRequirement( + 'mbstring.func_overload', + create_function('$cfgValue', 'return (int) $cfgValue === 0;'), + true, + 'string functions should not be overloaded', + 'Set "<strong>mbstring.func_overload</strong>" to <strong>0</strong> in php.ini<a href="#phpini">*</a> to disable function overloading by the mbstring extension.' + ); + } + + /* optional recommendations follow */ + + if (file_exists(__DIR__.'/../vendor/composer')) { + require_once __DIR__.'/../vendor/autoload.php'; + + try { + $r = new ReflectionClass('Sensio\Bundle\DistributionBundle\SensioDistributionBundle'); + + $contents = file_get_contents(dirname($r->getFileName()).'/Resources/skeleton/app/SymfonyRequirements.php'); + } catch (ReflectionException $e) { + $contents = ''; + } + $this->addRecommendation( + file_get_contents(__FILE__) === $contents, + 'Requirements file should be up-to-date', + 'Your requirements file is outdated. Run composer install and re-check your configuration.' + ); + } + + $this->addRecommendation( + version_compare($installedPhpVersion, '5.3.4', '>='), + 'You should use at least PHP 5.3.4 due to PHP bug #52083 in earlier versions', + 'Your project might malfunction randomly due to PHP bug #52083 ("Notice: Trying to get property of non-object"). Install PHP 5.3.4 or newer.' + ); + + $this->addRecommendation( + version_compare($installedPhpVersion, '5.3.8', '>='), + 'When using annotations you should have at least PHP 5.3.8 due to PHP bug #55156', + 'Install PHP 5.3.8 or newer if your project uses annotations.' + ); + + $this->addRecommendation( + version_compare($installedPhpVersion, '5.4.0', '!='), + 'You should not use PHP 5.4.0 due to the PHP bug #61453', + 'Your project might not work properly due to the PHP bug #61453 ("Cannot dump definitions which have method calls"). Install PHP 5.4.1 or newer.' + ); + + $this->addRecommendation( + version_compare($installedPhpVersion, '5.4.11', '>='), + 'When using the logout handler from the Symfony Security Component, you should have at least PHP 5.4.11 due to PHP bug #63379 (as a workaround, you can also set invalidate_session to false in the security logout handler configuration)', + 'Install PHP 5.4.11 or newer if your project uses the logout handler from the Symfony Security Component.' + ); + + $this->addRecommendation( + (version_compare($installedPhpVersion, '5.3.18', '>=') && version_compare($installedPhpVersion, '5.4.0', '<')) + || + version_compare($installedPhpVersion, '5.4.8', '>='), + 'You should use PHP 5.3.18+ or PHP 5.4.8+ to always get nice error messages for fatal errors in the development environment due to PHP bug #61767/#60909', + 'Install PHP 5.3.18+ or PHP 5.4.8+ if you want nice error messages for all fatal errors in the development environment.' + ); + + if (null !== $pcreVersion) { + $this->addRecommendation( + $pcreVersion >= 8.0, + sprintf('PCRE extension should be at least version 8.0 (%s installed)', $pcreVersion), + '<strong>PCRE 8.0+</strong> is preconfigured in PHP since 5.3.2 but you are using an outdated version of it. Symfony probably works anyway but it is recommended to upgrade your PCRE extension.' + ); + } + + $this->addRecommendation( + class_exists('DomDocument'), + 'PHP-DOM and PHP-XML modules should be installed', + 'Install and enable the <strong>PHP-DOM</strong> and the <strong>PHP-XML</strong> modules.' + ); + + $this->addRecommendation( + function_exists('mb_strlen'), + 'mb_strlen() should be available', + 'Install and enable the <strong>mbstring</strong> extension.' + ); + + $this->addRecommendation( + function_exists('utf8_decode'), + 'utf8_decode() should be available', + 'Install and enable the <strong>XML</strong> extension.' + ); + + $this->addRecommendation( + function_exists('filter_var'), + 'filter_var() should be available', + 'Install and enable the <strong>filter</strong> extension.' + ); + + if (!defined('PHP_WINDOWS_VERSION_BUILD')) { + $this->addRecommendation( + function_exists('posix_isatty'), + 'posix_isatty() should be available', + 'Install and enable the <strong>php_posix</strong> extension (used to colorize the CLI output).' + ); + } + + $this->addRecommendation( + extension_loaded('intl'), + 'intl extension should be available', + 'Install and enable the <strong>intl</strong> extension (used for validators).' + ); + + if (extension_loaded('intl')) { + // in some WAMP server installations, new Collator() returns null + $this->addRecommendation( + null !== new Collator('fr_FR'), + 'intl extension should be correctly configured', + 'The intl extension does not behave properly. This problem is typical on PHP 5.3.X x64 WIN builds.' + ); + + // check for compatible ICU versions (only done when you have the intl extension) + if (defined('INTL_ICU_VERSION')) { + $version = INTL_ICU_VERSION; + } else { + $reflector = new ReflectionExtension('intl'); + + ob_start(); + $reflector->info(); + $output = strip_tags(ob_get_clean()); + + preg_match('/^ICU version +(?:=> )?(.*)$/m', $output, $matches); + $version = $matches[1]; + } + + $this->addRecommendation( + version_compare($version, '4.0', '>='), + 'intl ICU version should be at least 4+', + 'Upgrade your <strong>intl</strong> extension with a newer ICU version (4+).' + ); + + if (class_exists('Symfony\Component\Intl\Intl')) { + $this->addRecommendation( + \Symfony\Component\Intl\Intl::getIcuDataVersion() <= \Symfony\Component\Intl\Intl::getIcuVersion(), + sprintf('intl ICU version installed on your system is outdated (%s) and does not match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()), + 'To get the latest internationalization data upgrade the ICU system package and the intl PHP extension.' + ); + if (\Symfony\Component\Intl\Intl::getIcuDataVersion() <= \Symfony\Component\Intl\Intl::getIcuVersion()) { + $this->addRecommendation( + \Symfony\Component\Intl\Intl::getIcuDataVersion() === \Symfony\Component\Intl\Intl::getIcuVersion(), + sprintf('intl ICU version installed on your system (%s) does not match the ICU data bundled with Symfony (%s)', \Symfony\Component\Intl\Intl::getIcuVersion(), \Symfony\Component\Intl\Intl::getIcuDataVersion()), + 'To avoid internationalization data inconsistencies upgrade the symfony/intl component.' + ); + } + } + + $this->addPhpIniRecommendation( + 'intl.error_level', + create_function('$cfgValue', 'return (int) $cfgValue === 0;'), + true, + 'intl.error_level should be 0 in php.ini', + 'Set "<strong>intl.error_level</strong>" to "<strong>0</strong>" in php.ini<a href="#phpini">*</a> to inhibit the messages when an error occurs in ICU functions.' + ); + } + + $accelerator = + (extension_loaded('eaccelerator') && ini_get('eaccelerator.enable')) + || + (extension_loaded('apc') && ini_get('apc.enabled')) + || + (extension_loaded('Zend Optimizer+') && ini_get('zend_optimizerplus.enable')) + || + (extension_loaded('Zend OPcache') && ini_get('opcache.enable')) + || + (extension_loaded('xcache') && ini_get('xcache.cacher')) + || + (extension_loaded('wincache') && ini_get('wincache.ocenabled')) + ; + + $this->addRecommendation( + $accelerator, + 'a PHP accelerator should be installed', + 'Install and/or enable a <strong>PHP accelerator</strong> (highly recommended).' + ); + + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + $this->addRecommendation( + $this->getRealpathCacheSize() >= 5 * 1024 * 1024, + 'realpath_cache_size should be at least 5M in php.ini', + 'Setting "<strong>realpath_cache_size</strong>" to e.g. "<strong>5242880</strong>" or "<strong>5M</strong>" in php.ini<a href="#phpini">*</a> may improve performance on Windows significantly in some cases.' + ); + } + + $this->addPhpIniRecommendation('short_open_tag', false); + + $this->addPhpIniRecommendation('magic_quotes_gpc', false, true); + + $this->addPhpIniRecommendation('register_globals', false, true); + + $this->addPhpIniRecommendation('session.auto_start', false); + + $this->addRecommendation( + class_exists('PDO'), + 'PDO should be installed', + 'Install <strong>PDO</strong> (mandatory for Doctrine).' + ); + + if (class_exists('PDO')) { + $drivers = PDO::getAvailableDrivers(); + $this->addRecommendation( + count($drivers) > 0, + sprintf('PDO should have some drivers installed (currently available: %s)', count($drivers) ? implode(', ', $drivers) : 'none'), + 'Install <strong>PDO drivers</strong> (mandatory for Doctrine).' + ); + } + } + + /** + * Loads realpath_cache_size from php.ini and converts it to int. + * + * (e.g. 16k is converted to 16384 int) + * + * @return int + */ + protected function getRealpathCacheSize() + { + $size = ini_get('realpath_cache_size'); + $size = trim($size); + $unit = ''; + if (!ctype_digit($size)) { + $unit = strtolower(substr($size, -1, 1)); + $size = (int) substr($size, 0, -1); + } + switch ($unit) { + case 'g': + return $size * 1024 * 1024 * 1024; + case 'm': + return $size * 1024 * 1024; + case 'k': + return $size * 1024; + default: + return (int) $size; + } + } + + /** + * Defines PHP required version from Symfony version. + * + * @return string|false The PHP required version or false if it could not be guessed + */ + protected function getPhpRequiredVersion() + { + if (!file_exists($path = __DIR__.'/../composer.lock')) { + return false; + } + + $composerLock = json_decode(file_get_contents($path), true); + foreach ($composerLock['packages'] as $package) { + $name = $package['name']; + if ('symfony/symfony' !== $name && 'symfony/http-kernel' !== $name) { + continue; + } + + return (int) $package['version'][1] > 2 ? self::REQUIRED_PHP_VERSION : self::LEGACY_REQUIRED_PHP_VERSION; + } + + return false; + } +} diff --git a/symfony-3.3/var/cache/.gitkeep b/symfony-3.3/var/cache/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/symfony-3.3/var/logs/.gitkeep b/symfony-3.3/var/logs/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/symfony-3.3/var/sessions/.gitkeep b/symfony-3.3/var/sessions/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/symfony-3.3/web/app.php b/symfony-3.3/web/app.php new file mode 100644 index 000000000..2244ea5c5 --- /dev/null +++ b/symfony-3.3/web/app.php @@ -0,0 +1,32 @@ +<?php + +use Symfony\Component\HttpFoundation\Request; + +/** + * @var Composer\Autoload\ClassLoader + */ +$loader = require __DIR__.'/../app/autoload.php'; +include_once __DIR__.'/../var/bootstrap.php.cache'; + +// Enable APC for autoloading to improve performance. +// You should change the ApcClassLoader first argument to a unique prefix +// in order to prevent cache key conflicts with other applications +// also using APC. +/* +$apcLoader = new Symfony\Component\ClassLoader\ApcClassLoader(sha1(__FILE__), $loader); +$loader->unregister(); +$apcLoader->register(true); +*/ + +$kernel = new AppKernel('prod', false); +$kernel->loadClassCache(); +//$kernel = new AppCache($kernel); + +// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter +//Request::enableHttpMethodParameterOverride(); +$request = Request::createFromGlobals(); +$response = $kernel->handle($request); +$response->send(); +$kernel->terminate($request, $response); + +require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php'; diff --git a/symfony-3.3/web/app_dev.php b/symfony-3.3/web/app_dev.php new file mode 100644 index 000000000..8456754d5 --- /dev/null +++ b/symfony-3.3/web/app_dev.php @@ -0,0 +1,32 @@ +<?php + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Debug\Debug; + +// If you don't want to setup permissions the proper way, just uncomment the following PHP line +// read http://symfony.com/doc/current/book/installation.html#checking-symfony-application-configuration-and-setup +// for more information +//umask(0000); + +// This check prevents access to debug front controllers that are deployed by accident to production servers. +// Feel free to remove this, extend it, or make something more sophisticated. +if (isset($_SERVER['HTTP_CLIENT_IP']) + || isset($_SERVER['HTTP_X_FORWARDED_FOR']) + || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1']) || php_sapi_name() === 'cli-server') +) { + header('HTTP/1.0 403 Forbidden'); + exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); +} + +/** + * @var Composer\Autoload\ClassLoader $loader + */ +$loader = require __DIR__.'/../app/autoload.php'; +Debug::enable(); + +$kernel = new AppKernel('dev', true); +$kernel->loadClassCache(); +$request = Request::createFromGlobals(); +$response = $kernel->handle($request); +$response->send(); +$kernel->terminate($request, $response); diff --git a/symfony-3.3/web/apple-touch-icon.png b/symfony-3.3/web/apple-touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..11f17e6d89ee3b416218ede42b66ec1dd81507f2 GIT binary patch literal 10784 zcmWkz1yB@S9ACP-8;%mCRJxlZq&uWLq>(-vq`SL2rBgtpyFoxeqy*{a+i!06c5ZIw z?c4YM|6jdG6(w0LbaHe60I=ksQflBm@c#=H8T{VQUr_-7bV(aYNfkLsNm?hDPnI_J z769;hHAmf3C+UV*Wb?)XM@wS)tRc-l5P;BEqyE6vEyPU(OhRz+#fCy7(6tDO@Uo$r zgFy@E(42^0`LEin#J@!7MQIxF{iRti`|9U?dUEox^w71Rz5h7rHH8Di!)HqPU1$sN ztAz>)EYrj(LkCB?VemxIEks(}-(%mbkcI%@48iNOzgxZNBV64l03L8!U}wM|-hK)0 zP+`&rXcK@f2>w0>T)Z0agI(hXA@G9~s8???M+cGtz~0MO0s>TG0mqkeB1ph;MbbJ6 zuv|!4feOUH0U57k8Q{e_0b|WTHCFh(Z$N&v7=#_MuNDrb+wx8p9@dQnc*N?&<A@mp zunY;-ae$T&9+0Fam_VRaM9Aly?cJ&{atdvO!U26_DHCZ5v+oJpQl`m0&(F4g(f#^n z-ymT^!h&mwwhPHl%c3WM?jtBpVgdm9-Aw;8pJ@F4@7?X+mizXnmqUfmc4wa;B6R;Y zpSz;r5dmDKsnb=Xy}d;Qr(w8y_g=dSePC4!u-?2ge7}a4uZKSEeHZ1$_b5i4TcGko zh>8*&1LK6zw4j@FCraey{r0D=DF18l-{&>&Gr&1hETg8cDEP_Q#L=TxEp~qlQR1!R z%|89}aA?3&EX&L<t_A~EqA&k+BHL6TABMf!)e@xWMpAy^9|XMnN0a)5mgI>AREH_| zDYc+{9kcKA{|g5ng{?E|0f_luutk$&BmlTpT<^SY03fONE>7$X959hqyaNDTe@G3= zlSvf6qXK|be&FkRaTLsc!s<Tk?0%}QJ`#8nWGOLBhCU%&3FKWEC3*pAsyLZOpTIKW z*Lno<e7wwU+~)qbd|3Ni_y&PTP9(_2q`BWnyTZ^A#ebj@n9vDC;F-oQLncv4GGY-S zCQz<KSTXHE1feQq=!Z)&e1(K<f+3XtoXv%hKgK}pK7Q>7?Yl3JU%F)9CI>dEBFw|P zi?x^2kbn7}?>ghgg<}XyEwq~<Z>AQ8wG@`kDEx7E1N^?kn!#q?Vp~S9m>5KdOB+Y( zkTVSvo9*dvYsGP!QR(n{5K;8ynw+9Cz(>Idj!{2`;C{0YijSAoQPhzvXFR5F#_vGY zMhgyk`;8frRIc32=#76j_}NsTAznwOn&~ecHC-;_M`mmSqa-K;_DJHc5;`4Y{5v@e zIXmbYl&x63SY#I0CR>r|DBfY@=Pqg^teQ40p*0>SUODk$WMH?IP+%zHmm*prgIaMi zzC5>u=pJH8-aCnm{7Th{irjhB$_RlxJvoPb4;2pe@CpJh_e{o#EMm#AVz#1%=}a3d zn;UD61Gf&ejbLi&wCS{2yFVxg`v<|7o|sr+Si!?k(^q76WIkkNq^)Ee8H%Myb7>hr zG&q;uQDj)9<D`Gm)OmgV+LtI{6hB2EMJvTWWxrBG(^XS+!K)HOqe>H}>Z6ulsf=cm z%1#B^JaN@R1(jxJ1yAjynx|Tv%9N^6QIFA6(7hQ}V_2w6ei*b!!>si?SqvTV_jeZm zbR-sCv=EM1?b1J(>NnmUD|#S3P<U|oD5^`kR$5kDCRpbDcAkL4{@$>4#=nv+KS?)< zHR;2Kz$VJpuxMLjS>s>ByXw8#vub+cazcD^w0i39lp~hInsX)KAaLW3*1^-E+7a5Z z=00^OGG}(=b%1s?dWC(kF(Z5Ba9MOka(KFUIzz+D$%V=jPiFs?&+KeG-t3QEx=q{6 zS;%%d-k5bq!k~50j9d|O8`Ix#s~zsoBqEm8pD0bMxqe!#+X<PN+PqsU9xNW(?O~Zn zw#&5am}#DK8z29{x?a6pJ#rk&zmRR0YtpmQwe}bjS|Xi2Bp<~SHJrMd>N|#%`XTkE zI$cXd%S-D@YpGgp(cp;n$YD|2UWGzC3o}a~YpkWbCaY%9Bg<iv@E2hm%Ph;4y5s8G z<Huw4<IH2^6aH(HYsPDb>nW;nN_?tCK{r8P7dQ8D4|}JsqvCC@fr`P3fdg$T3abLw zoC|J}Qib?2{4|d=5_N~NFJ+E--eW0y<bOM6zs_A1Wp!q)*Q_|qZ;T5M`Bgo9V9%l$ zF&q#+6~8>Y(fQ>(zLQgyRrc*7exKu`$4A|d58c$tP1#Jji<}NW)&}*ry2pHs1w@1` z?k5irM81o_=XvLa_muWPHidiW{TKZ+{81ir9|Z5mp5ktMx4q7Z|0y9E!}Y`M!F30c z2R0$tA<!UZAeNwTBgG(fB6DDh5J_O7Vd>JiBz@{5Ij6WYd%teQnmI!>ikd^DM{&<N z&ZJ1ah!-0+g}RCB|Ecs&@nF0KHDXKFKBA4rhAe~R&X17g^}9;;L)B(=H)ppS*2U^w z-3P1g*ne>q(d~k3wk<9mR@JulYW8NwS#7Yk%C^AI;kVNN((v5~7|>24cL$dTg(G)d z;rHz`-)HY;YNWcE)$Xkqwv+rmm>kRX6w>9^jrZjXO~+4b6x|D^l~CazRo*Le{6Ix; z9+DNREZtKWQ>fa|+9ofQ_&Y}{<(h9p&`<K-I!sx{{rh_~Wwke631o@w^cNqrq!xcx zPpvqwu<<8nCubL_VcDcMzggmJebuUL`Q}X$)~?rYhf#{8@X?!H`a9Q)H6r^^#hIdJ zwOSQyVnvSfH=p%M^*^^kyP<mX?>8-<5AWzPf{1;)<Lg!0>YJ9^KI{J5g7ivv64OVi zlX$YfHB{>`|7>$M>o;aS)|mRF@=Hfe^W4^J{XAAJc($ZO@=cI7S4u_l$e3g8rCz%k zkx7cV=BaJkg1%P3YmyYBYNzV*+S_`Ww%@<Bm5dgAue=;qSAWX4j-DJrkBW~Rt8a9B z>*Tv_#TTZ-&ai4I{>AK37&*xQbSv<-y^5V^o*11#;5Okt(I0QAUOO+~DZ2K~2{0Vf zda9{v?O9=3UF_ZP^tr$erXmvjd76CO_4UnXZM$x1zbnVtzd;*u<farIy}$i8+GIVI zhjQb5N_<eRrB9D+-9Fi`*Y)-`qB*GX#85*8oc6L{pH{O@GCjXK>AlAOCcf9tyjkk& zv!n8-U~*u6U}7^Pp!Ev%2<r7_R-o6tnyttoU$~(A^iOnA4%J60*`C%H|I@cSX70n> zaoV~0Ij@BO-R%Y??Ub39<>n}f3eRV(d)+8LX4o038g^SrPUVV{xcyaZHM$wO__-fv zc-G}~3Ar&{V{BEZ5v~=M^>=#OhSuqSI<mMKJJA-Zb-Vm<Bsg<A7jSRex8S;TyTopo z=hc1s{g|TFk!gdnjj`kE*5mqw#1s9m;<}-C+~>N-p4F#AlzW`Rfad20i#~^~TjM_C zsR3P_Q*5;G+~?$%x$x~-*>TwgdKvndxEvZ93M}&ObMwih?Xt!)f~iq|trxE&*Q))^ zr(X{WQ#y~!XBc-;Q@yob6&Eh2RTXst!}P;6U6WqI|4JWgCfEE<+fF++hr4MqUOkFE zt6a?7n+=yuE8mFh`#wK%+=N^_!1x*QKvjussvs)`y!`*k?=DLM0Gcp4DRGU@t0#sw zZW@{`&q`PssJPPrTuMK#B^mh;B6<DW+S0EJ*O9R42?Azv>+ruzQzbkiI_!DN6SNUx z^!U182>!SjN1A=4Wx^}U;p7v;&xDe~n~VbH<xQJ$9c4l{i&RywC6Olecs1MIr-bK3 z9*&<*{H{$RCU=py;HS$k^ksoapacF7T7Ij`mC9dtq-i8ERv0Nj4N&$W0a$=7kd5es z-scR21C)p=aQWzBY%p8KxNIQ++O9k^pTRnMIO-<QTjp{F=Y$0l2asQBD~24YAaBV6 z55O_93j9`t1cQqUONdxnME>2Z7$6BmBXTO;9nYg*S!+bl;q>tWJqRk*lI3X;v=S9G zFf?E`#jZR?sMzL>oCD8&?M>E3j{vGMGYlRO1PHg)zCbfkjceZRKwX_}u$U%1?*eKs zI&*w2UtEI)B8~tUFR+eA`*)U8K=~hF2`nRTg_OEdz}>PUYY2+TkYos1Nh^Avp0Qjd zT`a==Kshr4I*iEmj^>g2gn*Y>H_IYO`vWHOq&;nnKQn<u{rfX5M7l#(0x1@l6%k#F z@DEEo)eEUZOyeGimwtn9qwxY^ffc>`L5i0IUDz9L@*!zSOvQ^QPr&7aK%Bl?IavZ% znWFKK+<0yZ|A0Y^rK_rQXac~)Pk3FJfjWMeiLmuM%I3_Bi0+`g-?-&cn(mpnqH#zQ z#~2Cr@gxTbL%986x@d$cmA{AE*w;zXS96jAJm-s57dCw0L29{frc7TjWD3Cmh+ls* z?ZkaHg=0-Z-YB!FCphTn#tXcj{e^jIGe1&}M{aRQg}8-5VVy;!ViwNbO02W%#?pY{ z6uEhgkZwQS>yV4^i0*Hfr7Fqc3~#preKbPY>bKrOo#S@mz%fa6$-1kyeBW9wS&S>` z0<#ntVSafQooS?8uPYbSYP!K^c3MPsW{X6Iw?;28NsH+7ZL|(BTGg_EJrFL0*`sQw zAxd5dP~e46!Ekl-X<;km3t{1$K5a2%;yihKJjn5^i)Nh$ER=Ii>g*%jA@zfOv?Ps; z9P@6>urxv;m_2Fqu}a<InCv=zme;Wm$37i}yD|1p3Jsd?q@-p}?FNdzH=CBLJmd=s z`XUJN1?y|E#;4`P3cZL<nAgWwY34!G=J1Y1&#sW6*__fUxGtRDfifZe!qJV@!bv<k z<v42L=^A}r1_p+{qpQa6-(>_`e`Cf{@_(zWsv0p7{`#Ew6)1h}kwHukPXfbXxUi~f zfP`DL>IfUMlQ1c!!y*ZoXSe!;S5mY;M(*yK|3A*ozx<vaYE4Z|KL1BPY-*v1y547U z{Z_}J2D9PpdEMt4LNTVGjm<1JVFVu~f||YdIon+690B*jyNms~{k#CBl#~=Hsciew zZl9Z30%albfB*g|9gcIiAbTp{_MHOR;q4@UrI`sncYhSInxy<_U{Fov*5h;IsMlbM zBz(IS%w;i3*zxeU(`Iip#qIvm1_H6Qx8Hr&;Cnv8JYS_<r}E&c>PjF+{@Cese2dU* z2LYEc@PUksEIB8K4f!2sy6E#Q{f9h}oZ+FNgBFLyYF#)9RW+E4$MLdwnvs8d((`U2 z*?r4zhM?AOT*zOe_QdD_c(Ep{snWy4L)yjX?Qoh|O>IL9z28?$M#}g^i0lceZ2G^8 zCk?*YUIT4~{IKGO0uNLhIo@iX9o<3F9dzccC=!lTtAH)<{T$EF5)wfc8M?Z<1_Nkq zgZQ`4PY+&sB7WJI4VVly(S(JsLZUTpd5sdK9F$m{PfYo7DQVf+W9#%=*=aAGCo3u{ zA_?%Orl$7O3_Zx;XuqeM=nuzIDeO<>;c&u-;%cntmzIVpXS^G-2|$-9M{!bM@Wa*0 zWJMrJQQUHAx8CS*4<tLjxGQgHNQj64pPQ+i&KanHXuP~wUCml(%#*K&O-?~^hkzr5 zD-VwFqkrn}v59jqn!qa1s}s4^zMqTX1msOIW4J!jyxfL64A$4ztCWbND$(*OkY<ZL zj6XW@i$xdu2qa{$)fn?xO=kC%-}#Cxz^M3~VE5N2cAewv>jo(*uQ0-YZ7?!2&es`< zQd<Tj!?nFO*uj-{(voGvGq<!<lavfDV0gKlQx<%EQBjtgxFQ0Ml9);ifp|aP?GIEm zWq)!mN5sXrx~`8(MfJWumh-tjMpN6D67ar!RZ>#I|N1>Yf5w+DUod9|y1Inq<>Vp> z@igH6P@v<jQx`s{chU!eo4ulux7lc+0JXrT;ECq>^ivTm&cGY6TEG1N0|6N`Lh2=K z0!yTYGf9Bkk0;F-ij64g@|tuq{jFpP`s-lE5I!X-F84!?P9+v`60>OkyD_8ljQ3XO zx=ofdgOLOloL|<Or<U7|kZFg|;1okdCDJlbK6EZ%6N*K6UmZ#h4Gl?2brlqdOCtuo z)zH*boyrx~AIR&A<W0PN-jrc7>2||;EZEXp2&mD_#vnyV*tCC{mc%i+J=@;O9@zPZ z*cCi@3dCn+MU9S*)=x~br(rm@Qm|_e-lTHI{NwnkRQilB@Mq9uF7~~Z6y*mqQ`67k z*i@gvit#cvg~UZgMWq*24DW0Mx9&@ZvcqvS%n*EQTDkI%03=s5z+Ztcb9JT4cqj+0 zk00=~L0K=7M4Tf`UmmZLo=S=k7u8Eoh|6Y4bMD+YyYmHLZEbw1si|SAMKUIre`cx! zUY?;!N;1B_LYbMF<&~A_qED9u9;ZKJKJ`AOrlh7878XKOYS&Jf@}|m2x>>Eib8&O` zpLonk;s}R;VB<8o?eQ?<3c-&J1p4^)n_c&nI-g-4RNm>q84mM#-cww!4Ysg>Pgz8` zD75<Da`hKf!4;XV3wW~gzL?;3XLHA2CEm?$Fz$yZ=XWuOy614&;B#|xAHefBYN=>w zFdRR(+{*?fYHsS62ZT=SZvrw0cu_hLjzOZuRk<bg(rLlqo6Jyr>Y{7<INP*r<8XWa z0^*+UNFw9oVO5<+Go}4%b0h_BW+gQRk3Ft}s=g6+^9}V(5*m^;Ya%9Y7bA;iE}858 zBvGyIVM4s6iJ>8t-{p*Kv*{3ekK2Ko_d!Y8pE+ewtm++?)!qQniCp0|EyLkxG6FH= ziF!Clp)9r6pvMaXBjZdqzpM2`CU>*#!t0K!MScANMkS}<Rz_9W2;wx^b6emlfbYTU zE+ti>+x58tJ&y#vJ*doeyWV*Ki&tf-)=;kTLcP^-!y4QbE}v`r`{SmmAj`8%ZoAKF zYKawJ+FbVJB@M)?AkV*fdmHv#M9hESj!sT$;i*VUA_za84Y1Wf(2q>{VKa@Lu>6RI zGuf*a0-jpkS680`9<tDtmv#UU&ywTgjdlIi)bKa_A5Jd!(u^vZu1Ji0P1<71ii;7Q zX=^N$eZlgW<z6x{TPZCrX6W&I@L1T2YRLgn=zAQ^rrJ{#)tu;$(Lg6kFWkkoADJ-( z>n>w#a7P)e$<CAQf0|F$S}!JZ1Tlt{T-pubm$#$eg7@7k?~xM^lu<c(`9dTN;xn+; z`Y_p9S&Qi;!w|n({Os~7Rz>={r2?aOSZj$%OiE(o@1L(wZ%^1ui1-7}(vd|e|H+_Y z0lf=oq%=jqBfu2&{5yVgyfT0#WY359@BZF9lgB~t2Zh@E_wVn1cKaY$B&Vb}+Yr0d zEsgcwAHEq7h)@<s982S9U0{wAI*)i%^2*qjl0rg4f|GEh>sRshui}1v6)LLXQ%<+{ z4HDGux?d?EABXC3vMLR7Ahw;hi=H0&)W`^0vis#9)sDO0S!e)_pa*MRMa2vSYvLi{ ztsG1W-r(I~(p$6dXJ9>5G?Qkadi-6Nn-$cP7sQqLrIUd=i$|$bD4mM%opf(+@1XXj zQ6()aOMyzj4Ry_9y4%NdwZ(x#&X!>V>~mkRl3sgqd@wZMP6jFM7TiRA_`bc8;quLo zpSO`D-#42E+Q;m{fX6aL#P`S0_6c#srH?*rVC^Hh$9o9>zqr)G-cp0G`4R;Z@0}Q4 zczWmSV_mxU<)icLC=yyLt)FOUxNVcWUiz9hWnwAi%9L`@A#Qn7vhOX&tv^6?n9Pur z!{rc#=H;jIL`9(-OFM|*;K>;oBkt2J@zoIx4Gq2vm710BE~`V%UnImPCMSQ7jEpcK zs#W<P&6Z&JJzXt{OI`mPrb${l+T)3&CCtOFYPdyx{&5aX=1JjdRhOOq3U-*J7?j~H z!cw(v5ehp$kAebgHZ|CQeXI-er+V>F+@q?xp2PBh(hpfOS65e+JenFB)Ac3;dOk0^ zaIX>;edumA5{UJ&7we2ZMNCHO(nsVM6a-FXaw{mH(mBI#zsDsZkzH&3q&?v#yshB@ zJdGJWo341Ijs3r^rTe))v3Y`??5O?YKYm!-1i%+r$#@fvB_7Avn%m3?5=3C0XFSz; z2l)AQ=YB9Eni)LtAlT3L>i*c`d*@PFT|GEV6TrH56$8oQq_Sg<d>4UAFB>ZbGIqKI zY31vP8-j!gc8P4)#dcS##VT!%FEKF|F)=ZS0CikA$SQO!ENGxs;Bx*Y#p88u4$`0M z)y~6d?-aGq@!R9I);P>+e{<7N^LmjwIgYrQTk+_pKb*SCI>)x#-$GNz0<ZnOy!Z`0 zH{4CUSkMChP6a$S)vDN<zu(H91M9cEurTQV@-_0iA|fIrRB?8G3sxGm^$?svGuYJ~ zH$QzeA4v6Q<j1}~;5%aAQAD6Bar)i6ebm-wHbeB5$c$cgvgqWc;WQS5&WxEmS?+v~ zG0hJWqtY$YPDK!0RAfi)X=_WbGwe)N29=uU@p40r4&K+(&x;5z{fSyi=+^9IiI0!I zATA=Kp`n$=66!4q*)MZe>$hUJZg^1S@VkDGos-_0+jHsPznFo+A#nQMI&J?dv8_6m zU`j<!8ymVlSquM=#Zw>~M_sL6rbI|VF&2S}g@vV|t{zOlthDtbf&O^9K=Ks}iwP)G z9QrE;SpztL&k)RFPDsSI&uMp=Aja2cxJ)Y$BeaeD7Tz-B+OF)5Bq6i_UcB}8Z>B4w zK{1Nm#VaC`3(h~`|7&=7*fnjeWQ|$iW(}Wt`4HYI1G|K;z54vX8Ghjg6kwXvUc`sO zQ>13uuE?;7Y<_|$Vm4Fqf<&@;G$8$#?f2Q)*$}g`7T?l(gcN-;yaogmY($W#pM|O_ zDoj9bJAS;oh<2SMH5=dg#~C+Fu*F_j%Zal;jQN-1Do6Jt^XVUS;K-rSX~I@I`Q(J$ zB)V!(vUa0sI5Oh@WyXXtY;=4d9=`a$+fi9(Q(0VtDl1=S3VFHcqk$(JME?YV<>l2e zIKY4I1Fv(#u#pweCIiJ}#egW=*sx$x@~LdyrKV2L&ujE}o_?GqxNPPNeAQK59es1O zRLA{om1o~Y1^zb9#lc+(fTeO6)t2GA(Bsg=Jn%kU<h?Xw5yw#QDy0pO21-jwZTen( z&_}l<V^KOw!nmiKs$Qf{hjxvJC0F_c%oIxh7#W#ygn!GX?iCByCw#LWESJR8Z!U~k z3_hHx0)9LUF*X<l=bPz?1)bxf2{Ab$hGbFw=#dMHhlRC<ICGj!kN?yC_D%1L@Zav6 zkC~h%@C@}*DZ_g%GoXC?^ZamH1~&01LbZ49+tQBYeN>?9BS)!X1_U4@oljYJ<i(;9 zG0^lp@C&@LUD%=VzYV0k#JgOrC~_H~#Zml;5Y?sha|RKplfv~=L$kd2JyF!y_zpB( zMHnRPDi#)ue)k7udh0@e$lsbGrX(jLrXme(Yb;T7$llUIz~*mWXZl&9kVZSKEd0L3 zSNYvT3)iou_0FCfguV{wD53;&&rYl$W|5ct^=C;^Zed}=zWT=9NvsGlY1Gzrm#7NG z=`v-S%F0R?27>v8g^?`X)g;Aw6d*T>tHk4IG3NZ@0!!E<GJ?l(-MXE^>hboUhN`NG zh4yr%=j9-Qa{8kCY_VMF>3pZQs;W5H+17E{#^DMp&V;HNv}|lKvvYHDeRYshQ8P@D zJmqmWOe%r-2nqlI9aNy`^S?L^ZEX^rhtO!+#J<mr82QU_#;*vVwZA$Xv_=zZk~Q@7 z&{g9+m<Y06;P@;|pSdNGua3cUqaokQM43=Tc9mwwjgA7Jo4;^~)6kCRvjLp{B^(i? zyz9+bwPh!towYTm^mrH+1u+8)f$CQGyX`NVo~J*tC{W9Z<cC?uuPoJsGHlq1EzRD4 z*iFWG4z3!|#M6vPiGKU~R`Y%mbT>20%cv)(-tM}+{=(p#;k>3N1pfY+DGEDG7~bgz zo4!Uvxl~nIS5-A3Wpz(Vx;ZOu#h16Kz?)pybsTA{9swh@#_iW2S_(A>PA2IYSZ9S@ zUF+C*p!Guj)LYY=r8m$52W$qsbZ>X!6A;XlDd**T{@KPkKLwH5T2{`{sU73Fo{Jg6 zLO?0voBsOsYmMG0cP-RFet!N}930HRAV06S)mHbHZ6;bAs1Dp9GmxB`s%B$TQJ^^8 z>G?@sQITQApt_$5dM*MFfNCV+o8fAdBEW{19em#$tzr&>$?U9}{aOoK#L&I3NSgt> zmYP}+*j(SlsHZKWASxmD2Xo^0XMa0S8_&;O2Hf9)yE-&DSe{B0n)RbG?28~FF>zr> zhd|;x@!}`6<HF$8dmgxQCpbQgt#D}ncaUR1H`e03BQw9a_znn+pr?)tI6VUQBwY-t zCKX<F5)^qwiD<hPGH<bp3JWE0(@e@RsfBc;s7;VXzKFl<@9i~!LPlDR$@)$GKYu#X z-0&A;yYzZ?o%*Ie;R5*Idwb%MOE|4-Sd;ufen$s+r{^gX0-Unv)8R@JbE#5JrG6>C zQW#(iYH>X;+6W}jzbS@&L3*1YLmjWFbiC3Oj=8AOIP=M4$@-mc=ScCCiE63tProyo zLL}fej&ow9QV5<~5enV<)O|%fg4Z7z(R=m{BNkqp&8TPn(g1+`s_Q!cvaC!yisRk8 zcJjN^<79S&#Cliva>H{|b+gA${~=`l_j0`aS)K(Ev=?w<N{mRwZS3$kkq7gT4s^e& zy1Fv3gV9xn&%Q)P7Fgx^ExtBI4FCfGC}JLG6cU&9G%dSO(3Of}_vNetN5ayP!-qkR z*@%Ki5lx1skAO#r*hx#ays4R)O@9!QDS@1EDG?FTKj|pqf6>v=V#hQfg{iBnAM`x@ zC6J-6B@s|EsM4zW6&V?Me$6!?u;I0z^9U}30dsTL7lI#Q5h&E3#eRNXrREE4tAsPC zGNjScHAf$*kO~W7R!kQI^BcyR_Xl9yQx4KDIy!oJeSN&Vy!<Yd(O~N2s4oz~g%aY} z2dClgdstD{7C1ro1I7S}jHcj?-P#QLxu^ui@{~OEusDAR_1JT@boC;(k!-avH$UUH zTbu?Hj^OJ*8KLD>H8p!+2V5@oKBshep8owTc?c#a(X8RGA-Mf-HvMi416iCfHixVk zf?iV4#Go;o12j9e9OH3a+^gP}4B{Bv@q}NaLGVh*%ZmdIguJry@N$FMTbEsEad9!N zhzK=Um~X#>{1XDg?AF=#fQEs=cw<vjLRy+E3A@2`rI>k80|5X!D%I1U-DF%o=;kqE z^O_;46JukN4h}VxI_h=ZGJb=Y_X%XnHsi;<T5C_yquf3>y~)aT1}q$~2~?5e%AsGR z-a^zro2-;YjQap`J||j3_XSN*K-lpr)*SQ%JMVn|CmD`ian1JU*ae-hmYUy1iWRAN zhNn=IDZVJp55>6t-CxIkw2-V7rCVh|=kW5=uoTd?IPLyOu=KhC^R`fT0%RFBGS5EV zP2b?4prF2PkHofji$*NjG=MKVmcj^<6LcH9N5#Y}>LtfsCoo1x>kkD2ED!<ZUF%v* zX(>}_F`&a}N`zqiu`UfxOi4)zIA}KGkAYuKS2#E7IX^&uOo#x3XH%9Wvt?3~&lGE1 zodVn?-**1hgY=oQpxQuG?n@>08q_|gy)XWJh#SNvX5urOESciQ>sLWX0foNb({(z= z5h3UVznk%;9D0>MQ{hkvB;Vhha{R486u;}-!UVxgLrcr@`q?@-#v+iDMyx`!#~kRS zM3-Rm{uyZ4ud)(3Xf=^Jbj8zTt0AQ%)z#RTXykM9RjaI6Hp}?cvnZOe+O+x11sdF0 zyNqz8e1@3rT*ev0`JL}7R#hOQ#QN0aq-AJms8VWa3p>G&J%5ZX3_&RXpa4QVOBLQQ z_g{1LKAyw&RIX{_Kg>e7xwy85NQ|Te6&OYk>-Z-g$@L~r+I6wVVJ<>XBT3BeG1Ay^ zEm7YUs9PaGM}pY6lA&JB3@(Ijmz%jna_kpe?|XUBN^63LD3L(~^Gi!+D~%RxTD`>M z9BRamAI)Ruh$+_dC#Yk|NJz@K&0M<yO)052+O_r=;hr+@db2-?CL0qL6r&Mq4e|J~ z|H>B+Zgas$Uy9Ua%{C|pB~n>wsQ^Er5IH9FygPirg1*W@ujE^0Go{7+o{MT4yCIZ+ zO$=LbKLYjlR9+oLt`?;aM-SLC8+vwDTm*sF8NPs=CBkuoIAYZnj_VS^?|%G~^2o3o zKM@)bLlQDFBFD!Si%UvCISdAv{>C)EXK*gAt_6dLK}w26`SYNSP|V`_K;oRFAz{B< z5BEQcc`&P&A3B!*Dc|Vw$eoLwQoHT`{!J+^3nqdG7ggJHZ(A!xy)V#Dd-p9A<7<EZ zhyFq^EJ@(nwt|-%WL^JiM`GwaL{zykPu$dA6D+;z+3QI6xTfBkGQ}{|X6~l(QAcVT zbS?`O^fGkExxVLeYf|+VW5kjWTF6Iz{jpCS2TYwagGG_3gLIa|TQ^ilmqjytJdQx0 zx%3e3GcsNhTJbAW?|ulp6>Umd+65lHjJ4-G6!-D;w`NeZ*Ariv(;{4wlN7Q?0S8^C zt=knN7$CH0AaI9|DEKO*1U`mFG<Pyrn4-9mj1ndeO0+rjMDe{h24Yi^83cGN4|IBl zp)pSW8K@%tQz&M#k9`-DKu<{fW&yp@8JJ71oxdf_9R+cQYY%a*Oc^Izp^v*v2M-U- z6EQ$4)sdT@sivYFni}2`(7QM(ZTd3l#j2*^v6rHaOy_rAB7HmP!AW*O;t>RgfV`Dq zl^eKpL_`h{7U2O~-8Vl6K<u8Go`!j3@;#b-d0D^@-N1P0Oi@G{xH?+O%JETD>ysDo zI8NuhKrZ$&VOLUAELIk|lOh^`qQ{Q#e)>6{l$gjmB_FE><_|_Qvl^|Vh2kv{TcBfJ zYPv!R?Wij+&u39DB}J}Im7E790(*FuVYfH8G88%;*8T}ciZ<XyR1Vv^Avq#%N{i=+ zRvkhLDpgUh^Wwi=D5feG=jUxMA5~P!JPzmO+(+9Lq3-VP2K<%ZuPY8zr4Y|uOMtNE zMRGTy`Ec7X2DGt#TALdR9&YX#EZ+6}EDn15;PdlyH(ml_Vq#EfCS6V{*uF=u<vh3R z4t=K|1%#OMpo?Y5xVs?|mlPMDfq5a1b!&Zol<3oea^Su&HIA~f^1j_t?H-s|;v~}B z+S%Q0zC7RbCAbSHi1}<GilEhH9N-o@ws2AVYrA)nN=!fX2cw`!lMzX&sH;n^tgJM< zA8GyXQ7UU|u_XwVa|EQp1dAca96dNG48bW&Ce2y}j~~WwV(mSV$OOC!Z+ddB^!wuM z?0osBC{7I&hC<T@pNt9%*;E`I*#p3nhp(l^oy1etbntAX^MJ8qF&|)uEU_Gt=h;bq z5<}nANI*c~3??NIVPPu2hwGAB!_LO^bkbX25pV{UAhX|sTcfI?0x&*ysp?-|Ba#o{ zH@jxjD6UE)KgsjluaskX?<+b37eKYc7;NZsOf>G{v5GJS4Gj(7^lYuDxZoDz>LUpt zgv<70;nnR%)(KZ5W67!Y9QJP4a6u$1K2`-UEY1N{V4~%2kS=p2wHe{0N%WP1L)J8W z_9!_OTvz#licyG_xz8^|Z^T<X*z=4GAkz|7q&7hAp!1!b7&0vo;$-t=M2Qw2-;(SP zM?00@PdTyWK#3Go@R-YV@Z7r{M=-;#j{g|TvM-s<a-u3Y{d)!8n3g@r?fv{Di-%x? zFmB)sSQymNzqv(|=aKw5e$!(ke-%E)nr}G?GEF^=i((y_7m*V0t)^9PR2e!hkC;b) zT}VdqfZJE+gvVUdZw7&RnsA^>HnXD0xR0T55{YHc`}4Awh>@eblt#*b7+yHCCUn4J zO=NuXp75~+e37@XC$@~_nQTa5`*6pLWbxl|#mjz&)DCU&+W5Z-7F`^OnW^V#U6?mC z$;kj@B)$y4(OunbN!LAj1@F+J{*&x>M`RE9OwboM1Id?`992n;dW(KLzqZ{+hLx*Z zuG9IXfz(^&Sy1@=S1dxDjvX(sn-IhJ)nkEf9SWyGJHCEBwg}*pLS~fj`-0tfV6C-K zSkm*YK|)CzfWl47im%NQ!XE^4LfoJg#C^(V`WM#&0rrX+LC%y~A!1bmA0a`O<*f>L z_Oo}waL;V6zb@oMp&jsTnEtl{#LxLZKU(yWC-)0syi_!lZMAN{6#I&nJ!%!H=TeA< f!<SkgjlZDu#P5sF0LHT589g8;tt3?|VI1@y22Fs4 literal 0 HcmV?d00001 diff --git a/symfony-3.3/web/config.php b/symfony-3.3/web/config.php new file mode 100644 index 000000000..fd7e17e6b --- /dev/null +++ b/symfony-3.3/web/config.php @@ -0,0 +1,422 @@ +<?php + +/* + * ************** CAUTION ************** + * + * DO NOT EDIT THIS FILE as it will be overridden by Composer as part of + * the installation/update process. The original file resides in the + * SensioDistributionBundle. + * + * ************** CAUTION ************** + */ + +if (!isset($_SERVER['HTTP_HOST'])) { + exit("This script cannot be run from the CLI. Run it from a browser.\n"); +} + +if (!in_array(@$_SERVER['REMOTE_ADDR'], array( + '127.0.0.1', + '::1', +))) { + header('HTTP/1.0 403 Forbidden'); + exit('This script is only accessible from localhost.'); +} + +require_once dirname(__FILE__).'/../var/SymfonyRequirements.php'; + +$symfonyRequirements = new SymfonyRequirements(); + +$majorProblems = $symfonyRequirements->getFailedRequirements(); +$minorProblems = $symfonyRequirements->getFailedRecommendations(); +$hasMajorProblems = (bool) count($majorProblems); +$hasMinorProblems = (bool) count($minorProblems); + +?> +<!DOCTYPE html> +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <meta name="robots" content="noindex,nofollow" /> + <title>Symfony Configuration Checker</title> + <style> + /* styles copied from symfony framework bundle */ + html { + background: #eee; + } + body { + font: 11px Verdana, Arial, sans-serif; + color: #333; + } + .sf-reset, .sf-reset .block, .sf-reset #message { + margin: auto; + } + img { + border: 0; + } + .clear { + clear: both; + height: 0; + font-size: 0; + line-height: 0; + } + .clear-fix:after { + content: "\0020"; + display: block; + height: 0; + clear: both; + visibility: hidden; + } + .clear-fix { + display: inline-block; + } + * html .clear-fix { + height: 1%; + } + .clear-fix { + display: block; + } + .header { + padding: 30px 30px 20px 30px; + } + .header-logo { + float: left; + } + .search { + float: right; + padding-top: 20px; + } + .search label { + line-height: 28px; + vertical-align: middle; + } + .search input { + width: 195px; + font-size: 12px; + border: 1px solid #dadada; + background: #fff url(data:image/gif;base64,R0lGODlhAQAFAKIAAPX19e/v7/39/fr6+urq6gAAAAAAAAAAACH5BAAAAAAALAAAAAABAAUAAAMESAEjCQA7) repeat-x left top; + padding: 5px 6px; + color: #565656; + } + .search input[type="search"] { + -webkit-appearance: textfield; + } + #content { + width: 970px; + margin: 0 auto; + } + #content pre { + white-space: normal; + font-family: Arial, Helvetica, sans-serif; + } + + /* + Copyright (c) 2010, Yahoo! Inc. All rights reserved. + Code licensed under the BSD License: + http://developer.yahoo.com/yui/license.html + version: 3.1.2 + build: 56 + */ + .sf-reset div,.sf-reset dl,.sf-reset dt,.sf-reset dd,.sf-reset ul,.sf-reset ol,.sf-reset li,.sf-reset h1,.sf-reset h2,.sf-reset h3,.sf-reset h4,.sf-reset h5,.sf-reset h6,.sf-reset pre,.sf-reset code,.sf-reset form,.sf-reset fieldset,.sf-reset legend,.sf-reset input,.sf-reset textarea,.sf-reset p,.sf-reset blockquote,.sf-reset th,.sf-reset td{margin:0;padding:0;}.sf-reset table{border-collapse:collapse;border-spacing:0;}.sf-reset fieldset,.sf-reset img{border:0;}.sf-reset address,.sf-reset caption,.sf-reset cite,.sf-reset code,.sf-reset dfn,.sf-reset em,.sf-reset strong,.sf-reset th,.sf-reset var{font-style:normal;font-weight:normal;}.sf-reset li{list-style:none;}.sf-reset caption,.sf-reset th{text-align:left;}.sf-reset h1,.sf-reset h2,.sf-reset h3,.sf-reset h4,.sf-reset h5,.sf-reset h6{font-size:100%;font-weight:normal;}.sf-reset q:before,.sf-reset q:after{content:'';}.sf-reset abbr,.sf-reset acronym{border:0;font-variant:normal;}.sf-reset sup{vertical-align:text-top;}.sf-reset sub{vertical-align:text-bottom;}.sf-reset input,.sf-reset textarea,.sf-reset select{font-family:inherit;font-size:inherit;font-weight:inherit;}.sf-reset input,.sf-reset textarea,.sf-reset select{font-size:100%;}.sf-reset legend{color:#000;} + .sf-reset abbr { + border-bottom: 1px dotted #000; + cursor: help; + } + .sf-reset p { + font-size: 14px; + line-height: 20px; + padding-bottom: 20px; + } + .sf-reset strong { + color: #313131; + font-weight: bold; + } + .sf-reset a { + color: #6c6159; + } + .sf-reset a img { + border: none; + } + .sf-reset a:hover { + text-decoration: underline; + } + .sf-reset em { + font-style: italic; + } + .sf-reset h2, + .sf-reset h3 { + font-weight: bold; + } + .sf-reset h1 { + font-family: Georgia, "Times New Roman", Times, serif; + font-size: 20px; + color: #313131; + word-wrap: break-word; + } + .sf-reset li { + padding-bottom: 10px; + } + .sf-reset .block { + -moz-border-radius: 16px; + -webkit-border-radius: 16px; + border-radius: 16px; + margin-bottom: 20px; + background-color: #FFFFFF; + border: 1px solid #dfdfdf; + padding: 40px 50px; + word-break: break-all; + } + .sf-reset h2 { + font-size: 16px; + font-family: Arial, Helvetica, sans-serif; + } + .sf-reset li a { + background: none; + color: #868686; + text-decoration: none; + } + .sf-reset li a:hover { + background: none; + color: #313131; + text-decoration: underline; + } + .sf-reset ol { + padding: 10px 0; + } + .sf-reset ol li { + list-style: decimal; + margin-left: 20px; + padding: 2px; + padding-bottom: 20px; + } + .sf-reset ol ol li { + list-style-position: inside; + margin-left: 0; + white-space: nowrap; + font-size: 12px; + padding-bottom: 0; + } + .sf-reset li .selected { + background-color: #ffd; + } + .sf-button { + display: -moz-inline-box; + display: inline-block; + text-align: center; + vertical-align: middle; + border: 0; + background: transparent none; + text-transform: uppercase; + cursor: pointer; + font: bold 11px Arial, Helvetica, sans-serif; + } + .sf-button span { + text-decoration: none; + display: block; + height: 28px; + float: left; + } + .sf-button .border-l { + text-decoration: none; + display: block; + height: 28px; + float: left; + padding: 0 0 0 7px; + background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQtJREFUeNpiPHnyJAMakARiByDWYEGT8ADiYGVlZStubm5xlv///4MEQYoKZGRkQkRERLRYWVl5wYJQyXBZWdkwCQkJUxAHKgaWlAHSLqKiosb//v1DsYMFKGCvoqJiDmQzwXTAJYECulxcXNLoumCSoszMzDzoumDGghQwYZUECWIzkrAkSIIGOmlkLI10AiX//P379x8jIyMTNmPf/v79+ysLCwsvuiQoNi5//fr1Kch4dAyS3P/gwYMTQBP+wxwHw0xA4gkQ73v9+vUZdJ2w1Lf82bNn4iCHCQoKasHsZw4ODgbRIL8c+/Lly5M3b978Y2dn5wC6npkFLXnsAOKLjx49AmUHLYAAAwBoQubG016R5wAAAABJRU5ErkJggg==) no-repeat top left; + } + .sf-button .border-r { + padding: 0 7px 0 0; + background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAR1JREFUeNpiPHnyZCMDA8MNID5gZmb2nAEJMH7//v3N169fX969e/cYkL8WqGAHXPLv37//QYzfv39/fvPmzbUnT56sAXInmJub/2H5/x8sx8DCwsIrISFhDmQyPX78+CmQXs70798/BmQsKipqBNTgdvz4cWkmkE5kDATMioqKZkCFdiwg1eiAi4tLGqhQF24nMmBmZuYEigth1QkEbEBxTlySYPvJkwSJ00AnjYylgU6gxB8g/oFVEphkvgLF32KNMmCCewYUv4qhEyj47+HDhyeBzIMYOoEp8CxQw56wsLAncJ1//vz5/P79+2svX74EJc2V4BT58+fPd8CE/QKYHMGJOiIiAp6oWW7evDkNSF8DZYfIyEiU7AAQYACJ2vxVdJW4eQAAAABJRU5ErkJggg==) right top no-repeat; + } + .sf-button .btn-bg { + padding: 0 14px; + color: #636363; + line-height: 28px; + background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAcCAYAAACgXdXMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAClJREFUeNpiPnny5EKGf//+/Wf6//8/A4QAcrGzKCZwGc9sa2urBBBgAIbDUoYVp9lmAAAAAElFTkSuQmCC) repeat-x top left; + } + .sf-button:hover .border-l, + .sf-button-selected .border-l { + background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAR9JREFUeNpi/P//PwMyOHfunDqQSgNiexZkibNnzxYBqZa3HOs5v7PcYQBLnjlzhg1IbfzIdsTjA/t+ht9Mr8GKwZL//v3r+sB+0OMN+zqIEf8gFMvJkyd1gXTOa9YNDP//otrPAtSV/Jp9HfPff78Z0AEL0LUeXxivMfxD0wXTqfjj/2ugkf+wSrL9/YtpJEyS4S8WI5Ek/+GR/POPFjr//cenE6/kP9q4Fo/kr39/mdj+M/zFkGQCSj5i+ccPjLJ/GBgkuYOHQR1sNDpmAkb2LBmWwL///zKCIxwZM0VHR18G6p4uxeLLAA4tJMwEshiou1iMxXaHLGswA+t/YbhORuQUv2DBAnCifvxzI+enP3dQJUFg/vz5sOzgBBBgAPxX9j0YnH4JAAAAAElFTkSuQmCC) no-repeat top left; + } + .sf-button:hover .border-r, + .sf-button-selected .border-r { + background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAT5JREFUeNpiPHv27BkGBoaDQDzLyMjoJgMSYHrM3WX8hn1d0f///88DFRYhSzIuv2X5H8Rg/SfKIPDTkYH/l80OINffxMTkF9O/f/8ZQPgnwyuGl+wrGd6x7vf49+9fO9jYf3+Bkkj4NesmBqAV+SdPntQC6vzHgIz//gOawbqOGchOxtAJwp8Zr4F0e7D8/fuPAR38/P8eZIo0yz8skv8YvoIk+YE6/zNgAyD7sRqLkPzzjxY6/+HS+R+fTkZ8djLh08lCUCcuSWawJGbwMTGwg7zyBatX2Bj5QZKPsBrLzaICktzN8g/NWEYGZgYZjoC/wMiei5FMpFh8QPSU6Ojoy3Cd7EwiDBJsDgxiLNY7gLrKQGIsHAxSDHxAO2TZ/b8D+TVxcXF9MCtYtLiKLgDpfUDVsxITE1GyA0CAAQA2E/N8VuHyAAAAAABJRU5ErkJggg==) right top no-repeat; + } + .sf-button:hover .btn-bg, + .sf-button-selected .btn-bg { + color: #FFFFFF; + text-shadow:0 1px 1px #6b9311; + background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAcCAIAAAAvP0KbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEFJREFUeNpiPnv2LNMdvlymf///M/37B8R/QfQ/MP33L4j+B6Qh7L9//sHpf2h8MA1V+w/KRjYLaDaLCU8vQIABAFO3TxZriO4yAAAAAElFTkSuQmCC) repeat-x top left; + } + + /* styles copied from bundles/sensiodistribution/webconfigurator/css/install.css */ + body { + font-size: 14px; + font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; + } + .sf-reset h1.title { + font-size: 45px; + padding-bottom: 30px; + } + .sf-reset h2 { + font-weight: bold; + color: #FFFFFF; + /* Font is reset to sans-serif (like body) */ + font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; + margin-bottom: 10px; + background-color: #aacd4e; + padding: 2px 4px; + display: inline-block; + text-transform: uppercase; + } + .sf-reset ul a, + .sf-reset ul a:hover { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAICAYAAAAx8TU7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFdJREFUeNpiYACBjjOhDEiACSggCKTLgXQ5TJARqhIkcReIKxgqTGYxwvV0nDEGkmeAOIwJySiQ4HsgvseIpGo3ELsCtZ9lRDIvDCiwhwHJPEFkJwEEGACq6hdnax8y1AAAAABJRU5ErkJggg==) no-repeat right 7px; + padding-right: 10px; + } + .sf-reset ul, ol { + padding-left: 20px; + } + .sf-reset li { + padding-bottom: 18px; + } + .sf-reset ol li { + list-style-type: decimal; + } + .sf-reset ul li { + list-style-type: none; + } + .sf-reset .symfony-blocks-install { + overflow: hidden; + } + .sf-reset .symfony-install-continue { + font-size: 0.95em; + padding-left: 0; + } + .sf-reset .symfony-install-continue li { + padding-bottom: 10px; + } + .sf-reset .ok { + color: #fff; + font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; + background-color: #6d6; + padding: 10px; + margin-bottom: 20px; + } + .sf-reset .ko { + background-color: #d66; + } + .sf-reset p.help { + padding: 12px 16px; + word-break: break-word; + } + .version { + text-align: right; + font-size: 10px; + margin-right: 20px; + } + .sf-reset a, + .sf-reset li a { + color: #08C; + text-decoration: none; + } + .sf-reset a:hover, + .sf-reset li a:hover { + color: #08C; + text-decoration: underline; + } + .sf-reset textarea { + padding: 7px; + } + </style> + </head> + <body> + <div id="content"> + <div class="header clear-fix"> + <div class="header-logo"> + <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALYAAAA+CAMAAACxzRGDAAAAUVBMVEX////Ly8yko6WLioxkYmVXVVkwLjLl5eWxsLJKSEzy8vJxcHLY2Ni+vb89Oz9XVVh+fH+Yl5n///+xsbLY2Nlxb3KkpKWXlph+fX+LiYy+vr/IZP61AAAAAXRSTlMAQObYZgAABRBJREFUeNrVmtuWoyAQRS1FEEQSzQU7//+hYxUiXsKQZLJWM+chsUloN+WhCuguYoKyYqzmvGasKqH4HyRKxndipcgcumH8qViTM7TkUclcwaHmf5XM0eWq4km1KjdqXfMXJHVe1J3hL8lk5fCGv6wmT+o0d87U+XNrk0Y9nfv+7LM6ZJH5ZBL6LAbSxQ3Q5FDr22Skr8PQSy4n7isnsQxSX4r6pobhjCHHeDNOKrO3yGmCvZOjV9jmt8ulTdXFKdbKLNh+kOMvBzuVRa4Y7MUsdEUSWQe7xxCfZmcwjHU83LqzFvSbJQOXQvptbPnEFoyZtUUGwTeKuLuTHyT1kaP0P6cR01OKvv448gtl61dqZfmJezQmU/t+1R2fJLtBwXV6uWGwB9SZPrn0fKO2WAvQN1PUhHjTom3xgXYTkvlSKHs19OhslETq6X3HrXbjt8XbGj9b4Gi+lUAnL6XxQj8Pyk9N4Bt1xUrsLVN/3isYMug8rODMdbgOvoHs8uAb2fcANIAzkKCLYy+AXRpSU8sr1r4P67xhLgPp7vM32zlqt7Bhq2fI1Hwp+VgANxok59SsGV3oqdUL0YVDMRY7Yg8QLbVUU4NZNoOq5hJHuxEM28Sh/IyUZ8D3reR+yc58EGvOy2U0HQL6G9V+kWyEWHmzaMx6t4o9RhOm/riUiYrzqij4Ptqkn7AaCXqc+F47m04ahfde7YIz8RHEBN6BdVwdIGRVdNbKqYu1Hc0x0wBY4wqC8+XUgBGnj81SZsQB+0yAS1x/BlI/6ebHHk0lauQLuPDpu6EwAVJ7T0rl2uXa23jcqNyOZekhqYHRz3JOANrF4wCCmEs1f9D1lUe0n4NAATed80Y5e0Q7CO2TezM/BR6wKdgQzKbCF4uOQC3Bk0fKAzbFlyRWg3gksA/gmm7eOjrpaKX7fHlEW2xLbE6GZsPiCiShVzN7RG2xTz2G+OJtEqzdJ7APxy3MrSsV0VukXbKMp9lhs5BN6dr3CN+sySUaoxGwfRUM3I/gdPYONgVU+PLX4vUWm32AvUySarbONvcpV2RQEPKKjEBHFk01kQDGRblnn8ZuE9g+JUl8OWAPbkFK2K6JxhJVvF47FzYYnAN22ttwxKYCoH36rheEB7KG/HF/YUaa2G5JF+55tpyrl7B1WHM39HuP2N2EXPl1UBu8vbj4OjvD+NoTE4ssF+ScARgaJY1N7+u8bY/Y9BSM5PKwJbvMVab32YP5FB5TtcYVrGoASolVLTzI7kVsYVxRtAb5n2JXq1vCdtd47XtYItynrN0835PasLg0y13aOPbmPI+on2Lr9e5tjSHvgkAvclUjL3Fsdaw03IzgTR62yYClk7QMah4IQ0qSsoYYbOix6zJR1ZGDNMOY3Bb6W5S6jiyovep3t7bUPyoq7OkjYumrfESp8zSBc/OLosVf+nTnnKjsqR16++WDwpI8FxJWRFTlI6NKnqYJaL96TqjAbo9Toi5QiWBDcmfdFV+T8dkvFe5bItgstbM2X6QG2mVun+cazfRwOS0eiaeRRJKgLfc3BQAqfnhJyz8lfR6580SF/FXVu83Nz1xrrnFqqXL6Qxl47DNSm4RFflvN5sABDD8peouqLLKQXVdGbnqf+qIpOxON4ZyYdJEJ6sy4zS2c5eRPTT4Jyp46qDE5/ptAWqJOQ9e6yE82FXBbZCk1/tXVoshVoopE3CB0zmraI3nbqCJ/gW3ZMgtbC5nh/QHlOoOZBxQCRgAAAABJRU5ErkJggg==" alt="Symfony" /> + </div> + + <div class="search"> + <form method="get" action="http://symfony.com/search"> + <div class="form-row"> + + <label for="search-id"> + <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAABUElEQVQoz2NgAIJ29iBdD0d7X2cPb+tY2f9MDMjgP2O2hKu7vS8CBlisZUNSMJ3fxRMkXO61wm2ue6I3iB1q8Z8ZriDZFCS03fm/wX+1/xp/TBo8QPxeqf+MUAW+QIFKj/+q/wX/c/3n/i/6Qd/bx943z/Q/K1SBI1D9fKv/AhCn/Wf5L5EHdFGKw39OqAIXoPpOMziX4T9/DFBBnuN/HqhAEtCKCNf/XDA/rZRyAmrpsvrPDVUw3wrkqCiLaewg6TohX1d7X0ffs5r/OaAKfinmgt3t4ulr4+Xg4ANip3j+l/zPArNT4LNOD0pAgWCSOUIBy3+h/+pXbBa5tni0eMx23+/mB1YSYnENroT5Pw/QSOX/mkCo+l/jgo0v2KJA643s8PgAmsMBDCbu/5xALHPB2husxN9uCzsDOgAq5kAoaZVnYMCh5Ky1r88Eh/+iABM8jUk7ClYIAAAAAElFTkSuQmCC" alt="Search on Symfony website" /> + </label> + + <input name="q" id="search-id" type="search" placeholder="Search on Symfony website" /> + + <button type="submit" class="sf-button"> + <span class="border-l"> + <span class="border-r"> + <span class="btn-bg">OK</span> + </span> + </span> + </button> + </div> + </form> + </div> + </div> + + <div class="sf-reset"> + <div class="block"> + <div class="symfony-block-content"> + <h1 class="title">Configuration Checker</h1> + <p> + This script analyzes your system to check whether is + ready to run Symfony applications. + </p> + + <?php if ($hasMajorProblems): ?> + <h2 class="ko">Major problems</h2> + <p>Major problems have been detected and <strong>must</strong> be fixed before continuing:</p> + <ol> + <?php foreach ($majorProblems as $problem): ?> + <li><?php echo $problem->getTestMessage() ?> + <p class="help"><em><?php echo $problem->getHelpHtml() ?></em></p> + </li> + <?php endforeach; ?> + </ol> + <?php endif; ?> + + <?php if ($hasMinorProblems): ?> + <h2>Recommendations</h2> + <p> + <?php if ($hasMajorProblems): ?>Additionally, to<?php else: ?>To<?php endif; ?> enhance your Symfony experience, + it’s recommended that you fix the following: + </p> + <ol> + <?php foreach ($minorProblems as $problem): ?> + <li><?php echo $problem->getTestMessage() ?> + <p class="help"><em><?php echo $problem->getHelpHtml() ?></em></p> + </li> + <?php endforeach; ?> + </ol> + <?php endif; ?> + + <?php if ($symfonyRequirements->hasPhpIniConfigIssue()): ?> + <p id="phpini">* + <?php if ($symfonyRequirements->getPhpIniConfigPath()): ?> + Changes to the <strong>php.ini</strong> file must be done in "<strong><?php echo $symfonyRequirements->getPhpIniConfigPath() ?></strong>". + <?php else: ?> + To change settings, create a "<strong>php.ini</strong>". + <?php endif; ?> + </p> + <?php endif; ?> + + <?php if (!$hasMajorProblems && !$hasMinorProblems): ?> + <p class="ok">All checks passed successfully. Your system is ready to run Symfony applications.</p> + <?php endif; ?> + + <ul class="symfony-install-continue"> + <?php if ($hasMajorProblems || $hasMinorProblems): ?> + <li><a href="config.php">Re-check configuration</a></li> + <?php endif; ?> + </ul> + </div> + </div> + </div> + <div class="version">Symfony Standard Edition</div> + </div> + </body> +</html> diff --git a/symfony-3.3/web/favicon.ico b/symfony-3.3/web/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..479f7f50f404ada1e42c536097521d19f2c22f35 GIT binary patch literal 6518 zcmeHLTWD5E5<a=8s8QqnG7;l#42*(42>Kuy5M>-BgCK}6B8uRHx|%3>L5P|~O|ntQ zD!!<o56(m%1Z6Z{(dY*8iiwwrn`8$CZ%kH5WO9-})$@IouJ$-%c9`e2q5kTwuCA)C z?yjoyM^Rdo9%W}oz`0RguPFL5ilW?HKOPoE1)$}D1{QF1(}AK0^d4He(ev~3r=nk$ zlaq5ZD=VuJ{l>Jkw41=CfUf}7Y>i>k%K=@zd-rz03PXkrQJkKhPTU1316WJ0t;)^K zbyu!jaThLJh>sjO(gCIvVc@`l?8mUf<o;j+h)0heO}%c;oH=n@TU+Y*@#B=?Zr{GG z{KJL~bG>@?VxRKb$qO($xL+ALa-_~@WM&XcK|z6}QYkrb;DB&Ee*AdFuz@nj!@bZS z<->;$=Qy4}f4<wdZ=Vzu6)Eq_moMe{i|5+!-@m_uU)Wb(k4v%VTK0GD+}TlIU+>ng zT`R9&zg9W$g*fMA(V|7V4!nwC1N}icH$iJ+|IndBsoL6Fw{YP?U32~VbvbzOp!Rp| z+QoH3{j>x9l=r2cuRkN**Q-~rq^qk-7B5~b%a<?L^))p$vSGspH)F;Om4ovzA8>sw z{R`YNd-iNcpPfE^TKOs}D%6J$A3l`g;$nI7<cW}nyaNUdaIoPf;2#(}_&+8-di1Dp zA16+nkix=3xpwWE(2txueE6_p^kc3E<{3@{2=5p6r*`Fkoi7U(EKnO}&YVeq>X{UL zSHSyawhQh!&z`LUKzZ$;*}Tik%OlNg-n`jWRaLp_>grTuW24<4-nr1Qk5d>Z|IndB zV}Rb@F=NJ1UdNOvQ{rXImgzjkRbgR-$NZsHK#uLv`8VUnjvZ_3IG5CGYYkHp{Xw7d zUNu1;&*)z`<8uGDG1Qh^W3>M}%s80~_!^L=J#-L5|3XUxZ>I4h7WG4aK41rYe;RNb z{dzzh`=oIWFb~idV2v^;>#wwo1oIc@?}q#)V7o6pV(@W}vHkDBqXE{EGL7~r9QKUK z!oh<F|1x311UG8bC^v50IKjQ={U>xnM<=ldqlbHr`L~$+8^Bspw$YMU=aHXyQq|en z*|tyB2O48DW47~gBD^Kg$xGb?+Qc=CMT8&G9|B<O$p)j--wi%?#*-&cP8~aT%$+}f z-ZB2IT)EP82;!smAwSTt*7~$3X~z?c?L15uNZRadxbKF3{rYh&<B`-qsz<7Da^}n# zck<*(dH?>sT)cQO>~+M55vtF}6w__k_%yb`&ZqF(P}LYkrZe14%vWR1L8kIAS+Ydq zJoUeL@j_))R#q~1xcm3-Q-{(94H^{swD}W2KC|H*`qsi5gZ)L&PrevAT?puFo}m7^ zx;pWC<nG<On!lJw$%DJeJRv=tL((3tHNd;x8(`;<gS9Q7QNQL1oIzN(YSk*suSzQ^ zDWMD04`pR#O5+=$Eq`Kz$_5YLh24b+<Go&YZ0DGnnJJSdO=2!n`NSMk$MosbHTThm z=g+(A5Ymyqb)NkmK>dq3z6r($w*G)-0BO9hyw_IKB<1M-knc#-^QRNgg!KSvzK%(* zN%nO;_$&|q8-2#fZ@3n^^=%`+hBd6wE?v4LckbK~)_qHtF10y#>eMOqKlR_ce~)z5 z8j_Kb@n>hCdZ3T?FjklNeusbaS`$8c^hot?*|J4gyToy<P+nfHHtgQBTkjzCx3shf zYE-2oUYd>n3u|nG?j6v5mbL>r;6L>d>JgQV+Aqk!e%06S-n|p#BF8%R*Y;nP*5$gS zct^3WWsHWbPx(OSO&2kAGmqV6AMdTx*UIwr=~LDJ;K2ix#WQ*K>{;0Fwr$&#{`T$L zKtmm+G`pic*gziI!FxvinnQt=#(i<!o;`b{p`k&xZ{Mym8Ed#vG(CeAD^@5U>uS;n zw{G218frV4IB_EDeqBp>9(1010jeLk4!|59XvudEx^Q2V-`UxzxaLNU$&<5Z&nk`c zO-)UK&UFOTcYmPyIn!Tn{s*1;RBc3#)p*9Y_U6qS)8TjqT<^cbWb4+gT9;El@`Ag1 z^{QOHd|B;+kCZp@p8l|Z`X3PPpXs-p!tayTwpP_oJLb-vt1@TJnx%O4>eaz7{I=jb zS+{PTFi){I-@kvq@^L?Y-^8@Tax-hDk|Yg%>C>l=*{Xi!{t)W}jr^$Hh3AjD9n;;h zxU{r1=;8NDYiny5`+DIc{gA_YZGqpn#s%spSloq=H3w2&<v%O++vVK3bJE=0EZqN^ zHEZmAgzuJXnK!wAdq1dWG@tp{o{T@NC$pgcXJGD6<1b|p><%;kFa|Q#KYsjJ^~{?$ zPkG2k8hyZ+Wo!8ctWTV{*LL@sKxa+M{8I)*{jtYk?eESm(7`9urcKlF#*G_Qf7|;u zN!o?)64|?VuS}gfRr&lGs1E4d4H?$PV*FnWXan=ZM|x<3|5j2u<D{>>Le9aR(|hp! z58sEiK5od38#hSfniT&pfUaLK{sO?JH2}_LBk1OXAOrK-$Gr6I+gHD}jYiCGZ_B&< zrfqL;=eyK39P?b7d~CoO#Jt;(Rfx50)SaxqE@4a?v{nKRcJS`NK8@?%PWH*G`cW@v zpE-lI5@Qp;&-snLY11Z^$r>K~tnsXwZmR`HKqm9D@&i-9%1z)TE#w*Aan@mejjUh4 zUf+fvxBFWDCyZI+vYF2A(TBR6cfoAnUEzJ84Q5Bs0h;!~ub8<%QG<}5Yh#~RsCx{6 z&Fa4H(T887(+?K`rk8dk-=@(6PVn-cbRvev^tb<CrrLkgP?PESp!MTkn8%rKf?RtS z)Wz7r*h!#0Nicd>!j=}uC<33gAlnE%;N;oxJW2uoNyrWR#`=%?o~Id@HEm8peo|(F z++&w_Gih%Y#@_;1x1NFgd%%wY{QkZJU>++0u%2X1YmGAOo*V5m{_KIz9{B8m=r_v| BFLeL_ literal 0 HcmV?d00001 diff --git a/symfony-3.3/web/robots.txt b/symfony-3.3/web/robots.txt new file mode 100644 index 000000000..4665fcae3 --- /dev/null +++ b/symfony-3.3/web/robots.txt @@ -0,0 +1,5 @@ +# www.robotstxt.org/ +# www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 + +User-agent: * +Disallow: From cb8d2ea96939c436b46966c9dff6f85e360b3f58 Mon Sep 17 00:00:00 2001 From: Anton Minin <anton.a.minin@gmail.com> Date: Tue, 23 Jan 2018 11:44:53 +0300 Subject: [PATCH 3/5] Update sf 3.3 to 3.4 LTS --- list.sh | 4 +- .../.gitignore | 0 .../README.md | 2 +- .../_benchmark/hello_world.sh | 0 .../_benchmark/setup.sh | 0 .../app/AppCache.php | 0 .../app/AppKernel.php | 0 .../app/autoload.php | 0 .../app/config/config.yml | 0 .../app/config/config_dev.yml | 0 .../app/config/config_prod.yml | 0 .../app/config/config_test.yml | 0 .../app/config/parameters.yml.dist | 0 .../app/config/services.yml | 0 .../bin/console | 0 .../bin/symfony_requirements | 0 .../composer.json | 9 +- .../composer.lock | 749 ++++++++++-------- .../phpunit.xml.dist | 0 .../src/App/Controller/HelloController.php | 0 .../var/SymfonyRequirements.php | 0 .../var/cache/.gitkeep | 0 .../var/logs/.gitkeep | 0 .../var/sessions/.gitkeep | 0 .../web/micro.php | 0 {symfony-3.3 => symfony-3.4}/.gitignore | 0 {symfony-3.3 => symfony-3.4}/README.md | 2 +- .../_benchmark/hello_world.sh | 0 .../_benchmark/setup.sh | 0 {symfony-3.3 => symfony-3.4}/app/AppCache.php | 0 .../app/AppKernel.php | 0 .../app/Resources/views/base.html.twig | 0 .../Resources/views/default/index.html.twig | 0 {symfony-3.3 => symfony-3.4}/app/autoload.php | 0 .../app/config/config.yml | 0 .../app/config/config_dev.yml | 0 .../app/config/config_prod.yml | 0 .../app/config/config_test.yml | 0 .../app/config/parameters.yml.dist | 0 .../app/config/routing.yml | 0 .../app/config/routing_dev.yml | 0 .../app/config/security.yml | 0 .../app/config/services.yml | 0 {symfony-3.3 => symfony-3.4}/bin/console | 0 .../bin/symfony_requirements | 0 {symfony-3.3 => symfony-3.4}/composer.json | 6 +- {symfony-3.3 => symfony-3.4}/composer.lock | 373 +++++---- {symfony-3.3 => symfony-3.4}/phpunit.xml.dist | 0 .../src/AppBundle/AppBundle.php | 0 .../Controller/DefaultController.php | 0 .../AppBundle/Controller/HelloController.php | 0 .../Controller/DefaultControllerTest.php | 0 .../var/SymfonyRequirements.php | 0 .../var/cache/.gitkeep | 0 .../var/logs/.gitkeep | 0 .../var/sessions/.gitkeep | 0 {symfony-3.3 => symfony-3.4}/web/app.php | 0 {symfony-3.3 => symfony-3.4}/web/app_dev.php | 0 .../web/apple-touch-icon.png | Bin {symfony-3.3 => symfony-3.4}/web/config.php | 0 {symfony-3.3 => symfony-3.4}/web/favicon.ico | Bin {symfony-3.3 => symfony-3.4}/web/robots.txt | 0 62 files changed, 656 insertions(+), 489 deletions(-) rename {symfony-3.3-micro => symfony-3.4-micro}/.gitignore (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/README.md (91%) rename {symfony-3.3-micro => symfony-3.4-micro}/_benchmark/hello_world.sh (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/_benchmark/setup.sh (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/app/AppCache.php (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/app/AppKernel.php (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/app/autoload.php (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/app/config/config.yml (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/app/config/config_dev.yml (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/app/config/config_prod.yml (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/app/config/config_test.yml (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/app/config/parameters.yml.dist (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/app/config/services.yml (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/bin/console (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/bin/symfony_requirements (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/composer.json (80%) rename {symfony-3.3-micro => symfony-3.4-micro}/composer.lock (71%) rename {symfony-3.3-micro => symfony-3.4-micro}/phpunit.xml.dist (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/src/App/Controller/HelloController.php (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/var/SymfonyRequirements.php (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/var/cache/.gitkeep (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/var/logs/.gitkeep (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/var/sessions/.gitkeep (100%) rename {symfony-3.3-micro => symfony-3.4-micro}/web/micro.php (100%) rename {symfony-3.3 => symfony-3.4}/.gitignore (100%) rename {symfony-3.3 => symfony-3.4}/README.md (72%) rename {symfony-3.3 => symfony-3.4}/_benchmark/hello_world.sh (100%) rename {symfony-3.3 => symfony-3.4}/_benchmark/setup.sh (100%) rename {symfony-3.3 => symfony-3.4}/app/AppCache.php (100%) rename {symfony-3.3 => symfony-3.4}/app/AppKernel.php (100%) rename {symfony-3.3 => symfony-3.4}/app/Resources/views/base.html.twig (100%) rename {symfony-3.3 => symfony-3.4}/app/Resources/views/default/index.html.twig (100%) rename {symfony-3.3 => symfony-3.4}/app/autoload.php (100%) rename {symfony-3.3 => symfony-3.4}/app/config/config.yml (100%) rename {symfony-3.3 => symfony-3.4}/app/config/config_dev.yml (100%) rename {symfony-3.3 => symfony-3.4}/app/config/config_prod.yml (100%) rename {symfony-3.3 => symfony-3.4}/app/config/config_test.yml (100%) rename {symfony-3.3 => symfony-3.4}/app/config/parameters.yml.dist (100%) rename {symfony-3.3 => symfony-3.4}/app/config/routing.yml (100%) rename {symfony-3.3 => symfony-3.4}/app/config/routing_dev.yml (100%) rename {symfony-3.3 => symfony-3.4}/app/config/security.yml (100%) rename {symfony-3.3 => symfony-3.4}/app/config/services.yml (100%) rename {symfony-3.3 => symfony-3.4}/bin/console (100%) rename {symfony-3.3 => symfony-3.4}/bin/symfony_requirements (100%) rename {symfony-3.3 => symfony-3.4}/composer.json (95%) rename {symfony-3.3 => symfony-3.4}/composer.lock (87%) rename {symfony-3.3 => symfony-3.4}/phpunit.xml.dist (100%) rename {symfony-3.3 => symfony-3.4}/src/AppBundle/AppBundle.php (100%) rename {symfony-3.3 => symfony-3.4}/src/AppBundle/Controller/DefaultController.php (100%) rename {symfony-3.3 => symfony-3.4}/src/AppBundle/Controller/HelloController.php (100%) rename {symfony-3.3 => symfony-3.4}/tests/AppBundle/Controller/DefaultControllerTest.php (100%) rename {symfony-3.3 => symfony-3.4}/var/SymfonyRequirements.php (100%) rename {symfony-3.3 => symfony-3.4}/var/cache/.gitkeep (100%) rename {symfony-3.3 => symfony-3.4}/var/logs/.gitkeep (100%) rename {symfony-3.3 => symfony-3.4}/var/sessions/.gitkeep (100%) rename {symfony-3.3 => symfony-3.4}/web/app.php (100%) rename {symfony-3.3 => symfony-3.4}/web/app_dev.php (100%) rename {symfony-3.3 => symfony-3.4}/web/apple-touch-icon.png (100%) rename {symfony-3.3 => symfony-3.4}/web/config.php (100%) rename {symfony-3.3 => symfony-3.4}/web/favicon.ico (100%) rename {symfony-3.3 => symfony-3.4}/web/robots.txt (100%) diff --git a/list.sh b/list.sh index 18c1054db..8881690d0 100755 --- a/list.sh +++ b/list.sh @@ -40,8 +40,8 @@ staticphp-0.9 #symfony-2.6 #symfony-2.7 symfony-3.0 -symfony-3.3 -symfony-3.3-micro +symfony-3.4 +symfony-3.4-micro tipsy-0.10 #typo3f-2.3 # does not work #typo3f-3.0 # Catchable Fatal Error: Argument 1 passed to TYPO3\Flow\Object\ObjectManager::setObjects() must be of the type array, null given diff --git a/symfony-3.3-micro/.gitignore b/symfony-3.4-micro/.gitignore similarity index 100% rename from symfony-3.3-micro/.gitignore rename to symfony-3.4-micro/.gitignore diff --git a/symfony-3.3-micro/README.md b/symfony-3.4-micro/README.md similarity index 91% rename from symfony-3.3-micro/README.md rename to symfony-3.4-micro/README.md index 5d656566e..c4b1d8308 100644 --- a/symfony-3.3-micro/README.md +++ b/symfony-3.4-micro/README.md @@ -1,4 +1,4 @@ -symfony-3.3 +symfony-3.4 =========== A Symfony project with [micro kernel](https://symfony.com/doc/current/configuration/micro_kernel_trait.html) diff --git a/symfony-3.3-micro/_benchmark/hello_world.sh b/symfony-3.4-micro/_benchmark/hello_world.sh similarity index 100% rename from symfony-3.3-micro/_benchmark/hello_world.sh rename to symfony-3.4-micro/_benchmark/hello_world.sh diff --git a/symfony-3.3-micro/_benchmark/setup.sh b/symfony-3.4-micro/_benchmark/setup.sh similarity index 100% rename from symfony-3.3-micro/_benchmark/setup.sh rename to symfony-3.4-micro/_benchmark/setup.sh diff --git a/symfony-3.3-micro/app/AppCache.php b/symfony-3.4-micro/app/AppCache.php similarity index 100% rename from symfony-3.3-micro/app/AppCache.php rename to symfony-3.4-micro/app/AppCache.php diff --git a/symfony-3.3-micro/app/AppKernel.php b/symfony-3.4-micro/app/AppKernel.php similarity index 100% rename from symfony-3.3-micro/app/AppKernel.php rename to symfony-3.4-micro/app/AppKernel.php diff --git a/symfony-3.3-micro/app/autoload.php b/symfony-3.4-micro/app/autoload.php similarity index 100% rename from symfony-3.3-micro/app/autoload.php rename to symfony-3.4-micro/app/autoload.php diff --git a/symfony-3.3-micro/app/config/config.yml b/symfony-3.4-micro/app/config/config.yml similarity index 100% rename from symfony-3.3-micro/app/config/config.yml rename to symfony-3.4-micro/app/config/config.yml diff --git a/symfony-3.3-micro/app/config/config_dev.yml b/symfony-3.4-micro/app/config/config_dev.yml similarity index 100% rename from symfony-3.3-micro/app/config/config_dev.yml rename to symfony-3.4-micro/app/config/config_dev.yml diff --git a/symfony-3.3-micro/app/config/config_prod.yml b/symfony-3.4-micro/app/config/config_prod.yml similarity index 100% rename from symfony-3.3-micro/app/config/config_prod.yml rename to symfony-3.4-micro/app/config/config_prod.yml diff --git a/symfony-3.3-micro/app/config/config_test.yml b/symfony-3.4-micro/app/config/config_test.yml similarity index 100% rename from symfony-3.3-micro/app/config/config_test.yml rename to symfony-3.4-micro/app/config/config_test.yml diff --git a/symfony-3.3-micro/app/config/parameters.yml.dist b/symfony-3.4-micro/app/config/parameters.yml.dist similarity index 100% rename from symfony-3.3-micro/app/config/parameters.yml.dist rename to symfony-3.4-micro/app/config/parameters.yml.dist diff --git a/symfony-3.3-micro/app/config/services.yml b/symfony-3.4-micro/app/config/services.yml similarity index 100% rename from symfony-3.3-micro/app/config/services.yml rename to symfony-3.4-micro/app/config/services.yml diff --git a/symfony-3.3-micro/bin/console b/symfony-3.4-micro/bin/console similarity index 100% rename from symfony-3.3-micro/bin/console rename to symfony-3.4-micro/bin/console diff --git a/symfony-3.3-micro/bin/symfony_requirements b/symfony-3.4-micro/bin/symfony_requirements similarity index 100% rename from symfony-3.3-micro/bin/symfony_requirements rename to symfony-3.4-micro/bin/symfony_requirements diff --git a/symfony-3.3-micro/composer.json b/symfony-3.4-micro/composer.json similarity index 80% rename from symfony-3.3-micro/composer.json rename to symfony-3.4-micro/composer.json index 1e6cb190d..27e546ac0 100644 --- a/symfony-3.3-micro/composer.json +++ b/symfony-3.4-micro/composer.json @@ -12,18 +12,21 @@ ] }, "require": { - "php": ">=5.5.9", + "incenteev/composer-parameter-handler": "^2.0", + "php": "^5.5.9|>=7.0.8", "sensio/distribution-bundle": "^5.0", - "symfony/framework-bundle": "3.3.*", + "symfony/framework-bundle": "3.4.*", "symfony/monolog-bundle": "^2.8", - "symfony/yaml": "^3.3" + "symfony/yaml": "^3.4" }, "scripts": { "post-install-cmd": [ + "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache" ], "post-update-cmd": [ + "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache" ] diff --git a/symfony-3.3-micro/composer.lock b/symfony-3.4-micro/composer.lock similarity index 71% rename from symfony-3.3-micro/composer.lock rename to symfony-3.4-micro/composer.lock index 0b3e91058..91c9e55e5 100644 --- a/symfony-3.3-micro/composer.lock +++ b/symfony-3.4-micro/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "33c03bcc493aefd4dc6f10c978c0f7d9", + "content-hash": "928dce99b2637a951b7498e031c2027e", "packages": [ { "name": "composer/ca-bundle", - "version": "1.0.7", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12" + "reference": "943b2c4fcad1ef178d16a713c2468bf7e579c288" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/b17e6153cb7f33c7e44eb59578dc12eee5dc8e12", - "reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/943b2c4fcad1ef178d16a713c2468bf7e579c288", + "reference": "943b2c4fcad1ef178d16a713c2468bf7e579c288", "shasum": "" }, "require": { @@ -26,12 +26,9 @@ "php": "^5.3.2 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.5", + "phpunit/phpunit": "^4.8.35", "psr/log": "^1.0", - "symfony/process": "^2.5 || ^3.0" - }, - "suggest": { - "symfony/process": "This is necessary to reliably check whether openssl_x509_parse is vulnerable on older php versions, but can be ignored on PHP 5.5.6+" + "symfony/process": "^2.5 || ^3.0 || ^4.0" }, "type": "library", "extra": { @@ -63,42 +60,40 @@ "ssl", "tls" ], - "time": "2017-03-06T11:59:08+00:00" + "time": "2017-11-29T09:37:33+00:00" }, { - "name": "doctrine/cache", - "version": "v1.6.2", + "name": "incenteev/composer-parameter-handler", + "version": "v2.1.2", "source": { "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b" + "url": "https://github.com/Incenteev/ParameterHandler.git", + "reference": "d7ce7f06136109e81d1cb9d57066c4d4a99cf1cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/eb152c5100571c7a45470ff2a35095ab3f3b900b", - "reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b", + "url": "https://api.github.com/repos/Incenteev/ParameterHandler/zipball/d7ce7f06136109e81d1cb9d57066c4d4a99cf1cc", + "reference": "d7ce7f06136109e81d1cb9d57066c4d4a99cf1cc", "shasum": "" }, "require": { - "php": "~5.5|~7.0" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" + "php": ">=5.3.3", + "symfony/yaml": "~2.3|~3.0" }, "require-dev": { - "phpunit/phpunit": "~4.8|~5.0", - "predis/predis": "~1.0", - "satooshi/php-coveralls": "~0.6" + "composer/composer": "1.0.*@dev", + "phpspec/prophecy-phpunit": "~1.0", + "symfony/filesystem": "~2.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "2.1.x-dev" } }, "autoload": { "psr-4": { - "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + "Incenteev\\ParameterHandler\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -107,33 +102,16 @@ ], "authors": [ { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Christophe Coevoet", + "email": "stof@notk.org" } ], - "description": "Caching library offering an object-oriented API for many cache backends", - "homepage": "http://www.doctrine-project.org", + "description": "Composer script handling your ignored parameter file", + "homepage": "https://github.com/Incenteev/ParameterHandler", "keywords": [ - "cache", - "caching" + "parameters management" ], - "time": "2017-07-22T12:49:21+00:00" + "time": "2015-11-10T17:04:01+00:00" }, { "name": "monolog/monolog", @@ -213,6 +191,54 @@ ], "time": "2017-06-19T01:22:40+00:00" }, + { + "name": "paragonie/random_compat", + "version": "v2.0.11", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/5da4d3c796c275c55f057af5a643ae297d96b4d8", + "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "pseudorandom", + "random" + ], + "time": "2017-09-27T21:40:39+00:00" + }, { "name": "psr/cache", "version": "1.0.1", @@ -405,16 +431,16 @@ }, { "name": "sensio/distribution-bundle", - "version": "v5.0.20", + "version": "v5.0.21", "source": { "type": "git", "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", - "reference": "4b019d4c0bd64438c42e4b6b0726085b409be8d9" + "reference": "eb6266b3b472e4002538610b28a0a04bcf94891a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/4b019d4c0bd64438c42e4b6b0726085b409be8d9", - "reference": "4b019d4c0bd64438c42e4b6b0726085b409be8d9", + "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/eb6266b3b472e4002538610b28a0a04bcf94891a", + "reference": "eb6266b3b472e4002538610b28a0a04bcf94891a", "shasum": "" }, "require": { @@ -453,25 +479,25 @@ "configuration", "distribution" ], - "time": "2017-05-11T16:21:03+00:00" + "time": "2017-08-25T16:55:44+00:00" }, { "name": "sensiolabs/security-checker", - "version": "v4.0.5", + "version": "v4.1.7", "source": { "type": "git", "url": "https://github.com/sensiolabs/security-checker.git", - "reference": "6a3b0c3b42e41c777b1ad75032d8177863fdc5e1" + "reference": "d539ccba2b4dce515de04f16b7ed7ae5b9eeb434" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/6a3b0c3b42e41c777b1ad75032d8177863fdc5e1", - "reference": "6a3b0c3b42e41c777b1ad75032d8177863fdc5e1", + "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/d539ccba2b4dce515de04f16b7ed7ae5b9eeb434", + "reference": "d539ccba2b4dce515de04f16b7ed7ae5b9eeb434", "shasum": "" }, "require": { "composer/ca-bundle": "^1.0", - "symfony/console": "~2.7|~3.0" + "symfony/console": "~2.7|~3.0|~4.0" }, "bin": [ "security-checker" @@ -479,7 +505,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -498,27 +524,28 @@ } ], "description": "A security checker for your composer.lock", - "time": "2017-07-24T11:42:56+00:00" + "time": "2018-01-11T05:54:03+00:00" }, { "name": "symfony/cache", - "version": "v3.3.5", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "265987c7f524b9ad17d0a0b8819ac53ce1bb8054" + "reference": "5725378078bc4e1fe3c3414e9cc0e63d7de47fff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/265987c7f524b9ad17d0a0b8819ac53ce1bb8054", - "reference": "265987c7f524b9ad17d0a0b8819ac53ce1bb8054", + "url": "https://api.github.com/repos/symfony/cache/zipball/5725378078bc4e1fe3c3414e9cc0e63d7de47fff", + "reference": "5725378078bc4e1fe3c3414e9cc0e63d7de47fff", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "psr/cache": "~1.0", "psr/log": "~1.0", - "psr/simple-cache": "^1.0" + "psr/simple-cache": "^1.0", + "symfony/polyfill-apcu": "~1.1" }, "conflict": { "symfony/var-dumper": "<3.3" @@ -533,13 +560,10 @@ "doctrine/dbal": "~2.4", "predis/predis": "~1.0" }, - "suggest": { - "symfony/polyfill-apcu": "For using ApcuAdapter on HHVM" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -570,27 +594,27 @@ "caching", "psr6" ], - "time": "2017-07-17T17:27:31+00:00" + "time": "2018-01-03T17:14:19+00:00" }, { "name": "symfony/class-loader", - "version": "v3.3.5", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/class-loader.git", - "reference": "386a294d621576302e7cc36965d6ed53b8c73c4f" + "reference": "e63c12699822bb3b667e7216ba07fbcc3a3e203e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/class-loader/zipball/386a294d621576302e7cc36965d6ed53b8c73c4f", - "reference": "386a294d621576302e7cc36965d6ed53b8c73c4f", + "url": "https://api.github.com/repos/symfony/class-loader/zipball/e63c12699822bb3b667e7216ba07fbcc3a3e203e", + "reference": "e63c12699822bb3b667e7216ba07fbcc3a3e203e", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "require-dev": { - "symfony/finder": "~2.8|~3.0", + "symfony/finder": "~2.8|~3.0|~4.0", "symfony/polyfill-apcu": "~1.1" }, "suggest": { @@ -599,7 +623,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -626,34 +650,34 @@ ], "description": "Symfony ClassLoader Component", "homepage": "https://symfony.com", - "time": "2017-06-02T09:51:43+00:00" + "time": "2018-01-03T07:37:34+00:00" }, { "name": "symfony/config", - "version": "v3.3.5", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "a094618deb9a3fe1c3cf500a796e167d0495a274" + "reference": "cfd5c972f7b4992a5df41673d25d980ab077aa5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/a094618deb9a3fe1c3cf500a796e167d0495a274", - "reference": "a094618deb9a3fe1c3cf500a796e167d0495a274", + "url": "https://api.github.com/repos/symfony/config/zipball/cfd5c972f7b4992a5df41673d25d980ab077aa5b", + "reference": "cfd5c972f7b4992a5df41673d25d980ab077aa5b", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/filesystem": "~2.8|~3.0" + "php": "^5.5.9|>=7.0.8", + "symfony/filesystem": "~2.8|~3.0|~4.0" }, "conflict": { "symfony/dependency-injection": "<3.3", "symfony/finder": "<3.3" }, "require-dev": { - "symfony/dependency-injection": "~3.3", - "symfony/finder": "~3.3", - "symfony/yaml": "~3.0" + "symfony/dependency-injection": "~3.3|~4.0", + "symfony/finder": "~3.3|~4.0", + "symfony/yaml": "~3.0|~4.0" }, "suggest": { "symfony/yaml": "To use the yaml reference dumper" @@ -661,7 +685,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -688,49 +712,49 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2017-06-16T12:40:34+00:00" + "time": "2018-01-03T07:37:34+00:00" }, { "name": "symfony/console", - "version": "v3.3.5", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a97e45d98c59510f085fa05225a1acb74dfe0546" + "reference": "8394c8ef121949e8f858f13bc1e34f05169e4e7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a97e45d98c59510f085fa05225a1acb74dfe0546", - "reference": "a97e45d98c59510f085fa05225a1acb74dfe0546", + "url": "https://api.github.com/repos/symfony/console/zipball/8394c8ef121949e8f858f13bc1e34f05169e4e7d", + "reference": "8394c8ef121949e8f858f13bc1e34f05169e4e7d", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/debug": "~2.8|~3.0", + "php": "^5.5.9|>=7.0.8", + "symfony/debug": "~2.8|~3.0|~4.0", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/dependency-injection": "<3.3" + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~3.3", - "symfony/dependency-injection": "~3.3", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/filesystem": "~2.8|~3.0", - "symfony/http-kernel": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" + "symfony/config": "~3.3|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.3|~4.0" }, "suggest": { "psr/log": "For using the console logger", "symfony/event-dispatcher": "", - "symfony/filesystem": "", + "symfony/lock": "", "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -757,36 +781,36 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-07-03T13:19:36+00:00" + "time": "2018-01-03T07:37:34+00:00" }, { "name": "symfony/debug", - "version": "v3.3.5", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "63b85a968486d95ff9542228dc2e4247f16f9743" + "reference": "603b95dda8b00020e4e6e60dc906e7b715b1c245" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/63b85a968486d95ff9542228dc2e4247f16f9743", - "reference": "63b85a968486d95ff9542228dc2e4247f16f9743", + "url": "https://api.github.com/repos/symfony/debug/zipball/603b95dda8b00020e4e6e60dc906e7b715b1c245", + "reference": "603b95dda8b00020e4e6e60dc906e7b715b1c245", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "psr/log": "~1.0" }, "conflict": { "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" }, "require-dev": { - "symfony/http-kernel": "~2.8|~3.0" + "symfony/http-kernel": "~2.8|~3.0|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -813,38 +837,39 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-07-05T13:02:37+00:00" + "time": "2018-01-03T17:14:19+00:00" }, { "name": "symfony/dependency-injection", - "version": "v3.3.5", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "761e51a86f35f5b3e213e9b7f554fd91f9bffae4" + "reference": "35f957ca171a431710966bec6e2f8636d3b019c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/761e51a86f35f5b3e213e9b7f554fd91f9bffae4", - "reference": "761e51a86f35f5b3e213e9b7f554fd91f9bffae4", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/35f957ca171a431710966bec6e2f8636d3b019c4", + "reference": "35f957ca171a431710966bec6e2f8636d3b019c4", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "psr/container": "^1.0" }, "conflict": { - "symfony/config": "<3.3.1", + "symfony/config": "<3.3.7", "symfony/finder": "<3.3", - "symfony/yaml": "<3.3" + "symfony/proxy-manager-bridge": "<3.4", + "symfony/yaml": "<3.4" }, "provide": { "psr/container-implementation": "1.0" }, "require-dev": { - "symfony/config": "~3.3", - "symfony/expression-language": "~2.8|~3.0", - "symfony/yaml": "~3.3" + "symfony/config": "~3.3|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/yaml": "~3.4|~4.0" }, "suggest": { "symfony/config": "", @@ -856,7 +881,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -883,34 +908,34 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2017-07-17T14:07:10+00:00" + "time": "2018-01-04T15:56:45+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.3.5", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "67535f1e3fd662bdc68d7ba317c93eecd973617e" + "reference": "26b87b6bca8f8f797331a30b76fdae5342dc26ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/67535f1e3fd662bdc68d7ba317c93eecd973617e", - "reference": "67535f1e3fd662bdc68d7ba317c93eecd973617e", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/26b87b6bca8f8f797331a30b76fdae5342dc26ca", + "reference": "26b87b6bca8f8f797331a30b76fdae5342dc26ca", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "conflict": { "symfony/dependency-injection": "<3.3" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0", - "symfony/dependency-injection": "~3.3", - "symfony/expression-language": "~2.8|~3.0", - "symfony/stopwatch": "~2.8|~3.0" + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "~3.3|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/stopwatch": "~2.8|~3.0|~4.0" }, "suggest": { "symfony/dependency-injection": "", @@ -919,7 +944,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -946,29 +971,29 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2017-06-09T14:53:08+00:00" + "time": "2018-01-03T07:37:34+00:00" }, { "name": "symfony/filesystem", - "version": "v3.3.5", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "427987eb4eed764c3b6e38d52a0f87989e010676" + "reference": "e078773ad6354af38169faf31c21df0f18ace03d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/427987eb4eed764c3b6e38d52a0f87989e010676", - "reference": "427987eb4eed764c3b6e38d52a0f87989e010676", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/e078773ad6354af38169faf31c21df0f18ace03d", + "reference": "e078773ad6354af38169faf31c21df0f18ace03d", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -995,29 +1020,29 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2017-07-11T07:17:58+00:00" + "time": "2018-01-03T07:37:34+00:00" }, { "name": "symfony/finder", - "version": "v3.3.5", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4" + "reference": "613e26310776f49a1773b6737c6bd554b8bc8c6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/baea7f66d30854ad32988c11a09d7ffd485810c4", - "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4", + "url": "https://api.github.com/repos/symfony/finder/zipball/613e26310776f49a1773b6737c6bd554b8bc8c6f", + "reference": "613e26310776f49a1773b6737c6bd554b8bc8c6f", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1044,77 +1069,79 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-06-01T21:01:25+00:00" + "time": "2018-01-03T07:37:34+00:00" }, { "name": "symfony/framework-bundle", - "version": "v3.3.5", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/framework-bundle.git", - "reference": "678bc1b17ae351ba98a492f31d57c0011281334a" + "reference": "41882368efe6c740f7aab9dd6da250c44eb550cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/678bc1b17ae351ba98a492f31d57c0011281334a", - "reference": "678bc1b17ae351ba98a492f31d57c0011281334a", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/41882368efe6c740f7aab9dd6da250c44eb550cf", + "reference": "41882368efe6c740f7aab9dd6da250c44eb550cf", "shasum": "" }, "require": { - "doctrine/cache": "~1.0", "ext-xml": "*", - "php": ">=5.5.9", - "symfony/cache": "~3.3", + "php": "^5.5.9|>=7.0.8", + "symfony/cache": "~3.4|~4.0", "symfony/class-loader": "~3.2", - "symfony/config": "~3.3", - "symfony/dependency-injection": "~3.3", - "symfony/event-dispatcher": "^3.3.1", - "symfony/filesystem": "~2.8|~3.0", - "symfony/finder": "~2.8|~3.0", - "symfony/http-foundation": "~3.3", - "symfony/http-kernel": "~3.3", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "^3.4.3|^4.0.3", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/filesystem": "~2.8|~3.0|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/http-foundation": "^3.3.11|~4.0", + "symfony/http-kernel": "~3.4|~4.0", "symfony/polyfill-mbstring": "~1.0", - "symfony/routing": "~3.3", - "symfony/stopwatch": "~2.8|~3.0" + "symfony/routing": "~3.4|~4.0" }, "conflict": { "phpdocumentor/reflection-docblock": "<3.0", - "phpdocumentor/type-resolver": "<0.2.0", + "phpdocumentor/type-resolver": "<0.2.1", "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", "symfony/asset": "<3.3", - "symfony/console": "<3.3", - "symfony/form": "<3.3", + "symfony/console": "<3.4", + "symfony/form": "<3.4", "symfony/property-info": "<3.3", "symfony/serializer": "<3.3", - "symfony/translation": "<3.2", - "symfony/validator": "<3.3", + "symfony/stopwatch": "<3.4", + "symfony/translation": "<3.4", + "symfony/validator": "<3.4", "symfony/workflow": "<3.3" }, "require-dev": { "doctrine/annotations": "~1.0", + "doctrine/cache": "~1.0", "fig/link-util": "^1.0", - "phpdocumentor/reflection-docblock": "^3.0", - "sensio/framework-extra-bundle": "^3.0.2", - "symfony/asset": "~3.3", - "symfony/browser-kit": "~2.8|~3.0", - "symfony/console": "~3.3", - "symfony/css-selector": "~2.8|~3.0", - "symfony/dom-crawler": "~2.8|~3.0", - "symfony/expression-language": "~2.8|~3.0", - "symfony/form": "~3.3", + "phpdocumentor/reflection-docblock": "^3.0|^4.0", + "symfony/asset": "~3.3|~4.0", + "symfony/browser-kit": "~2.8|~3.0|~4.0", + "symfony/console": "~3.4|~4.0", + "symfony/css-selector": "~2.8|~3.0|~4.0", + "symfony/dom-crawler": "~2.8|~3.0|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/form": "~3.4|~4.0", + "symfony/lock": "~3.4|~4.0", "symfony/polyfill-intl-icu": "~1.0", - "symfony/process": "~2.8|~3.0", - "symfony/property-info": "~3.3", - "symfony/security": "~2.8|~3.0", - "symfony/security-core": "~3.2", - "symfony/security-csrf": "~2.8|~3.0", - "symfony/serializer": "~3.3", - "symfony/templating": "~2.8|~3.0", - "symfony/translation": "~3.2", - "symfony/validator": "~3.3", - "symfony/web-link": "~3.3", - "symfony/workflow": "~3.3", - "symfony/yaml": "~3.2", + "symfony/process": "~2.8|~3.0|~4.0", + "symfony/property-info": "~3.3|~4.0", + "symfony/security": "~2.8|~3.0|~4.0", + "symfony/security-core": "~3.2|~4.0", + "symfony/security-csrf": "~2.8|~3.0|~4.0", + "symfony/serializer": "~3.3|~4.0", + "symfony/stopwatch": "~3.4|~4.0", + "symfony/templating": "~2.8|~3.0|~4.0", + "symfony/translation": "~3.4|~4.0", + "symfony/validator": "~3.4|~4.0", + "symfony/var-dumper": "~3.3|~4.0", + "symfony/web-link": "~3.3|~4.0", + "symfony/workflow": "~3.3|~4.0", + "symfony/yaml": "~3.2|~4.0", "twig/twig": "~1.34|~2.4" }, "suggest": { @@ -1130,7 +1157,7 @@ "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1157,33 +1184,34 @@ ], "description": "Symfony FrameworkBundle", "homepage": "https://symfony.com", - "time": "2017-07-17T11:48:40+00:00" + "time": "2018-01-04T15:42:01+00:00" }, { "name": "symfony/http-foundation", - "version": "v3.3.5", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e307abe4b79ccbbfdced9b91c132fd128f456bc5" + "reference": "4a213be1cc8598089b8c7451529a2927b49b5d26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e307abe4b79ccbbfdced9b91c132fd128f456bc5", - "reference": "e307abe4b79ccbbfdced9b91c132fd128f456bc5", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/4a213be1cc8598089b8c7451529a2927b49b5d26", + "reference": "4a213be1cc8598089b8c7451529a2927b49b5d26", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/polyfill-mbstring": "~1.1" + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php70": "~1.6" }, "require-dev": { - "symfony/expression-language": "~2.8|~3.0" + "symfony/expression-language": "~2.8|~3.0|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1210,56 +1238,58 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2017-07-17T14:07:10+00:00" + "time": "2018-01-03T17:14:19+00:00" }, { "name": "symfony/http-kernel", - "version": "v3.3.5", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "16ceea64d23abddf58797a782ae96a5242282cd8" + "reference": "1c2a82d6a8ec9b354fe4ef48ad1ad3f1a4f7db0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/16ceea64d23abddf58797a782ae96a5242282cd8", - "reference": "16ceea64d23abddf58797a782ae96a5242282cd8", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1c2a82d6a8ec9b354fe4ef48ad1ad3f1a4f7db0e", + "reference": "1c2a82d6a8ec9b354fe4ef48ad1ad3f1a4f7db0e", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "psr/log": "~1.0", - "symfony/debug": "~2.8|~3.0", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/http-foundation": "~3.3" + "symfony/debug": "~2.8|~3.0|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/http-foundation": "^3.3.11|~4.0" }, "conflict": { "symfony/config": "<2.8", - "symfony/dependency-injection": "<3.3", + "symfony/dependency-injection": "<3.4", "symfony/var-dumper": "<3.3", "twig/twig": "<1.34|<2.4,>=2" }, + "provide": { + "psr/log-implementation": "1.0" + }, "require-dev": { "psr/cache": "~1.0", - "symfony/browser-kit": "~2.8|~3.0", + "symfony/browser-kit": "~2.8|~3.0|~4.0", "symfony/class-loader": "~2.8|~3.0", - "symfony/config": "~2.8|~3.0", - "symfony/console": "~2.8|~3.0", - "symfony/css-selector": "~2.8|~3.0", - "symfony/dependency-injection": "~3.3", - "symfony/dom-crawler": "~2.8|~3.0", - "symfony/expression-language": "~2.8|~3.0", - "symfony/finder": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0", - "symfony/routing": "~2.8|~3.0", - "symfony/stopwatch": "~2.8|~3.0", - "symfony/templating": "~2.8|~3.0", - "symfony/translation": "~2.8|~3.0", - "symfony/var-dumper": "~3.3" + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/console": "~2.8|~3.0|~4.0", + "symfony/css-selector": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/dom-crawler": "~2.8|~3.0|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/process": "~2.8|~3.0|~4.0", + "symfony/routing": "~3.4|~4.0", + "symfony/stopwatch": "~2.8|~3.0|~4.0", + "symfony/templating": "~2.8|~3.0|~4.0", + "symfony/translation": "~2.8|~3.0|~4.0", + "symfony/var-dumper": "~3.3|~4.0" }, "suggest": { "symfony/browser-kit": "", - "symfony/class-loader": "", "symfony/config": "", "symfony/console": "", "symfony/dependency-injection": "", @@ -1269,7 +1299,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1296,44 +1326,46 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2017-07-17T19:08:23+00:00" + "time": "2018-01-05T08:33:00+00:00" }, { "name": "symfony/monolog-bridge", - "version": "v3.3.5", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/monolog-bridge.git", - "reference": "b2e5cf7959432161c2816a20508f384200c995a3" + "reference": "d00a3eae96da210e44ce0b6a8fa72ee737703861" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/monolog-bridge/zipball/b2e5cf7959432161c2816a20508f384200c995a3", - "reference": "b2e5cf7959432161c2816a20508f384200c995a3", + "url": "https://api.github.com/repos/symfony/monolog-bridge/zipball/d00a3eae96da210e44ce0b6a8fa72ee737703861", + "reference": "d00a3eae96da210e44ce0b6a8fa72ee737703861", "shasum": "" }, "require": { "monolog/monolog": "~1.19", - "php": ">=5.5.9", - "symfony/http-kernel": "~2.8|~3.0" + "php": "^5.5.9|>=7.0.8", + "symfony/http-kernel": "~2.8|~3.0|~4.0" }, "conflict": { "symfony/http-foundation": "<3.3" }, "require-dev": { - "symfony/console": "~2.8|~3.0", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/var-dumper": "~3.3" + "symfony/console": "~2.8|~3.0|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/security-core": "~2.8|~3.0|~4.0", + "symfony/var-dumper": "~3.3|~4.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." + "symfony/http-kernel": "For using the debugging handlers together with the response life cycle of the HTTP kernel.", + "symfony/var-dumper": "For using the debugging handlers like the console handler or the log server handler." }, "type": "symfony-bridge", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1360,7 +1392,7 @@ ], "description": "Symfony Monolog Bridge", "homepage": "https://symfony.com", - "time": "2017-06-06T15:10:52+00:00" + "time": "2018-01-03T07:37:34+00:00" }, { "name": "symfony/monolog-bundle", @@ -1422,18 +1454,74 @@ ], "time": "2017-01-02T19:04:26+00:00" }, + { + "name": "symfony/polyfill-apcu", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-apcu.git", + "reference": "04f62674339602def515bff4bc6901fc1d4951e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/04f62674339602def515bff4bc6901fc1d4951e8", + "reference": "04f62674339602def515bff4bc6901fc1d4951e8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Apcu\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 polyfill backporting apcu_* functions to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "apcu", + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2017-10-11T12:05:26+00:00" + }, { "name": "symfony/polyfill-mbstring", - "version": "v1.4.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "f29dca382a6485c3cbe6379f0c61230167681937" + "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937", - "reference": "f29dca382a6485c3cbe6379f0c61230167681937", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", + "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", "shasum": "" }, "require": { @@ -1445,7 +1533,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -1479,37 +1567,41 @@ "portable", "shim" ], - "time": "2017-06-09T14:24:12+00:00" + "time": "2017-10-11T12:05:26+00:00" }, { - "name": "symfony/process", - "version": "v3.3.5", + "name": "symfony/polyfill-php70", + "version": "v1.6.0", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "07432804942b9f6dd7b7377faf9920af5f95d70a" + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/07432804942b9f6dd7b7377faf9920af5f95d70a", - "reference": "07432804942b9f6dd7b7377faf9920af5f95d70a", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff", + "reference": "0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff", "shasum": "" }, "require": { - "php": ">=5.5.9" + "paragonie/random_compat": "~1.0|~2.0", + "php": ">=5.3.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "1.6-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Process\\": "" + "Symfony\\Polyfill\\Php70\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1518,67 +1610,50 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", "homepage": "https://symfony.com", - "time": "2017-07-13T13:05:09+00:00" + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2017-10-11T12:05:26+00:00" }, { - "name": "symfony/routing", - "version": "v3.3.5", + "name": "symfony/process", + "version": "v3.4.3", "source": { "type": "git", - "url": "https://github.com/symfony/routing.git", - "reference": "dc70bbd0ca7b19259f63cdacc8af370bc32a4728" + "url": "https://github.com/symfony/process.git", + "reference": "ff69f110c6b33fd33cd2089ba97d6112f44ef0ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/dc70bbd0ca7b19259f63cdacc8af370bc32a4728", - "reference": "dc70bbd0ca7b19259f63cdacc8af370bc32a4728", + "url": "https://api.github.com/repos/symfony/process/zipball/ff69f110c6b33fd33cd2089ba97d6112f44ef0ba", + "reference": "ff69f110c6b33fd33cd2089ba97d6112f44ef0ba", "shasum": "" }, "require": { - "php": ">=5.5.9" - }, - "conflict": { - "symfony/config": "<2.8", - "symfony/dependency-injection": "<3.3", - "symfony/yaml": "<3.3" - }, - "require-dev": { - "doctrine/annotations": "~1.0", - "doctrine/common": "~2.2", - "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0", - "symfony/dependency-injection": "~3.3", - "symfony/expression-language": "~2.8|~3.0", - "symfony/http-foundation": "~2.8|~3.0", - "symfony/yaml": "~3.3" - }, - "suggest": { - "doctrine/annotations": "For using the annotation loader", - "symfony/config": "For using the all-in-one router or any loader", - "symfony/dependency-injection": "For loading routes from a service", - "symfony/expression-language": "For using expression matching", - "symfony/http-foundation": "For using a Symfony Request object", - "symfony/yaml": "For using the YAML loader" + "php": "^5.5.9|>=7.0.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Routing\\": "" + "Symfony\\Component\\Process\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -1598,42 +1673,59 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Routing Component", + "description": "Symfony Process Component", "homepage": "https://symfony.com", - "keywords": [ - "router", - "routing", - "uri", - "url" - ], - "time": "2017-06-24T09:29:48+00:00" + "time": "2018-01-03T07:37:34+00:00" }, { - "name": "symfony/stopwatch", - "version": "v3.3.5", + "name": "symfony/routing", + "version": "v3.4.3", "source": { "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "602a15299dc01556013b07167d4f5d3a60e90d15" + "url": "https://github.com/symfony/routing.git", + "reference": "e2b6d6fe7b090c7af720b75c7722c6dfa7a52658" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/602a15299dc01556013b07167d4f5d3a60e90d15", - "reference": "602a15299dc01556013b07167d4f5d3a60e90d15", + "url": "https://api.github.com/repos/symfony/routing/zipball/e2b6d6fe7b090c7af720b75c7722c6dfa7a52658", + "reference": "e2b6d6fe7b090c7af720b75c7722c6dfa7a52658", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" + }, + "conflict": { + "symfony/config": "<2.8", + "symfony/dependency-injection": "<3.3", + "symfony/yaml": "<3.4" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "doctrine/common": "~2.2", + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "~3.3|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/http-foundation": "~2.8|~3.0|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/dependency-injection": "For loading routes from a service", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" + "Symfony\\Component\\Routing\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -1653,29 +1745,38 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Stopwatch Component", + "description": "Symfony Routing Component", "homepage": "https://symfony.com", - "time": "2017-04-12T14:14:56+00:00" + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "time": "2018-01-04T15:09:34+00:00" }, { "name": "symfony/yaml", - "version": "v3.3.5", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "1f93a8d19b8241617f5074a123e282575b821df8" + "reference": "25c192f25721a74084272671f658797d9e0e0146" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/1f93a8d19b8241617f5074a123e282575b821df8", - "reference": "1f93a8d19b8241617f5074a123e282575b821df8", + "url": "https://api.github.com/repos/symfony/yaml/zipball/25c192f25721a74084272671f658797d9e0e0146", + "reference": "25c192f25721a74084272671f658797d9e0e0146", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" + }, + "conflict": { + "symfony/console": "<3.4" }, "require-dev": { - "symfony/console": "~2.8|~3.0" + "symfony/console": "~3.4|~4.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -1683,7 +1784,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1710,7 +1811,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-06-15T12:58:50+00:00" + "time": "2018-01-03T07:37:34+00:00" } ], "packages-dev": [], @@ -1720,7 +1821,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "platform-dev": [], "platform-overrides": { diff --git a/symfony-3.3-micro/phpunit.xml.dist b/symfony-3.4-micro/phpunit.xml.dist similarity index 100% rename from symfony-3.3-micro/phpunit.xml.dist rename to symfony-3.4-micro/phpunit.xml.dist diff --git a/symfony-3.3-micro/src/App/Controller/HelloController.php b/symfony-3.4-micro/src/App/Controller/HelloController.php similarity index 100% rename from symfony-3.3-micro/src/App/Controller/HelloController.php rename to symfony-3.4-micro/src/App/Controller/HelloController.php diff --git a/symfony-3.3-micro/var/SymfonyRequirements.php b/symfony-3.4-micro/var/SymfonyRequirements.php similarity index 100% rename from symfony-3.3-micro/var/SymfonyRequirements.php rename to symfony-3.4-micro/var/SymfonyRequirements.php diff --git a/symfony-3.3-micro/var/cache/.gitkeep b/symfony-3.4-micro/var/cache/.gitkeep similarity index 100% rename from symfony-3.3-micro/var/cache/.gitkeep rename to symfony-3.4-micro/var/cache/.gitkeep diff --git a/symfony-3.3-micro/var/logs/.gitkeep b/symfony-3.4-micro/var/logs/.gitkeep similarity index 100% rename from symfony-3.3-micro/var/logs/.gitkeep rename to symfony-3.4-micro/var/logs/.gitkeep diff --git a/symfony-3.3-micro/var/sessions/.gitkeep b/symfony-3.4-micro/var/sessions/.gitkeep similarity index 100% rename from symfony-3.3-micro/var/sessions/.gitkeep rename to symfony-3.4-micro/var/sessions/.gitkeep diff --git a/symfony-3.3-micro/web/micro.php b/symfony-3.4-micro/web/micro.php similarity index 100% rename from symfony-3.3-micro/web/micro.php rename to symfony-3.4-micro/web/micro.php diff --git a/symfony-3.3/.gitignore b/symfony-3.4/.gitignore similarity index 100% rename from symfony-3.3/.gitignore rename to symfony-3.4/.gitignore diff --git a/symfony-3.3/README.md b/symfony-3.4/README.md similarity index 72% rename from symfony-3.3/README.md rename to symfony-3.4/README.md index 839b7e5f8..44895903c 100644 --- a/symfony-3.3/README.md +++ b/symfony-3.4/README.md @@ -1,4 +1,4 @@ -symfony-3.3 +symfony-3.4 =========== A Symfony project diff --git a/symfony-3.3/_benchmark/hello_world.sh b/symfony-3.4/_benchmark/hello_world.sh similarity index 100% rename from symfony-3.3/_benchmark/hello_world.sh rename to symfony-3.4/_benchmark/hello_world.sh diff --git a/symfony-3.3/_benchmark/setup.sh b/symfony-3.4/_benchmark/setup.sh similarity index 100% rename from symfony-3.3/_benchmark/setup.sh rename to symfony-3.4/_benchmark/setup.sh diff --git a/symfony-3.3/app/AppCache.php b/symfony-3.4/app/AppCache.php similarity index 100% rename from symfony-3.3/app/AppCache.php rename to symfony-3.4/app/AppCache.php diff --git a/symfony-3.3/app/AppKernel.php b/symfony-3.4/app/AppKernel.php similarity index 100% rename from symfony-3.3/app/AppKernel.php rename to symfony-3.4/app/AppKernel.php diff --git a/symfony-3.3/app/Resources/views/base.html.twig b/symfony-3.4/app/Resources/views/base.html.twig similarity index 100% rename from symfony-3.3/app/Resources/views/base.html.twig rename to symfony-3.4/app/Resources/views/base.html.twig diff --git a/symfony-3.3/app/Resources/views/default/index.html.twig b/symfony-3.4/app/Resources/views/default/index.html.twig similarity index 100% rename from symfony-3.3/app/Resources/views/default/index.html.twig rename to symfony-3.4/app/Resources/views/default/index.html.twig diff --git a/symfony-3.3/app/autoload.php b/symfony-3.4/app/autoload.php similarity index 100% rename from symfony-3.3/app/autoload.php rename to symfony-3.4/app/autoload.php diff --git a/symfony-3.3/app/config/config.yml b/symfony-3.4/app/config/config.yml similarity index 100% rename from symfony-3.3/app/config/config.yml rename to symfony-3.4/app/config/config.yml diff --git a/symfony-3.3/app/config/config_dev.yml b/symfony-3.4/app/config/config_dev.yml similarity index 100% rename from symfony-3.3/app/config/config_dev.yml rename to symfony-3.4/app/config/config_dev.yml diff --git a/symfony-3.3/app/config/config_prod.yml b/symfony-3.4/app/config/config_prod.yml similarity index 100% rename from symfony-3.3/app/config/config_prod.yml rename to symfony-3.4/app/config/config_prod.yml diff --git a/symfony-3.3/app/config/config_test.yml b/symfony-3.4/app/config/config_test.yml similarity index 100% rename from symfony-3.3/app/config/config_test.yml rename to symfony-3.4/app/config/config_test.yml diff --git a/symfony-3.3/app/config/parameters.yml.dist b/symfony-3.4/app/config/parameters.yml.dist similarity index 100% rename from symfony-3.3/app/config/parameters.yml.dist rename to symfony-3.4/app/config/parameters.yml.dist diff --git a/symfony-3.3/app/config/routing.yml b/symfony-3.4/app/config/routing.yml similarity index 100% rename from symfony-3.3/app/config/routing.yml rename to symfony-3.4/app/config/routing.yml diff --git a/symfony-3.3/app/config/routing_dev.yml b/symfony-3.4/app/config/routing_dev.yml similarity index 100% rename from symfony-3.3/app/config/routing_dev.yml rename to symfony-3.4/app/config/routing_dev.yml diff --git a/symfony-3.3/app/config/security.yml b/symfony-3.4/app/config/security.yml similarity index 100% rename from symfony-3.3/app/config/security.yml rename to symfony-3.4/app/config/security.yml diff --git a/symfony-3.3/app/config/services.yml b/symfony-3.4/app/config/services.yml similarity index 100% rename from symfony-3.3/app/config/services.yml rename to symfony-3.4/app/config/services.yml diff --git a/symfony-3.3/bin/console b/symfony-3.4/bin/console similarity index 100% rename from symfony-3.3/bin/console rename to symfony-3.4/bin/console diff --git a/symfony-3.3/bin/symfony_requirements b/symfony-3.4/bin/symfony_requirements similarity index 100% rename from symfony-3.3/bin/symfony_requirements rename to symfony-3.4/bin/symfony_requirements diff --git a/symfony-3.3/composer.json b/symfony-3.4/composer.json similarity index 95% rename from symfony-3.3/composer.json rename to symfony-3.4/composer.json index e6fc6a14a..a6f63491f 100644 --- a/symfony-3.3/composer.json +++ b/symfony-3.4/composer.json @@ -1,5 +1,5 @@ { - "name": "kenji/symfony.3.3", + "name": "kenji/symfony.3.4", "license": "proprietary", "type": "project", "autoload": { @@ -17,8 +17,8 @@ } }, "require": { - "php": ">=5.5.9", - "symfony/symfony": "3.3.*", + "php": "^5.5.9|>=7.0.8", + "symfony/symfony": "3.4.*", "doctrine/orm": "^2.5", "doctrine/doctrine-bundle": "^1.6", "doctrine/doctrine-cache-bundle": "^1.2", diff --git a/symfony-3.3/composer.lock b/symfony-3.4/composer.lock similarity index 87% rename from symfony-3.3/composer.lock rename to symfony-3.4/composer.lock index 1b35b6c45..0a97ee23b 100644 --- a/symfony-3.3/composer.lock +++ b/symfony-3.4/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "a723c0e8603b9ee3cc29461e54e74279", + "content-hash": "cab3e704043ea1ba4c17dd1c93524f32", "packages": [ { "name": "composer/ca-bundle", - "version": "1.0.7", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12" + "reference": "943b2c4fcad1ef178d16a713c2468bf7e579c288" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/b17e6153cb7f33c7e44eb59578dc12eee5dc8e12", - "reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/943b2c4fcad1ef178d16a713c2468bf7e579c288", + "reference": "943b2c4fcad1ef178d16a713c2468bf7e579c288", "shasum": "" }, "require": { @@ -26,12 +26,9 @@ "php": "^5.3.2 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.5", + "phpunit/phpunit": "^4.8.35", "psr/log": "^1.0", - "symfony/process": "^2.5 || ^3.0" - }, - "suggest": { - "symfony/process": "This is necessary to reliably check whether openssl_x509_parse is vulnerable on older php versions, but can be ignored on PHP 5.5.6+" + "symfony/process": "^2.5 || ^3.0 || ^4.0" }, "type": "library", "extra": { @@ -63,7 +60,7 @@ "ssl", "tls" ], - "time": "2017-03-06T11:59:08+00:00" + "time": "2017-11-29T09:37:33+00:00" }, { "name": "doctrine/annotations", @@ -415,37 +412,41 @@ }, { "name": "doctrine/doctrine-bundle", - "version": "1.6.8", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/doctrine/DoctrineBundle.git", - "reference": "6e96577cbbdbb5b6dcca2ff203d665976b51beb0" + "reference": "eb6e4fb904a459be28872765ab6e2d246aac7c87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/6e96577cbbdbb5b6dcca2ff203d665976b51beb0", - "reference": "6e96577cbbdbb5b6dcca2ff203d665976b51beb0", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/eb6e4fb904a459be28872765ab6e2d246aac7c87", + "reference": "eb6e4fb904a459be28872765ab6e2d246aac7c87", "shasum": "" }, "require": { - "doctrine/dbal": "~2.3", + "doctrine/dbal": "^2.5.12", "doctrine/doctrine-cache-bundle": "~1.2", - "jdorn/sql-formatter": "~1.1", - "php": ">=5.5.9", + "jdorn/sql-formatter": "^1.2.16", + "php": "^5.5.9|^7.0", "symfony/console": "~2.7|~3.0|~4.0", "symfony/dependency-injection": "~2.7|~3.0|~4.0", "symfony/doctrine-bridge": "~2.7|~3.0|~4.0", "symfony/framework-bundle": "~2.7|~3.0|~4.0" }, + "conflict": { + "symfony/http-foundation": "<2.6" + }, "require-dev": { "doctrine/orm": "~2.3", - "phpunit/phpunit": "~4", + "phpunit/phpunit": "^4.8.36|^5.7|^6.4", "satooshi/php-coveralls": "^1.0", "symfony/phpunit-bridge": "~2.7|~3.0|~4.0", "symfony/property-info": "~2.8|~3.0|~4.0", "symfony/validator": "~2.7|~3.0|~4.0", + "symfony/web-profiler-bundle": "~2.7|~3.0|~4.0", "symfony/yaml": "~2.7|~3.0|~4.0", - "twig/twig": "~1.12|~2.0" + "twig/twig": "~1.26|~2.0" }, "suggest": { "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", @@ -454,7 +455,7 @@ "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -492,27 +493,27 @@ "orm", "persistence" ], - "time": "2017-05-18T08:15:18+00:00" + "time": "2017-11-24T13:09:19+00:00" }, { "name": "doctrine/doctrine-cache-bundle", - "version": "1.3.0", + "version": "1.3.2", "source": { "type": "git", "url": "https://github.com/doctrine/DoctrineCacheBundle.git", - "reference": "18c600a9b82f6454d2e81ca4957cdd56a1cf3504" + "reference": "9baecbd6bfdd1123b0cf8c1b88fee0170a84ddd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineCacheBundle/zipball/18c600a9b82f6454d2e81ca4957cdd56a1cf3504", - "reference": "18c600a9b82f6454d2e81ca4957cdd56a1cf3504", + "url": "https://api.github.com/repos/doctrine/DoctrineCacheBundle/zipball/9baecbd6bfdd1123b0cf8c1b88fee0170a84ddd1", + "reference": "9baecbd6bfdd1123b0cf8c1b88fee0170a84ddd1", "shasum": "" }, "require": { "doctrine/cache": "^1.4.2", "doctrine/inflector": "~1.0", "php": ">=5.3.2", - "symfony/doctrine-bridge": "~2.2|~3.0" + "symfony/doctrine-bridge": "~2.2|~3.0|~4.0" }, "require-dev": { "instaclick/coding-standard": "~1.1", @@ -520,15 +521,15 @@ "instaclick/symfony2-coding-standard": "dev-remaster", "phpunit/phpunit": "~4", "predis/predis": "~0.8", - "satooshi/php-coveralls": "~0.6.1", + "satooshi/php-coveralls": "^1.0", "squizlabs/php_codesniffer": "~1.5", - "symfony/console": "~2.2|~3.0", - "symfony/finder": "~2.2|~3.0", - "symfony/framework-bundle": "~2.2|~3.0", - "symfony/phpunit-bridge": "~2.7|~3.0", + "symfony/console": "~2.2|~3.0|~4.0", + "symfony/finder": "~2.2|~3.0|~4.0", + "symfony/framework-bundle": "~2.2|~3.0|~4.0", + "symfony/phpunit-bridge": "~2.7|~3.0|~4.0", "symfony/security-acl": "~2.3|~3.0", - "symfony/validator": "~2.2|~3.0", - "symfony/yaml": "~2.2|~3.0" + "symfony/validator": "~2.2|~3.0|~4.0", + "symfony/yaml": "~2.2|~3.0|~4.0" }, "suggest": { "symfony/security-acl": "For using this bundle to cache ACLs" @@ -536,7 +537,7 @@ "type": "symfony-bundle", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -580,7 +581,7 @@ "cache", "caching" ], - "time": "2016-01-26T17:28:51+00:00" + "time": "2017-10-12T17:23:29+00:00" }, { "name": "doctrine/inflector", @@ -759,31 +760,31 @@ }, { "name": "doctrine/orm", - "version": "v2.5.6", + "version": "v2.5.14", "source": { "type": "git", "url": "https://github.com/doctrine/doctrine2.git", - "reference": "e6c434196c8ef058239aaa0724b4aadb0107940b" + "reference": "810a7baf81462a5ddf10e8baa8cb94b6eec02754" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/e6c434196c8ef058239aaa0724b4aadb0107940b", - "reference": "e6c434196c8ef058239aaa0724b4aadb0107940b", + "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/810a7baf81462a5ddf10e8baa8cb94b6eec02754", + "reference": "810a7baf81462a5ddf10e8baa8cb94b6eec02754", "shasum": "" }, "require": { "doctrine/cache": "~1.4", "doctrine/collections": "~1.2", - "doctrine/common": ">=2.5-dev,<2.8-dev", - "doctrine/dbal": ">=2.5-dev,<2.6-dev", - "doctrine/instantiator": "~1.0.1", + "doctrine/common": ">=2.5-dev,<2.9-dev", + "doctrine/dbal": ">=2.5-dev,<2.7-dev", + "doctrine/instantiator": "^1.0.1", "ext-pdo": "*", "php": ">=5.4", - "symfony/console": "~2.5|~3.0" + "symfony/console": "~2.5|~3.0|~4.0" }, "require-dev": { "phpunit/phpunit": "~4.0", - "symfony/yaml": "~2.3|~3.0" + "symfony/yaml": "~2.3|~3.0|~4.0" }, "suggest": { "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" @@ -831,7 +832,7 @@ "database", "orm" ], - "time": "2016-12-18T15:42:34+00:00" + "time": "2017-12-17T02:57:51+00:00" }, { "name": "fig/link-util", @@ -1068,16 +1069,16 @@ }, { "name": "paragonie/random_compat", - "version": "v2.0.10", + "version": "v2.0.11", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" + "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/5da4d3c796c275c55f057af5a643ae297d96b4d8", + "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8", "shasum": "" }, "require": { @@ -1112,7 +1113,7 @@ "pseudorandom", "random" ], - "time": "2017-03-13T16:27:32+00:00" + "time": "2017-09-27T21:40:39+00:00" }, { "name": "psr/cache", @@ -1355,16 +1356,16 @@ }, { "name": "sensio/distribution-bundle", - "version": "v5.0.20", + "version": "v5.0.21", "source": { "type": "git", "url": "https://github.com/sensiolabs/SensioDistributionBundle.git", - "reference": "4b019d4c0bd64438c42e4b6b0726085b409be8d9" + "reference": "eb6266b3b472e4002538610b28a0a04bcf94891a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/4b019d4c0bd64438c42e4b6b0726085b409be8d9", - "reference": "4b019d4c0bd64438c42e4b6b0726085b409be8d9", + "url": "https://api.github.com/repos/sensiolabs/SensioDistributionBundle/zipball/eb6266b3b472e4002538610b28a0a04bcf94891a", + "reference": "eb6266b3b472e4002538610b28a0a04bcf94891a", "shasum": "" }, "require": { @@ -1403,42 +1404,42 @@ "configuration", "distribution" ], - "time": "2017-05-11T16:21:03+00:00" + "time": "2017-08-25T16:55:44+00:00" }, { "name": "sensio/framework-extra-bundle", - "version": "v3.0.26", + "version": "v3.0.29", "source": { "type": "git", "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", - "reference": "6d6cbe971554f0a2cc84965850481eb04a2a0059" + "reference": "bb907234df776b68922eb4b25bfa061683597b6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/6d6cbe971554f0a2cc84965850481eb04a2a0059", - "reference": "6d6cbe971554f0a2cc84965850481eb04a2a0059", + "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/bb907234df776b68922eb4b25bfa061683597b6a", + "reference": "bb907234df776b68922eb4b25bfa061683597b6a", "shasum": "" }, "require": { "doctrine/common": "~2.2", "symfony/dependency-injection": "~2.3|~3.0", - "symfony/framework-bundle": "~2.3|~3.0" + "symfony/framework-bundle": "~2.3|~3.0|~4.0" }, "require-dev": { "doctrine/doctrine-bundle": "~1.5", "doctrine/orm": "~2.4,>=2.4.5", - "symfony/asset": "~2.7|~3.0", - "symfony/browser-kit": "~2.3|~3.0", - "symfony/dom-crawler": "~2.3|~3.0", - "symfony/expression-language": "~2.4|~3.0", - "symfony/finder": "~2.3|~3.0", - "symfony/phpunit-bridge": "~3.2", - "symfony/psr-http-message-bridge": "^0.3", - "symfony/security-bundle": "~2.4|~3.0", - "symfony/templating": "~2.3|~3.0", - "symfony/translation": "~2.3|~3.0", - "symfony/twig-bundle": "~2.3|~3.0", - "symfony/yaml": "~2.3|~3.0", + "symfony/asset": "~2.7|~3.0|~4.0", + "symfony/browser-kit": "~2.3|~3.0|~4.0", + "symfony/dom-crawler": "~2.3|~3.0|~4.0", + "symfony/expression-language": "~2.4|~3.0|~4.0", + "symfony/finder": "~2.3|~3.0|~4.0", + "symfony/phpunit-bridge": "~3.2|~4.0", + "symfony/psr-http-message-bridge": "^0.3|^1.0", + "symfony/security-bundle": "~2.4|~3.0|~4.0", + "symfony/templating": "~2.3|~3.0|~4.0", + "symfony/translation": "~2.3|~3.0|~4.0", + "symfony/twig-bundle": "~2.3|~3.0|~4.0", + "symfony/yaml": "~2.3|~3.0|~4.0", "twig/twig": "~1.12|~2.0", "zendframework/zend-diactoros": "^1.3" }, @@ -1473,25 +1474,25 @@ "annotations", "controllers" ], - "time": "2017-05-11T17:01:57+00:00" + "time": "2017-12-14T19:03:23+00:00" }, { "name": "sensiolabs/security-checker", - "version": "v4.0.5", + "version": "v4.1.7", "source": { "type": "git", "url": "https://github.com/sensiolabs/security-checker.git", - "reference": "6a3b0c3b42e41c777b1ad75032d8177863fdc5e1" + "reference": "d539ccba2b4dce515de04f16b7ed7ae5b9eeb434" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/6a3b0c3b42e41c777b1ad75032d8177863fdc5e1", - "reference": "6a3b0c3b42e41c777b1ad75032d8177863fdc5e1", + "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/d539ccba2b4dce515de04f16b7ed7ae5b9eeb434", + "reference": "d539ccba2b4dce515de04f16b7ed7ae5b9eeb434", "shasum": "" }, "require": { "composer/ca-bundle": "^1.0", - "symfony/console": "~2.7|~3.0" + "symfony/console": "~2.7|~3.0|~4.0" }, "bin": [ "security-checker" @@ -1499,7 +1500,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -1518,20 +1519,20 @@ } ], "description": "A security checker for your composer.lock", - "time": "2017-07-24T11:42:56+00:00" + "time": "2018-01-11T05:54:03+00:00" }, { "name": "swiftmailer/swiftmailer", - "version": "v5.4.8", + "version": "v5.4.9", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "9a06dc570a0367850280eefd3f1dc2da45aef517" + "reference": "7ffc1ea296ed14bf8260b6ef11b80208dbadba91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/9a06dc570a0367850280eefd3f1dc2da45aef517", - "reference": "9a06dc570a0367850280eefd3f1dc2da45aef517", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/7ffc1ea296ed14bf8260b6ef11b80208dbadba91", + "reference": "7ffc1ea296ed14bf8260b6ef11b80208dbadba91", "shasum": "" }, "require": { @@ -1566,13 +1567,13 @@ } ], "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "http://swiftmailer.org", + "homepage": "https://swiftmailer.symfony.com", "keywords": [ "email", "mail", "mailer" ], - "time": "2017-05-01T15:54:03+00:00" + "time": "2018-01-23T07:37:21+00:00" }, { "name": "symfony/monolog-bundle", @@ -1634,18 +1635,74 @@ ], "time": "2017-01-02T19:04:26+00:00" }, + { + "name": "symfony/polyfill-apcu", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-apcu.git", + "reference": "04f62674339602def515bff4bc6901fc1d4951e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/04f62674339602def515bff4bc6901fc1d4951e8", + "reference": "04f62674339602def515bff4bc6901fc1d4951e8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Apcu\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 polyfill backporting apcu_* functions to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "apcu", + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2017-10-11T12:05:26+00:00" + }, { "name": "symfony/polyfill-intl-icu", - "version": "v1.4.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-icu.git", - "reference": "3191cbe0ce64987bd382daf6724af31c53daae01" + "reference": "d2bb2ef00dd8605d6fbd4db53ed4af1395953497" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/3191cbe0ce64987bd382daf6724af31c53daae01", - "reference": "3191cbe0ce64987bd382daf6724af31c53daae01", + "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/d2bb2ef00dd8605d6fbd4db53ed4af1395953497", + "reference": "d2bb2ef00dd8605d6fbd4db53ed4af1395953497", "shasum": "" }, "require": { @@ -1658,7 +1715,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -1690,20 +1747,20 @@ "portable", "shim" ], - "time": "2017-06-09T08:25:21+00:00" + "time": "2017-10-11T12:05:26+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.4.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "f29dca382a6485c3cbe6379f0c61230167681937" + "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937", - "reference": "f29dca382a6485c3cbe6379f0c61230167681937", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", + "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", "shasum": "" }, "require": { @@ -1715,7 +1772,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -1749,20 +1806,20 @@ "portable", "shim" ], - "time": "2017-06-09T14:24:12+00:00" + "time": "2017-10-11T12:05:26+00:00" }, { "name": "symfony/polyfill-php56", - "version": "v1.4.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php56.git", - "reference": "bc0b7d6cb36b10cfabb170a3e359944a95174929" + "reference": "265fc96795492430762c29be291a371494ba3a5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/bc0b7d6cb36b10cfabb170a3e359944a95174929", - "reference": "bc0b7d6cb36b10cfabb170a3e359944a95174929", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/265fc96795492430762c29be291a371494ba3a5b", + "reference": "265fc96795492430762c29be291a371494ba3a5b", "shasum": "" }, "require": { @@ -1772,7 +1829,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -1805,20 +1862,20 @@ "portable", "shim" ], - "time": "2017-06-09T08:25:21+00:00" + "time": "2017-10-11T12:05:26+00:00" }, { "name": "symfony/polyfill-php70", - "version": "v1.4.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "032fd647d5c11a9ceab8ee8747e13b5448e93874" + "reference": "0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/032fd647d5c11a9ceab8ee8747e13b5448e93874", - "reference": "032fd647d5c11a9ceab8ee8747e13b5448e93874", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff", + "reference": "0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff", "shasum": "" }, "require": { @@ -1828,7 +1885,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -1864,20 +1921,20 @@ "portable", "shim" ], - "time": "2017-06-09T14:24:12+00:00" + "time": "2017-10-11T12:05:26+00:00" }, { "name": "symfony/polyfill-util", - "version": "v1.4.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-util.git", - "reference": "ebccbde4aad410f6438d86d7d261c6b4d2b9a51d" + "reference": "6e719200c8e540e0c0effeb31f96bdb344b94176" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/ebccbde4aad410f6438d86d7d261c6b4d2b9a51d", - "reference": "ebccbde4aad410f6438d86d7d261c6b4d2b9a51d", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/6e719200c8e540e0c0effeb31f96bdb344b94176", + "reference": "6e719200c8e540e0c0effeb31f96bdb344b94176", "shasum": "" }, "require": { @@ -1886,7 +1943,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.6-dev" } }, "autoload": { @@ -1916,20 +1973,20 @@ "polyfill", "shim" ], - "time": "2017-06-09T08:25:21+00:00" + "time": "2017-10-11T12:05:26+00:00" }, { "name": "symfony/swiftmailer-bundle", - "version": "v2.6.3", + "version": "v2.6.7", "source": { "type": "git", "url": "https://github.com/symfony/swiftmailer-bundle.git", - "reference": "11555c338f3c367b0a1bd2f024a53aa813f4ce00" + "reference": "c4808f5169efc05567be983909d00f00521c53ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/11555c338f3c367b0a1bd2f024a53aa813f4ce00", - "reference": "11555c338f3c367b0a1bd2f024a53aa813f4ce00", + "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/c4808f5169efc05567be983909d00f00521c53ec", + "reference": "c4808f5169efc05567be983909d00f00521c53ec", "shasum": "" }, "require": { @@ -1975,47 +2032,49 @@ ], "description": "Symfony SwiftmailerBundle", "homepage": "http://symfony.com", - "time": "2017-07-22T07:18:13+00:00" + "time": "2017-10-19T01:06:41+00:00" }, { "name": "symfony/symfony", - "version": "v3.3.5", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/symfony.git", - "reference": "b9a0d3d2393f683b28043e9dbf83b8bf6b347faa" + "reference": "21abeae69baf64d689b04ca33663b4354be1a226" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/b9a0d3d2393f683b28043e9dbf83b8bf6b347faa", - "reference": "b9a0d3d2393f683b28043e9dbf83b8bf6b347faa", + "url": "https://api.github.com/repos/symfony/symfony/zipball/21abeae69baf64d689b04ca33663b4354be1a226", + "reference": "21abeae69baf64d689b04ca33663b4354be1a226", "shasum": "" }, "require": { "doctrine/common": "~2.4", "ext-xml": "*", "fig/link-util": "^1.0", - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "psr/cache": "~1.0", "psr/container": "^1.0", "psr/link": "^1.0", "psr/log": "~1.0", "psr/simple-cache": "^1.0", + "symfony/polyfill-apcu": "~1.1", "symfony/polyfill-intl-icu": "~1.0", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php56": "~1.0", - "symfony/polyfill-php70": "~1.0", + "symfony/polyfill-php70": "~1.6", "symfony/polyfill-util": "~1.0", - "twig/twig": "~1.34|~2.4" + "twig/twig": "^1.35|^2.4.4" }, "conflict": { - "phpdocumentor/reflection-docblock": "<3.0||>=3.2.0", - "phpdocumentor/type-resolver": "<0.2.0", + "phpdocumentor/reflection-docblock": "<3.0||>=3.2.0,<3.2.2", + "phpdocumentor/type-resolver": "<0.2.1", "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" }, "provide": { "psr/cache-implementation": "1.0", "psr/container-implementation": "1.0", + "psr/log-implementation": "1.0", "psr/simple-cache-implementation": "1.0" }, "replace": { @@ -2043,6 +2102,7 @@ "symfony/inflector": "self.version", "symfony/intl": "self.version", "symfony/ldap": "self.version", + "symfony/lock": "self.version", "symfony/monolog-bridge": "self.version", "symfony/options-resolver": "self.version", "symfony/process": "self.version", @@ -2072,6 +2132,7 @@ }, "require-dev": { "cache/integration-tests": "dev-master", + "doctrine/annotations": "~1.0", "doctrine/cache": "~1.6", "doctrine/data-fixtures": "1.0.*", "doctrine/dbal": "~2.4", @@ -2080,17 +2141,15 @@ "egulias/email-validator": "~1.2,>=1.2.8|~2.0", "monolog/monolog": "~1.11", "ocramius/proxy-manager": "~0.4|~1.0|~2.0", - "phpdocumentor/reflection-docblock": "^3.0", + "phpdocumentor/reflection-docblock": "^3.0|^4.0", "predis/predis": "~1.0", - "sensio/framework-extra-bundle": "^3.0.2", - "symfony/phpunit-bridge": "~3.2", - "symfony/polyfill-apcu": "~1.1", + "symfony/phpunit-bridge": "~3.4|~4.0", "symfony/security-acl": "~2.8|~3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -2128,20 +2187,20 @@ "keywords": [ "framework" ], - "time": "2017-07-17T19:08:46+00:00" + "time": "2018-01-05T08:33:31+00:00" }, { "name": "twig/twig", - "version": "v1.34.4", + "version": "v1.35.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "f878bab48edb66ad9c6ed626bf817f60c6c096ee" + "reference": "daa657073e55b0a78cce8fdd22682fddecc6385f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/f878bab48edb66ad9c6ed626bf817f60c6c096ee", - "reference": "f878bab48edb66ad9c6ed626bf817f60c6c096ee", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/daa657073e55b0a78cce8fdd22682fddecc6385f", + "reference": "daa657073e55b0a78cce8fdd22682fddecc6385f", "shasum": "" }, "require": { @@ -2155,7 +2214,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.34-dev" + "dev-master": "1.35-dev" } }, "autoload": { @@ -2193,22 +2252,22 @@ "keywords": [ "templating" ], - "time": "2017-07-04T13:19:31+00:00" + "time": "2017-09-27T18:06:46+00:00" } ], "packages-dev": [ { "name": "sensio/generator-bundle", - "version": "v3.1.6", + "version": "v3.1.7", "source": { "type": "git", "url": "https://github.com/sensiolabs/SensioGeneratorBundle.git", - "reference": "128bc5dabc91ca40b7445f094968dd70ccd58305" + "reference": "28cbaa244bd0816fd8908b93f90380bcd7b67a65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/128bc5dabc91ca40b7445f094968dd70ccd58305", - "reference": "128bc5dabc91ca40b7445f094968dd70ccd58305", + "url": "https://api.github.com/repos/sensiolabs/SensioGeneratorBundle/zipball/28cbaa244bd0816fd8908b93f90380bcd7b67a65", + "reference": "28cbaa244bd0816fd8908b93f90380bcd7b67a65", "shasum": "" }, "require": { @@ -2249,20 +2308,20 @@ } ], "description": "This bundle generates code for you", - "time": "2017-07-18T07:57:44+00:00" + "time": "2017-12-07T15:36:41+00:00" }, { "name": "symfony/phpunit-bridge", - "version": "v3.3.5", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "c2c124b7f9de79f4a64dc011f041a3a2c768b913" + "reference": "24ffb71a115c25f5ee56cbfd38e56ed2cdbeb0a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/c2c124b7f9de79f4a64dc011f041a3a2c768b913", - "reference": "c2c124b7f9de79f4a64dc011f041a3a2c768b913", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/24ffb71a115c25f5ee56cbfd38e56ed2cdbeb0a9", + "reference": "24ffb71a115c25f5ee56cbfd38e56ed2cdbeb0a9", "shasum": "" }, "require": { @@ -2281,7 +2340,11 @@ "type": "symfony-bridge", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" + }, + "thanks": { + "name": "phpunit/phpunit", + "url": "https://github.com/sebastianbergmann/phpunit" } }, "autoload": { @@ -2311,7 +2374,7 @@ ], "description": "Symfony PHPUnit Bridge", "homepage": "https://symfony.com", - "time": "2017-06-12T13:35:45+00:00" + "time": "2018-01-04T17:19:23+00:00" } ], "aliases": [], @@ -2320,7 +2383,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "platform-dev": [], "platform-overrides": { diff --git a/symfony-3.3/phpunit.xml.dist b/symfony-3.4/phpunit.xml.dist similarity index 100% rename from symfony-3.3/phpunit.xml.dist rename to symfony-3.4/phpunit.xml.dist diff --git a/symfony-3.3/src/AppBundle/AppBundle.php b/symfony-3.4/src/AppBundle/AppBundle.php similarity index 100% rename from symfony-3.3/src/AppBundle/AppBundle.php rename to symfony-3.4/src/AppBundle/AppBundle.php diff --git a/symfony-3.3/src/AppBundle/Controller/DefaultController.php b/symfony-3.4/src/AppBundle/Controller/DefaultController.php similarity index 100% rename from symfony-3.3/src/AppBundle/Controller/DefaultController.php rename to symfony-3.4/src/AppBundle/Controller/DefaultController.php diff --git a/symfony-3.3/src/AppBundle/Controller/HelloController.php b/symfony-3.4/src/AppBundle/Controller/HelloController.php similarity index 100% rename from symfony-3.3/src/AppBundle/Controller/HelloController.php rename to symfony-3.4/src/AppBundle/Controller/HelloController.php diff --git a/symfony-3.3/tests/AppBundle/Controller/DefaultControllerTest.php b/symfony-3.4/tests/AppBundle/Controller/DefaultControllerTest.php similarity index 100% rename from symfony-3.3/tests/AppBundle/Controller/DefaultControllerTest.php rename to symfony-3.4/tests/AppBundle/Controller/DefaultControllerTest.php diff --git a/symfony-3.3/var/SymfonyRequirements.php b/symfony-3.4/var/SymfonyRequirements.php similarity index 100% rename from symfony-3.3/var/SymfonyRequirements.php rename to symfony-3.4/var/SymfonyRequirements.php diff --git a/symfony-3.3/var/cache/.gitkeep b/symfony-3.4/var/cache/.gitkeep similarity index 100% rename from symfony-3.3/var/cache/.gitkeep rename to symfony-3.4/var/cache/.gitkeep diff --git a/symfony-3.3/var/logs/.gitkeep b/symfony-3.4/var/logs/.gitkeep similarity index 100% rename from symfony-3.3/var/logs/.gitkeep rename to symfony-3.4/var/logs/.gitkeep diff --git a/symfony-3.3/var/sessions/.gitkeep b/symfony-3.4/var/sessions/.gitkeep similarity index 100% rename from symfony-3.3/var/sessions/.gitkeep rename to symfony-3.4/var/sessions/.gitkeep diff --git a/symfony-3.3/web/app.php b/symfony-3.4/web/app.php similarity index 100% rename from symfony-3.3/web/app.php rename to symfony-3.4/web/app.php diff --git a/symfony-3.3/web/app_dev.php b/symfony-3.4/web/app_dev.php similarity index 100% rename from symfony-3.3/web/app_dev.php rename to symfony-3.4/web/app_dev.php diff --git a/symfony-3.3/web/apple-touch-icon.png b/symfony-3.4/web/apple-touch-icon.png similarity index 100% rename from symfony-3.3/web/apple-touch-icon.png rename to symfony-3.4/web/apple-touch-icon.png diff --git a/symfony-3.3/web/config.php b/symfony-3.4/web/config.php similarity index 100% rename from symfony-3.3/web/config.php rename to symfony-3.4/web/config.php diff --git a/symfony-3.3/web/favicon.ico b/symfony-3.4/web/favicon.ico similarity index 100% rename from symfony-3.3/web/favicon.ico rename to symfony-3.4/web/favicon.ico diff --git a/symfony-3.3/web/robots.txt b/symfony-3.4/web/robots.txt similarity index 100% rename from symfony-3.3/web/robots.txt rename to symfony-3.4/web/robots.txt From 1c82de0ace2fd4e36eff25e1a0095e218d18f43a Mon Sep 17 00:00:00 2001 From: Anton Minin <anton.a.minin@gmail.com> Date: Tue, 23 Jan 2018 16:21:29 +0300 Subject: [PATCH 4/5] Add symfony 3.4 with micro-framework-bundle --- list.sh | 1 + symfony-3.4-empty/.gitignore | 17 + symfony-3.4-empty/LICENSE | 19 + symfony-3.4-empty/README.md | 34 + symfony-3.4-empty/_benchmark/hello_world.sh | 3 + symfony-3.4-empty/_benchmark/setup.sh | 8 + symfony-3.4-empty/app/AppKernel.php | 48 + symfony-3.4-empty/app/autoload.php | 3 + symfony-3.4-empty/app/config/config.yml | 23 + symfony-3.4-empty/app/config/config_dev.yml | 2 + symfony-3.4-empty/app/config/config_prod.yml | 2 + symfony-3.4-empty/app/config/config_test.yml | 2 + .../app/config/parameters.yml.dist | 2 + symfony-3.4-empty/app/config/routings.yml | 12 + .../app/config/routings/.gitkeep | 0 .../app/config/routings/routings.yml | 12 + symfony-3.4-empty/bin/console | 18 + symfony-3.4-empty/composer.json | 35 + symfony-3.4-empty/composer.lock | 1038 +++++++++++++++++ symfony-3.4-empty/src/AppBundle/AppBundle.php | 9 + .../AppBundle/Controller/HelloController.php | 15 + .../src/AppBundle/Kernel/MicroKernelTrait.php | 96 ++ symfony-3.4-empty/var/cache/.gitkeep | 0 symfony-3.4-empty/var/logs/.gitkeep | 0 symfony-3.4-empty/web/app.php | 17 + symfony-3.4-empty/web/favicon.ico | Bin 0 -> 1406 bytes symfony-3.4-empty/web/robots.txt | 4 + 27 files changed, 1420 insertions(+) create mode 100644 symfony-3.4-empty/.gitignore create mode 100644 symfony-3.4-empty/LICENSE create mode 100644 symfony-3.4-empty/README.md create mode 100644 symfony-3.4-empty/_benchmark/hello_world.sh create mode 100644 symfony-3.4-empty/_benchmark/setup.sh create mode 100644 symfony-3.4-empty/app/AppKernel.php create mode 100644 symfony-3.4-empty/app/autoload.php create mode 100644 symfony-3.4-empty/app/config/config.yml create mode 100644 symfony-3.4-empty/app/config/config_dev.yml create mode 100644 symfony-3.4-empty/app/config/config_prod.yml create mode 100644 symfony-3.4-empty/app/config/config_test.yml create mode 100644 symfony-3.4-empty/app/config/parameters.yml.dist create mode 100644 symfony-3.4-empty/app/config/routings.yml create mode 100644 symfony-3.4-empty/app/config/routings/.gitkeep create mode 100644 symfony-3.4-empty/app/config/routings/routings.yml create mode 100755 symfony-3.4-empty/bin/console create mode 100644 symfony-3.4-empty/composer.json create mode 100644 symfony-3.4-empty/composer.lock create mode 100644 symfony-3.4-empty/src/AppBundle/AppBundle.php create mode 100644 symfony-3.4-empty/src/AppBundle/Controller/HelloController.php create mode 100644 symfony-3.4-empty/src/AppBundle/Kernel/MicroKernelTrait.php create mode 100644 symfony-3.4-empty/var/cache/.gitkeep create mode 100644 symfony-3.4-empty/var/logs/.gitkeep create mode 100644 symfony-3.4-empty/web/app.php create mode 100644 symfony-3.4-empty/web/favicon.ico create mode 100644 symfony-3.4-empty/web/robots.txt diff --git a/list.sh b/list.sh index 8881690d0..639691a78 100755 --- a/list.sh +++ b/list.sh @@ -42,6 +42,7 @@ staticphp-0.9 symfony-3.0 symfony-3.4 symfony-3.4-micro +symfony-3.4-empty tipsy-0.10 #typo3f-2.3 # does not work #typo3f-3.0 # Catchable Fatal Error: Argument 1 passed to TYPO3\Flow\Object\ObjectManager::setObjects() must be of the type array, null given diff --git a/symfony-3.4-empty/.gitignore b/symfony-3.4-empty/.gitignore new file mode 100644 index 000000000..40e9c1007 --- /dev/null +++ b/symfony-3.4-empty/.gitignore @@ -0,0 +1,17 @@ +# Temporary Files +/var/* + +!/var/cache +/var/cache/* +!var/cache/.gitkeep + +!/var/logs +/var/logs/* +!var/logs/.gitkeep + +# Configuration +/app/config/parameters.yml + +# Third Party libraries +/vendor/ +/composer.phar diff --git a/symfony-3.4-empty/LICENSE b/symfony-3.4-empty/LICENSE new file mode 100644 index 000000000..5241ee57e --- /dev/null +++ b/symfony-3.4-empty/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014-2015 Loïc Faugeron + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/symfony-3.4-empty/README.md b/symfony-3.4-empty/README.md new file mode 100644 index 000000000..3713fe968 --- /dev/null +++ b/symfony-3.4-empty/README.md @@ -0,0 +1,34 @@ +# Symfony Empty Edition + +A skeleton allowing you to create an empty Symfony application: it is provided without +any libraries or bundles (except for Symfony's FrameworkBundle). + +You can then start building on it, and install the dependencies you need. + +> **Note**: The [Symfony Standard Edition](https://github.com/symfony/symfony-standard) +> provides a big set of libraries and bundles (database, email, templating, etc). +> If you don't feel comfortable with picking your own yet, you should probably use it. + +## Installation + +Use [Composer](https://getcomposer.org/) to create a new application: + +``` +composer create-project gnugat/symfony-empty-edition my-project +``` + +## Differences with the Standard Edition + +* Only 2 bundles: `src/AppBundle` and `symfony/framework-bundle`, add the ones you really need +* Only 1 front controller (`web/app.php`), change the environment using the `SYMFONY_ENV` environment variable +* No annotations (can be brought back by installing `sensio/framework-extra-bundle`) + +## Use cases + +There are many real world use cases for this distribution. Here's a small selection: + +* tailored made applications: for applications that require "non standard" dependencies (e.g. Propel or Pomm for the database, etc) +* micro applications: for applications that don't need database, templating or mailing systems (Symfony can be a Micro Framework) +* legacy migrations: for applications that need to depend on legacy database, templating, etc while migrating to symfony +* teaching material: [better explained here](http://www.whitewashing.de/2014/04/24/symfony_hello_world.html) + diff --git a/symfony-3.4-empty/_benchmark/hello_world.sh b/symfony-3.4-empty/_benchmark/hello_world.sh new file mode 100644 index 000000000..9e6369133 --- /dev/null +++ b/symfony-3.4-empty/_benchmark/hello_world.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +url="$base/$fw/web/app.php/hello/index" diff --git a/symfony-3.4-empty/_benchmark/setup.sh b/symfony-3.4-empty/_benchmark/setup.sh new file mode 100644 index 000000000..0244cd4d5 --- /dev/null +++ b/symfony-3.4-empty/_benchmark/setup.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +export SYMFONY_ENV=prod +composer install --no-dev --optimize-autoloader +php bin/console cache:clear --env=prod --no-debug --no-warmup +php bin/console cache:warmup --env=prod --no-debug +chmod o+w var/cache/ var/logs/ +chmod -R o+w var/cache/* diff --git a/symfony-3.4-empty/app/AppKernel.php b/symfony-3.4-empty/app/AppKernel.php new file mode 100644 index 000000000..e45ccd8f1 --- /dev/null +++ b/symfony-3.4-empty/app/AppKernel.php @@ -0,0 +1,48 @@ +<?php +// app/AppKernel.php + +use AppBundle\Kernel\MicroKernelTrait; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\HttpKernel\Kernel; +use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\Routing\RouteCollectionBuilder; + +class AppKernel extends Kernel +{ + use MicroKernelTrait; + + public function registerBundles() + { + $bundles = [ + new Gnugat\MicroFrameworkBundle\GnugatMicroFrameworkBundle(), +// new Symfony\Bundle\MonologBundle\MonologBundle(), + ]; + + return $bundles; + } + + protected function configureRoutes(RouteCollectionBuilder $routes) + { + $routes->add('/hello/index', \AppBundle\Controller\HelloController::class . '::indexAction'); + } + + public function getRootDir() + { + return __DIR__; + } + + public function getCacheDir() + { + return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment(); + } + + public function getLogDir() + { + return dirname(__DIR__) . '/var/logs'; + } + + protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader) + { + $loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml'); + } +} diff --git a/symfony-3.4-empty/app/autoload.php b/symfony-3.4-empty/app/autoload.php new file mode 100644 index 000000000..991ea4397 --- /dev/null +++ b/symfony-3.4-empty/app/autoload.php @@ -0,0 +1,3 @@ +<?php + +require __DIR__.'/../vendor/autoload.php'; diff --git a/symfony-3.4-empty/app/config/config.yml b/symfony-3.4-empty/app/config/config.yml new file mode 100644 index 000000000..2b0a05a9d --- /dev/null +++ b/symfony-3.4-empty/app/config/config.yml @@ -0,0 +1,23 @@ +#imports: +# - { resource: parameters.yml } +# - { resource: services/ } +# +#framework: +# secret: '%secret%' +# router: +# resource: '%kernel.root_dir%/config/routings/' +# type: directory + +# app/config/config.yml +imports: + - { resource: parameters.yml } + +#framework: +# secret: "%secret%" +# router: +# resource: "%kernel.root_dir%/config/routings.yml" + +services: + app.hello_controller: + class: AppBundle\Controller\HelloController + tags: ['controller.service_arguments'] diff --git a/symfony-3.4-empty/app/config/config_dev.yml b/symfony-3.4-empty/app/config/config_dev.yml new file mode 100644 index 000000000..8e0b6ff02 --- /dev/null +++ b/symfony-3.4-empty/app/config/config_dev.yml @@ -0,0 +1,2 @@ +imports: + - { resource: config.yml } diff --git a/symfony-3.4-empty/app/config/config_prod.yml b/symfony-3.4-empty/app/config/config_prod.yml new file mode 100644 index 000000000..8e0b6ff02 --- /dev/null +++ b/symfony-3.4-empty/app/config/config_prod.yml @@ -0,0 +1,2 @@ +imports: + - { resource: config.yml } diff --git a/symfony-3.4-empty/app/config/config_test.yml b/symfony-3.4-empty/app/config/config_test.yml new file mode 100644 index 000000000..a3b2db43c --- /dev/null +++ b/symfony-3.4-empty/app/config/config_test.yml @@ -0,0 +1,2 @@ +imports: + - { resource: config_dev.yml } diff --git a/symfony-3.4-empty/app/config/parameters.yml.dist b/symfony-3.4-empty/app/config/parameters.yml.dist new file mode 100644 index 000000000..a447c8b81 --- /dev/null +++ b/symfony-3.4-empty/app/config/parameters.yml.dist @@ -0,0 +1,2 @@ +parameters: + secret: ThouShallChangeMe diff --git a/symfony-3.4-empty/app/config/routings.yml b/symfony-3.4-empty/app/config/routings.yml new file mode 100644 index 000000000..0625d76f4 --- /dev/null +++ b/symfony-3.4-empty/app/config/routings.yml @@ -0,0 +1,12 @@ +main_page: + path: / + defaults: + _controller: app.hello_controller:worldAction + methods: + - GET +hello_world: + path: /hello/index + defaults: + _controller: app.hello_controller:worldAction + methods: + - GET \ No newline at end of file diff --git a/symfony-3.4-empty/app/config/routings/.gitkeep b/symfony-3.4-empty/app/config/routings/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/symfony-3.4-empty/app/config/routings/routings.yml b/symfony-3.4-empty/app/config/routings/routings.yml new file mode 100644 index 000000000..0625d76f4 --- /dev/null +++ b/symfony-3.4-empty/app/config/routings/routings.yml @@ -0,0 +1,12 @@ +main_page: + path: / + defaults: + _controller: app.hello_controller:worldAction + methods: + - GET +hello_world: + path: /hello/index + defaults: + _controller: app.hello_controller:worldAction + methods: + - GET \ No newline at end of file diff --git a/symfony-3.4-empty/bin/console b/symfony-3.4-empty/bin/console new file mode 100755 index 000000000..9d1acfea3 --- /dev/null +++ b/symfony-3.4-empty/bin/console @@ -0,0 +1,18 @@ +#!/usr/bin/env php +<?php +// bin/console + +set_time_limit(0); + +require_once __DIR__.'/../app/autoload.php'; + +use Gnugat\MicroFrameworkBundle\Service\KernelApplication; +use Symfony\Component\Console\Input\ArgvInput; + +$input = new ArgvInput(); +$env = $input->getParameterOption(array('--env', '-e'), 'dev'); +$debug = !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod'; + +$kernel = new AppKernel($env, $debug); +$application = new KernelApplication($kernel); +$application->run($input); diff --git a/symfony-3.4-empty/composer.json b/symfony-3.4-empty/composer.json new file mode 100644 index 000000000..37b55ed5a --- /dev/null +++ b/symfony-3.4-empty/composer.json @@ -0,0 +1,35 @@ +{ + "name": "gnugat/symfony-empty-edition", + "license": "MIT", + "type": "project", + "description": "The \"Symfony Empty Edition\" distribution", + "autoload": { + "psr-4": { "": "src" }, + "files": [ "app/AppKernel.php" ] + }, + "autoload-dev": { + "psr-4": { "Tests\\": "tests" } + }, + "require": { + "php": "^5.5.9|^7.0", + "symfony/console": "^3.0", + "symfony/event-dispatcher": "^3.0", + "symfony/finder": "^3.0", + "symfony/yaml": "^3.0", + "incenteev/composer-parameter-handler": "^2.1", + "gnugat/micro-framework-bundle": "0.5.0" + }, + "scripts": { + "post-install-cmd": [ + "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters" + ], + "post-update-cmd": [ + "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters" + ] + }, + "extra": { + "incenteev-parameters": [ + { "file": "app/config/parameters.yml" } + ] + } +} diff --git a/symfony-3.4-empty/composer.lock b/symfony-3.4-empty/composer.lock new file mode 100644 index 000000000..30a7ea8cf --- /dev/null +++ b/symfony-3.4-empty/composer.lock @@ -0,0 +1,1038 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "8a0245f7f986cb0548da5da6fc82fc81", + "packages": [ + { + "name": "gnugat/micro-framework-bundle", + "version": "v0.5.0", + "source": { + "type": "git", + "url": "https://github.com/gnugat/micro-framework-bundle.git", + "reference": "fc426e68e891b456b9bff214f3d08d5509d5c8d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/gnugat/micro-framework-bundle/zipball/fc426e68e891b456b9bff214f3d08d5509d5c8d0", + "reference": "fc426e68e891b456b9bff214f3d08d5509d5c8d0", + "shasum": "" + }, + "require": { + "php": "^5.5.9|^7.0", + "symfony/class-loader": "^3.0", + "symfony/config": "^3.0", + "symfony/console": "^3.0", + "symfony/dependency-injection": "^3.0", + "symfony/finder": "^3.0", + "symfony/http-kernel": "^3.0", + "symfony/routing": "^3.0" + }, + "require-dev": { + "league/tactician-bundle": "^0.4", + "phpunit/phpunit": "^5.0", + "symfony/monolog-bundle": "^2.0" + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Gnugat\\MicroFrameworkBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Loïc Faugeron", + "email": "faugeron.loic@gmail.com", + "homepage": "http://gnugat.github.io", + "role": "Developer" + } + ], + "description": "Symfony Micro Framework Bundle", + "homepage": "http://gnugat.github.io/micro-framework-bundle", + "keywords": [ + "bundle", + "framework", + "micro", + "symfony" + ], + "time": "2016-03-09T19:36:33+00:00" + }, + { + "name": "incenteev/composer-parameter-handler", + "version": "v2.1.2", + "source": { + "type": "git", + "url": "https://github.com/Incenteev/ParameterHandler.git", + "reference": "d7ce7f06136109e81d1cb9d57066c4d4a99cf1cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Incenteev/ParameterHandler/zipball/d7ce7f06136109e81d1cb9d57066c4d4a99cf1cc", + "reference": "d7ce7f06136109e81d1cb9d57066c4d4a99cf1cc", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/yaml": "~2.3|~3.0" + }, + "require-dev": { + "composer/composer": "1.0.*@dev", + "phpspec/prophecy-phpunit": "~1.0", + "symfony/filesystem": "~2.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Incenteev\\ParameterHandler\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christophe Coevoet", + "email": "stof@notk.org" + } + ], + "description": "Composer script handling your ignored parameter file", + "homepage": "https://github.com/Incenteev/ParameterHandler", + "keywords": [ + "parameters management" + ], + "time": "2015-11-10T17:04:01+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "psr/log", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-10-10T12:19:37+00:00" + }, + { + "name": "symfony/class-loader", + "version": "v3.4.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/class-loader.git", + "reference": "e63c12699822bb3b667e7216ba07fbcc3a3e203e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/class-loader/zipball/e63c12699822bb3b667e7216ba07fbcc3a3e203e", + "reference": "e63c12699822bb3b667e7216ba07fbcc3a3e203e", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "require-dev": { + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/polyfill-apcu": "~1.1" + }, + "suggest": { + "symfony/polyfill-apcu": "For using ApcClassLoader on HHVM" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-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": "2018-01-03T07:37:34+00:00" + }, + { + "name": "symfony/config", + "version": "v3.4.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "cfd5c972f7b4992a5df41673d25d980ab077aa5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/cfd5c972f7b4992a5df41673d25d980ab077aa5b", + "reference": "cfd5c972f7b4992a5df41673d25d980ab077aa5b", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/filesystem": "~2.8|~3.0|~4.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.3", + "symfony/finder": "<3.3" + }, + "require-dev": { + "symfony/dependency-injection": "~3.3|~4.0", + "symfony/finder": "~3.3|~4.0", + "symfony/yaml": "~3.0|~4.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "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 Config Component", + "homepage": "https://symfony.com", + "time": "2018-01-03T07:37:34+00:00" + }, + { + "name": "symfony/console", + "version": "v3.4.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "8394c8ef121949e8f858f13bc1e34f05169e4e7d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/8394c8ef121949e8f858f13bc1e34f05169e4e7d", + "reference": "8394c8ef121949e8f858f13bc1e34f05169e4e7d", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/debug": "~2.8|~3.0|~4.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.3|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.3|~4.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "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 Console Component", + "homepage": "https://symfony.com", + "time": "2018-01-03T07:37:34+00:00" + }, + { + "name": "symfony/debug", + "version": "v4.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "9ae4223a661b56a9abdce144de4886cca37f198f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/9ae4223a661b56a9abdce144de4886cca37f198f", + "reference": "9ae4223a661b56a9abdce144de4886cca37f198f", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": "<3.4" + }, + "require-dev": { + "symfony/http-kernel": "~3.4|~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "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 Debug Component", + "homepage": "https://symfony.com", + "time": "2018-01-03T17:15:19+00:00" + }, + { + "name": "symfony/dependency-injection", + "version": "v3.4.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "35f957ca171a431710966bec6e2f8636d3b019c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/35f957ca171a431710966bec6e2f8636d3b019c4", + "reference": "35f957ca171a431710966bec6e2f8636d3b019c4", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "psr/container": "^1.0" + }, + "conflict": { + "symfony/config": "<3.3.7", + "symfony/finder": "<3.3", + "symfony/proxy-manager-bridge": "<3.4", + "symfony/yaml": "<3.4" + }, + "provide": { + "psr/container-implementation": "1.0" + }, + "require-dev": { + "symfony/config": "~3.3|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "symfony/config": "", + "symfony/expression-language": "For using expressions in service container configuration", + "symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required", + "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-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": "2018-01-04T15:56:45+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v3.4.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "26b87b6bca8f8f797331a30b76fdae5342dc26ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/26b87b6bca8f8f797331a30b76fdae5342dc26ca", + "reference": "26b87b6bca8f8f797331a30b76fdae5342dc26ca", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "conflict": { + "symfony/dependency-injection": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "~3.3|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/stopwatch": "~2.8|~3.0|~4.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "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 EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2018-01-03T07:37:34+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v4.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "760e47a4ee64b4c48f4b30017011e09d4c0f05ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/760e47a4ee64b4c48f4b30017011e09d4c0f05ed", + "reference": "760e47a4ee64b4c48f4b30017011e09d4c0f05ed", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "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 Filesystem Component", + "homepage": "https://symfony.com", + "time": "2018-01-03T07:38:00+00:00" + }, + { + "name": "symfony/finder", + "version": "v3.4.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "613e26310776f49a1773b6737c6bd554b8bc8c6f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/613e26310776f49a1773b6737c6bd554b8bc8c6f", + "reference": "613e26310776f49a1773b6737c6bd554b8bc8c6f", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "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 Finder Component", + "homepage": "https://symfony.com", + "time": "2018-01-03T07:37:34+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v4.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "03fe5171e35966f43453e2e5c15d7fe65f7fb23b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/03fe5171e35966f43453e2e5c15d7fe65f7fb23b", + "reference": "03fe5171e35966f43453e2e5c15d7fe65f7fb23b", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "symfony/expression-language": "~3.4|~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "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 HttpFoundation Component", + "homepage": "https://symfony.com", + "time": "2018-01-03T17:15:19+00:00" + }, + { + "name": "symfony/http-kernel", + "version": "v3.4.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "1c2a82d6a8ec9b354fe4ef48ad1ad3f1a4f7db0e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1c2a82d6a8ec9b354fe4ef48ad1ad3f1a4f7db0e", + "reference": "1c2a82d6a8ec9b354fe4ef48ad1ad3f1a4f7db0e", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "psr/log": "~1.0", + "symfony/debug": "~2.8|~3.0|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/http-foundation": "^3.3.11|~4.0" + }, + "conflict": { + "symfony/config": "<2.8", + "symfony/dependency-injection": "<3.4", + "symfony/var-dumper": "<3.3", + "twig/twig": "<1.34|<2.4,>=2" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/cache": "~1.0", + "symfony/browser-kit": "~2.8|~3.0|~4.0", + "symfony/class-loader": "~2.8|~3.0", + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/console": "~2.8|~3.0|~4.0", + "symfony/css-selector": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/dom-crawler": "~2.8|~3.0|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/process": "~2.8|~3.0|~4.0", + "symfony/routing": "~3.4|~4.0", + "symfony/stopwatch": "~2.8|~3.0|~4.0", + "symfony/templating": "~2.8|~3.0|~4.0", + "symfony/translation": "~2.8|~3.0|~4.0", + "symfony/var-dumper": "~3.3|~4.0" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "", + "symfony/var-dumper": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "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 HttpKernel Component", + "homepage": "https://symfony.com", + "time": "2018-01-05T08:33:00+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", + "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "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 polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2017-10-11T12:05:26+00:00" + }, + { + "name": "symfony/routing", + "version": "v3.4.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "e2b6d6fe7b090c7af720b75c7722c6dfa7a52658" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/e2b6d6fe7b090c7af720b75c7722c6dfa7a52658", + "reference": "e2b6d6fe7b090c7af720b75c7722c6dfa7a52658", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "conflict": { + "symfony/config": "<2.8", + "symfony/dependency-injection": "<3.3", + "symfony/yaml": "<3.4" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "doctrine/common": "~2.2", + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "~3.3|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/http-foundation": "~2.8|~3.0|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/dependency-injection": "For loading routes from a service", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "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 Routing Component", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "time": "2018-01-04T15:09:34+00:00" + }, + { + "name": "symfony/yaml", + "version": "v3.4.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "25c192f25721a74084272671f658797d9e0e0146" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/25c192f25721a74084272671f658797d9e0e0146", + "reference": "25c192f25721a74084272671f658797d9e0e0146", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "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 Yaml Component", + "homepage": "https://symfony.com", + "time": "2018-01-03T07:37:34+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": "^5.5.9|^7.0" + }, + "platform-dev": [] +} diff --git a/symfony-3.4-empty/src/AppBundle/AppBundle.php b/symfony-3.4-empty/src/AppBundle/AppBundle.php new file mode 100644 index 000000000..05123b678 --- /dev/null +++ b/symfony-3.4-empty/src/AppBundle/AppBundle.php @@ -0,0 +1,9 @@ +<?php + +namespace AppBundle; + +use Symfony\Component\HttpKernel\Bundle\Bundle; + +class AppBundle extends Bundle +{ +} diff --git a/symfony-3.4-empty/src/AppBundle/Controller/HelloController.php b/symfony-3.4-empty/src/AppBundle/Controller/HelloController.php new file mode 100644 index 000000000..13ddeefc2 --- /dev/null +++ b/symfony-3.4-empty/src/AppBundle/Controller/HelloController.php @@ -0,0 +1,15 @@ +<?php +// src/AppBundle/Controller/HelloController.php + +namespace AppBundle\Controller; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; + +class HelloController +{ + public function worldAction(Request $request) + { + return new Response('Hello World!'); + } +} diff --git a/symfony-3.4-empty/src/AppBundle/Kernel/MicroKernelTrait.php b/symfony-3.4-empty/src/AppBundle/Kernel/MicroKernelTrait.php new file mode 100644 index 000000000..326e031c8 --- /dev/null +++ b/symfony-3.4-empty/src/AppBundle/Kernel/MicroKernelTrait.php @@ -0,0 +1,96 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace AppBundle\Kernel; + +use Symfony\Component\Config\Loader\LoaderInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Symfony\Component\Routing\RouteCollectionBuilder; + +/** + * A Kernel that provides configuration hooks. + * + * @author Ryan Weaver <ryan@knpuniversity.com> + * @author Fabien Potencier <fabien@symfony.com> + */ +trait MicroKernelTrait +{ + /** + * Add or import routes into your application. + * + * $routes->import('config/routing.yml'); + * $routes->add('/admin', 'AppBundle:Admin:dashboard', 'admin_dashboard'); + * + * @param RouteCollectionBuilder $routes + */ + abstract protected function configureRoutes(RouteCollectionBuilder $routes); + + /** + * Configures the container. + * + * You can register extensions: + * + * $c->loadFromExtension('framework', array( + * 'secret' => '%secret%' + * )); + * + * Or services: + * + * $c->register('halloween', 'FooBundle\HalloweenProvider'); + * + * Or parameters: + * + * $c->setParameter('halloween', 'lot of fun'); + * + * @param ContainerBuilder $c + * @param LoaderInterface $loader + */ + abstract protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader); + + /** + * {@inheritdoc} + */ + public function registerContainerConfiguration(LoaderInterface $loader) + { + $loader->load(function (ContainerBuilder $container) use ($loader) { + $container->loadFromExtension('gnugat_micro_framework', array( + 'router' => array( + 'resource' => 'kernel:loadRoutes', + 'type' => 'service', + ), + )); + + if ($this instanceof EventSubscriberInterface) { + $container->register('kernel', static::class) + ->setSynthetic(true) + ->setPublic(true) + ->addTag('kernel.event_subscriber') + ; + } + + $this->configureContainer($container, $loader); + + $container->addObjectResource($this); + }); + } + + /** + * @internal + */ + public function loadRoutes(LoaderInterface $loader) + { + $routes = new RouteCollectionBuilder($loader); + $this->configureRoutes($routes); + + return $routes->build(); + } +} diff --git a/symfony-3.4-empty/var/cache/.gitkeep b/symfony-3.4-empty/var/cache/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/symfony-3.4-empty/var/logs/.gitkeep b/symfony-3.4-empty/var/logs/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/symfony-3.4-empty/web/app.php b/symfony-3.4-empty/web/app.php new file mode 100644 index 000000000..33eb67506 --- /dev/null +++ b/symfony-3.4-empty/web/app.php @@ -0,0 +1,17 @@ +<?php + +use Symfony\Component\HttpFoundation\Request; + +require_once __DIR__.'/../app/autoload.php'; + +$env = getenv('SYMFONY_ENV') ?: 'prod'; +$debug = ('prod' !== $env); + +$kernel = new AppKernel($env, $debug); +// $kernel->loadClassCache(); +Request::enableHttpMethodParameterOverride(); +$request = Request::createFromGlobals(); +$response = $kernel->handle($request); +$response->send(); + +require __DIR__ . '/../../libs/output_data.php'; diff --git a/symfony-3.4-empty/web/favicon.ico b/symfony-3.4-empty/web/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..526c2581c9502539ae8a0e0d9daa9781749539e2 GIT binary patch literal 1406 zcmZQzU<5(|0R|w+!H~hqz#zuJz@P!dKp_SNAO?w#g3%Bd4S~@R7!3i`5cvO}fq@bX E0PkKP@Bjb+ literal 0 HcmV?d00001 diff --git a/symfony-3.4-empty/web/robots.txt b/symfony-3.4-empty/web/robots.txt new file mode 100644 index 000000000..214e41196 --- /dev/null +++ b/symfony-3.4-empty/web/robots.txt @@ -0,0 +1,4 @@ +# www.robotstxt.org/ +# www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 + +User-agent: * From 96d0fa679436c52c027e6ee35f39beb1bdcaa2ef Mon Sep 17 00:00:00 2001 From: Anton Minin <anton.a.minin@gmail.com> Date: Tue, 23 Jan 2018 16:34:55 +0300 Subject: [PATCH 5/5] Fix some warnings --- phalcon-1.3/public/index.php | 2 +- phalcon-2.0/public/index.php | 2 +- slim-3.0/index.php | 11 +++++++++-- symfony-3.4/web/app.php | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/phalcon-1.3/public/index.php b/phalcon-1.3/public/index.php index 0692a1a0e..9e562dcda 100644 --- a/phalcon-1.3/public/index.php +++ b/phalcon-1.3/public/index.php @@ -30,4 +30,4 @@ echo $e->getMessage(); } -require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php'; +require __DIR__ . '/../../libs/output_data.php'; diff --git a/phalcon-2.0/public/index.php b/phalcon-2.0/public/index.php index 0692a1a0e..9e562dcda 100644 --- a/phalcon-2.0/public/index.php +++ b/phalcon-2.0/public/index.php @@ -30,4 +30,4 @@ echo $e->getMessage(); } -require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php'; +require __DIR__ . '/../../libs/output_data.php'; diff --git a/slim-3.0/index.php b/slim-3.0/index.php index d07cb7226..f62cc1838 100644 --- a/slim-3.0/index.php +++ b/slim-3.0/index.php @@ -5,9 +5,16 @@ $app = new \Slim\App(); $app->get('/hello/index', function ($request, $response, $args) { - return $response->write('Hello World!'); + return $response->write('Hello World!' . str_repeat('+', 22)); }); +ob_start(); $app->run(); +$output = ob_get_clean(); -require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php'; +ob_start(); +// Doesn't work due to Content-Length header +require __DIR__ . '/../libs/output_data.php'; +$benchmarkData = ob_get_clean(); + +echo str_replace('+', ' ', str_replace(str_repeat('+', min(22, strlen($benchmarkData))), $benchmarkData, $output)); diff --git a/symfony-3.4/web/app.php b/symfony-3.4/web/app.php index 2244ea5c5..ff372e2ca 100644 --- a/symfony-3.4/web/app.php +++ b/symfony-3.4/web/app.php @@ -29,4 +29,4 @@ $response->send(); $kernel->terminate($request, $response); -require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php'; +require __DIR__ . '/../../libs/output_data.php';