From afdedc6a9528c35a9ee451d12720d26ce5cbfc3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Wed, 24 Feb 2016 16:20:58 +0100 Subject: [PATCH 01/19] Working on compilable Mouf container. --- .gitignore | 2 + composer.json | 3 +- mouf/MoufComponents.php | 18 +- mouf/no_commit/.gitkeep | 0 src/Mouf/MoufInstanceDescriptor.php | 8 - src/Mouf/MoufInstancePropertyDescriptor.php | 2 +- src/Mouf/MoufManager.php | 258 +++++++++++++++++++- src/Mouf/Yaco/PhpCodeDefinition.php | 74 ++++++ 8 files changed, 339 insertions(+), 26 deletions(-) create mode 100644 mouf/no_commit/.gitkeep create mode 100644 src/Mouf/Yaco/PhpCodeDefinition.php diff --git a/.gitignore b/.gitignore index 16d8d74..2b58d4a 100755 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ vendor/* config.php moufRunningActions.php .composer +!mouf/no_commit/.gitkeep +mouf/no_commit/ \ No newline at end of file diff --git a/composer.json b/composer.json index 1b81c4b..4c130c9 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,8 @@ "mouf/mouf-installer" : "~2.0", "mouf/mouf-validators-interface" : "~2.0", "container-interop/container-interop" : "~1.0", - "mouf/classname-mapper": "~1.0" + "mouf/classname-mapper": "~1.0", + "thecodingmachine/yaco": "~1.0@dev" }, "autoload" : { "psr-0" : { diff --git a/mouf/MoufComponents.php b/mouf/MoufComponents.php index c7fd8ac..8b7f548 100755 --- a/mouf/MoufComponents.php +++ b/mouf/MoufComponents.php @@ -1833,7 +1833,7 @@ 'external' => false, 'fieldProperties' => array ( - 'Mouf\\Html\\HtmlElement\\HtmlString' => + 'htmlString' => array ( 'value' => '

Login

Welcome to Mouf. Please login to access the administration interface of your web application.

@@ -3242,15 +3242,15 @@ unset($moufManager); -/** - * This is the base class of the Manage Object User Friendly or Modular object user framework (MOUF) framework. - * This object can be used to get the objects manage by MOUF. - * - */ -class MoufAdmin { - public function getClosures() { +/** + * This is the base class of the Manage Object User Friendly or Modular object user framework (MOUF) framework. + * This object can be used to get the objects manage by MOUF. + * + */ +class MoufAdmin { + public function getClosures() { return [ - ]; + ]; } /** * @return Mouf\Controllers\MoufAjaxInstanceController diff --git a/mouf/no_commit/.gitkeep b/mouf/no_commit/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/Mouf/MoufInstanceDescriptor.php b/src/Mouf/MoufInstanceDescriptor.php index f3c426e..ae679f3 100755 --- a/src/Mouf/MoufInstanceDescriptor.php +++ b/src/Mouf/MoufInstanceDescriptor.php @@ -41,14 +41,6 @@ class MoufInstanceDescriptor { */ private $name; - /** - * A list of properties (not the list of all properties). - * Used for caching. - * - * @var MoufInstancePropertyDescriptor[] - */ - private $properties = array(); - /** * A list of public properties (not sure to be complete) * Used for caching. diff --git a/src/Mouf/MoufInstancePropertyDescriptor.php b/src/Mouf/MoufInstancePropertyDescriptor.php index c3dc650..5b9250a 100755 --- a/src/Mouf/MoufInstancePropertyDescriptor.php +++ b/src/Mouf/MoufInstancePropertyDescriptor.php @@ -200,7 +200,7 @@ private function toInstanceDescriptor($instanceNames) { } - private static function array_map_deep($array, $callback) { + public static function array_map_deep($array, $callback) { $new = array(); if( is_array($array) ) foreach ($array as $key => $val) { if (is_array($val)) { diff --git a/src/Mouf/MoufManager.php b/src/Mouf/MoufManager.php index b5cb891..cb7c054 100755 --- a/src/Mouf/MoufManager.php +++ b/src/Mouf/MoufManager.php @@ -7,12 +7,21 @@ * For the full copyright and license information, please view the LICENSE.txt * file that was distributed with this source code. */ +declare(strict_types=1); + namespace Mouf; use Mouf\Composer\ComposerService; +use Mouf\Picotainer\Picotainer; use Mouf\Reflection\MoufReflectionProxy; use Mouf\Reflection\MoufReflectionClass; use Interop\Container\ContainerInterface; +use TheCodingMachine\Yaco\Compiler; +use TheCodingMachine\Yaco\Definition\ConstParameterDefinition; +use TheCodingMachine\Yaco\Definition\ObjectDefinition; +use TheCodingMachine\Yaco\Definition\ParameterDefinition; +use Mouf\Yaco\PhpCodeDefinition; +use TheCodingMachine\Yaco\Definition\Reference; /** * The class managing object instanciation in the Mouf framework. @@ -91,8 +100,9 @@ public static function initMoufManager() { self::$defaultInstance->mainClassName = "Mouf"; // FIXME: not appscope for sure self::$defaultInstance->scope = MoufManager::SCOPE_APP; - // Unless the setDelegateLookupContainer is set, we lookup dependencies inside our own container. - self::$defaultInstance->delegateLookupContainer = self::$defaultInstance; + + self::$defaultInstance->compiledContainerName = "Mouf\\GeneratedContainer"; + self::$defaultInstance->compiledContainerFile = '../../../../../mouf/no_commit/GeneratedContainer.php'; } } @@ -111,8 +121,10 @@ public static function switchToHidden() { self::$defaultInstance->adminUiFileName = "../../mouf/MoufUI.php"; self::$defaultInstance->mainClassName = "MoufAdmin"; self::$defaultInstance->scope = MoufManager::SCOPE_ADMIN; - // Unless the setDelegateLookupContainer is set, we lookup dependencies inside our own container. - self::$defaultInstance->delegateLookupContainer = self::$defaultInstance; + + + self::$defaultInstance->compiledContainerName = "Mouf\\GeneratedAdminContainer"; + self::$defaultInstance->compiledContainerFile = '../../mouf/no_commit/GeneratedAdminContainer.php'; } /** @@ -235,6 +247,27 @@ public static function switchToHidden() { */ private $mainClass; + /** + * The fully qualified class name to the compiled class. + * + * @var string + */ + private $compiledContainerName; + + /** + * The path to the compiled container file + * + * @var string + */ + private $compiledContainerFile; + + /** + * The instance of the container compiled with Yaco. + * + * @var Picotainer + */ + private $container; + /** * Returns the config manager (the service in charge of writing the config.php file). * @@ -244,6 +277,31 @@ public function getConfigManager() { return $this->configManager; } + /** + * Returns the container + * + * @return Picotainer + */ + private function getContainer() { + if ($this->container === null) { + // Does the container file exists? + // If yes, is it newer than MoufComponents? + $compiledContainerFile = __DIR__.'/'.$this->compiledContainerFile; + $componentsFile = __DIR__.'/'.$this->componentsFileName; + + $containerFileExists = file_exists($compiledContainerFile); + + if (($containerFileExists && filemtime($compiledContainerFile) <= filemtime($componentsFile)) || !$containerFileExists) { + $this->defaultCompile(); + } + + require_once $compiledContainerFile; + $containerName = $this->compiledContainerName; + $this->container = new $containerName($this->delegateLookupContainer); + } + return $this->container; + } + /** * Returns the instance of the specified object. * @@ -251,10 +309,12 @@ public function getConfigManager() { * @return object */ public function get($instanceName) { - if (!isset($this->objectInstances[$instanceName]) || $this->objectInstances[$instanceName] == null) { + /*if (!isset($this->objectInstances[$instanceName]) || $this->objectInstances[$instanceName] == null) { $this->instantiateComponent($instanceName); } - return $this->objectInstances[$instanceName]; + return $this->objectInstances[$instanceName];*/ + $container = $this->getContainer(); + return $container->get($instanceName); } /** @@ -285,7 +345,8 @@ public function instanceExists($instanceName) { * @return bool */ public function has($instanceName) { - return $this->instanceExists($instanceName); + $container = $this->getContainer(); + return $container->has($instanceName); } /** @@ -1400,6 +1461,8 @@ class ".$this->mainClassName." { $composerService = new ComposerService($selfEdit); $composerService->rewriteMoufUi(); + // Let's compile the container! + $this->defaultCompile(); } /** @@ -2166,4 +2229,185 @@ private function walkConstructorLoop($instanceName, array $path) { } } } + + private function defaultCompile() { + $this->compile($this->compiledContainerName, __DIR__.'/'.$this->compiledContainerFile); + } + + private function compile(string $className, string $pathToFile) + { + $compiler = new Compiler(); + foreach ($this->declaredInstances as $instanceName => $descriptor) { + if ($this->isInstanceAnonymous($instanceName)) { + continue; + } + $definition = $this->toDefinition($instanceName); + $compiler->addDumpableDefinition($definition); + } + if (!file_exists(dirname($pathToFile))) { + mkdir(dirname($pathToFile), 0775, true); + chmod(dirname($pathToFile), 0775); + } + file_put_contents($pathToFile, $compiler->compile($className)); + chmod($pathToFile, 0664); + } + + /** + * Returns a reference (if we are dealing with a non anonymous instance) or a definition (in the case of anonymous instances) + * @param $instanceName + */ + private function toDefinitionOrReference($instanceName) { + if ($this->isInstanceAnonymous($instanceName)) { + return $this->toDefinition($instanceName); + } else { + return new Reference($instanceName); + } + } + + private function toDefinition($instanceName) + { + if (!isset($this->declaredInstances[$instanceName])) { + throw new MoufInstanceNotFoundException("The object instance '".$instanceName."' is not defined.", 1, $instanceName); + } + try { + $instanceDefinition = $this->declaredInstances[$instanceName]; + + if (isset($instanceDefinition['code'])) { + if (isset($instanceDefinition['error'])) { + throw new MoufException("The code defining instance '$instanceName' is invalid: ".$instanceDefinition['error']); + } + return new PhpCodeDefinition($instanceName, $instanceDefinition['code']); + } + + $className = $instanceDefinition["class"]; + + if ($this->isInstanceAnonymous($instanceName)) { + $definition = new ObjectDefinition(null, $className); + } else { + $definition = new ObjectDefinition($instanceName, $className); + } + + if (isset($instanceDefinition['constructor'])) { + $constructorParametersArray = $instanceDefinition['constructor']; + + foreach ($constructorParametersArray as $key=>$constructorParameterDefinition) { + $value = $constructorParameterDefinition["value"]; + switch ($constructorParameterDefinition['parametertype']) { + case 'primitive': + switch ($constructorParameterDefinition["type"]) { + case 'string': + $definition->addConstructorArgument(new ParameterDefinition(null, $value)); + break; + case 'config': + $definition->addConstructorArgument(new ConstParameterDefinition(null, $value)); + break; + case 'php': + $definition->addConstructorArgument(new PhpCodeDefinition(null, $value)); + break; + default: + throw new MoufException("Invalid type '".$constructorParameterDefinition['type']."' for object instance '$instanceName'."); + } + break; + case 'object': + if (is_array($value)) { + $tmpArray = array(); + foreach ($value as $keyInstanceName=>$valueInstanceName) { + if ($valueInstanceName !== null) { + $tmpArray[$keyInstanceName] = $this->toDefinitionOrReference($valueInstanceName); + } else { + $tmpArray[$keyInstanceName] = new ParameterDefinition(null, null); + } + } + $definition->addConstructorArgument($tmpArray); + } else { + if ($value !== null) { + $definition->addConstructorArgument($this->toDefinitionOrReference($value)); + } else { + $definition->addConstructorArgument(new ParameterDefinition(null, null)); + } + } + break; + default: + throw new MoufException("Unknown parameter type ".$constructorParameterDefinition['parametertype']." for parameter in constructor of instance '".$instanceName."'"); + } + } + } + + if (isset($instanceDefinition["fieldProperties"])) { + foreach ($instanceDefinition["fieldProperties"] as $key=>$valueDef) { + switch ($valueDef["type"]) { + case "string": + $definition->setProperty($key, $valueDef["value"]); + break; + case "config": + $definition->setProperty($key, new ConstParameterDefinition(null, $valueDef["value"])); + break; + case "php": + $definition->setProperty($key, new PhpCodeDefinition(null, $valueDef["value"])); + break; + default: + throw new MoufException("Invalid type '".$valueDef["type"]."' for object instance '$instanceName'."); + } + } + } + + if (isset($instanceDefinition["setterProperties"])) { + foreach ($instanceDefinition["setterProperties"] as $key=>$valueDef) { + switch ($valueDef["type"]) { + case "string": + $definition->addMethodCall($key, [ $valueDef["value"] ]); + break; + case "config": + $definition->addMethodCall($key, [ ConstParameterDefinition(null, $valueDef["value"]) ]); + break; + case "php": + $definition->addMethodCall($key, [ PhpCodeDefinition(null, $valueDef["value"]) ]); + break; + default: + throw new MoufException("Invalid type '".$valueDef["type"]."' for object instance '$instanceName'."); + } + } + } + + if (isset($instanceDefinition["fieldBinds"])) { + foreach ($instanceDefinition["fieldBinds"] as $key=>$value) { + if (is_array($value)) { + $tmpArray = array(); + foreach ($value as $keyInstanceName=>$valueInstanceName) { + if ($valueInstanceName !== null) { + $tmpArray[$keyInstanceName] = $this->toDefinitionOrReference($valueInstanceName); + } else { + $tmpArray[$keyInstanceName] = null; + } + } + $definition->setProperty($key, $tmpArray); + } else { + $definition->setProperty($key, $this->toDefinitionOrReference($value)); + } + } + } + + if (isset($instanceDefinition["setterBinds"])) { + foreach ($instanceDefinition["setterBinds"] as $key=>$value) { + if (is_array($value)) { + $tmpArray = array(); + foreach ($value as $keyInstanceName=>$valueInstanceName) { + if ($valueInstanceName !== null) { + $tmpArray[$keyInstanceName] = $this->toDefinitionOrReference($valueInstanceName); + } else { + $tmpArray[$keyInstanceName] = null; + } + } + $definition->addMethodCall($key, [ $tmpArray ]); + } else { + $definition->addMethodCall($key, [ $this->toDefinitionOrReference($value) ]); + } + } + } + } catch (MoufInstanceNotFoundException $e) { + throw new MoufInstanceNotFoundException("The object instance '".$instanceName."' could not be created because it depends on an object in error (".$e->getMissingInstanceName().")", 2, $instanceName, $e); + } + return $definition; + } + } diff --git a/src/Mouf/Yaco/PhpCodeDefinition.php b/src/Mouf/Yaco/PhpCodeDefinition.php new file mode 100644 index 0000000..c90fdee --- /dev/null +++ b/src/Mouf/Yaco/PhpCodeDefinition.php @@ -0,0 +1,74 @@ +identifier = $identifier; + $this->phpCode = $phpCode; + } + + /** + * Returns the identifier of the instance. + * + * @return string + */ + public function getIdentifier() + { + return $this->identifier; + } + + /** + * Returns the value of the parameter. + * + * @return mixed + */ + public function getPhpCode() + { + return $this->phpCode; + } + + /** + * Returns an InlineEntryInterface object representing the PHP code necessary to generate + * the container entry. + * + * @param string $containerVariable The name of the variable that allows access to the container instance. For instance: "$container", or "$this->container" + * @param array $usedVariables An array of variables that are already used and that should not be used when generating this code. + * + * @return InlineEntryInterface + */ + public function toPhpCode($containerVariable, array $usedVariables = array()) + { + $code = sprintf('(function($container) { %s; })(%s)', $this->phpCode, $containerVariable); + return new InlineEntry($code, null, $usedVariables, false); + } +} From 3529bccbd4bc58c77a95db6cf10355164180baae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Fri, 26 Feb 2016 18:39:01 +0100 Subject: [PATCH 02/19] Migrating to Splash 7 Upgrading Splash version --- composer-mouf.json | 3 +- composer-mouf.lock | 604 +++++++++++++++++++++++++++++++++++----- mouf/MoufComponents.php | 420 ++++++++++++++++++++++++++++ 3 files changed, 955 insertions(+), 72 deletions(-) diff --git a/composer-mouf.json b/composer-mouf.json index f310d35..baae5e7 100644 --- a/composer-mouf.json +++ b/composer-mouf.json @@ -5,7 +5,7 @@ "mouf/html.template.mouftemplate": "~2.0", "mouf/html.template.bootstrap": "2.3.2.*", "mouf/utils.i18n.fine": "~3.0", - "mouf/mvc.splash": "~4.2", + "mouf/mvc.splash": "~7.0", "mouf/javascript.jquery.jquery-ui": "~1.10", "mouf/javascript.underscore": "~1.3.3", "mouf/utils.log.errorlog_logger": "~2.0", @@ -36,6 +36,7 @@ "autoload": { "psr-0": {"Mouf": ["src/", "src-dev/", "tests/"]} }, + "minimum-stability": "dev", "prefer-stable": true, "extra": { "mouf": { diff --git a/composer-mouf.lock b/composer-mouf.lock index d0672bf..b7ccfb1 100644 --- a/composer-mouf.lock +++ b/composer-mouf.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "3268e5f6147d56aa74b38dcb5547a086", - "content-hash": "8add59f4939d8505150ecacfeeaa4b6e", + "hash": "f4a3cadbc739c60f7947844676fa19c9", + "content-hash": "eeb7e55eaf75507388a989cd8590b838", "packages": [ { "name": "container-interop/container-interop", @@ -34,6 +34,92 @@ "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", "time": "2014-12-30 15:22:37" }, + { + "name": "filp/whoops", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "a327942c50cbd62b25c6fbe08f173031ce25fbff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/a327942c50cbd62b25c6fbe08f173031ce25fbff", + "reference": "a327942c50cbd62b25c6fbe08f173031ce25fbff", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://github.com/filp/whoops", + "keywords": [ + "error", + "exception", + "handling", + "library", + "whoops", + "zf2" + ], + "time": "2016-01-06 17:51:21" + }, + { + "name": "franzl/whoops-middleware", + "version": "0.3.1", + "source": { + "type": "git", + "url": "https://github.com/franzliedke/whoops-middleware.git", + "reference": "4e9673c092f24ed812bc1c78066b72658b4d358a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/franzliedke/whoops-middleware/zipball/4e9673c092f24ed812bc1c78066b72658b4d358a", + "reference": "4e9673c092f24ed812bc1c78066b72658b4d358a", + "shasum": "" + }, + "require": { + "filp/whoops": "^1.1 || ^2.0", + "zendframework/zend-diactoros": "^1.1@dev" + }, + "type": "library", + "autoload": { + "psr-4": { + "Franzl\\Middleware\\Whoops\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "time": "2016-02-26 02:57:51" + }, { "name": "michelf/php-markdown", "version": "1.6.0", @@ -1182,6 +1268,150 @@ ], "time": "2014-06-03 20:45:03" }, + { + "name": "mouf/mouf", + "version": "v2.0.12", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/mouf.git", + "reference": "a37b6649de73fd389374197f9fd61112fef03ac7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/mouf/zipball/a37b6649de73fd389374197f9fd61112fef03ac7", + "reference": "a37b6649de73fd389374197f9fd61112fef03ac7", + "shasum": "" + }, + "require": { + "container-interop/container-interop": "~1.0", + "mouf/classname-mapper": "~1.0", + "mouf/mouf-installer": "~2.0", + "mouf/mouf-validators-interface": "~2.0", + "php": ">=5.3.9" + }, + "type": "mouf-framework", + "extra": { + "mouf": { + "doc": [ + { + "title": "Installing Mouf", + "url": "doc/installing_mouf.md" + }, + { + "title": "Getting started with dependency injection", + "url": "doc/dependency_injection.md", + "children": [ + { + "title": "Using Mouf UI to define instances", + "url": "doc/mouf_di_ui.md" + }, + { + "title": "Injection techniques", + "url": "doc/injection_techniques.md" + }, + { + "title": "Supported types", + "url": "doc/supported_types.md" + }, + { + "title": "Injection via PHP code", + "url": "doc/declare_instance_via_php_code.md" + }, + { + "title": "Special annotations", + "url": "doc/mouf_annotations.md" + } + ] + }, + { + "title": "Configuration management", + "url": "doc/configuration_management.md" + }, + { + "title": "Creating a Mouf2 package", + "url": "doc/create_mouf_package.md", + "children": [ + { + "title": "Writing a validator", + "url": "doc/writing_mouf_validator.md", + "children": [ + { + "title": "Legacy validators", + "url": "doc/mouf_legacy_validators.md" + } + ] + }, + { + "title": "Writing an install process", + "url": "doc/install_process.md" + }, + { + "title": "Writing packages documentation", + "url": "doc/writing_packages_documentation.md" + }, + { + "title": "Extending Mouf user interface", + "url": "doc/extending_mouf_ui.md" + }, + { + "title": "Managing instances programmatically", + "url": "doc/managing_instances_programmatically.md" + }, + { + "title": "Utility functions", + "url": "doc/utility_functions.md" + }, + { + "title": "Integrating your package with full-text search", + "url": "doc/full_text_search.md" + }, + { + "title": "Weak instances", + "url": "doc/weak_instances.md" + } + ] + }, + { + "title": "Troubleshooting", + "url": "doc/troubleshooting.md", + "children": [ + { + "title": "Troubleshooting installation", + "url": "doc/troubleshooting_install.md" + } + ] + } + ] + } + }, + "autoload": { + "psr-0": { + "Mouf": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David Négrier", + "email": "d.negrier@thecodingmachine.com", + "homepage": "http://mouf-php.com/" + } + ], + "description": "The Mouf PHP framework: an open-source PHP framework providing an easy way to download, install, use and reuse components, with a graphical user interface.", + "homepage": "http://mouf-php.com/", + "keywords": [ + "dependency injection", + "di", + "framework", + "inversion of control", + "ioc", + "mouf" + ], + "time": "2016-02-17 14:07:42" + }, { "name": "mouf/mouf-installer", "version": "v2.0.0", @@ -1274,31 +1504,35 @@ }, { "name": "mouf/mvc.splash", - "version": "v4.3.1", + "version": "7.0.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/mvc.splash.git", - "reference": "fd988413802baef0c0e4a0c2c1809d59deec280a" + "reference": "dbdc2ddfb8acbc74cea812d4a55efb906884e150" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/mvc.splash/zipball/fd988413802baef0c0e4a0c2c1809d59deec280a", - "reference": "fd988413802baef0c0e4a0c2c1809d59deec280a", + "url": "https://api.github.com/repos/thecodingmachine/mvc.splash/zipball/dbdc2ddfb8acbc74cea812d4a55efb906884e150", + "reference": "dbdc2ddfb8acbc74cea812d4a55efb906884e150", "shasum": "" }, "require": { - "mouf/html.template.bootstrap": ">=2.1, <4.0", + "franzl/whoops-middleware": "~0.3", + "mouf/html.template.bootstrap": ">=2.1, <5.0", + "mouf/mouf": ">=2.0.2, <3.0", "mouf/mouf-validators-interface": "~2.0", - "mouf/mvc.splash-common": "4.3.*", + "mouf/mvc.splash-common": "~7.0", "mouf/utils.cache.apc-cache": "~2.1", "mouf/utils.cache.file-cache": "~2.1", "mouf/utils.cache.no-cache": "2.0.*", + "mouf/utils.constants.debug": "~1.0", "mouf/utils.constants.secret": "~1.0", + "mouf/utils.value.common-value": "~1.0", "php": ">=5.3.0", "psr/log": "~1.0" }, "provide": { - "mouf/mvc.splash-implementation": "4.3.*" + "mouf/mvc.splash-implementation": "7.0.*" }, "type": "mouf-library", "extra": { @@ -1308,13 +1542,13 @@ "scope": "global", "description": "Create RootController and root view.", "type": "url", - "url": "splashinstall/" + "url": "splash7install/" }, { "scope": "global", "description": "Write .htaccess file.", "type": "url", - "url": "splashinstall/writeHtAccess" + "url": "splash7install/writeHtAccess" } ], "logo": "logo.png", @@ -1340,8 +1574,12 @@ "url": "doc/filters.md" }, { - "title": "Settings and error handling", - "url": "doc/settings_and_error_handling.md" + "title": "Advanced: configuring routing", + "url": "doc/url_routing.md" + }, + { + "title": "Migrating from Splash 4", + "url": "doc/migrating.md" } ], "require-admin": [ @@ -1377,41 +1615,40 @@ "mvc", "splash" ], - "time": "2014-08-28 14:14:15" + "time": "2016-02-26 14:58:50" }, { "name": "mouf/mvc.splash-common", - "version": "v4.3.1", + "version": "7.0.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/mvc.splash-common.git", - "reference": "f78dba2e8940bd9d6d0f936bd22ec7befafb7fa2" + "reference": "303dc01b6e6809d602e09138432d1915a26b3e97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/mvc.splash-common/zipball/f78dba2e8940bd9d6d0f936bd22ec7befafb7fa2", - "reference": "f78dba2e8940bd9d6d0f936bd22ec7befafb7fa2", + "url": "https://api.github.com/repos/thecodingmachine/mvc.splash-common/zipball/303dc01b6e6809d602e09138432d1915a26b3e97", + "reference": "303dc01b6e6809d602e09138432d1915a26b3e97", "shasum": "" }, "require": { "mouf/html.htmlelement": "2.*", "mouf/html.renderer.twig-extensions": "~1.0", - "mouf/mvc.splash-implementation": "~4.3", + "mouf/mouf": ">=2.0.2, <3.0", + "mouf/mvc.splash-implementation": "~7.0", "mouf/utils.action.common-action": "~1.0", + "mouf/utils.cache.apc-cache": "~2.1", + "mouf/utils.cache.cache-interface": "~2.0", + "mouf/utils.cache.file-cache": "~2.1", + "mouf/utils.common.conditioninterface": "~2.0", "mouf/utils.common.url-interface": "~1.0", - "mouf/utils.common.validators": "3.*", - "mouf/utils.i18n.fine": "3.*", - "php": ">=5.3.0" + "php": ">=5.3.0", + "zendframework/zend-diactoros": "~1.0", + "zendframework/zend-stratigility": "~1.0" }, "type": "mouf-library", "extra": { "mouf": { - "install": [ - { - "file": "src/splashCommonInstall.php", - "type": "file" - } - ], "require-admin": [ "src/SplashCommonAdmin.php" ] @@ -1443,7 +1680,7 @@ "splash", "splash-common" ], - "time": "2014-08-22 14:52:37" + "time": "2016-02-26 17:51:15" }, { "name": "mouf/security.simplelogincontroller", @@ -1813,19 +2050,20 @@ }, { "name": "mouf/utils.cache.cache-interface", - "version": "v2.0.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/thecodingmachine/utils.cache.cache-interface.git", - "reference": "85ed0a965fd18d89c509cfbacb68a240844afc0a" + "reference": "109685126f5759a6376e113c4bf13fd625091243" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/utils.cache.cache-interface/zipball/85ed0a965fd18d89c509cfbacb68a240844afc0a", - "reference": "85ed0a965fd18d89c509cfbacb68a240844afc0a", + "url": "https://api.github.com/repos/thecodingmachine/utils.cache.cache-interface/zipball/109685126f5759a6376e113c4bf13fd625091243", + "reference": "109685126f5759a6376e113c4bf13fd625091243", "shasum": "" }, "require": { + "mouf/utils.composite-exception": "~1.0", "php": ">=5.3.0" }, "type": "mouf-library", @@ -1860,7 +2098,7 @@ "interface", "mouf" ], - "time": "2013-10-29 18:21:59" + "time": "2015-09-08 16:07:35" }, { "name": "mouf/utils.cache.file-cache", @@ -2155,57 +2393,35 @@ "time": "2013-10-29 18:21:59" }, { - "name": "mouf/utils.common.validators", - "version": "v3.1.0", + "name": "mouf/utils.composite-exception", + "version": "1.0.x-dev", "source": { "type": "git", - "url": "https://github.com/thecodingmachine/utils.common.validators.git", - "reference": "2c2e5ded2c3c5b2185838994ea99681a51952f42" + "url": "https://github.com/thecodingmachine/utils.composite-exception.git", + "reference": "f887828a2730e9591e73b0d533c0b4f3b5c5872c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/utils.common.validators/zipball/2c2e5ded2c3c5b2185838994ea99681a51952f42", - "reference": "2c2e5ded2c3c5b2185838994ea99681a51952f42", + "url": "https://api.github.com/repos/thecodingmachine/utils.composite-exception/zipball/f887828a2730e9591e73b0d533c0b4f3b5c5872c", + "reference": "f887828a2730e9591e73b0d533c0b4f3b5c5872c", "shasum": "" }, - "require": { - "mouf/utils.i18n.fine": ">=3.0-dev,<4.0", - "php": ">=5.3.0" - }, - "type": "mouf-library", - "extra": { - "mouf": { - "install": [ - { - "type": "file", - "file": "src/validatorsInstall.php" - } - ] - } + "require-dev": { + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master" }, + "type": "library", "autoload": { - "psr-0": { - "Mouf\\Utils\\Common\\Validators\\": "src/" + "psr-4": { + "Mouf\\Utils\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com", - "homepage": "http://mouf-php.com/" - } - ], - "description": "This package contains typical validators to be used in your application. A validator is a class that decides whether a string is valid or not. For instance, you could use an EmailValidator to validate that a string is a mail, etc...", - "homepage": "https://github.com/thecodingmachine/utils.common.validators", - "keywords": [ - "utils", - "validators" - ], - "time": "2014-06-04 16:32:03" + "description": "This project contains a simple PHP exception that can aggregate multiple exceptions in one.", + "time": "2015-09-18 15:40:51" }, { "name": "mouf/utils.constants.debug", @@ -2625,6 +2841,57 @@ ], "time": "2015-08-10 14:03:37" }, + { + "name": "mouf/utils.value.common-value", + "version": "1.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/mouf-utils.value.common-value.git", + "reference": "c989693980176722ead0134791fdf28e9f8ff0be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/mouf-utils.value.common-value/zipball/c989693980176722ead0134791fdf28e9f8ff0be", + "reference": "c989693980176722ead0134791fdf28e9f8ff0be", + "shasum": "" + }, + "require": { + "mouf/utils.common.conditioninterface": "~2.0", + "mouf/utils.value.value-interface": "~1.0", + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "mouf": { + "logo": "logo.png" + } + }, + "autoload": { + "psr-0": { + "Mouf\\Utils\\Action": "src/", + "Mouf\\Utils\\Common": "src/", + "Mouf\\Utils\\Value": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David Négrier", + "email": "d.negrier@thecodingmachine.com", + "homepage": "http://mouf-php.com/" + } + ], + "description": "This package contains common classes that implement the ValueInterface interface (from the mouf/utils.value.value-interface package).", + "homepage": "https://mouf-php.com/mouf/utils.value.common-value", + "keywords": [ + "mouf", + "valueinterface" + ], + "time": "2016-02-26 13:50:11" + }, { "name": "mouf/utils.value.value-interface", "version": "v1.0.0", @@ -2724,6 +2991,55 @@ ], "time": "2015-12-04 15:28:43" }, + { + "name": "psr/http-message", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2015-05-04 20:22:00" + }, { "name": "psr/log", "version": "1.0.0", @@ -2822,6 +3138,152 @@ "templating" ], "time": "2016-01-25 21:22:18" + }, + { + "name": "zendframework/zend-diactoros", + "version": "1.3.3", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-diactoros.git", + "reference": "4d54fde709664562eb63356f0250d527824d05de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/4d54fde709664562eb63356f0250d527824d05de", + "reference": "4d54fde709664562eb63356f0250d527824d05de", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "~1.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.6", + "squizlabs/php_codesniffer": "^2.3.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev", + "dev-develop": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "description": "PSR HTTP Message implementations", + "homepage": "https://github.com/zendframework/zend-diactoros", + "keywords": [ + "http", + "psr", + "psr-7" + ], + "time": "2016-01-04 21:37:32" + }, + { + "name": "zendframework/zend-escaper", + "version": "2.5.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-escaper.git", + "reference": "a4b227d8a477f4e7e9073f8e0a7ae7dbd3104a73" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/a4b227d8a477f4e7e9073f8e0a7ae7dbd3104a73", + "reference": "a4b227d8a477f4e7e9073f8e0a7ae7dbd3104a73", + "shasum": "" + }, + "require": { + "php": ">=5.3.23" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Escaper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-escaper", + "keywords": [ + "escaper", + "zf2" + ], + "time": "2015-06-03 14:05:37" + }, + { + "name": "zendframework/zend-stratigility", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-stratigility.git", + "reference": "8c01ddf62131f67c51f51dad7fa433374aa68a27" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-stratigility/zipball/8c01ddf62131f67c51f51dad7fa433374aa68a27", + "reference": "8c01ddf62131f67c51f51dad7fa433374aa68a27", + "shasum": "" + }, + "require": { + "php": ">=5.4.8", + "psr/http-message": "~1.0.0", + "zendframework/zend-escaper": "~2.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.7", + "squizlabs/php_codesniffer": "^2.3.1", + "zendframework/zend-diactoros": "~1.0" + }, + "suggest": { + "psr/http-message-implementation": "Please install a psr/http-message-implementation to consume Stratigility; e.g., zendframework/zend-diactoros" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev", + "dev-develop": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Stratigility\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Middleware for PHP", + "homepage": "https://github.com/zendframework/zend-stratigility", + "keywords": [ + "http", + "middleware", + "psr-7" + ], + "time": "2015-10-09 20:16:34" } ], "packages-dev": [ @@ -3238,7 +3700,7 @@ } ], "aliases": [], - "minimum-stability": "stable", + "minimum-stability": "dev", "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, diff --git a/mouf/MoufComponents.php b/mouf/MoufComponents.php index 8b7f548..1dbb384 100755 --- a/mouf/MoufComponents.php +++ b/mouf/MoufComponents.php @@ -3237,6 +3237,426 @@ ), ), ), + 'splashMiddleware' => + array ( + 'class' => 'Mouf\\Mvc\\Splash\\SplashMiddleware', + 'external' => false, + 'weak' => false, + 'constructor' => + array ( + 0 => + array ( + 'value' => + array ( + 0 => '__anonymous__b67b_1753892387', + 1 => '__anonymous__b67b_59788333', + 2 => '__anonymous__b67b_632286537', + 3 => '__anonymous__b67b_351917355', + 4 => '__anonymous__b67b_282937984', + ), + 'parametertype' => 'object', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), + + '__anonymous__b67b_1344235188' => + array ( + 'class' => 'Mouf\\Utils\\Common\\Condition\\ToCondition', + 'external' => false, + 'anonymous' => true, + 'weak' => true, + 'constructor' => + array ( + 0 => + array ( + 'value' => '__anonymous__b67b_1934177810', + 'parametertype' => 'object', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), + '__anonymous__b67b_1753892387' => + array ( + 'class' => 'Mouf\\Mvc\\Splash\\Routers\\Router', + 'external' => false, + 'anonymous' => true, + 'weak' => true, + 'constructor' => + array ( + 0 => + array ( + 'value' => 'phpVarsCheckRouter', + 'parametertype' => 'object', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), + '__anonymous__b67b_1934177810' => + array ( + 'class' => 'Mouf\\Utils\\Value\\Variable', + 'external' => false, + 'anonymous' => true, + 'weak' => true, + 'constructor' => + array ( + 0 => + array ( + 'value' => true, + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), + '__anonymous__b67b_282937984' => + array ( + 'class' => 'Mouf\\Mvc\\Splash\\Routers\\ErrorRouter', + 'external' => false, + 'anonymous' => true, + 'weak' => true, + 'constructor' => + array ( + 0 => + array ( + 'value' => 'exceptionRouter', + 'parametertype' => 'object', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), + '__anonymous__b67b_351917355' => + array ( + 'class' => 'Mouf\\Mvc\\Splash\\Routers\\ErrorRouter', + 'external' => false, + 'anonymous' => true, + 'weak' => true, + 'constructor' => + array ( + 0 => + array ( + 'value' => 'return $container->get(\'whoopsMiddleware\');', + 'parametertype' => 'primitive', + 'type' => 'php', + 'metadata' => + array ( + ), + ), + 1 => + array ( + 'value' => NULL, + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + 2 => + array ( + 'value' => '__anonymous__b67b_1344235188', + 'parametertype' => 'object', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), + '__anonymous__b67b_59788333' => + array ( + 'class' => 'Mouf\\Mvc\\Splash\\Routers\\Router', + 'external' => false, + 'anonymous' => true, + 'weak' => true, + 'constructor' => + array ( + 0 => + array ( + 'value' => 'splashDefaultRouter', + 'parametertype' => 'object', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), + '__anonymous__b67b_632286537' => + array ( + 'class' => 'Mouf\\Mvc\\Splash\\Routers\\Router', + 'external' => false, + 'anonymous' => true, + 'weak' => true, + 'constructor' => + array ( + 0 => + array ( + 'value' => 'notFoundRouter', + 'parametertype' => 'object', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), + 'exceptionRouter' => + array ( + 'class' => 'Mouf\\Mvc\\Splash\\Routers\\ExceptionRouter', + 'external' => false, + 'weak' => false, + 'constructor' => + array ( + 0 => + array ( + 'value' => 'httpErrorsController', + 'parametertype' => 'object', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + 1 => + array ( + 'value' => 'psr.errorLogLogger', + 'parametertype' => 'object', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), + 'httpErrorsController' => + array ( + 'class' => 'Mouf\\Mvc\\Splash\\Controllers\\HttpErrorsController', + 'external' => false, + 'weak' => false, + 'fieldBinds' => + array ( + ), + 'fieldProperties' => + array ( + ), + 'constructor' => + array ( + 0 => + array ( + 'value' => 'moufTemplate', + 'parametertype' => 'object', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + 1 => + array ( + 'value' => 'block.content', + 'parametertype' => 'object', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + 2 => + array ( + 'value' => true, + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), + 'notFoundRouter' => + array ( + 'class' => 'Mouf\\Mvc\\Splash\\Routers\\NotFoundRouter', + 'external' => false, + 'weak' => false, + 'constructor' => + array ( + 0 => + array ( + 'value' => 'httpErrorsController', + 'parametertype' => 'object', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), + 'phpVarsCheckRouter' => + array ( + 'class' => 'Mouf\\Mvc\\Splash\\Routers\\PhpVarsCheckRouter', + 'external' => false, + 'weak' => false, + 'constructor' => + array ( + 0 => + array ( + 'value' => 'psr.errorLogLogger', + 'parametertype' => 'object', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), + + 'splashDefaultRouter' => + array ( + 'class' => 'Mouf\\Mvc\\Splash\\Routers\\SplashDefaultRouter', + 'external' => false, + 'weak' => false, + 'constructor' => + array ( + 0 => + array ( + 'value' => + array ( + 0 => 'moufExplorerUrlProvider', + ), + 'parametertype' => 'object', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + 1 => + array ( + 'value' => 'splashCacheApc', + 'parametertype' => 'object', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + 2 => + array ( + 'value' => NULL, + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + 3 => + array ( + 'value' => 'weak', + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + 4 => + array ( + 'value' => true, + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), + + 'whoopsMiddleware' => + array ( + 'class' => 'Franzl\\Middleware\\Whoops\\ErrorMiddleware', + 'external' => false, + 'weak' => false, + ), + + 'psr.errorLogLogger' => + array ( + 'class' => 'Mouf\\Utils\\Log\\Psr\\ErrorLogLogger', + 'external' => false, + 'weak' => false, + 'constructor' => + array ( + 0 => + array ( + 'value' => 'warning', + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), + + 'moufExplorerUrlProvider' => + array ( + 'class' => 'Mouf\\Mvc\\Splash\\Services\\MoufExplorerUrlProvider', + 'external' => false, + 'weak' => false, + ), + + 'splashCacheApc' => + array ( + 'class' => 'Mouf\\Utils\\Cache\\ApcCache', + 'external' => false, + 'weak' => false, + 'fieldProperties' => + array ( + 'prefix' => + array ( + 'value' => 'ROOT_PATH', + 'type' => 'config', + 'metadata' => + array ( + ), + ), + ), + 'fieldBinds' => + array ( + 'fallback' => 'splashCacheFile', + ), + ), + 'splashCacheFile' => + array ( + 'class' => 'Mouf\\Utils\\Cache\\FileCache', + 'external' => false, + 'weak' => false, + 'fieldProperties' => + array ( + 'prefix' => + array ( + 'value' => 'ROOT_PATH', + 'type' => 'config', + 'metadata' => + array ( + ), + ), + 'cacheDirectory' => + array ( + 'value' => 'splashCache/', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), )); From 54edd6c251c1ed99d58055fd692c02d7dcd52a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Tue, 1 Mar 2016 15:24:26 +0100 Subject: [PATCH 03/19] Adding dependency on yaco service provider Adding puli composer plugin Working on service providers cache purging Cleanup and adding dependency on puli/cli --- .gitignore | 3 +- composer-mouf.json | 4 +- composer-mouf.lock | 1330 +++++++++++++++++++++++++++++++++-- composer.json | 5 +- puli.json | 390 ++++++++++ src/Mouf/MoufManager.php | 112 ++- src/direct/save_changes.php | 66 +- src/splash.php | 32 - 8 files changed, 1794 insertions(+), 148 deletions(-) create mode 100644 puli.json delete mode 100755 src/splash.php diff --git a/.gitignore b/.gitignore index 2b58d4a..8456abf 100755 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ config.php moufRunningActions.php .composer !mouf/no_commit/.gitkeep -mouf/no_commit/ \ No newline at end of file +mouf/no_commit/ +.puli/ \ No newline at end of file diff --git a/composer-mouf.json b/composer-mouf.json index baae5e7..e72cdf7 100644 --- a/composer-mouf.json +++ b/composer-mouf.json @@ -28,7 +28,9 @@ "mouf/javascript.ace": "1.1.3", "nikic/php-parser": "~2.0", "mouf/security.userservice-splash": "~4.0", - "mouf/classname-mapper": "~1.0" + "mouf/classname-mapper": "~1.0", + "puli/composer-plugin": "^1.0-beta9@dev", + "puli/cli": "^1.0-beta9@dev" }, "require-dev": { "phpunit/phpunit": "3.7.*" diff --git a/composer-mouf.lock b/composer-mouf.lock index b7ccfb1..841550e 100644 --- a/composer-mouf.lock +++ b/composer-mouf.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "f4a3cadbc739c60f7947844676fa19c9", - "content-hash": "eeb7e55eaf75507388a989cd8590b838", + "hash": "d5cb878a49c5ade812f959645b0710e1", + "content-hash": "2d8ecfbfd9fdb5fff19f5436457226e8", "packages": [ { "name": "container-interop/container-interop", @@ -120,6 +120,72 @@ "notification-url": "https://packagist.org/downloads/", "time": "2016-02-26 02:57:51" }, + { + "name": "justinrainbow/json-schema", + "version": "1.6.1", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/cc84765fb7317f6b07bd8ac78364747f95b86341", + "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341", + "shasum": "" + }, + "require": { + "php": ">=5.3.29" + }, + "require-dev": { + "json-schema/json-schema-test-suite": "1.1.0", + "phpdocumentor/phpdocumentor": "~2", + "phpunit/phpunit": "~3.7" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "time": "2016-01-25 15:43:01" + }, { "name": "michelf/php-markdown", "version": "1.6.0", @@ -1504,16 +1570,16 @@ }, { "name": "mouf/mvc.splash", - "version": "7.0.x-dev", + "version": "v7.0.0", "source": { "type": "git", "url": "https://github.com/thecodingmachine/mvc.splash.git", - "reference": "dbdc2ddfb8acbc74cea812d4a55efb906884e150" + "reference": "9f9b4d218185a71b779beb78c30936ea7866831d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/mvc.splash/zipball/dbdc2ddfb8acbc74cea812d4a55efb906884e150", - "reference": "dbdc2ddfb8acbc74cea812d4a55efb906884e150", + "url": "https://api.github.com/repos/thecodingmachine/mvc.splash/zipball/9f9b4d218185a71b779beb78c30936ea7866831d", + "reference": "9f9b4d218185a71b779beb78c30936ea7866831d", "shasum": "" }, "require": { @@ -1615,20 +1681,20 @@ "mvc", "splash" ], - "time": "2016-02-26 14:58:50" + "time": "2016-03-02 18:51:45" }, { "name": "mouf/mvc.splash-common", - "version": "7.0.x-dev", + "version": "v7.0.1", "source": { "type": "git", "url": "https://github.com/thecodingmachine/mvc.splash-common.git", - "reference": "303dc01b6e6809d602e09138432d1915a26b3e97" + "reference": "a387bbe17bc79f5e2c800d27c4316f56680664de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/mvc.splash-common/zipball/303dc01b6e6809d602e09138432d1915a26b3e97", - "reference": "303dc01b6e6809d602e09138432d1915a26b3e97", + "url": "https://api.github.com/repos/thecodingmachine/mvc.splash-common/zipball/a387bbe17bc79f5e2c800d27c4316f56680664de", + "reference": "a387bbe17bc79f5e2c800d27c4316f56680664de", "shasum": "" }, "require": { @@ -1680,7 +1746,7 @@ "splash", "splash-common" ], - "time": "2016-02-26 17:51:15" + "time": "2016-03-02 19:00:49" }, { "name": "mouf/security.simplelogincontroller", @@ -2102,16 +2168,16 @@ }, { "name": "mouf/utils.cache.file-cache", - "version": "v2.1.3", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/thecodingmachine/utils.cache.file-cache.git", - "reference": "e4f4301eccf8e6cd1bae508b186bd0a4226b3634" + "reference": "1364ebe903354440c2b3b47c4d918233d8d3ebd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/utils.cache.file-cache/zipball/e4f4301eccf8e6cd1bae508b186bd0a4226b3634", - "reference": "e4f4301eccf8e6cd1bae508b186bd0a4226b3634", + "url": "https://api.github.com/repos/thecodingmachine/utils.cache.file-cache/zipball/1364ebe903354440c2b3b47c4d918233d8d3ebd2", + "reference": "1364ebe903354440c2b3b47c4d918233d8d3ebd2", "shasum": "" }, "require": { @@ -2155,7 +2221,7 @@ "file", "mouf" ], - "time": "2015-03-19 10:45:17" + "time": "2015-12-31 13:37:36" }, { "name": "mouf/utils.cache.in-memory-cache", @@ -2942,16 +3008,16 @@ }, { "name": "nikic/php-parser", - "version": "v2.0.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "c542e5d86a9775abd1021618eb2430278bfc1e01" + "reference": "ce5be709d59b32dd8a88c80259028759991a4206" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c542e5d86a9775abd1021618eb2430278bfc1e01", - "reference": "c542e5d86a9775abd1021618eb2430278bfc1e01", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ce5be709d59b32dd8a88c80259028759991a4206", + "reference": "ce5be709d59b32dd8a88c80259028759991a4206", "shasum": "" }, "require": { @@ -2989,7 +3055,116 @@ "parser", "php" ], - "time": "2015-12-04 15:28:43" + "time": "2016-02-28 19:48:28" + }, + { + "name": "padraic/humbug_get_contents", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/padraic/file_get_contents.git", + "reference": "66797199019d0cb4529cb8d29c6f0b4c5085b53a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/padraic/file_get_contents/zipball/66797199019d0cb4529cb8d29c6f0b4c5085b53a", + "reference": "66797199019d0cb4529cb8d29c6f0b4c5085b53a", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Humbug\\": "src/Humbug/" + }, + "files": [ + "src/function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com/" + } + ], + "description": "Secure wrapper for accessing HTTPS resources with file_get_contents for PHP 5.3+", + "homepage": "https://github.com/padraic/file_get_contents", + "keywords": [ + "download", + "file_get_contents", + "http", + "https", + "ssl", + "tls" + ], + "time": "2015-04-22 18:45:00" + }, + { + "name": "padraic/phar-updater", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/padraic/phar-updater.git", + "reference": "c17eeb3887dc4269d1b4837dc875d39e9f8149a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/padraic/phar-updater/zipball/c17eeb3887dc4269d1b4837dc875d39e9f8149a8", + "reference": "c17eeb3887dc4269d1b4837dc875d39e9f8149a8", + "shasum": "" + }, + "require": { + "padraic/humbug_get_contents": "^1.0", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Humbug\\SelfUpdate\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com/" + } + ], + "description": "A thing to make PHAR self-updating easy and secure.", + "keywords": [ + "humbug", + "phar", + "self-update", + "update" + ], + "time": "2016-01-05 23:08:01" }, { "name": "psr/http-message", @@ -3079,65 +3254,1103 @@ "time": "2012-12-21 11:40:51" }, { - "name": "twig/twig", - "version": "v1.24.0", + "name": "puli/cli", + "version": "1.0.0-beta10", "source": { "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "3e5aa30ebfbafd5951fb1b01e338e1800ce7e0e8" + "url": "https://github.com/puli/cli.git", + "reference": "14368a347a6c8bc045cd94e331fc23560b867003" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/3e5aa30ebfbafd5951fb1b01e338e1800ce7e0e8", - "reference": "3e5aa30ebfbafd5951fb1b01e338e1800ce7e0e8", + "url": "https://api.github.com/repos/puli/cli/zipball/14368a347a6c8bc045cd94e331fc23560b867003", + "reference": "14368a347a6c8bc045cd94e331fc23560b867003", "shasum": "" }, "require": { - "php": ">=5.2.7" + "padraic/phar-updater": "^1.0.1", + "php": "^5.3.9|^7.0", + "puli/discovery": "^1.0-beta9", + "puli/manager": "^1.0-beta10", + "puli/repository": "^1.0-beta9", + "puli/url-generator": "^1.0-beta4", + "webmozart/console": "^1.0-beta4", + "webmozart/expression": "^1.0", + "webmozart/glob": "^4.0", + "webmozart/json": "^1.2.2", + "webmozart/path-util": "^2.2.2" }, "require-dev": { - "symfony/debug": "~2.7", - "symfony/phpunit-bridge": "~2.7" + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1", + "symfony/filesystem": "^2.3|^3.0" }, + "bin": [ + "bin/puli" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "1.24-dev" + "dev-master": "1.0-dev" } }, "autoload": { - "psr-0": { - "Twig_": "lib/" + "psr-4": { + "Puli\\Cli\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org/", - "role": "Lead Developer" + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A Command Line Interface (CLI) for managing Puli projects.", + "homepage": "http://puli.io/", + "time": "2016-01-14 12:24:35" + }, + { + "name": "puli/composer-plugin", + "version": "1.0.0-beta9", + "source": { + "type": "git", + "url": "https://github.com/puli/composer-plugin.git", + "reference": "a807314893420bd6c33402e7e9b01448748f3618" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/puli/composer-plugin/zipball/a807314893420bd6c33402e7e9b01448748f3618", + "reference": "a807314893420bd6c33402e7e9b01448748f3618", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0", + "php": "^5.3.9|^7.0", + "puli/discovery": "^1.0-beta9", + "puli/repository": "^1.0-beta9", + "puli/url-generator": "^1.0-beta4", + "symfony/process": "^2.3|^3.0", + "webmozart/assert": "^1.0", + "webmozart/json": "^1.2.2", + "webmozart/path-util": "^2.2" + }, + "require-dev": { + "composer/composer": "^1.0-alpha10", + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1", + "symfony/filesystem": "^2.3", + "webmozart/glob": "^4.0" + }, + "type": "composer-plugin", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" }, + "class": "Puli\\ComposerPlugin\\PuliPlugin" + }, + "autoload": { + "psr-4": { + "Puli\\ComposerPlugin\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - }, + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Integrates Composer into the Puli package manager.", + "homepage": "http://puli.io/", + "time": "2016-01-14 12:40:31" + }, + { + "name": "puli/discovery", + "version": "1.0.0-beta9", + "source": { + "type": "git", + "url": "https://github.com/puli/discovery.git", + "reference": "3fcb42bbbf27e7baa6d978c93be966ee4c2f6085" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/puli/discovery/zipball/3fcb42bbbf27e7baa6d978c93be966ee4c2f6085", + "reference": "3fcb42bbbf27e7baa6d978c93be966ee4c2f6085", + "shasum": "" + }, + "require": { + "php": "^5.3.9|^7.0", + "ramsey/uuid": "^2.8", + "webmozart/assert": "^1.0", + "webmozart/expression": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "puli/repository": "^1.0-beta9", + "sebastian/version": "^1.0.1", + "webmozart/json": "^1.2", + "webmozart/key-value-store": "^1.0-beta7" + }, + "suggest": { + "puli/repository": "to bind and discover Puli resources", + "webmozart/json": "to use the JSON discovery", + "webmozart/key-value-store": "to use the key-value store discovery" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Puli\\Discovery\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { - "name": "Twig Team", - "homepage": "http://twig.sensiolabs.org/contributors", - "role": "Contributors" + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "http://twig.sensiolabs.org/", - "keywords": [ - "templating" + "description": "Publishes and discovers artifacts across Puli packages.", + "homepage": "http://puli.io/", + "time": "2016-01-14 10:18:41" + }, + { + "name": "puli/manager", + "version": "1.0.0-beta10", + "source": { + "type": "git", + "url": "https://github.com/puli/manager.git", + "reference": "07e03dc2cb10069ec51cd33e31f9404602f4d976" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/puli/manager/zipball/07e03dc2cb10069ec51cd33e31f9404602f4d976", + "reference": "07e03dc2cb10069ec51cd33e31f9404602f4d976", + "shasum": "" + }, + "require": { + "php": "^5.3.9|^7.0", + "psr/log": "^1.0", + "puli/discovery": "^1.0-beta9", + "puli/repository": "^1.0-beta9", + "puli/url-generator": "^1.0-beta4", + "ramsey/uuid": "^2.8", + "symfony/event-dispatcher": "^2.3|^3.0", + "symfony/filesystem": "^2.3|^3.0", + "webmozart/assert": "^1.0", + "webmozart/expression": "^1.0", + "webmozart/glob": "^4.0", + "webmozart/json": "^1.2.1", + "webmozart/path-util": "^2.2.3" + }, + "require-dev": { + "basho/riak": "^1.4", + "phpunit/phpunit": "^4.6", + "predis/predis": "^1.0", + "sebastian/comparator": "^1.2", + "sebastian/version": "^1.0.1", + "webmozart/key-value-store": "^1.0-beta7" + }, + "suggest": { + "basho/riak": "to use Riak based key-value stores", + "predis/predis": "to use Predis based key-value stores", + "webmozart/key-value-store": "to use key-value store change streams/discoveries" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Puli\\Manager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "time": "2016-01-25 21:22:18" + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Generates Puli repositories from configured packages.", + "homepage": "http://puli.io/", + "time": "2016-01-14 10:59:29" + }, + { + "name": "puli/repository", + "version": "1.0.0-beta10", + "source": { + "type": "git", + "url": "https://github.com/puli/repository.git", + "reference": "2b3136f62c81bf1d6f0fbdbda62c199524eab65d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/puli/repository/zipball/2b3136f62c81bf1d6f0fbdbda62c199524eab65d", + "reference": "2b3136f62c81bf1d6f0fbdbda62c199524eab65d", + "shasum": "" + }, + "require": { + "php": "^5.3.9|^7.0", + "psr/log": "^1.0", + "webmozart/assert": "^1.0", + "webmozart/glob": "^4.1", + "webmozart/path-util": "^2.2" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1", + "symfony/filesystem": "^2.0|^3.0", + "webmozart/json": "^1.2.1", + "webmozart/key-value-store": "^1.0-beta7" + }, + "suggest": { + "symfony/filesystem": "to use the filesystem repository", + "webmozart/json": "to use the JSON repositories", + "webmozart/key-value-store": "to use the key-value store change stream" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Puli\\Repository\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A filesystem-like repository for storing arbitrary resources.", + "homepage": "http://puli.io/", + "time": "2016-02-05 10:12:35" + }, + { + "name": "puli/url-generator", + "version": "1.0.0-beta4", + "source": { + "type": "git", + "url": "https://github.com/puli/url-generator.git", + "reference": "b6c0bfb678dde9a2f8ece661f894c9f39e62dcc2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/puli/url-generator/zipball/b6c0bfb678dde9a2f8ece661f894c9f39e62dcc2", + "reference": "b6c0bfb678dde9a2f8ece661f894c9f39e62dcc2", + "shasum": "" + }, + "require": { + "php": "^5.3.9|^7.0", + "puli/discovery": "^1.0-beta9", + "puli/repository": "^1.0-beta9", + "webmozart/glob": "^4.0", + "webmozart/path-util": "^2.3" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Puli\\UrlGenerator\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Generates URLs for public Puli resources.", + "homepage": "http://puli.io/", + "keywords": [ + "asset", + "public", + "puli", + "resource", + "url" + ], + "time": "2016-01-14 10:30:17" + }, + { + "name": "ramsey/uuid", + "version": "2.8.4", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "805d8e1894c52e5b1582e75ca8803a8d85650df9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/805d8e1894c52e5b1582e75ca8803a8d85650df9", + "reference": "805d8e1894c52e5b1582e75ca8803a8d85650df9", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "doctrine/dbal": ">=2.3", + "jakub-onderka/php-parallel-lint": "^0.9.0", + "moontoast/math": "~1.1", + "phpunit/phpunit": "~4.1|~5.0", + "satooshi/php-coveralls": "~0.6", + "squizlabs/php_codesniffer": "^2.3", + "symfony/console": "~2.3|~3.0" + }, + "suggest": { + "doctrine/dbal": "Allow the use of a UUID as doctrine field type.", + "moontoast/math": "Support for converting UUID to 128-bit integer (in string form).", + "symfony/console": "Support for use of the bin/uuid command line tool." + }, + "bin": [ + "bin/uuid" + ], + "type": "library", + "autoload": { + "psr-4": { + "Rhumsaa\\Uuid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marijn Huizendveld", + "email": "marijn.huizendveld@gmail.com" + }, + { + "name": "Ben Ramsey", + "homepage": "http://benramsey.com/" + } + ], + "description": "A PHP 5.3+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", + "homepage": "https://github.com/ramsey/uuid", + "keywords": [ + "guid", + "identifier", + "uuid" + ], + "time": "2015-12-17 16:54:24" + }, + { + "name": "seld/jsonlint", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "66834d3e3566bb5798db7294619388786ae99394" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/66834d3e3566bb5798db7294619388786ae99394", + "reference": "66834d3e3566bb5798db7294619388786ae99394", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be/" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "time": "2015-11-21 02:21:41" + }, + { + "name": "symfony/console", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "2ed5e2706ce92313d120b8fe50d1063bcfd12e04" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/2ed5e2706ce92313d120b8fe50d1063bcfd12e04", + "reference": "2ed5e2706ce92313d120b8fe50d1063bcfd12e04", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-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": "2016-02-28 16:24:34" + }, + { + "name": "symfony/event-dispatcher", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "4dd5df31a28c0f82b41cb1e1599b74b5dcdbdafa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4dd5df31a28c0f82b41cb1e1599b74b5dcdbdafa", + "reference": "4dd5df31a28c0f82b41cb1e1599b74b5dcdbdafa", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.8|~3.0", + "symfony/dependency-injection": "~2.8|~3.0", + "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.0-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": "2016-01-27 05:14:46" + }, + { + "name": "symfony/filesystem", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "23ae8f9648d0a7fe94a47c8e20e5bf37c489a451" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/23ae8f9648d0a7fe94a47c8e20e5bf37c489a451", + "reference": "23ae8f9648d0a7fe94a47c8e20e5bf37c489a451", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.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": "2016-02-23 15:16:06" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "1289d16209491b584839022f29257ad859b8532d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/1289d16209491b584839022f29257ad859b8532d", + "reference": "1289d16209491b584839022f29257ad859b8532d", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-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": "2016-01-20 09:13:37" + }, + { + "name": "symfony/process", + "version": "v3.0.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "dfecef47506179db2501430e732adbf3793099c8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/dfecef47506179db2501430e732adbf3793099c8", + "reference": "dfecef47506179db2501430e732adbf3793099c8", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-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": "2016-02-02 13:44:19" + }, + { + "name": "twig/twig", + "version": "v1.24.0", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "3e5aa30ebfbafd5951fb1b01e338e1800ce7e0e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/3e5aa30ebfbafd5951fb1b01e338e1800ce7e0e8", + "reference": "3e5aa30ebfbafd5951fb1b01e338e1800ce7e0e8", + "shasum": "" + }, + "require": { + "php": ">=5.2.7" + }, + "require-dev": { + "symfony/debug": "~2.7", + "symfony/phpunit-bridge": "~2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.24-dev" + } + }, + "autoload": { + "psr-0": { + "Twig_": "lib/" + } + }, + "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": "2016-01-25 21:22:18" + }, + { + "name": "webmozart/assert", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "reference": "30eed06dd6bc88410a4ff7f77b6d22f3ce13dbde", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2015-08-24 13:29:44" + }, + { + "name": "webmozart/console", + "version": "1.0.0-beta5", + "source": { + "type": "git", + "url": "https://github.com/webmozart/console.git", + "reference": "be58c622090e61a2a7c3ad77baae776b46e7f305" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/console/zipball/be58c622090e61a2a7c3ad77baae776b46e7f305", + "reference": "be58c622090e61a2a7c3ad77baae776b46e7f305", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/console": "^2.7|^3.0", + "symfony/event-dispatcher": "^2.5|^3.0", + "symfony/process": "^2.5|^3.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1", + "symfony/filesystem": "^2.3|^3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Console\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A usable, beautiful and easily testable console toolkit written in PHP.", + "time": "2016-02-05 10:03:13" + }, + { + "name": "webmozart/expression", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/expression.git", + "reference": "35c222fc49533894228e1240cc844ae91d6a9ef2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/expression/zipball/35c222fc49533894228e1240cc844ae91d6a9ef2", + "reference": "35c222fc49533894228e1240cc844ae91d6a9ef2", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Expression\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Formulate expressions and search criteria using PHP objects.", + "keywords": [ + "criteria", + "expression", + "filter", + "formula" + ], + "time": "2015-12-17 10:43:13" + }, + { + "name": "webmozart/glob", + "version": "4.1.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/glob.git", + "reference": "3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/glob/zipball/3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe", + "reference": "3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe", + "shasum": "" + }, + "require": { + "php": "^5.3.3|^7.0", + "webmozart/path-util": "^2.2" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1", + "symfony/filesystem": "^2.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Glob\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A PHP implementation of Ant's glob.", + "time": "2015-12-29 11:14:33" + }, + { + "name": "webmozart/json", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/webmozart/json.git", + "reference": "a1fb3da904b8364e3db47eed68f76bfb6cd0031a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/json/zipball/a1fb3da904b8364e3db47eed68f76bfb6cd0031a", + "reference": "a1fb3da904b8364e3db47eed68f76bfb6cd0031a", + "shasum": "" + }, + "require": { + "justinrainbow/json-schema": "^1.6", + "php": "^5.3.3|^7.0", + "seld/jsonlint": "^1.0", + "webmozart/path-util": "^2.3" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1", + "symfony/filesystem": "^2.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Json\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A robust JSON decoder/encoder with support for schema validation.", + "time": "2016-01-14 12:11:46" + }, + { + "name": "webmozart/path-util", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/path-util.git", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "webmozart/assert": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\PathUtil\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", + "time": "2015-12-17 08:42:14" }, { "name": "zendframework/zend-diactoros", @@ -3651,16 +4864,16 @@ }, { "name": "symfony/yaml", - "version": "v2.8.2", + "version": "v2.8.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "34c8a4b51e751e7ea869b8262f883d008a2b81b8" + "reference": "2a4ee40acb880c56f29fb1b8886e7ffe94f3b995" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/34c8a4b51e751e7ea869b8262f883d008a2b81b8", - "reference": "34c8a4b51e751e7ea869b8262f883d008a2b81b8", + "url": "https://api.github.com/repos/symfony/yaml/zipball/2a4ee40acb880c56f29fb1b8886e7ffe94f3b995", + "reference": "2a4ee40acb880c56f29fb1b8886e7ffe94f3b995", "shasum": "" }, "require": { @@ -3696,12 +4909,15 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com/", - "time": "2016-01-13 10:28:07" + "time": "2016-02-23 07:41:20" } ], "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": { + "puli/composer-plugin": 20, + "puli/cli": 20 + }, "prefer-stable": true, "prefer-lowest": false, "platform": [], diff --git a/composer.json b/composer.json index 4c130c9..242b815 100644 --- a/composer.json +++ b/composer.json @@ -24,11 +24,12 @@ ], "require" : { "php" : ">=5.3.9", - "mouf/mouf-installer" : "~2.0", + "mouf/mouf-installer" : "~2.1.0@dev", "mouf/mouf-validators-interface" : "~2.0", "container-interop/container-interop" : "~1.0", "mouf/classname-mapper": "~1.0", - "thecodingmachine/yaco": "~1.0@dev" + "thecodingmachine/yaco-service-provider": "~1.0@dev", + "puli/composer-plugin": "^1.0-beta9@dev" }, "autoload" : { "psr-0" : { diff --git a/puli.json b/puli.json new file mode 100644 index 0000000..eb7e7a9 --- /dev/null +++ b/puli.json @@ -0,0 +1,390 @@ +{ + "version": "1.0", + "config": { + "bootstrap-file": "vendor/autoload.php", + "factory": { + "in": { + "class": "Puli\\GeneratedMoufPuliFactory", + "file": ".puli/GeneratedMoufPuliFactory.php" + }, + "out": { + "file": ".puli/GeneratedMoufPuliFactory.php", + "class": "Puli\\GeneratedMoufPuliFactory" + } + } + }, + "packages": { + "container-interop/container-interop": { + "install-path": "vendor/container-interop/container-interop", + "installer": "composer" + }, + "filp/whoops": { + "install-path": "vendor/filp/whoops", + "installer": "composer" + }, + "franzl/whoops-middleware": { + "install-path": "vendor/franzl/whoops-middleware", + "installer": "composer" + }, + "justinrainbow/json-schema": { + "install-path": "vendor/justinrainbow/json-schema", + "installer": "composer" + }, + "michelf/php-markdown": { + "install-path": "vendor/michelf/php-markdown", + "installer": "composer" + }, + "mouf/classname-mapper": { + "install-path": "vendor/mouf/classname-mapper", + "installer": "composer" + }, + "mouf/famfamfam": { + "install-path": "vendor/mouf/famfamfam", + "installer": "composer" + }, + "mouf/html.htmlelement": { + "install-path": "vendor/mouf/html.htmlelement", + "installer": "composer" + }, + "mouf/html.renderer": { + "install-path": "vendor/mouf/html.renderer", + "installer": "composer" + }, + "mouf/html.renderer.twig-extensions": { + "install-path": "vendor/mouf/html.renderer.twig-extensions", + "installer": "composer" + }, + "mouf/html.template.bootstrap": { + "install-path": "vendor/mouf/html.template.bootstrap", + "installer": "composer" + }, + "mouf/html.template.menus.basicmenu": { + "install-path": "vendor/mouf/html.template.menus.basicmenu", + "installer": "composer" + }, + "mouf/html.template.mouftemplate": { + "install-path": "vendor/mouf/html.template.mouftemplate", + "installer": "composer" + }, + "mouf/html.template.templateinterface": { + "install-path": "vendor/mouf/html.template.templateinterface", + "installer": "composer" + }, + "mouf/html.utils.bootstrap": { + "install-path": "vendor/mouf/html.utils.bootstrap", + "installer": "composer" + }, + "mouf/html.utils.weblibrarymanager": { + "install-path": "vendor/mouf/html.utils.weblibrarymanager", + "installer": "composer" + }, + "mouf/html.utils.weblibrarymanager.component-installer": { + "install-path": "vendor/mouf/html.utils.weblibrarymanager.component-installer", + "installer": "composer" + }, + "mouf/html.widgets.menu": { + "install-path": "vendor/mouf/html.widgets.menu", + "installer": "composer" + }, + "mouf/html.widgets.messageservice": { + "install-path": "vendor/mouf/html.widgets.messageservice", + "installer": "composer" + }, + "mouf/javascript.ace": { + "install-path": "vendor/mouf/javascript.ace", + "installer": "composer" + }, + "mouf/javascript.jquery.jq-bootstrap-validation": { + "install-path": "vendor/mouf/javascript.jquery.jq-bootstrap-validation", + "installer": "composer" + }, + "mouf/javascript.jquery.jquery": { + "install-path": "vendor/mouf/javascript.jquery.jquery", + "installer": "composer" + }, + "mouf/javascript.jquery.jquery-filetree": { + "install-path": "vendor/mouf/javascript.jquery.jquery-filetree", + "installer": "composer" + }, + "mouf/javascript.jquery.jquery-ui": { + "install-path": "vendor/mouf/javascript.jquery.jquery-ui", + "installer": "composer" + }, + "mouf/javascript.syntaxhighlighter": { + "install-path": "vendor/mouf/javascript.syntaxhighlighter", + "installer": "composer" + }, + "mouf/javascript.underscore": { + "install-path": "vendor/mouf/javascript.underscore", + "installer": "composer" + }, + "mouf/mouf": { + "install-path": "vendor/mouf/mouf", + "installer": "composer" + }, + "mouf/mouf-installer": { + "install-path": "vendor/mouf/mouf-installer", + "installer": "composer" + }, + "mouf/mouf-validators-interface": { + "install-path": "vendor/mouf/mouf-validators-interface", + "installer": "composer" + }, + "mouf/mvc.splash": { + "install-path": "vendor/mouf/mvc.splash", + "installer": "composer" + }, + "mouf/mvc.splash-common": { + "install-path": "vendor/mouf/mvc.splash-common", + "installer": "composer" + }, + "mouf/security.simplelogincontroller": { + "install-path": "vendor/mouf/security.simplelogincontroller", + "installer": "composer" + }, + "mouf/security.userfiledao": { + "install-path": "vendor/mouf/security.userfiledao", + "installer": "composer" + }, + "mouf/security.userservice": { + "install-path": "vendor/mouf/security.userservice", + "installer": "composer" + }, + "mouf/security.userservice-splash": { + "install-path": "vendor/mouf/security.userservice-splash", + "installer": "composer" + }, + "mouf/utils.action.action-interface": { + "install-path": "vendor/mouf/utils.action.action-interface", + "installer": "composer" + }, + "mouf/utils.action.common-action": { + "install-path": "vendor/mouf/utils.action.common-action", + "installer": "composer" + }, + "mouf/utils.cache.apc-cache": { + "install-path": "vendor/mouf/utils.cache.apc-cache", + "installer": "composer" + }, + "mouf/utils.cache.cache-interface": { + "install-path": "vendor/mouf/utils.cache.cache-interface", + "installer": "composer" + }, + "mouf/utils.cache.file-cache": { + "install-path": "vendor/mouf/utils.cache.file-cache", + "installer": "composer" + }, + "mouf/utils.cache.in-memory-cache": { + "install-path": "vendor/mouf/utils.cache.in-memory-cache", + "installer": "composer" + }, + "mouf/utils.cache.no-cache": { + "install-path": "vendor/mouf/utils.cache.no-cache", + "installer": "composer" + }, + "mouf/utils.common.conditioninterface": { + "install-path": "vendor/mouf/utils.common.conditioninterface", + "installer": "composer" + }, + "mouf/utils.common.getvars": { + "install-path": "vendor/mouf/utils.common.getvars", + "installer": "composer" + }, + "mouf/utils.common.url-interface": { + "install-path": "vendor/mouf/utils.common.url-interface", + "installer": "composer" + }, + "mouf/utils.composite-exception": { + "install-path": "vendor/mouf/utils.composite-exception", + "installer": "composer" + }, + "mouf/utils.constants.debug": { + "install-path": "vendor/mouf/utils.constants.debug", + "installer": "composer" + }, + "mouf/utils.constants.secret": { + "install-path": "vendor/mouf/utils.constants.secret", + "installer": "composer" + }, + "mouf/utils.i18n.fine": { + "install-path": "vendor/mouf/utils.i18n.fine", + "installer": "composer" + }, + "mouf/utils.log.errorlog_logger": { + "install-path": "vendor/mouf/utils.log.errorlog_logger", + "installer": "composer" + }, + "mouf/utils.log.log_interface": { + "install-path": "vendor/mouf/utils.log.log_interface", + "installer": "composer" + }, + "mouf/utils.log.psr.errorlog_logger": { + "install-path": "vendor/mouf/utils.log.psr.errorlog_logger", + "installer": "composer" + }, + "mouf/utils.session.session-manager": { + "install-path": "vendor/mouf/utils.session.session-manager", + "installer": "composer" + }, + "mouf/utils.value.common-value": { + "install-path": "vendor/mouf/utils.value.common-value", + "installer": "composer" + }, + "mouf/utils.value.value-interface": { + "install-path": "vendor/mouf/utils.value.value-interface", + "installer": "composer" + }, + "nikic/php-parser": { + "install-path": "vendor/nikic/php-parser", + "installer": "composer" + }, + "padraic/humbug_get_contents": { + "install-path": "vendor/padraic/humbug_get_contents", + "installer": "composer" + }, + "padraic/phar-updater": { + "install-path": "vendor/padraic/phar-updater", + "installer": "composer" + }, + "phpunit/php-code-coverage": { + "install-path": "vendor/phpunit/php-code-coverage", + "installer": "composer", + "env": "dev" + }, + "phpunit/php-file-iterator": { + "install-path": "vendor/phpunit/php-file-iterator", + "installer": "composer", + "env": "dev" + }, + "phpunit/php-text-template": { + "install-path": "vendor/phpunit/php-text-template", + "installer": "composer", + "env": "dev" + }, + "phpunit/php-timer": { + "install-path": "vendor/phpunit/php-timer", + "installer": "composer", + "env": "dev" + }, + "phpunit/php-token-stream": { + "install-path": "vendor/phpunit/php-token-stream", + "installer": "composer", + "env": "dev" + }, + "phpunit/phpunit": { + "install-path": "vendor/phpunit/phpunit", + "installer": "composer", + "env": "dev" + }, + "phpunit/phpunit-mock-objects": { + "install-path": "vendor/phpunit/phpunit-mock-objects", + "installer": "composer", + "env": "dev" + }, + "psr/http-message": { + "install-path": "vendor/psr/http-message", + "installer": "composer" + }, + "psr/log": { + "install-path": "vendor/psr/log", + "installer": "composer" + }, + "puli/cli": { + "install-path": "vendor/puli/cli", + "installer": "composer" + }, + "puli/composer-plugin": { + "install-path": "vendor/puli/composer-plugin", + "installer": "composer" + }, + "puli/discovery": { + "install-path": "vendor/puli/discovery", + "installer": "composer" + }, + "puli/manager": { + "install-path": "vendor/puli/manager", + "installer": "composer" + }, + "puli/repository": { + "install-path": "vendor/puli/repository", + "installer": "composer" + }, + "puli/url-generator": { + "install-path": "vendor/puli/url-generator", + "installer": "composer" + }, + "ramsey/uuid": { + "install-path": "vendor/ramsey/uuid", + "installer": "composer" + }, + "seld/jsonlint": { + "install-path": "vendor/seld/jsonlint", + "installer": "composer" + }, + "symfony/console": { + "install-path": "vendor/symfony/console", + "installer": "composer" + }, + "symfony/event-dispatcher": { + "install-path": "vendor/symfony/event-dispatcher", + "installer": "composer" + }, + "symfony/filesystem": { + "install-path": "vendor/symfony/filesystem", + "installer": "composer" + }, + "symfony/polyfill-mbstring": { + "install-path": "vendor/symfony/polyfill-mbstring", + "installer": "composer" + }, + "symfony/process": { + "install-path": "vendor/symfony/process", + "installer": "composer" + }, + "symfony/yaml": { + "install-path": "vendor/symfony/yaml", + "installer": "composer", + "env": "dev" + }, + "twig/twig": { + "install-path": "vendor/twig/twig", + "installer": "composer" + }, + "webmozart/assert": { + "install-path": "vendor/webmozart/assert", + "installer": "composer" + }, + "webmozart/console": { + "install-path": "vendor/webmozart/console", + "installer": "composer" + }, + "webmozart/expression": { + "install-path": "vendor/webmozart/expression", + "installer": "composer" + }, + "webmozart/glob": { + "install-path": "vendor/webmozart/glob", + "installer": "composer" + }, + "webmozart/json": { + "install-path": "vendor/webmozart/json", + "installer": "composer" + }, + "webmozart/path-util": { + "install-path": "vendor/webmozart/path-util", + "installer": "composer" + }, + "zendframework/zend-diactoros": { + "install-path": "vendor/zendframework/zend-diactoros", + "installer": "composer" + }, + "zendframework/zend-escaper": { + "install-path": "vendor/zendframework/zend-escaper", + "installer": "composer" + }, + "zendframework/zend-stratigility": { + "install-path": "vendor/zendframework/zend-stratigility", + "installer": "composer" + } + } +} diff --git a/src/Mouf/MoufManager.php b/src/Mouf/MoufManager.php index cb7c054..811aa9c 100755 --- a/src/Mouf/MoufManager.php +++ b/src/Mouf/MoufManager.php @@ -16,12 +16,14 @@ use Mouf\Reflection\MoufReflectionProxy; use Mouf\Reflection\MoufReflectionClass; use Interop\Container\ContainerInterface; +use Puli\Discovery\Api\Discovery; use TheCodingMachine\Yaco\Compiler; use TheCodingMachine\Yaco\Definition\ConstParameterDefinition; use TheCodingMachine\Yaco\Definition\ObjectDefinition; use TheCodingMachine\Yaco\Definition\ParameterDefinition; use Mouf\Yaco\PhpCodeDefinition; use TheCodingMachine\Yaco\Definition\Reference; +use TheCodingMachine\Yaco\ServiceProvider\ServiceProviderLoader; /** * The class managing object instanciation in the Mouf framework. @@ -103,6 +105,8 @@ public static function initMoufManager() { self::$defaultInstance->compiledContainerName = "Mouf\\GeneratedContainer"; self::$defaultInstance->compiledContainerFile = '../../../../../mouf/no_commit/GeneratedContainer.php'; + self::$defaultInstance->cachedModificationTimeFile = '../../../../../mouf/no_commit/modificationTimes.php'; + self::$defaultInstance->puliFactoryClassName = "Puli\\GeneratedPuliFactory"; } } @@ -125,6 +129,8 @@ public static function switchToHidden() { self::$defaultInstance->compiledContainerName = "Mouf\\GeneratedAdminContainer"; self::$defaultInstance->compiledContainerFile = '../../mouf/no_commit/GeneratedAdminContainer.php'; + self::$defaultInstance->cachedModificationTimeFile = '../../mouf/no_commit/modificationTimes.php'; + self::$defaultInstance->puliFactoryClassName = "Puli\\GeneratedMoufPuliFactory"; } /** @@ -261,6 +267,20 @@ public static function switchToHidden() { */ private $compiledContainerFile; + /** + * The path to the file containing timestamp of lost modification time + * + * @var string + */ + private $cachedModificationTimeFile; + + /** + * The class name of the Puli factory + * + * @var string + */ + private $puliFactoryClassName; + /** * The instance of the container compiled with Yaco. * @@ -284,6 +304,8 @@ public function getConfigManager() { */ private function getContainer() { if ($this->container === null) { + $compiledContainerFile = __DIR__.'/'.$this->compiledContainerFile; + /* // Does the container file exists? // If yes, is it newer than MoufComponents? $compiledContainerFile = __DIR__.'/'.$this->compiledContainerFile; @@ -293,6 +315,9 @@ private function getContainer() { if (($containerFileExists && filemtime($compiledContainerFile) <= filemtime($componentsFile)) || !$containerFileExists) { $this->defaultCompile(); + }*/ + if (!$this->checkContainerUpToDate()) { + $this->defaultCompile(); } require_once $compiledContainerFile; @@ -302,6 +327,52 @@ private function getContainer() { return $this->container; } + /** + * Checks whether the container is up to date or not. + * Returns false if the container needs updating, i.e. if one of the service providers or the MoufComponents file + * has been modified lately. + * + * @return bool + */ + private function checkContainerUpToDate() : bool + { + $cachedModificationTimeFile = __DIR__.'/'.$this->cachedModificationTimeFile; + $componentsFile = __DIR__.'/'.$this->componentsFileName; + + if (!file_exists($cachedModificationTimeFile)) { + return false; + } + + $cachedModifications = require $cachedModificationTimeFile; + + if ($cachedModifications['moufComponents'] !== filemtime($componentsFile)) { + return false; + } + foreach ($cachedModifications['serviceProviders'] as $serviceProviderFile => $serviceProviderModificationTime) { + if ($serviceProviderModificationTime !== filemtime($serviceProviderFile)) { + return false; + } + } + return true; + } + + private function writeContainerCachedModification() + { + $componentsFile = __DIR__.'/'.$this->componentsFileName; + $cachedModificationTimeFile = __DIR__.'/'.$this->cachedModificationTimeFile; + + $cachedModifications = ['moufComponents' => filemtime($componentsFile), + 'serviceProviders' => []]; + + foreach ($this->discoverServiceProviderBindings() as $serviceProvider) { + $reflectionClass = new \ReflectionClass($serviceProvider); + $cachedModifications['serviceProviders'][$reflectionClass->getFileName()] = filemtime($reflectionClass->getFileName()); + } + + $code = " @@ -2232,11 +2303,48 @@ private function walkConstructorLoop($instanceName, array $path) { private function defaultCompile() { $this->compile($this->compiledContainerName, __DIR__.'/'.$this->compiledContainerFile); + $this->writeContainerCachedModification(); + } + + + private $puliDiscovery; + + /** + * Creates a Puli discovery and returns it. + * + * TODO: improve this to be sure that the Puli discovery and puli factory is available in the container at runtime. + * + * @return Discovery + */ + private function getPuliDiscovery() : Discovery + { + if ($this->puliDiscovery === null) { + $factoryClass = $this->puliFactoryClassName; + $factory = new $factoryClass(); + $this->puliDiscovery = $factory->createDiscovery($factory->createRepository()); + } + return $this->puliDiscovery; + } + + public function discoverServiceProviderBindings() : array { + $bindings = $this->getPuliDiscovery()->findBindings('container-interop/service-provider'); + $serviceProviders = []; + + foreach ($bindings as $binding) { + if ($binding instanceof ClassBinding) { + $serviceProviders[] = $binding->getClassName(); + } + } + return $serviceProviders; } private function compile(string $className, string $pathToFile) { $compiler = new Compiler(); + + $serviceProviderLoader = new ServiceProviderLoader($compiler); + $serviceProviderLoader->discoverAndLoad($this->getPuliDiscovery()); + foreach ($this->declaredInstances as $instanceName => $descriptor) { if ($this->isInstanceAnonymous($instanceName)) { continue; @@ -2256,7 +2364,7 @@ private function compile(string $className, string $pathToFile) * Returns a reference (if we are dealing with a non anonymous instance) or a definition (in the case of anonymous instances) * @param $instanceName */ - private function toDefinitionOrReference($instanceName) { + private function toDefinitionOrReference(string $instanceName) { if ($this->isInstanceAnonymous($instanceName)) { return $this->toDefinition($instanceName); } else { diff --git a/src/direct/save_changes.php b/src/direct/save_changes.php index 4d3a37e..c8375a9 100755 --- a/src/direct/save_changes.php +++ b/src/direct/save_changes.php @@ -38,14 +38,7 @@ require_once 'utils/check_rights.php'; -if (get_magic_quotes_gpc()==1) -{ - // FIXME: add suppport for arrays (see "get") - $changesList = $_REQUEST["changesList"]; - //$changesList = stripslashes($_REQUEST["changesList"]); -} else { - $changesList = $_REQUEST["changesList"]; -} +$changesList = $_REQUEST["changesList"]; $moufManager = MoufManager::getMoufManager(); @@ -159,18 +152,18 @@ function mouf_convert_json_ordered_array_to_php(array $jsonArr, $associativeArra } } else { $arrayOfString = $value; - if ($arrayOfString !== null){ - $arrayOfDescriptors = array(); - foreach ($arrayOfString as $key=>$instanceName) { - if ($instanceName != null) { - $arrayOfDescriptors[$key] = $moufManager->getInstanceDescriptor($instanceName); - } else { - $arrayOfDescriptors[$key] = null; - } - } - }else{ - $arrayOfDescriptors = null; - } + if ($arrayOfString !== null){ + $arrayOfDescriptors = array(); + foreach ($arrayOfString as $key=>$instanceName) { + if ($instanceName != null) { + $arrayOfDescriptors[$key] = $moufManager->getInstanceDescriptor($instanceName); + } else { + $arrayOfDescriptors[$key] = null; + } + } + }else{ + $arrayOfDescriptors = null; + } $property->setValue($arrayOfDescriptors); } } @@ -208,37 +201,6 @@ function mouf_convert_json_ordered_array_to_php(array $jsonArr, $associativeArra $response = array(); $response["status"] = "ok"; -/*$instanceList = $moufManager->findInstances($className); - -$response = array(); -$instancesArray = array(); -$instanceArray = array(); - -foreach ($instanceList as $instanceName) { - $instanceDescriptor = $moufManager->getInstanceDescriptor($instanceName); - $response["instances"][$instanceDescriptor->getName()] = $instanceDescriptor->toJson(); -} - -// Now, let's get the full list of absolutely all classes implementing "class". -$classList = Moufspector::getComponentsList($className); -$classArray = array(); -$childClassArray = array(); - -foreach ($classList as $childClassName) { - $childClassArray[] = $childClassName; - $classDescriptor = new MoufReflectionClass($childClassName); - - do { - $classArray[$classDescriptor->getName()] = $classDescriptor->toJson(); - $classDescriptor = $classDescriptor->getParentClass(); - } while ($classDescriptor != null && !isset($classArray[$classDescriptor->getName()])); -} - -// List of all classes that might be relevant -$response["classes"] = $classArray; -// List of all classes that are a subclass of the main class / interface -$response["childrenClasses"] = $childClassArray; -*/ $encode = "php"; if (isset($_REQUEST["encode"]) && $_REQUEST["encode"]=="json") { @@ -253,5 +215,3 @@ function mouf_convert_json_ordered_array_to_php(array $jsonArr, $associativeArra } else { echo "invalid encode parameter"; } - -?> \ No newline at end of file diff --git a/src/splash.php b/src/splash.php deleted file mode 100755 index 660a4c6..0000000 --- a/src/splash.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -// Let's load the Mouf file, and the MoufAdmin file. -// The MoufAdmin will replace the Mouf configuration file. -if (file_exists(dirname(__FILE__).'/../MoufComponents.php')) { - require_once dirname(__FILE__).'/../MoufComponents.php'; -} -require_once dirname(__FILE__).'/../MoufUniversalParameters.php'; - -MoufManager::switchToHidden(); -require_once 'MoufAdmin.php'; -if (isset($_REQUEST['selfedit']) && $_REQUEST['selfedit']=="true") { - require_once 'MoufAdminUI.php'; -} else { - // Check file existence just to be sure. - if (file_exists(dirname(__FILE__).'/../MoufUI.php')) { - require_once dirname(__FILE__).'/../MoufUI.php'; - } -} - -$splashUrlPrefix = ROOT_URL."mouf/"; -require_once '../plugins/mvc/splash/3.2/splash.php'; - -?> \ No newline at end of file From 44c9682eca5db8a9ae881dae0ae2e9c9920061c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Tue, 8 Mar 2016 13:20:59 +0100 Subject: [PATCH 04/19] Fixing minor bug --- src/Mouf/MoufManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mouf/MoufManager.php b/src/Mouf/MoufManager.php index 811aa9c..954cabc 100755 --- a/src/Mouf/MoufManager.php +++ b/src/Mouf/MoufManager.php @@ -473,7 +473,7 @@ public function declareComponent($instanceName, $className, $external = false, $ } } - if (strpos($className, '\\' === 0)) { + if (strpos($className, '\\') === 0) { $className = substr($className, 1); } From ed586b97305f9173904d4f93cdcf38564972df96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Tue, 15 Mar 2016 17:18:06 +0100 Subject: [PATCH 05/19] Fixing scalar type hint detection. Closes #119 --- src/Mouf/Reflection/MoufReflectionParameter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mouf/Reflection/MoufReflectionParameter.php b/src/Mouf/Reflection/MoufReflectionParameter.php index fcf9c0a..7a590a1 100644 --- a/src/Mouf/Reflection/MoufReflectionParameter.php +++ b/src/Mouf/Reflection/MoufReflectionParameter.php @@ -154,7 +154,7 @@ public function getClass() function getClassName() { preg_match('/\[\s\<\w+?>\s([\w\\\\]+)/s', $this->__toString(), $matches); $class = isset($matches[1]) ? $matches[1] : null; - if($class == "array" || $class == "callback" || $class == "callable"){ + if(in_array($class, [ 'array', 'callback', 'callable', 'int', 'integer', 'string', 'float', 'bool', 'boolean' ])) { return null; } return $class; From 4cb7509107734bc5654fd33c5f390d3a5e82490a Mon Sep 17 00:00:00 2001 From: xhuberty Date: Thu, 14 Apr 2016 15:29:59 +0200 Subject: [PATCH 06/19] Delete deprecated unit test --- README.md | 2 +- tests/Mouf/MoufManagerTest.php | 50 -------- tests/Mouf/MoufPropertyDescriptorTest.php | 121 ++++++++---------- tests/Mouf/Reflection/TypesDescriptorTest.php | 8 -- 4 files changed, 56 insertions(+), 125 deletions(-) delete mode 100644 tests/Mouf/MoufManagerTest.php diff --git a/README.md b/README.md index dc28d73..396cdb9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ Mouf 2: Dependency injection... on steroids =========================================== -[![Latest Unstable Version](https://poser.pugx.org/mouf/mouf/v/unstable.png)](https://packagist.org/packages/mouf/mouf) [![Total Downloads](https://poser.pugx.org/mouf/mouf/downloads.png)](https://packagist.org/packages/mouf/mouf) [![License](https://poser.pugx.org/mouf/mouf/license.png)](https://packagist.org/packages/mouf/mouf) [![Build Status](https://travis-ci.org/thecodingmachine/mouf.svg?branch=master)](https://travis-ci.org/thecodingmachine/mouf) +[![Latest Unstable Version](https://poser.pugx.org/mouf/mouf/v/unstable.png)](https://packagist.org/packages/mouf/mouf) [![Total Downloads](https://poser.pugx.org/mouf/mouf/downloads.png)](https://packagist.org/packages/mouf/mouf) [![License](https://poser.pugx.org/mouf/mouf/license.png)](https://packagist.org/packages/mouf/mouf) [![Build Status](https://travis-ci.org/thecodingmachine/mouf.svg?branch=2.1)](https://travis-ci.org/thecodingmachine/mouf) What is Mouf? ------------- diff --git a/tests/Mouf/MoufManagerTest.php b/tests/Mouf/MoufManagerTest.php deleted file mode 100644 index 4f62088..0000000 --- a/tests/Mouf/MoufManagerTest.php +++ /dev/null @@ -1,50 +0,0 @@ -createInstance("Mouf\TestClasses\TestClass2"); - - $instanceDescriptor = $container->createInstance("Mouf\TestClasses\TestClass1"); - $instanceDescriptor->getProperty("constructorParamA")->setValue(1); - $instanceDescriptor->getProperty("constructorParamB")->setValue($instanceDescriptorClass2); - $instanceDescriptor->getProperty("constructorParamC")->setValue($instanceDescriptorClass2); - $instanceDescriptor->setName("testClass1"); - - $instance = $container->getInstance("testClass1"); - /* @var $instance \Mouf\TestClasses\TestClass */ - $this->assertEquals(1, $instance->getConstructorParamA()); - $this->assertInstanceOf("Mouf\TestClasses\TestClass2", $instance->getConstructorParamB()); - $this->assertInstanceOf("Mouf\TestClasses\TestClass2", $instance->getConstructorParamC()); - $this->assertEquals($instance->getConstructorParamB(), $instance->getConstructorParamC()); - } - - public function testCallbackInjection() { - $container = new MoufManager(); - - $instanceDescriptor = $container->createInstance("Mouf\TestClasses\TestClass1"); - $instanceDescriptor->getProperty("constructorParamA")->setOrigin('php')->setValue('return [];'); - $instanceDescriptor->setName("testClass1"); - - // Note: we cannot retrieve the instance without first saving and loading the file. - // This is not an issue. - } - - - static function main() { - $suite = new \PHPUnit_Framework_TestSuite( __CLASS__); - \PHPUnit_TextUI_TestRunner::run( $suite); - } -} - -if (!defined('PHPUnit_MAIN_METHOD')) { - MoufManagerTest::main(); -} \ No newline at end of file diff --git a/tests/Mouf/MoufPropertyDescriptorTest.php b/tests/Mouf/MoufPropertyDescriptorTest.php index 6bdb33b..386b1be 100644 --- a/tests/Mouf/MoufPropertyDescriptorTest.php +++ b/tests/Mouf/MoufPropertyDescriptorTest.php @@ -1,160 +1,149 @@ -getProperty("indexedArray"); - $moufPropertyDescriptor = new MoufPropertyDescriptor($indexedArrayProperty); - $types = $moufPropertyDescriptor->getTypes(); - $type = $types->getTypes()[0]; - $subtype = $type->getSubType(); - $keytype = $type->getKeyType(); - $this->assertEquals(true, $type->isArray()); - $this->assertEquals("int", $subtype->getType()); - $this->assertEquals(null, $keytype); - +getProperty("indexedArray"); + $moufPropertyDescriptor = new MoufPropertyDescriptor($indexedArrayProperty); + $types = $moufPropertyDescriptor->getTypes(); + $type = $types->getTypes()[0]; + $subtype = $type->getSubType(); + $keytype = $type->getKeyType(); + $this->assertEquals(true, $type->isArray()); + $this->assertEquals("int", $subtype->getType()); + $this->assertEquals(null, $keytype); + $property = $moufReflectionClass->getProperty("associativeArray"); $moufPropertyDescriptor = new MoufPropertyDescriptor($property); $types = $moufPropertyDescriptor->getTypes(); - $type = $types->getTypes()[0]; + $type = $types->getTypes()[0]; $subtype = $type->getSubType(); $keytype = $type->getKeyType(); $this->assertEquals("array", $type->getType()); $this->assertEquals("string", $subtype->getType()); - $this->assertEquals("string", $keytype); - + $this->assertEquals("string", $keytype); + $property = $moufReflectionClass->getProperty("int"); $moufPropertyDescriptor = new MoufPropertyDescriptor($property); $types = $moufPropertyDescriptor->getTypes(); - $type = $types->getTypes()[0]; + $type = $types->getTypes()[0]; $subtype = $type->getSubType(); $keytype = $type->getKeyType(); $this->assertEquals("int", $type->getType()); $this->assertEquals(null, $subtype); - $this->assertEquals(null, $keytype); - + $this->assertEquals(null, $keytype); + $property = $moufReflectionClass->getProperty("testClass1"); $moufPropertyDescriptor = new MoufPropertyDescriptor($property); $types = $moufPropertyDescriptor->getTypes(); - $type = $types->getTypes()[0]; + $type = $types->getTypes()[0]; $subtype = $type->getSubType(); $keytype = $type->getKeyType(); $this->assertEquals("\\Mouf\\TestClasses\\TestClass1", $type->getType(), "Testing \$testClass1 property"); $this->assertEquals(null, $subtype, "Testing \$testClass1 property subtype"); - $this->assertEquals(null, $keytype, "Testing \$testClass1 property keytype"); - + $this->assertEquals(null, $keytype, "Testing \$testClass1 property keytype"); + $property = $moufReflectionClass->getProperty("testClass1FullyQualifiedNamespace"); $moufPropertyDescriptor = new MoufPropertyDescriptor($property); $types = $moufPropertyDescriptor->getTypes(); - $type = $types->getTypes()[0]; + $type = $types->getTypes()[0]; $subtype = $type->getSubType(); $keytype = $type->getKeyType(); $this->assertEquals("\\Mouf\\TestClasses\\TestClass1", $type->getType(), "Testing \$testClass1FullyQualifiedNamespace property"); $this->assertEquals(null, $subtype, "Testing \$testClass1FullyQualifiedNamespace property subtype"); $this->assertEquals(null, $keytype, "Testing \$testClass1FullyQualifiedNamespace property keytype"); - + $property = $moufReflectionClass->getProperty("testSubNamespace"); $moufPropertyDescriptor = new MoufPropertyDescriptor($property); $types = $moufPropertyDescriptor->getTypes(); - $type = $types->getTypes()[0]; + $type = $types->getTypes()[0]; $subtype = $type->getSubType(); $keytype = $type->getKeyType(); $this->assertEquals("\\Mouf\\TestClasses\\Subname\\Subclass", $type->getType(), "Testing \$testSubNamespace property"); $this->assertEquals(null, $subtype, "Testing \$testSubNamespace property subtype"); $this->assertEquals(null, $keytype, "Testing \$testSubNamespace property keytype"); - + $property = $moufReflectionClass->getProperty("testUse"); $moufPropertyDescriptor = new MoufPropertyDescriptor($property); $types = $moufPropertyDescriptor->getTypes(); - $type = $types->getTypes()[0]; + $type = $types->getTypes()[0]; $subtype = $type->getSubType(); $keytype = $type->getKeyType(); $this->assertEquals("\\Mouf\\TestClasses\\Subname\\Subclass", $type->getType(), "Testing \$testUse property"); $this->assertEquals(null, $subtype, "Testing \$testUse property subtype"); $this->assertEquals(null, $keytype, "Testing \$testUse property keytype"); - + $property = $moufReflectionClass->getProperty("testRelativeUse"); $moufPropertyDescriptor = new MoufPropertyDescriptor($property); $types = $moufPropertyDescriptor->getTypes(); - $type = $types->getTypes()[0]; + $type = $types->getTypes()[0]; $subtype = $type->getSubType(); $keytype = $type->getKeyType(); $this->assertEquals("\\Mouf\\TestClasses\\Subname\\Subclass", $type->getType(), "Testing \$testRelativeUse property"); $this->assertEquals(null, $subtype, "Testing \$testRelativeUse property subtype"); $this->assertEquals(null, $keytype, "Testing \$testRelativeUse property keytype"); - - + + $property = $moufReflectionClass->getMethod("setSetterProperty1"); $moufPropertyDescriptor = new MoufPropertyDescriptor($property); $types = $moufPropertyDescriptor->getTypes(); - $type = $types->getTypes()[0]; + $type = $types->getTypes()[0]; $subtype = $type->getSubType(); $keytype = $type->getKeyType(); $this->assertEquals("\\Mouf\\TestClasses\\TestClass1", $type->getType(), "Testing \$setSetterProperty1 property"); $this->assertEquals(null, $subtype, "Testing \$setSetterProperty1 property subtype"); $this->assertEquals(null, $keytype, "Testing \$setSetterProperty1 property keytype"); - + $property = $moufReflectionClass->getMethod("setSetterProperty2"); $moufPropertyDescriptor = new MoufPropertyDescriptor($property); $types = $moufPropertyDescriptor->getTypes(); - $type = $types->getTypes()[0]; + $type = $types->getTypes()[0]; $subtype = $type->getSubType(); $keytype = $type->getKeyType(); $this->assertEquals("\\Mouf\\TestClasses\\TestClass1", $type->getType(), "Testing \$setSetterProperty2 property"); $this->assertEquals(null, $subtype, "Testing \$setSetterProperty2 property subtype"); $this->assertEquals(null, $keytype, "Testing \$setSetterProperty2 property keytype"); - $property = $moufReflectionClass->getConstructor()->getParameters(); + $property = $moufReflectionClass->getConstructor()->getParameters(); $property = $property[0]; $moufPropertyDescriptor = new MoufPropertyDescriptor($property); $types = $moufPropertyDescriptor->getTypes(); - $type = $types->getTypes()[0]; + $type = $types->getTypes()[0]; $subtype = $type->getSubType(); $keytype = $type->getKeyType(); $this->assertEquals("string", $type->getType(), "Testing \$constructorParamA property"); $this->assertEquals(null, $subtype, "Testing \$constructorParamA property subtype"); $this->assertEquals(null, $keytype, "Testing \$constructorParamA property keytype"); - - $property = $moufReflectionClass->getConstructor()->getParameters(); + + $property = $moufReflectionClass->getConstructor()->getParameters(); $property = $property[1]; $moufPropertyDescriptor = new MoufPropertyDescriptor($property); $types = $moufPropertyDescriptor->getTypes(); - $type = $types->getTypes()[0]; + $type = $types->getTypes()[0]; $subtype = $type->getSubType(); $keytype = $type->getKeyType(); $this->assertEquals("\\Mouf\\TestClasses\\TestClass2", $type->getType(), "Testing \$constructorParamB property"); $this->assertEquals(null, $subtype, "Testing \$constructorParamB property subtype"); $this->assertEquals(null, $keytype, "Testing \$constructorParamB property keytype"); - - $property = $moufReflectionClass->getConstructor()->getParameters(); + + $property = $moufReflectionClass->getConstructor()->getParameters(); $property = $property[2]; $moufPropertyDescriptor = new MoufPropertyDescriptor($property); $types = $moufPropertyDescriptor->getTypes(); - $type = $types->getTypes()[0]; + $type = $types->getTypes()[0]; $subtype = $type->getSubType(); $keytype = $type->getKeyType(); $this->assertEquals("\\Mouf\\TestClasses\\TestClass2", $type->getType(), "Testing \$constructorParamC property"); $this->assertEquals(null, $subtype, "Testing \$constructorParamC property subtype"); $this->assertEquals(null, $keytype, "Testing \$constructorParamC property keytype"); - - - - } - - static function main() { - $suite = new \PHPUnit_Framework_TestSuite( __CLASS__); - \PHPUnit_TextUI_TestRunner::run( $suite); - } -} - -if (!defined('PHPUnit_MAIN_METHOD')) { - MoufPropertyDescriptorTest::main(); -} \ No newline at end of file + + } +} diff --git a/tests/Mouf/Reflection/TypesDescriptorTest.php b/tests/Mouf/Reflection/TypesDescriptorTest.php index 60a9687..e23ee7c 100644 --- a/tests/Mouf/Reflection/TypesDescriptorTest.php +++ b/tests/Mouf/Reflection/TypesDescriptorTest.php @@ -166,12 +166,4 @@ public function testGetCompatibleTypeForInstance() { } - static function main() { - $suite = new \PHPUnit_Framework_TestSuite( __CLASS__); - \PHPUnit_TextUI_TestRunner::run( $suite); - } } - -if (!defined('PHPUnit_MAIN_METHOD')) { - TypesDescriptorTest::main(); -} \ No newline at end of file From 2ecaf6da44a4b26cd29c7f853cafe637bfe867ce Mon Sep 17 00:00:00 2001 From: xhuberty Date: Thu, 14 Apr 2016 18:26:38 +0200 Subject: [PATCH 07/19] Add puli/cli to composer.json --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 242b815..a0f09f2 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,8 @@ "container-interop/container-interop" : "~1.0", "mouf/classname-mapper": "~1.0", "thecodingmachine/yaco-service-provider": "~1.0@dev", - "puli/composer-plugin": "^1.0-beta9@dev" + "puli/composer-plugin": "^1.0-beta9@dev", + "puli/cli": "^1.0-beta9@dev" }, "autoload" : { "psr-0" : { From f88da5af58f1b01b75e55ebaa87cdb6b0fc30dc7 Mon Sep 17 00:00:00 2001 From: Marc TEYSSIER Date: Tue, 28 Mar 2017 10:44:18 +0200 Subject: [PATCH 08/19] Fix mapping of symlink --- src/Mouf/Composer/ClassMapGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mouf/Composer/ClassMapGenerator.php b/src/Mouf/Composer/ClassMapGenerator.php index 0031a06..0e6c618 100644 --- a/src/Mouf/Composer/ClassMapGenerator.php +++ b/src/Mouf/Composer/ClassMapGenerator.php @@ -67,7 +67,7 @@ public static function createMap($path, $whitelist = null) $map = array(); foreach ($path as $file) { - $filePath = $file->getRealPath(); + $filePath = $file->getPath().DIRECTORY_SEPARATOR.$file->getFilename(); if (!in_array(pathinfo($filePath, PATHINFO_EXTENSION), array('php', 'inc'))) { continue; From 521f4d380b01d89a3e05270e33e2bc1e58c92af3 Mon Sep 17 00:00:00 2001 From: Dorian Savina Date: Fri, 12 May 2017 20:19:51 +0200 Subject: [PATCH 09/19] [fix] homogeneous line endings when writing MoufComponents.php (PHPDoc for Mouf class) Signed-off-by: Dorian Savina --- src/Mouf/MoufManager.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Mouf/MoufManager.php b/src/Mouf/MoufManager.php index 024d990..e2c81d4 100755 --- a/src/Mouf/MoufManager.php +++ b/src/Mouf/MoufManager.php @@ -1373,18 +1373,18 @@ public function rewriteMouf() { fwrite($fp, "unset(\$moufManager);\n"); fwrite($fp, "\n"); - fwrite($fp, "/** - * This is the base class of the Manage Object User Friendly or Modular object user framework (MOUF) framework. - * This object can be used to get the objects manage by MOUF. - * - */ -class ".$this->mainClassName." { - "); + fwrite($fp, "/**\n"); + fwrite($fp, " * This is the base class of the Manage Object User Friendly or Modular object user framework (MOUF) framework.\n"); + fwrite($fp, " * This object can be used to get the objects manage by MOUF.\n"); + fwrite($fp, " *\n"); + fwrite($fp, " */\n"); + fwrite($fp, "class $this->mainClassName {\n"); + fwrite($fp, " "); // Now, let's export the closures! /***** closures Start ******/ - fwrite($fp, "public function getClosures() { - return [\n"); + fwrite($fp, "public function getClosures() {\n"); + fwrite($fp, " return [\n"); $targetArray = []; foreach ($internalDeclaredInstances as $instanceName=>$instanceDesc) { @@ -1489,8 +1489,8 @@ class ".$this->mainClassName." { } } - fwrite($fp, " ]; - }\n"); + fwrite($fp, " ];\n"); + fwrite($fp, " }\n"); /***** closures end ******/ From 13587452d6383ae3c665d44275e662ea182bca9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Mon, 10 Jul 2017 16:29:54 +0200 Subject: [PATCH 10/19] Updating dependencies --- composer.json | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 4b457be..15c1555 100644 --- a/composer.json +++ b/composer.json @@ -25,12 +25,13 @@ "require" : { "php" : ">=5.3.9", "mouf/mouf-installer" : "~2.1.0@dev", - "mouf/mouf-validators-interface" : "~2.0", - "container-interop/container-interop" : "~1.0", - "mouf/classname-mapper": "~1.0", - "thecodingmachine/yaco-service-provider": "~1.0@dev", + "mouf/mouf-validators-interface" : "^2.0", + "container-interop/container-interop" : "^1.0", + "mouf/classname-mapper": "^1.0", + "thecodingmachine/yaco": "^1.1", "puli/composer-plugin": "^1.0-beta9@dev", - "puli/cli": "^1.0-beta9@dev" + "puli/cli": "^1.0-beta9@dev", + "thecodingmachine/discovery": "^1.0" }, "autoload" : { "psr-0" : { From 5c7f33554e9b6bc34ff2d3bcb0de5bf4c843b311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Mon, 10 Jul 2017 16:40:15 +0200 Subject: [PATCH 11/19] Adding Mouf name in composer-mouf.json in order to avoid looping on mouf/mouf integration because of Splash dependency on Mouf --- composer-mouf.json | 2 + composer-mouf.lock | 151 +-------------------------------------------- puli.json | 5 +- 3 files changed, 4 insertions(+), 154 deletions(-) diff --git a/composer-mouf.json b/composer-mouf.json index 5f15a13..961f7ea 100644 --- a/composer-mouf.json +++ b/composer-mouf.json @@ -1,4 +1,6 @@ { + "name": "mouf/mouf", + "version": "2.1", "require": { "mouf/mouf-installer": "~2.0", "mouf/mouf-validators-interface": "~2.0", diff --git a/composer-mouf.lock b/composer-mouf.lock index f50b32d..6f27e82 100644 --- a/composer-mouf.lock +++ b/composer-mouf.lock @@ -4,7 +4,7 @@ "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": "c44190049828c0783c1914c47b50ecb4", + "content-hash": "4a3619dd2ae6dffc2bad76b2f47674c6", "packages": [ { "name": "composer/ca-bundle", @@ -1460,155 +1460,6 @@ ], "time": "2014-06-03T20:45:03+00:00" }, - { - "name": "mouf/mouf", - "version": "v2.0.27", - "source": { - "type": "git", - "url": "https://github.com/thecodingmachine/mouf.git", - "reference": "6d83fab89c0ee90dc7706c2bb81969aa1bd8de64" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/mouf/zipball/6d83fab89c0ee90dc7706c2bb81969aa1bd8de64", - "reference": "6d83fab89c0ee90dc7706c2bb81969aa1bd8de64", - "shasum": "" - }, - "require": { - "container-interop/container-interop": "~1.0", - "mouf/classname-mapper": "~1.0", - "mouf/mouf-installer": "~2.0", - "mouf/mouf-validators-interface": "~2.0", - "php": ">=5.3.9" - }, - "type": "mouf-framework", - "extra": { - "mouf": { - "doc": [ - { - "title": "Installing Mouf", - "url": "doc/installing_mouf.md" - }, - { - "title": "Getting started with dependency injection", - "url": "doc/dependency_injection.md", - "children": [ - { - "title": "Using Mouf UI to define instances", - "url": "doc/mouf_di_ui.md" - }, - { - "title": "Injection techniques", - "url": "doc/injection_techniques.md" - }, - { - "title": "Supported types", - "url": "doc/supported_types.md" - }, - { - "title": "Injection via PHP code", - "url": "doc/declare_instance_via_php_code.md" - }, - { - "title": "Special annotations", - "url": "doc/mouf_annotations.md" - } - ] - }, - { - "title": "Configuration management", - "url": "doc/configuration_management.md" - }, - { - "title": "Creating a Mouf2 package", - "url": "doc/create_mouf_package.md", - "children": [ - { - "title": "Writing a validator", - "url": "doc/writing_mouf_validator.md", - "children": [ - { - "title": "Legacy validators", - "url": "doc/mouf_legacy_validators.md" - } - ] - }, - { - "title": "Writing an install process", - "url": "doc/install_process.md" - }, - { - "title": "Writing packages documentation", - "url": "doc/writing_packages_documentation.md" - }, - { - "title": "Extending Mouf user interface", - "url": "doc/extending_mouf_ui.md" - }, - { - "title": "Managing instances programmatically", - "url": "doc/managing_instances_programmatically.md" - }, - { - "title": "Utility functions", - "url": "doc/utility_functions.md" - }, - { - "title": "Integrating your package with full-text search", - "url": "doc/full_text_search.md" - }, - { - "title": "Weak instances", - "url": "doc/weak_instances.md" - } - ] - }, - { - "title": "Troubleshooting", - "url": "doc/troubleshooting.md", - "children": [ - { - "title": "Troubleshooting installation", - "url": "doc/troubleshooting_install.md" - } - ] - } - ], - "section": { - "name": "Dependency injection", - "description": "The core of the Mouf framework: the dependency injection module", - "weight": 0 - } - } - }, - "autoload": { - "psr-0": { - "Mouf": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com", - "homepage": "http://mouf-php.com/" - } - ], - "description": "The Mouf PHP framework: an open-source PHP framework providing an easy way to download, install, use and reuse components, with a graphical user interface.", - "homepage": "http://mouf-php.com/", - "keywords": [ - "dependency injection", - "di", - "framework", - "inversion of control", - "ioc", - "mouf" - ], - "time": "2017-05-23T08:42:28+00:00" - }, { "name": "mouf/mouf-installer", "version": "v2.0.0", diff --git a/puli.json b/puli.json index e36d2d6..aa23b1b 100644 --- a/puli.json +++ b/puli.json @@ -1,5 +1,6 @@ { "version": "1.0", + "name": "mouf/mouf", "config": { "bootstrap-file": "vendor/autoload.php", "factory": { @@ -131,10 +132,6 @@ "install-path": "vendor/mouf/javascript.underscore", "installer": "composer" }, - "mouf/mouf": { - "install-path": "vendor/mouf/mouf", - "installer": "composer" - }, "mouf/mouf-installer": { "install-path": "vendor/mouf/mouf-installer", "installer": "composer" From 0e84fe31f3d788d0db0ebd7409bd63884a1394b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Mon, 10 Jul 2017 16:47:47 +0200 Subject: [PATCH 12/19] Replacing Puli with thecodingmachine/discovery --- src/Mouf/MoufManager.php | 54 +++++----------------------------------- 1 file changed, 6 insertions(+), 48 deletions(-) diff --git a/src/Mouf/MoufManager.php b/src/Mouf/MoufManager.php index 4006162..3725420 100755 --- a/src/Mouf/MoufManager.php +++ b/src/Mouf/MoufManager.php @@ -2,7 +2,7 @@ /* * This file is part of the Mouf core package. * -* (c) 2012 David Negrier +* (c) 2012-2017 David Negrier * * For the full copyright and license information, please view the LICENSE.txt * file that was distributed with this source code. @@ -11,19 +11,19 @@ namespace Mouf; +use Interop\Container\ServiceProvider; use Mouf\Composer\ComposerService; use Mouf\Picotainer\Picotainer; use Mouf\Reflection\MoufReflectionProxy; use Mouf\Reflection\MoufReflectionClass; use Interop\Container\ContainerInterface; -use Puli\Discovery\Api\Discovery; +use TheCodingMachine\ServiceProvider\Registry; use TheCodingMachine\Yaco\Compiler; use TheCodingMachine\Yaco\Definition\ConstParameterDefinition; use TheCodingMachine\Yaco\Definition\ObjectDefinition; use TheCodingMachine\Yaco\Definition\ParameterDefinition; use Mouf\Yaco\PhpCodeDefinition; use TheCodingMachine\Yaco\Definition\Reference; -use TheCodingMachine\Yaco\ServiceProvider\ServiceProviderLoader; /** * The class managing object instanciation in the Mouf framework. @@ -106,7 +106,6 @@ public static function initMoufManager() { self::$defaultInstance->compiledContainerName = "Mouf\\GeneratedContainer"; self::$defaultInstance->compiledContainerFile = '../../../../../mouf/no_commit/GeneratedContainer.php'; self::$defaultInstance->cachedModificationTimeFile = '../../../../../mouf/no_commit/modificationTimes.php'; - self::$defaultInstance->puliFactoryClassName = "Puli\\GeneratedPuliFactory"; } } @@ -130,7 +129,6 @@ public static function switchToHidden() { self::$defaultInstance->compiledContainerName = "Mouf\\GeneratedAdminContainer"; self::$defaultInstance->compiledContainerFile = '../../mouf/no_commit/GeneratedAdminContainer.php'; self::$defaultInstance->cachedModificationTimeFile = '../../mouf/no_commit/modificationTimes.php'; - self::$defaultInstance->puliFactoryClassName = "Puli\\GeneratedMoufPuliFactory"; } /** @@ -274,13 +272,6 @@ public static function switchToHidden() { */ private $cachedModificationTimeFile; - /** - * The class name of the Puli factory - * - * @var string - */ - private $puliFactoryClassName; - /** * The instance of the container compiled with Yaco. * @@ -364,7 +355,7 @@ private function writeContainerCachedModification() $cachedModifications = ['moufComponents' => filemtime($componentsFile), 'serviceProviders' => []]; - foreach ($this->discoverServiceProviderBindings() as $serviceProvider) { + foreach (\TheCodingMachine\Discovery\Discovery::getInstance()->get(ServiceProvider::class) as $serviceProvider) { $reflectionClass = new \ReflectionClass($serviceProvider); $cachedModifications['serviceProviders'][$reflectionClass->getFileName()] = filemtime($reflectionClass->getFileName()); } @@ -2324,44 +2315,11 @@ private function defaultCompile() { $this->writeContainerCachedModification(); } - - private $puliDiscovery; - - /** - * Creates a Puli discovery and returns it. - * - * TODO: improve this to be sure that the Puli discovery and puli factory is available in the container at runtime. - * - * @return Discovery - */ - private function getPuliDiscovery() : Discovery - { - if ($this->puliDiscovery === null) { - $factoryClass = $this->puliFactoryClassName; - $factory = new $factoryClass(); - $this->puliDiscovery = $factory->createDiscovery($factory->createRepository()); - } - return $this->puliDiscovery; - } - - public function discoverServiceProviderBindings() : array { - $bindings = $this->getPuliDiscovery()->findBindings('container-interop/service-provider'); - $serviceProviders = []; - - foreach ($bindings as $binding) { - if ($binding instanceof ClassBinding) { - $serviceProviders[] = $binding->getClassName(); - } - } - return $serviceProviders; - } - private function compile(string $className, string $pathToFile) { - $compiler = new Compiler(); + $registry = new Registry([], \TheCodingMachine\Discovery\Discovery::getInstance()); - $serviceProviderLoader = new ServiceProviderLoader($compiler); - $serviceProviderLoader->discoverAndLoad($this->getPuliDiscovery()); + $compiler = new Compiler($registry); foreach ($this->declaredInstances as $instanceName => $descriptor) { if ($this->isInstanceAnonymous($instanceName)) { From 13f1b1c4d6b51fc1847962f1651583d2080d165c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 23 Aug 2018 15:49:39 +0200 Subject: [PATCH 13/19] Implementing first service providers --- .gitignore | 2 +- composer-mouf.json | 20 +- composer-mouf.lock | 3039 +++++++++-------- discovery.json | 3 + mouf/Mouf.php | 40 +- mouf/MoufUI.php | 8 +- puli.json | 487 --- .../Mouf/Controllers/MoufLoginController.php | 22 +- .../ControllersServiceProvider.php | 54 + src/Mouf/MoufManager.php | 7 +- src/mouf_router.php | 21 +- 11 files changed, 1687 insertions(+), 2016 deletions(-) create mode 100644 discovery.json delete mode 100644 puli.json create mode 100644 src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php diff --git a/.gitignore b/.gitignore index 8456abf..cde7fc8 100755 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ moufRunningActions.php .composer !mouf/no_commit/.gitkeep mouf/no_commit/ -.puli/ \ No newline at end of file +.discovery/ \ No newline at end of file diff --git a/composer-mouf.json b/composer-mouf.json index 961f7ea..aa7973c 100644 --- a/composer-mouf.json +++ b/composer-mouf.json @@ -7,14 +7,13 @@ "mouf/html.template.mouftemplate": "~2.0", "mouf/html.template.bootstrap": "2.3.2.*", "mouf/utils.i18n.fine": "~3.0", - "mouf/mvc.splash": "~7.0", "mouf/javascript.jquery.jquery-ui": "~1.10", "mouf/javascript.underscore": "~1.3.3", "mouf/utils.log.errorlog_logger": "~2.0", "mouf/javascript.jquery.jquery-filetree" : "~1.01.0", "mouf/javascript.syntaxhighlighter" : "~3.0.83", "mouf/html.widgets.menu" : "~2.0", - "mouf/security.simplelogincontroller" : "~2.0", + "mouf/security.simplelogincontroller" : "~5.0", "mouf/security.userfiledao" : "~2.0", "mouf/utils.cache.file-cache" : "~2.0", "mouf/utils.common.getvars" : "~2.0", @@ -25,13 +24,22 @@ "mouf/utils.cache.apc-cache": "~2.0", "michelf/php-markdown": "~1.3", "mouf/javascript.jquery.jq-bootstrap-validation": "~1.3.0", - "container-interop/container-interop": "~1.0", + "thecodingmachine/funky": "^1.0", "mouf/javascript.ace": "1.1.3", "nikic/php-parser": "~2.0", - "mouf/security.userservice-splash": "~4.0", + "mouf/security.userservice-splash": "~8.0", "mouf/classname-mapper": "~1.0", - "puli/composer-plugin": "^1.0-beta9@dev", - "puli/cli": "^1.0-beta9@dev" + + "thecodingmachine/splash-router": "^10", + "thecodingmachine/splash-service-provider": "^10", + "mnapoli/simplex": "~0.5", + "zendframework/zend-diactoros": "^1.3", + "zendframework/zend-stratigility": "^3.0", + "thecodingmachine/doctrine-annotations-universal-module": "~1.0", + "thecodingmachine/symfony-cache-universal-module": "~1.0", + "thecodingmachine/stratigility-harmony": "^3.0", + "thecodingmachine/twig-universal-module": "^1.1", + "thecodingmachine/discovery": "^1.0" }, "require-dev": { "phpunit/phpunit": "~5.0" diff --git a/composer-mouf.lock b/composer-mouf.lock index 6f27e82..fe5048b 100644 --- a/composer-mouf.lock +++ b/composer-mouf.lock @@ -4,44 +4,36 @@ "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": "4a3619dd2ae6dffc2bad76b2f47674c6", + "content-hash": "3c8ac157a52bdf6b35199d571a5e7064", "packages": [ { - "name": "composer/ca-bundle", - "version": "1.0.7", + "name": "cache/adapter-common", + "version": "0.3.3", "source": { "type": "git", - "url": "https://github.com/composer/ca-bundle.git", - "reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12" + "url": "https://github.com/php-cache/adapter-common.git", + "reference": "874256105aefaa52b60599ab02858a4575e61095" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/b17e6153cb7f33c7e44eb59578dc12eee5dc8e12", - "reference": "b17e6153cb7f33c7e44eb59578dc12eee5dc8e12", + "url": "https://api.github.com/repos/php-cache/adapter-common/zipball/874256105aefaa52b60599ab02858a4575e61095", + "reference": "874256105aefaa52b60599ab02858a4575e61095", "shasum": "" }, "require": { - "ext-openssl": "*", - "ext-pcre": "*", - "php": "^5.3.2 || ^7.0" + "cache/taggable-cache": "^0.4", + "php": "^5.5 || ^7.0", + "psr/cache": "^1.0", + "psr/log": "^1.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+" + "cache/integration-tests": "^0.10", + "phpunit/phpunit": "^4.0 || ^5.1" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { "psr-4": { - "Composer\\CaBundle\\": "src" + "Cache\\Adapter\\Common\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -50,89 +42,114 @@ ], "authors": [ { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be/" + "name": "Aaron Scherer", + "email": "aequasi@gmail.com", + "homepage": "https://github.com/aequasi" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/nyholm" } ], - "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "description": "Common classes for PSR-6 adapters", + "homepage": "http://www.php-cache.com/en/latest/", "keywords": [ - "cabundle", - "cacert", - "certificate", - "ssl", - "tls" + "cache", + "psr-6", + "tag" ], - "time": "2017-03-06T11:59:08+00:00" + "time": "2016-07-31T18:10:41+00:00" }, { - "name": "container-interop/container-interop", - "version": "1.2.0", + "name": "cache/hierarchical-cache", + "version": "0.3.0", "source": { "type": "git", - "url": "https://github.com/container-interop/container-interop.git", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" + "url": "https://github.com/php-cache/hierarchical-cache.git", + "reference": "783e179acc3c9d47c469513a2380219022bfa0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "url": "https://api.github.com/repos/php-cache/hierarchical-cache/zipball/783e179acc3c9d47c469513a2380219022bfa0bc", + "reference": "783e179acc3c9d47c469513a2380219022bfa0bc", "shasum": "" }, "require": { - "psr/container": "^1.0" + "cache/taggable-cache": "^0.4", + "php": "^5.5 || ^7.0", + "psr/cache": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.1" }, "type": "library", "autoload": { "psr-4": { - "Interop\\Container\\": "src/Interop/Container/" - } + "Cache\\Hierarchy\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "homepage": "https://github.com/container-interop/container-interop", - "time": "2017-02-14T19:40:03+00:00" + "authors": [ + { + "name": "Aaron Scherer", + "email": "aequasi@gmail.com", + "homepage": "https://github.com/aequasi" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/nyholm" + } + ], + "description": "A helper trait and interface to your PSR-6 cache to support hierarchical keys.", + "homepage": "http://www.php-cache.com/en/latest/", + "keywords": [ + "cache", + "hierarchical", + "psr-6", + "tag" + ], + "time": "2016-08-07T14:49:33+00:00" }, { - "name": "filp/whoops", - "version": "2.1.9", + "name": "cache/psr-6-doctrine-bridge", + "version": "2.2.0", "source": { "type": "git", - "url": "https://github.com/filp/whoops.git", - "reference": "b238974e1c7cc1859b0c16ddc1c02ecb70ecc07f" + "url": "https://github.com/php-cache/doctrine-bridge.git", + "reference": "dcdb269a72e8d7c451f749b617c748ead42b78f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/b238974e1c7cc1859b0c16ddc1c02ecb70ecc07f", - "reference": "b238974e1c7cc1859b0c16ddc1c02ecb70ecc07f", + "url": "https://api.github.com/repos/php-cache/doctrine-bridge/zipball/dcdb269a72e8d7c451f749b617c748ead42b78f8", + "reference": "dcdb269a72e8d7c451f749b617c748ead42b78f8", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0", - "psr/log": "^1.0.1" + "doctrine/cache": "^1.3", + "php": "^5.5 || ^7.0", + "psr/cache-implementation": "^1.0" }, "require-dev": { - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "^4.8 || ^5.0", - "symfony/var-dumper": "^2.6 || ^3.0" - }, - "suggest": { - "symfony/var-dumper": "Pretty print complex values better with var-dumper available", - "whoops/soap": "Formats errors as SOAP responses" + "cache/doctrine-adapter": "^0.5", + "mockery/mockery": "^0.9", + "phpunit/phpunit": "^4.0 || ^5.1" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, "autoload": { "psr-4": { - "Whoops\\": "src/Whoops/" - } + "Cache\\Bridge\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -140,88 +157,114 @@ ], "authors": [ { - "name": "Filipe Dobreira", - "homepage": "https://github.com/filp", - "role": "Developer" + "name": "Aaron Scherer", + "email": "aequasi@gmail.com", + "homepage": "https://github.com/aequasi" } ], - "description": "php error handling for cool kids", - "homepage": "https://filp.github.io/whoops/", + "description": "PSR-6 Doctrine bridge", + "homepage": "http://www.php-cache.com/en/latest/", "keywords": [ - "error", - "exception", - "handling", - "library", - "whoops", - "zf2" - ], - "time": "2017-06-03T18:33:07+00:00" + "cache", + "doctrine", + "psr-6" + ], + "time": "2016-08-07T14:49:33+00:00" }, { - "name": "franzl/whoops-middleware", - "version": "0.5.0", + "name": "cache/taggable-cache", + "version": "0.4.3", "source": { "type": "git", - "url": "https://github.com/franzliedke/whoops-middleware.git", - "reference": "b33d0adac275ce3f6a8834a9ffa7b4ff165ba126" + "url": "https://github.com/php-cache/taggable-cache.git", + "reference": "8ae3042edd1ac9546c9eae1020dc2b438ef10742" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/franzliedke/whoops-middleware/zipball/b33d0adac275ce3f6a8834a9ffa7b4ff165ba126", - "reference": "b33d0adac275ce3f6a8834a9ffa7b4ff165ba126", + "url": "https://api.github.com/repos/php-cache/taggable-cache/zipball/8ae3042edd1ac9546c9eae1020dc2b438ef10742", + "reference": "8ae3042edd1ac9546c9eae1020dc2b438ef10742", "shasum": "" }, "require": { - "filp/whoops": "^1.1 || ^2.0", - "zendframework/zend-diactoros": "^1.1.0" + "php": "^5.5 || ^7.0", + "psr/cache": "^1.0" }, "require-dev": { - "http-interop/http-middleware": "^0.4.1", - "phpunit/phpunit": "5.0.*" - }, - "suggest": { - "http-interop/http-middleware": "In case you want to use PSR 15 middleware" + "cache/integration-tests": "^0.11", + "phpunit/phpunit": "^4.0 || ^5.1", + "symfony/cache": "^3.1" }, "type": "library", "autoload": { "psr-4": { - "Franzl\\Middleware\\Whoops\\": "src/" - } + "Cache\\Taggable\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "time": "2017-02-01T11:49:46+00:00" + "authors": [ + { + "name": "Aaron Scherer", + "email": "aequasi@gmail.com", + "homepage": "https://github.com/aequasi" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/nyholm" + } + ], + "description": "Add tag support to your PSR-6 cache implementation", + "homepage": "http://www.php-cache.com/en/latest/", + "keywords": [ + "Taggable", + "cache", + "psr6", + "tag" + ], + "time": "2016-08-08T17:20:09+00:00" }, { - "name": "http-interop/http-middleware", - "version": "0.2.0", + "name": "cache/void-adapter", + "version": "0.3.1", "source": { "type": "git", - "url": "https://github.com/http-interop/http-middleware.git", - "reference": "ff545c87e97bf4d88f0cb7eb3e89f99aaa53d7a9" + "url": "https://github.com/php-cache/void-adapter.git", + "reference": "a946b2e83e6cf8996f01a05811c76869cf11c009" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/http-interop/http-middleware/zipball/ff545c87e97bf4d88f0cb7eb3e89f99aaa53d7a9", - "reference": "ff545c87e97bf4d88f0cb7eb3e89f99aaa53d7a9", + "url": "https://api.github.com/repos/php-cache/void-adapter/zipball/a946b2e83e6cf8996f01a05811c76869cf11c009", + "reference": "a946b2e83e6cf8996f01a05811c76869cf11c009", "shasum": "" }, "require": { - "php": ">=5.3.0", - "psr/http-message": "^1.0" + "cache/adapter-common": "^0.3", + "cache/hierarchical-cache": "^0.3", + "cache/taggable-cache": "^0.4", + "php": "^5.5 || ^7.0", + "psr/cache": "^1.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } + "provide": { + "psr/cache-implementation": "^1.0" + }, + "require-dev": { + "cache/integration-tests": "^0.11", + "phpunit/phpunit": "^4.0 || ^5.1" }, + "type": "library", "autoload": { "psr-4": { - "Interop\\Http\\Middleware\\": "src/" - } + "Cache\\Adapter\\Void\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -229,48 +272,110 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Aaron Scherer", + "email": "aequasi@gmail.com", + "homepage": "https://github.com/aequasi" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/nyholm" } ], - "description": "Common interface for HTTP middleware", + "description": "A PSR-6 cache implementation using Void. This implementation supports tags", + "homepage": "http://www.php-cache.com/en/latest/", "keywords": [ - "factory", - "http", - "middleware", - "psr", - "psr-17", - "psr-7", - "request", - "response" + "cache", + "psr-6", + "tag", + "void" ], - "time": "2016-09-25T13:30:27+00:00" + "time": "2016-08-07T15:04:55+00:00" }, { - "name": "justinrainbow/json-schema", - "version": "1.6.1", + "name": "container-interop/container-interop", + "version": "1.2.0", "source": { "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341" + "url": "https://github.com/container-interop/container-interop.git", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/cc84765fb7317f6b07bd8ac78364747f95b86341", - "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341", + "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", "shasum": "" }, "require": { - "php": ">=5.3.29" + "psr/container": "^1.0" }, - "require-dev": { - "json-schema/json-schema-test-suite": "1.1.0", - "phpdocumentor/phpdocumentor": "~2", - "phpunit/phpunit": "~3.7" + "type": "library", + "autoload": { + "psr-4": { + "Interop\\Container\\": "src/Interop/Container/" + } }, - "bin": [ - "bin/validate-json" + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", + "homepage": "https://github.com/container-interop/container-interop", + "time": "2017-02-14T19:40:03+00:00" + }, + { + "name": "container-interop/service-provider", + "version": "v0.4.0", + "source": { + "type": "git", + "url": "https://github.com/container-interop/service-provider.git", + "reference": "4969b9e49460690b7430b3f1a87cab07be61418a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/container-interop/service-provider/zipball/4969b9e49460690b7430b3f1a87cab07be61418a", + "reference": "4969b9e49460690b7430b3f1a87cab07be61418a", + "shasum": "" + }, + "require": { + "psr/container": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Interop\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], + "description": "Promoting container interoperability through standard service providers", + "homepage": "https://github.com/container-interop/service-provider", + "time": "2017-09-20T14:13:36+00:00" + }, + { + "name": "doctrine/annotations", + "version": "v1.6.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", + "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "php": "^7.1" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "^6.4" + }, "type": "library", "extra": { "branch-alias": { @@ -279,115 +384,145 @@ }, "autoload": { "psr-4": { - "JsonSchema\\": "src/JsonSchema/" + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" + "name": "Roman Borschel", + "email": "roman@code-factory.org" }, { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" }, { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" }, { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" } ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", + "description": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org/", "keywords": [ - "json", - "schema" + "annotations", + "docblock", + "parser" ], - "time": "2016-01-25T15:43:01+00:00" + "time": "2017-12-06T07:11:42+00:00" }, { - "name": "michelf/php-markdown", - "version": "1.7.0", + "name": "doctrine/cache", + "version": "v1.8.0", "source": { "type": "git", - "url": "https://github.com/michelf/php-markdown.git", - "reference": "1f51cc520948f66cd2af8cbc45a5ee175e774220" + "url": "https://github.com/doctrine/cache.git", + "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/michelf/php-markdown/zipball/1f51cc520948f66cd2af8cbc45a5ee175e774220", - "reference": "1f51cc520948f66cd2af8cbc45a5ee175e774220", + "url": "https://api.github.com/repos/doctrine/cache/zipball/d768d58baee9a4862ca783840eca1b9add7a7f57", + "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "~7.1" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "alcaeus/mongo-php-adapter": "^1.1", + "doctrine/coding-standard": "^4.0", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^7.0", + "predis/predis": "~1.0" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" }, "type": "library", "extra": { "branch-alias": { - "dev-lib": "1.4.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { - "psr-0": { - "Michelf": "" + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Michel Fortin", - "email": "michel.fortin@michelf.ca", - "homepage": "https://michelf.ca/", - "role": "Developer" + "name": "Roman Borschel", + "email": "roman@code-factory.org" }, { - "name": "John Gruber", - "homepage": "https://daringfireball.net/" + "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": "PHP Markdown", - "homepage": "https://michelf.ca/projects/php-markdown/", + "description": "Caching library offering an object-oriented API for many cache backends", + "homepage": "https://www.doctrine-project.org/", "keywords": [ - "markdown" + "cache", + "caching" ], - "time": "2016-10-29T18:58:20+00:00" + "time": "2018-08-21T18:01:43+00:00" }, { - "name": "mouf/classname-mapper", + "name": "doctrine/lexer", "version": "v1.0.1", "source": { "type": "git", - "url": "https://github.com/thecodingmachine/classname-mapper.git", - "reference": "2b11a7c83cd3487677f8dbb81fb3363f59bb4b4c" + "url": "https://github.com/doctrine/lexer.git", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/classname-mapper/zipball/2b11a7c83cd3487677f8dbb81fb3363f59bb4b4c", - "reference": "2b11a7c83cd3487677f8dbb81fb3363f59bb4b4c", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", "shasum": "" }, "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0 | ~5.0", - "satooshi/php-coveralls": "~1.0" + "php": ">=5.3.2" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { - "psr-4": { - "Mouf\\Composer\\": "src/" + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" } }, "notification-url": "https://packagist.org/downloads/", @@ -396,77 +531,329 @@ ], "authors": [ { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com", - "homepage": "http://mouf-php.com/" + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" } ], - "description": "Provides a way to find in which PHP files a class will be looked upon.", - "homepage": "http://mouf-php.com/packages/thecodingmachine/classname-mapper", + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org/", "keywords": [ - "autoload", - "composer" + "lexer", + "parser" ], - "time": "2017-05-22T07:47:00+00:00" + "time": "2014-09-09T13:34:57+00:00" }, { - "name": "mouf/famfamfam", - "version": "v1.3.0", + "name": "fig/http-message-util", + "version": "1.1.2", "source": { "type": "git", - "url": "https://github.com/moufmouf/famfamfam.git", - "reference": "438cac30bdaa0718a04f1ffdf0c078e2d195403f" + "url": "https://github.com/php-fig/http-message-util.git", + "reference": "20b2c280cb6914b7b83089720df44e490f4b42f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/moufmouf/famfamfam/zipball/438cac30bdaa0718a04f1ffdf0c078e2d195403f", - "reference": "438cac30bdaa0718a04f1ffdf0c078e2d195403f", + "url": "https://api.github.com/repos/php-fig/http-message-util/zipball/20b2c280cb6914b7b83089720df44e490f4b42f0", + "reference": "20b2c280cb6914b7b83089720df44e490f4b42f0", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^5.3 || ^7.0", + "psr/http-message": "^1.0" }, "type": "library", "extra": { - "mouf": { - "logo": "logo.png" + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Fig\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Creative Commons Attribution 2.5 License" + "MIT" ], "authors": [ { - "name": "Mark James", - "homepage": "http://www.famfamfam.com/" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "This is the Famfamfam silk icon set, wrapped into an easy to use PHP composer package.", - "homepage": "http://www.famfamfam.com/", + "description": "Utility classes and constants for use with PSR-7 (psr/http-message)", "keywords": [ - "famfamfam", - "icons", - "silk" + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" ], - "time": "2014-06-03T20:29:43+00:00" + "time": "2017-02-09T16:10:21+00:00" }, { - "name": "mouf/html.htmlelement", - "version": "v2.0.0", + "name": "http-interop/http-middleware", + "version": "0.4.1", "source": { "type": "git", - "url": "https://github.com/thecodingmachine/html.html_element.git", - "reference": "c8272bf308894c0843e7eeaae30746f3f05464f9" + "url": "https://github.com/http-interop/http-middleware.git", + "reference": "9a801fe60e70d5d608b61d56b2dcde29516c81b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/html.html_element/zipball/c8272bf308894c0843e7eeaae30746f3f05464f9", - "reference": "c8272bf308894c0843e7eeaae30746f3f05464f9", + "url": "https://api.github.com/repos/http-interop/http-middleware/zipball/9a801fe60e70d5d608b61d56b2dcde29516c81b9", + "reference": "9a801fe60e70d5d608b61d56b2dcde29516c81b9", "shasum": "" }, "require": { - "mouf/utils.action.action-interface": "~1.0", + "php": ">=5.3.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Interop\\Http\\ServerMiddleware\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP server-side middleware", + "keywords": [ + "factory", + "http", + "middleware", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "abandoned": "http-interop/http-server-middleware", + "time": "2017-01-14T15:23:42+00:00" + }, + { + "name": "michelf/php-markdown", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/michelf/php-markdown.git", + "reference": "01ab082b355bf188d907b9929cd99b2923053495" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/michelf/php-markdown/zipball/01ab082b355bf188d907b9929cd99b2923053495", + "reference": "01ab082b355bf188d907b9929cd99b2923053495", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Michelf\\": "Michelf/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Michel Fortin", + "email": "michel.fortin@michelf.ca", + "homepage": "https://michelf.ca/", + "role": "Developer" + }, + { + "name": "John Gruber", + "homepage": "https://daringfireball.net/" + } + ], + "description": "PHP Markdown", + "homepage": "https://michelf.ca/projects/php-markdown/", + "keywords": [ + "markdown" + ], + "time": "2018-01-15T00:49:33+00:00" + }, + { + "name": "mnapoli/simplex", + "version": "0.5.0", + "source": { + "type": "git", + "url": "https://github.com/mnapoli/simplex.git", + "reference": "cdc81c738262739f4f35e911f6888da9ee59016b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mnapoli/simplex/zipball/cdc81c738262739f4f35e911f6888da9ee59016b", + "reference": "cdc81c738262739f4f35e911f6888da9ee59016b", + "shasum": "" + }, + "require": { + "container-interop/service-provider": "~0.4.0", + "php": ">=5.3.0", + "psr/container": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Simplex\\": "src/Simplex" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Matthieu Napoli", + "email": "matthieu@mnapoli.fr" + } + ], + "description": "Pimple fork with full container-interop support", + "homepage": "https://github.com/mnapoli/simplex", + "keywords": [ + "container", + "dependency injection" + ], + "time": "2018-02-13T08:14:36+00:00" + }, + { + "name": "mouf/classname-mapper", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/classname-mapper.git", + "reference": "2b11a7c83cd3487677f8dbb81fb3363f59bb4b4c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/classname-mapper/zipball/2b11a7c83cd3487677f8dbb81fb3363f59bb4b4c", + "reference": "2b11a7c83cd3487677f8dbb81fb3363f59bb4b4c", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0 | ~5.0", + "satooshi/php-coveralls": "~1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Mouf\\Composer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David Négrier", + "email": "d.negrier@thecodingmachine.com", + "homepage": "http://mouf-php.com/" + } + ], + "description": "Provides a way to find in which PHP files a class will be looked upon.", + "homepage": "http://mouf-php.com/packages/thecodingmachine/classname-mapper", + "keywords": [ + "autoload", + "composer" + ], + "time": "2017-05-22T07:47:00+00:00" + }, + { + "name": "mouf/famfamfam", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/moufmouf/famfamfam.git", + "reference": "438cac30bdaa0718a04f1ffdf0c078e2d195403f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/moufmouf/famfamfam/zipball/438cac30bdaa0718a04f1ffdf0c078e2d195403f", + "reference": "438cac30bdaa0718a04f1ffdf0c078e2d195403f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "mouf": { + "logo": "logo.png" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Creative Commons Attribution 2.5 License" + ], + "authors": [ + { + "name": "Mark James", + "homepage": "http://www.famfamfam.com/" + } + ], + "description": "This is the Famfamfam silk icon set, wrapped into an easy to use PHP composer package.", + "homepage": "http://www.famfamfam.com/", + "keywords": [ + "famfamfam", + "icons", + "silk" + ], + "time": "2014-06-03T20:29:43+00:00" + }, + { + "name": "mouf/html.htmlelement", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/html.html_element.git", + "reference": "86b7b3f9fc9d9a823a708e3190e5aa9b3ce95a56" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/html.html_element/zipball/86b7b3f9fc9d9a823a708e3190e5aa9b3ce95a56", + "reference": "86b7b3f9fc9d9a823a708e3190e5aa9b3ce95a56", + "shasum": "" + }, + "require": { + "mouf/utils.action.action-interface": "~1.0", "mouf/utils.value.value-interface": "~1.0", "php": ">=5.3.0" }, @@ -500,20 +887,20 @@ "interface", "tohtml" ], - "time": "2014-06-03T20:28:43+00:00" + "time": "2018-08-22T21:07:53+00:00" }, { "name": "mouf/html.renderer", - "version": "v1.1.4", + "version": "v1.2.1", "source": { "type": "git", "url": "https://github.com/thecodingmachine/html.renderer.git", - "reference": "2370d4464f0de0d4c91d67c5d09f779b344d7fd0" + "reference": "1bba9f6307285eb48cf91f8fdc51bde77729c8ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/html.renderer/zipball/2370d4464f0de0d4c91d67c5d09f779b344d7fd0", - "reference": "2370d4464f0de0d4c91d67c5d09f779b344d7fd0", + "url": "https://api.github.com/repos/thecodingmachine/html.renderer/zipball/1bba9f6307285eb48cf91f8fdc51bde77729c8ad", + "reference": "1bba9f6307285eb48cf91f8fdc51bde77729c8ad", "shasum": "" }, "require": { @@ -522,7 +909,7 @@ "mouf/utils.cache.apc-cache": "~2.0", "mouf/utils.cache.in-memory-cache": "~1.0", "php": ">=5.4.4", - "twig/twig": "1.*@stable" + "twig/twig": "^1 || ^2" }, "type": "mouf-library", "extra": { @@ -578,29 +965,29 @@ "render", "tohtml" ], - "time": "2015-10-14T08:39:26+00:00" + "time": "2018-08-07T09:26:08+00:00" }, { "name": "mouf/html.renderer.twig-extensions", - "version": "v1.0.11", + "version": "1.2.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/html.renderer.twig-extensions.git", - "reference": "c0acae7e464adeeeefc80133a86959d6d784c67f" + "reference": "330369b64f5449fcc6e09658aa4022dee4c18899" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/html.renderer.twig-extensions/zipball/c0acae7e464adeeeefc80133a86959d6d784c67f", - "reference": "c0acae7e464adeeeefc80133a86959d6d784c67f", + "url": "https://api.github.com/repos/thecodingmachine/html.renderer.twig-extensions/zipball/330369b64f5449fcc6e09658aa4022dee4c18899", + "reference": "330369b64f5449fcc6e09658aa4022dee4c18899", "shasum": "" }, "require": { "container-interop/container-interop": "~1.0", "mouf/html.htmlelement": "~2.0", - "mouf/utils.cache.cache-interface": "~2.0", + "mouf/utils.cache.purge-ui": "^1", "mouf/utils.constants.debug": "~1.0", "php": ">=5.4.0", - "twig/twig": "~1.19" + "twig/twig": "~1.19 | ^2" }, "type": "mouf-library", "extra": { @@ -644,7 +1031,7 @@ "render", "tohtml" ], - "time": "2016-04-04T16:24:06+00:00" + "time": "2018-08-16T21:23:09+00:00" }, { "name": "mouf/html.template.bootstrap", @@ -1462,26 +1849,26 @@ }, { "name": "mouf/mouf-installer", - "version": "v2.0.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/thecodingmachine/mouf-installer.git", - "reference": "75cd4295a831b32aabea0b2bb6f4925da6b6e198" + "reference": "cb8268c2fe56c68cdb16c6d90211afa5eec3d82f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/mouf-installer/zipball/75cd4295a831b32aabea0b2bb6f4925da6b6e198", - "reference": "75cd4295a831b32aabea0b2bb6f4925da6b6e198", + "url": "https://api.github.com/repos/thecodingmachine/mouf-installer/zipball/cb8268c2fe56c68cdb16c6d90211afa5eec3d82f", + "reference": "cb8268c2fe56c68cdb16c6d90211afa5eec3d82f", "shasum": "" }, "require": { + "composer-plugin-api": "^1", "php": ">=5.3.0" }, - "type": "composer-installer", + "type": "composer-plugin", "extra": { "class": [ - "Mouf\\Installer\\MoufLibraryInstaller", - "Mouf\\Installer\\MoufFrameworkInstaller" + "Mouf\\Installer\\MoufPlugin" ] }, "autoload": { @@ -1506,7 +1893,7 @@ "install", "mouf" ], - "time": "2014-06-03T20:47:09+00:00" + "time": "2018-08-02T10:21:08+00:00" }, { "name": "mouf/mouf-validators-interface", @@ -1551,67 +1938,91 @@ "time": "2013-10-29T18:21:58+00:00" }, { - "name": "mouf/mvc.splash", - "version": "v7.0.3", + "name": "mouf/mvc.splash-common", + "version": "v8.3.0", "source": { "type": "git", - "url": "https://github.com/thecodingmachine/mvc.splash.git", - "reference": "af1702295d2cae3a52f39652463b725258b6f0bd" + "url": "https://github.com/thecodingmachine/mvc.splash-common.git", + "reference": "cf7e63501faecca66eedaa127f2c38fad006adf5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/mvc.splash/zipball/af1702295d2cae3a52f39652463b725258b6f0bd", - "reference": "af1702295d2cae3a52f39652463b725258b6f0bd", + "url": "https://api.github.com/repos/thecodingmachine/mvc.splash-common/zipball/cf7e63501faecca66eedaa127f2c38fad006adf5", + "reference": "cf7e63501faecca66eedaa127f2c38fad006adf5", "shasum": "" }, "require": { - "franzl/whoops-middleware": "~0.3", - "mouf/html.template.bootstrap": ">=2.1, <5.0", - "mouf/mouf": ">=2.0.2, <3.0", - "mouf/mouf-validators-interface": "~2.0", - "mouf/mvc.splash-common": "~7.0", - "mouf/utils.cache.apc-cache": "~2.1", - "mouf/utils.cache.file-cache": "~2.1", - "mouf/utils.cache.no-cache": "2.0.*", - "mouf/utils.constants.debug": "~1.0", - "mouf/utils.constants.secret": "~1.0", - "mouf/utils.value.common-value": "~1.0", - "php": ">=5.3.0", - "psr/log": "~1.0" + "cache/void-adapter": "^0.3.0", + "container-interop/service-provider": "^0.4", + "doctrine/annotations": "^1.2", + "http-interop/http-middleware": "^0.4", + "mouf/html.htmlelement": "^2.0", + "mouf/html.renderer.twig-extensions": "~1.0", + "mouf/html.template.templateinterface": "^2.1", + "mouf/utils.action.common-action": "~1.0", + "mouf/utils.cache.cache-interface": "~2.0", + "mouf/utils.common.conditioninterface": "~2.0", + "mouf/utils.common.url-interface": "~1.0", + "php": ">=7.0", + "psr/cache": "^1.0", + "thecodingmachine/common-factories": "^0.4", + "thecodingmachine/middleware-list-universal-module": "~1.0", + "zendframework/zend-diactoros": "~1.0" }, - "provide": { - "mouf/mvc.splash-implementation": "7.0.*" + "conflict": { + "zendframework/zend-stratigility": "<2.0" + }, + "require-dev": { + "cache/array-adapter": "^0.4.0", + "mnapoli/simplex": "^0.3", + "mouf/picotainer": "~1.0", + "phpunit/phpunit": "^5.0", + "satooshi/php-coveralls": "^1.0" }, "type": "mouf-library", "extra": { "mouf": { - "install": [ - { - "scope": "global", - "description": "Create RootController and root view.", - "type": "url", - "url": "splash7install/" - }, - { - "scope": "global", - "description": "Write .htaccess file.", - "type": "url", - "url": "splash7install/writeHtAccess" - } - ], - "logo": "logo.png", + "logo": "doc/images/logo.png", "doc": [ { "title": "Installing Splash", - "url": "doc/install.md" + "url": "doc/install/index.md", + "children": [ + { + "title": "Standalone mode", + "url": "doc/install/standalone.md" + }, + { + "title": "Mouf integration", + "url": "doc/install/mouf.md" + }, + { + "title": "Service provider", + "url": "doc/service-provider.md" + } + ] }, { "title": "Writing controllers", - "url": "doc/writing_controllers.md" + "url": "doc/writing_controllers_manually.md" }, { - "title": "Writing controllers, manually", - "url": "doc/writing_controllers_manually.md" + "title": "Integrations", + "children": [ + { + "title": "Mouf", + "children": [ + { + "title": "Controller creation wizard", + "url": "doc/mouf/writing_controllers.md" + }, + { + "title": "Advanced: configuring routing", + "url": "doc/url_routing.md" + } + ] + } + ] }, { "title": "Managing URL parameters", @@ -1622,26 +2033,21 @@ "url": "doc/filters.md" }, { - "title": "Advanced: configuring routing", - "url": "doc/url_routing.md" - }, - { - "title": "Migrating from Splash 4", + "title": "Migrating from older version", "url": "doc/migrating.md" } ], - "require-admin": [ - "src/SplashAdmin.php", - "src/Mouf/Mvc/Splash/SplashGenerateService.php", - "src/Mouf/Mvc/Splash/Controllers/Admin/SplashPurgeCacheController.php", - "src/Mouf/Mvc/Splash/Controllers/Admin/SplashAdminApacheConfigureController.php", - "src/Mouf/Mvc/Splash/Controllers/Admin/SplashInstallController.php" - ] + "section": { + "name": "MVC", + "description": "All the tools you need to route requests and display pages", + "weight": 10 + } } }, "autoload": { - "psr-0": { - "Mouf\\Mvc\\Splash": "src/" + "psr-4": { + "Mouf\\Annotations\\": "src/Mouf/Annotations", + "Mouf\\Mvc\\Splash\\": "src/Mouf/Mvc/Splash" } }, "notification-url": "https://packagist.org/downloads/", @@ -1655,104 +2061,58 @@ "homepage": "http://mouf-php.com/" } ], - "description": "An MVC framework deeply integrated with Mouf.", - "homepage": "http://mouf-php.com/packages/mouf/mvc.splash/", + "description": "Splash is a PHP router. It takes an HTTP request and dispatches it to the appropriate controller.", + "homepage": "http://mouf-php.com/packages/mouf/mvc.splash-common", "keywords": [ "framework", "mouf", "mvc", - "splash" + "splash", + "splash-common" ], - "time": "2017-03-02T11:29:21+00:00" + "time": "2018-03-01T14:22:20+00:00" }, { - "name": "mouf/mvc.splash-common", - "version": "v7.0.3", + "name": "mouf/security.simplelogincontroller", + "version": "5.0.x-dev", "source": { "type": "git", - "url": "https://github.com/thecodingmachine/mvc.splash-common.git", - "reference": "3c4359eeda2e5d5576a348c9647d9e5733152f54" + "url": "https://github.com/thecodingmachine/security.simplelogincontroller.git", + "reference": "c4d0600bef6089add7bf1c2223b3a7cc547fb657" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/mvc.splash-common/zipball/3c4359eeda2e5d5576a348c9647d9e5733152f54", - "reference": "3c4359eeda2e5d5576a348c9647d9e5733152f54", + "url": "https://api.github.com/repos/thecodingmachine/security.simplelogincontroller/zipball/c4d0600bef6089add7bf1c2223b3a7cc547fb657", + "reference": "c4d0600bef6089add7bf1c2223b3a7cc547fb657", "shasum": "" }, "require": { - "mouf/html.htmlelement": "2.*", - "mouf/html.renderer.twig-extensions": "~1.0", - "mouf/mouf": ">=2.0.2, <3.0", - "mouf/mvc.splash-implementation": "~7.0", - "mouf/utils.action.common-action": "~1.0", - "mouf/utils.cache.apc-cache": "~2.1", - "mouf/utils.cache.cache-interface": "~2.0", - "mouf/utils.cache.file-cache": "~2.1", - "mouf/utils.common.conditioninterface": "~2.0", - "mouf/utils.common.url-interface": "~1.0", - "php": ">=5.3.0", - "zendframework/zend-diactoros": "~1.0", - "zendframework/zend-stratigility": "~1.0" + "mouf/mvc.splash-common": "^8.0.0", + "mouf/security.userservice": "^2.1.0", + "mouf/security.userservice-splash": "^8.0.0", + "mouf/utils.action.action-interface": "~1.0", + "php": "^7.0.0" }, "type": "mouf-library", "extra": { "mouf": { - "require-admin": [ - "src/SplashCommonAdmin.php" + "install": [ + { + "type": "class", + "class": "Mouf\\Security\\SimpleLoginInstaller" + } + ], + "doc": [ + { + "title": "Intergrate the UserService.RememberMe feature", + "url": "doc/integrate_remember_me.md" + } ] } }, "autoload": { - "psr-0": { - "Mouf\\Annotations": "src/", - "Mouf\\Mvc\\Splash": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com", - "homepage": "http://mouf-php.com/" - } - ], - "description": "The Core part of Splash (an MVC framework). It is used by Splash itself, but also by Drusplash (the Splash wrapper for Drupal)", - "homepage": "https://github.com/thecodingmachine/mvc.splash-common", - "keywords": [ - "framework", - "mouf", - "mvc", - "splash", - "splash-common" - ], - "time": "2017-03-02T11:30:49+00:00" - }, - { - "name": "mouf/security.simplelogincontroller", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/thecodingmachine/security.simplelogincontroller.git", - "reference": "3a1c779aa5d492bcec0d33a05609d58f0af30b92" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/security.simplelogincontroller/zipball/3a1c779aa5d492bcec0d33a05609d58f0af30b92", - "reference": "3a1c779aa5d492bcec0d33a05609d58f0af30b92", - "shasum": "" - }, - "require": { - "mouf/security.userservice": "2.*", - "mouf/utils.common.getvars": "2.*", - "php": ">=5.3.0" - }, - "type": "mouf-library", - "autoload": { - "psr-0": { - "Mouf": "src/" + "psr-4": { + "Mouf\\Security\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1773,7 +2133,7 @@ "mouf", "security" ], - "time": "2014-06-03T20:30:24+00:00" + "time": "2016-09-13T10:04:51+00:00" }, { "name": "mouf/security.userfiledao", @@ -1822,16 +2182,16 @@ }, { "name": "mouf/security.userservice", - "version": "v2.0.0", + "version": "2.1.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/security.userservice.git", - "reference": "ac2739f414689349ea008f9c173723bb832c8861" + "reference": "8915c4703296cf09943f63805d4c1d494872e6de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/security.userservice/zipball/ac2739f414689349ea008f9c173723bb832c8861", - "reference": "ac2739f414689349ea008f9c173723bb832c8861", + "url": "https://api.github.com/repos/thecodingmachine/security.userservice/zipball/8915c4703296cf09943f63805d4c1d494872e6de", + "reference": "8915c4703296cf09943f63805d4c1d494872e6de", "shasum": "" }, "require": { @@ -1868,6 +2228,10 @@ { "title": "UserService - Quick Example", "url": "doc/userservicesample.md" + }, + { + "title": "UserService - 'Remember Me' feature", + "url": "doc/remember_me.md" } ], "logo": "logo.png" @@ -1896,31 +2260,41 @@ "security", "user" ], - "time": "2014-06-04T16:08:19+00:00" + "time": "2016-07-06T09:32:57+00:00" }, { "name": "mouf/security.userservice-splash", - "version": "v4.0.1", + "version": "v8.0.1", "source": { "type": "git", "url": "https://github.com/thecodingmachine/security.userservice-splash.git", - "reference": "a38b77cb4b0aed8697d0945c683486aedb373bb3" + "reference": "4dacf48fcba71958e7cea1a06b2d958962ae26e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/security.userservice-splash/zipball/a38b77cb4b0aed8697d0945c683486aedb373bb3", - "reference": "a38b77cb4b0aed8697d0945c683486aedb373bb3", + "url": "https://api.github.com/repos/thecodingmachine/security.userservice-splash/zipball/4dacf48fcba71958e7cea1a06b2d958962ae26e9", + "reference": "4dacf48fcba71958e7cea1a06b2d958962ae26e9", "shasum": "" }, "require": { - "mouf/mvc.splash-common": ">=4.0,< 6.0 | 7.*", - "mouf/security.userservice": "2.*", - "php": ">=5.3.0" + "mouf/mvc.splash-common": "^8.0.0", + "mouf/security.userservice": "^2.1.0", + "php": ">=7.0.0" }, "type": "library", + "extra": { + "mouf": { + "install": [ + { + "type": "class", + "class": "Mouf\\Security\\UnauthorizedMiddlewareInstaller" + } + ] + } + }, "autoload": { - "psr-0": { - "Mouf": "src/" + "psr-4": { + "Mouf\\Security\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1942,7 +2316,7 @@ "splash", "user" ], - "time": "2015-07-26T07:45:28+00:00" + "time": "2018-07-25T12:49:49+00:00" }, { "name": "mouf/utils.action.action-interface", @@ -2098,28 +2472,26 @@ }, { "name": "mouf/utils.cache.cache-interface", - "version": "v2.0.1", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/thecodingmachine/utils.cache.cache-interface.git", - "reference": "109685126f5759a6376e113c4bf13fd625091243" + "reference": "20de258be5200eeae96696c09ab1a510dda1d104" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/utils.cache.cache-interface/zipball/109685126f5759a6376e113c4bf13fd625091243", - "reference": "109685126f5759a6376e113c4bf13fd625091243", + "url": "https://api.github.com/repos/thecodingmachine/utils.cache.cache-interface/zipball/20de258be5200eeae96696c09ab1a510dda1d104", + "reference": "20de258be5200eeae96696c09ab1a510dda1d104", "shasum": "" }, "require": { - "mouf/utils.composite-exception": "~1.0", + "mouf/utils.cache.purge-ui": "^1", + "mouf/utils.composite-exception": "^1", "php": ">=5.3.0" }, "type": "mouf-library", "extra": { "mouf": { - "require-admin": [ - "CacheAdmin.php" - ], "logo": "logo.png" } }, @@ -2146,7 +2518,7 @@ "interface", "mouf" ], - "time": "2015-09-08T16:07:35+00:00" + "time": "2018-06-20T09:45:40+00:00" }, { "name": "mouf/utils.cache.file-cache", @@ -2250,39 +2622,41 @@ "time": "2015-07-10T13:31:07+00:00" }, { - "name": "mouf/utils.cache.no-cache", - "version": "v2.0.0", + "name": "mouf/utils.cache.purge-ui", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/thecodingmachine/utils.cache.no-cache.git", - "reference": "bf1758eaea3289b9c3070009ed04dc10b7c129ab" + "url": "https://github.com/thecodingmachine/utils.cache.purge-ui.git", + "reference": "7ea15f6bebbbe7b5f7bc91999d3cbf413e7d1887" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/utils.cache.no-cache/zipball/bf1758eaea3289b9c3070009ed04dc10b7c129ab", - "reference": "bf1758eaea3289b9c3070009ed04dc10b7c129ab", + "url": "https://api.github.com/repos/thecodingmachine/utils.cache.purge-ui/zipball/7ea15f6bebbbe7b5f7bc91999d3cbf413e7d1887", + "reference": "7ea15f6bebbbe7b5f7bc91999d3cbf413e7d1887", "shasum": "" }, "require": { - "mouf/utils.cache.cache-interface": "2.*", - "mouf/utils.log.log_interface": "2.*", - "php": ">=5.3.0" + "mouf/utils.composite-exception": "~1.0", + "php": ">=5.5" + }, + "require-dev": { + "doctrine/cache": "^1.4", + "mouf/utils.cache.cache-interface": "^2", + "psr/cache": "^1.0", + "psr/simple-cache": "^1.0" }, "type": "mouf-library", "extra": { "mouf": { - "install": [ - { - "type": "file", - "file": "src/install.php" - } + "require-admin": [ + "CacheAdmin.php" ], "logo": "logo.png" } }, "autoload": { - "psr-0": { - "Mouf": "src/" + "psr-4": { + "Mouf\\Utils\\Cache\\Purge\\": "src/Mouf/Utils/Cache/Purge" } }, "notification-url": "https://packagist.org/downloads/", @@ -2296,14 +2670,16 @@ "homepage": "http://mouf-php.com/" } ], - "description": "This package contains a cache mechanism that... does not cache anything. This is useful if another component requires a cache mechanism and if you don't want to provide any (for development purpose...).", - "homepage": "https://github.com/thecodingmachine/utils.cache.no-cache", + "description": "This package contains a user interface that will add a 'Purge cache' button to Mouf, allowing you to purge any PSR-6, PSR-16, Doctrine and Mouf cache easily.", + "homepage": "https://github.com/thecodingmachine/utils.cache.purge-ui", "keywords": [ "cache", + "doctrine", "mouf", - "nocache" + "psr-16", + "psr-6" ], - "time": "2013-03-19T22:09:31+00:00" + "time": "2018-06-20T09:38:21+00:00" }, { "name": "mouf/utils.common.conditioninterface", @@ -2442,7 +2818,7 @@ }, { "name": "mouf/utils.composite-exception", - "version": "1.0.x-dev", + "version": "v1.0.0", "source": { "type": "git", "url": "https://github.com/thecodingmachine/utils.composite-exception.git", @@ -2583,16 +2959,16 @@ }, { "name": "mouf/utils.i18n.fine", - "version": "v3.0.2", + "version": "v3.0.4", "source": { "type": "git", "url": "https://github.com/thecodingmachine/utils.i18n.fine.git", - "reference": "43a9661ceb0fb128eb03d2d23ca9dca7e7ce5129" + "reference": "69c165497bc5c202892fdc8022591eddbb8e0e3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/utils.i18n.fine/zipball/43a9661ceb0fb128eb03d2d23ca9dca7e7ce5129", - "reference": "43a9661ceb0fb128eb03d2d23ca9dca7e7ce5129", + "url": "https://api.github.com/repos/thecodingmachine/utils.i18n.fine/zipball/69c165497bc5c202892fdc8022591eddbb8e0e3b", + "reference": "69c165497bc5c202892fdc8022591eddbb8e0e3b", "shasum": "" }, "require": { @@ -2654,7 +3030,7 @@ "homepage": "http://mouf-php.com/" }, { - "name": "Marc TEYSSIER", + "name": "Marc Teyssier", "email": "m.teyssier@thecodingmachine.com", "homepage": "http://mouf-php.com/" } @@ -2667,7 +3043,7 @@ "internationalisation", "mouf" ], - "time": "2015-04-15T07:21:29+00:00" + "time": "2017-08-04T10:52:04+00:00" }, { "name": "mouf/utils.log.errorlog_logger", @@ -2889,57 +3265,6 @@ ], "time": "2015-08-10T14:03:37+00:00" }, - { - "name": "mouf/utils.value.common-value", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/thecodingmachine/mouf-utils.value.common-value.git", - "reference": "c989693980176722ead0134791fdf28e9f8ff0be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/mouf-utils.value.common-value/zipball/c989693980176722ead0134791fdf28e9f8ff0be", - "reference": "c989693980176722ead0134791fdf28e9f8ff0be", - "shasum": "" - }, - "require": { - "mouf/utils.common.conditioninterface": "~2.0", - "mouf/utils.value.value-interface": "~1.0", - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "mouf": { - "logo": "logo.png" - } - }, - "autoload": { - "psr-0": { - "Mouf\\Utils\\Action": "src/", - "Mouf\\Utils\\Common": "src/", - "Mouf\\Utils\\Value": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com", - "homepage": "http://mouf-php.com/" - } - ], - "description": "This package contains common classes that implement the ValueInterface interface (from the mouf/utils.value.value-interface package).", - "homepage": "https://mouf-php.com/mouf/utils.value.common-value", - "keywords": [ - "mouf", - "valueinterface" - ], - "time": "2016-02-26T13:50:11+00:00" - }, { "name": "mouf/utils.value.value-interface", "version": "v1.0.0", @@ -3040,172 +3365,50 @@ "time": "2016-09-16T12:04:44+00:00" }, { - "name": "padraic/humbug_get_contents", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/humbug/file_get_contents.git", - "reference": "6e6c47af83cb98c610f4ba7d06ee809ad59ede1b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/humbug/file_get_contents/zipball/6e6c47af83cb98c610f4ba7d06ee809ad59ede1b", - "reference": "6e6c47af83cb98c610f4ba7d06ee809ad59ede1b", - "shasum": "" - }, - "require": { - "composer/ca-bundle": "^1.0", - "ext-openssl": "*", - "php": "^5.3 || ^7.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.1", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": false - }, - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "Humbug\\": "src/" - }, - "files": [ - "src/function.php", - "src/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com/" - }, - { - "name": "Théo Fidry", - "email": "theo.fidry@gmail.com" - } - ], - "description": "Secure wrapper for accessing HTTPS resources with file_get_contents for PHP 5.3+", - "homepage": "https://github.com/padraic/file_get_contents", - "keywords": [ - "download", - "file_get_contents", - "http", - "https", - "ssl", - "tls" - ], - "time": "2017-07-10T10:32:34+00:00" - }, - { - "name": "padraic/phar-updater", - "version": "1.0.3", + "name": "psr/cache", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/humbug/phar-updater.git", - "reference": "c17eeb3887dc4269d1b4837dc875d39e9f8149a8" + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/humbug/phar-updater/zipball/c17eeb3887dc4269d1b4837dc875d39e9f8149a8", - "reference": "c17eeb3887dc4269d1b4837dc875d39e9f8149a8", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", "shasum": "" }, "require": { - "padraic/humbug_get_contents": "^1.0", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" + "php": ">=5.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "Humbug\\SelfUpdate\\": "src/" + "Psr\\Cache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Padraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com/" - } - ], - "description": "A thing to make PHAR self-updating easy and secure.", - "keywords": [ - "humbug", - "phar", - "self-update", - "update" - ], - "time": "2016-01-05T23:08:01+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/" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "description": "Common interface for caching libraries", "keywords": [ - "csprng", - "pseudorandom", - "random" + "cache", + "psr", + "psr-6" ], - "time": "2017-03-13T16:27:32+00:00" + "time": "2016-08-06T20:24:11+00:00" }, { "name": "psr/container", @@ -3307,336 +3510,32 @@ "time": "2016-08-06T14:39:51+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": "puli/cli", - "version": "1.0.0-beta10", - "source": { - "type": "git", - "url": "https://github.com/puli/cli.git", - "reference": "14368a347a6c8bc045cd94e331fc23560b867003" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/puli/cli/zipball/14368a347a6c8bc045cd94e331fc23560b867003", - "reference": "14368a347a6c8bc045cd94e331fc23560b867003", - "shasum": "" - }, - "require": { - "padraic/phar-updater": "^1.0.1", - "php": "^5.3.9|^7.0", - "puli/discovery": "^1.0-beta9", - "puli/manager": "^1.0-beta10", - "puli/repository": "^1.0-beta9", - "puli/url-generator": "^1.0-beta4", - "webmozart/console": "^1.0-beta4", - "webmozart/expression": "^1.0", - "webmozart/glob": "^4.0", - "webmozart/json": "^1.2.2", - "webmozart/path-util": "^2.2.2" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1", - "symfony/filesystem": "^2.3|^3.0" - }, - "bin": [ - "bin/puli" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Puli\\Cli\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "A Command Line Interface (CLI) for managing Puli projects.", - "homepage": "http://puli.io/", - "time": "2016-01-14T12:24:35+00:00" - }, - { - "name": "puli/composer-plugin", - "version": "1.0.0-beta10", - "source": { - "type": "git", - "url": "https://github.com/puli/composer-plugin.git", - "reference": "89f1d4df4cc24dc8025e3afb98b5fab0bd2df831" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/puli/composer-plugin/zipball/89f1d4df4cc24dc8025e3afb98b5fab0bd2df831", - "reference": "89f1d4df4cc24dc8025e3afb98b5fab0bd2df831", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0", - "php": "^5.3.9|^7.0", - "puli/discovery": "^1.0-beta9", - "puli/repository": "^1.0-beta9", - "puli/url-generator": "^1.0-beta4", - "symfony/filesystem": "^2.3|^3.0", - "symfony/process": "^2.3|^3.0", - "webmozart/assert": "^1.0", - "webmozart/json": "^1.2.2", - "webmozart/path-util": "^2.2" - }, - "require-dev": { - "composer/composer": "^1.0-alpha10", - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1", - "webmozart/glob": "^4.0" - }, - "type": "composer-plugin", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - }, - "class": "Puli\\ComposerPlugin\\PuliPlugin" - }, - "autoload": { - "psr-4": { - "Puli\\ComposerPlugin\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Integrates Composer into the Puli package manager.", - "homepage": "http://puli.io/", - "time": "2016-03-31T12:15:22+00:00" - }, - { - "name": "puli/discovery", - "version": "1.0.0-beta9", - "source": { - "type": "git", - "url": "https://github.com/puli/discovery.git", - "reference": "3fcb42bbbf27e7baa6d978c93be966ee4c2f6085" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/puli/discovery/zipball/3fcb42bbbf27e7baa6d978c93be966ee4c2f6085", - "reference": "3fcb42bbbf27e7baa6d978c93be966ee4c2f6085", - "shasum": "" - }, - "require": { - "php": "^5.3.9|^7.0", - "ramsey/uuid": "^2.8", - "webmozart/assert": "^1.0", - "webmozart/expression": "^1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "puli/repository": "^1.0-beta9", - "sebastian/version": "^1.0.1", - "webmozart/json": "^1.2", - "webmozart/key-value-store": "^1.0-beta7" - }, - "suggest": { - "puli/repository": "to bind and discover Puli resources", - "webmozart/json": "to use the JSON discovery", - "webmozart/key-value-store": "to use the key-value store discovery" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Puli\\Discovery\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Publishes and discovers artifacts across Puli packages.", - "homepage": "http://puli.io/", - "time": "2016-01-14T10:18:41+00:00" - }, - { - "name": "puli/manager", - "version": "1.0.0-beta10", - "source": { - "type": "git", - "url": "https://github.com/puli/manager.git", - "reference": "07e03dc2cb10069ec51cd33e31f9404602f4d976" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/puli/manager/zipball/07e03dc2cb10069ec51cd33e31f9404602f4d976", - "reference": "07e03dc2cb10069ec51cd33e31f9404602f4d976", - "shasum": "" - }, - "require": { - "php": "^5.3.9|^7.0", - "psr/log": "^1.0", - "puli/discovery": "^1.0-beta9", - "puli/repository": "^1.0-beta9", - "puli/url-generator": "^1.0-beta4", - "ramsey/uuid": "^2.8", - "symfony/event-dispatcher": "^2.3|^3.0", - "symfony/filesystem": "^2.3|^3.0", - "webmozart/assert": "^1.0", - "webmozart/expression": "^1.0", - "webmozart/glob": "^4.0", - "webmozart/json": "^1.2.1", - "webmozart/path-util": "^2.2.3" - }, - "require-dev": { - "basho/riak": "^1.4", - "phpunit/phpunit": "^4.6", - "predis/predis": "^1.0", - "sebastian/comparator": "^1.2", - "sebastian/version": "^1.0.1", - "webmozart/key-value-store": "^1.0-beta7" - }, - "suggest": { - "basho/riak": "to use Riak based key-value stores", - "predis/predis": "to use Predis based key-value stores", - "webmozart/key-value-store": "to use key-value store change streams/discoveries" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Puli\\Manager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Generates Puli repositories from configured packages.", - "homepage": "http://puli.io/", - "time": "2016-01-14T10:59:29+00:00" - }, - { - "name": "puli/repository", - "version": "1.0.0-beta10", + "name": "psr/http-server-handler", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/puli/repository.git", - "reference": "2b3136f62c81bf1d6f0fbdbda62c199524eab65d" + "url": "https://github.com/php-fig/http-server-handler.git", + "reference": "439d92054dc06097f2406ec074a2627839955a02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/puli/repository/zipball/2b3136f62c81bf1d6f0fbdbda62c199524eab65d", - "reference": "2b3136f62c81bf1d6f0fbdbda62c199524eab65d", + "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/439d92054dc06097f2406ec074a2627839955a02", + "reference": "439d92054dc06097f2406ec074a2627839955a02", "shasum": "" }, "require": { - "php": "^5.3.9|^7.0", - "psr/log": "^1.0", - "webmozart/assert": "^1.0", - "webmozart/glob": "^4.1", - "webmozart/path-util": "^2.2" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1", - "symfony/filesystem": "^2.0|^3.0", - "webmozart/json": "^1.2.1", - "webmozart/key-value-store": "^1.0-beta7" - }, - "suggest": { - "symfony/filesystem": "to use the filesystem repository", - "webmozart/json": "to use the JSON repositories", - "webmozart/key-value-store": "to use the key-value store change stream" + "php": ">=7.0", + "psr/http-message": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "Puli\\Repository\\": "src/" + "Psr\\Http\\Server\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3645,48 +3544,52 @@ ], "authors": [ { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "A filesystem-like repository for storing arbitrary resources.", - "homepage": "http://puli.io/", - "time": "2016-02-05T10:12:35+00:00" + "description": "Common interface for HTTP server-side request handler", + "keywords": [ + "handler", + "http", + "http-interop", + "psr", + "psr-15", + "psr-7", + "request", + "response", + "server" + ], + "time": "2018-01-22T17:04:15+00:00" }, { - "name": "puli/url-generator", - "version": "1.0.0-beta4", + "name": "psr/http-server-middleware", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/puli/url-generator.git", - "reference": "b6c0bfb678dde9a2f8ece661f894c9f39e62dcc2" + "url": "https://github.com/php-fig/http-server-middleware.git", + "reference": "ea17eb1fb2c8df6db919cc578451a8013c6a0ae5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/puli/url-generator/zipball/b6c0bfb678dde9a2f8ece661f894c9f39e62dcc2", - "reference": "b6c0bfb678dde9a2f8ece661f894c9f39e62dcc2", + "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/ea17eb1fb2c8df6db919cc578451a8013c6a0ae5", + "reference": "ea17eb1fb2c8df6db919cc578451a8013c6a0ae5", "shasum": "" }, "require": { - "php": "^5.3.9|^7.0", - "puli/discovery": "^1.0-beta9", - "puli/repository": "^1.0-beta9", - "webmozart/glob": "^4.0", - "webmozart/path-util": "^2.3" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" + "php": ">=7.0", + "psr/http-message": "^1.0", + "psr/http-server-handler": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "Puli\\UrlGenerator\\": "src/" + "Psr\\Http\\Server\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3695,63 +3598,49 @@ ], "authors": [ { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "Generates URLs for public Puli resources.", - "homepage": "http://puli.io/", + "description": "Common interface for HTTP server-side middleware", "keywords": [ - "asset", - "public", - "puli", - "resource", - "url" + "http", + "http-interop", + "middleware", + "psr", + "psr-15", + "psr-7", + "request", + "response" ], - "time": "2016-01-14T10:30:17+00:00" + "time": "2018-01-22T17:08:31+00:00" }, { - "name": "ramsey/uuid", - "version": "2.9.0", + "name": "psr/log", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/ramsey/uuid.git", - "reference": "b2ef4dd9584268d73f92f752a62bc24cd534dc9a" + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/b2ef4dd9584268d73f92f752a62bc24cd534dc9a", - "reference": "b2ef4dd9584268d73f92f752a62bc24cd534dc9a", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", "shasum": "" }, "require": { - "paragonie/random_compat": "^1.0|^2.0", - "php": ">=5.3.3" - }, - "replace": { - "rhumsaa/uuid": "self.version" - }, - "require-dev": { - "doctrine/dbal": ">=2.3", - "jakub-onderka/php-parallel-lint": "^0.9.0", - "moontoast/math": "~1.1", - "phpunit/phpunit": "~4.1|~5.0", - "satooshi/php-coveralls": "~0.6", - "squizlabs/php_codesniffer": "^2.3", - "symfony/console": "~2.3|~3.0" - }, - "suggest": { - "doctrine/dbal": "Allow the use of a UUID as doctrine field type.", - "moontoast/math": "Support for converting UUID to 128-bit integer (in string form).", - "symfony/console": "Support for use of the bin/uuid command line tool." + "php": ">=5.3.0" }, - "bin": [ - "bin/uuid" - ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { "psr-4": { - "Rhumsaa\\Uuid\\": "src/" + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3760,50 +3649,45 @@ ], "authors": [ { - "name": "Marijn Huizendveld", - "email": "marijn.huizendveld@gmail.com" - }, - { - "name": "Ben Ramsey", - "homepage": "http://benramsey.com/" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "A PHP 5.3+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", - "homepage": "https://github.com/ramsey/uuid", + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", "keywords": [ - "guid", - "identifier", - "uuid" + "log", + "psr", + "psr-3" ], - "time": "2016-03-22T18:20:19+00:00" + "time": "2016-10-10T12:19:37+00:00" }, { - "name": "seld/jsonlint", - "version": "1.6.1", + "name": "psr/simple-cache", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "50d63f2858d87c4738d5b76a7dcbb99fa8cf7c77" + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/50d63f2858d87c4738d5b76a7dcbb99fa8cf7c77", - "reference": "50d63f2858d87c4738d5b76a7dcbb99fa8cf7c77", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "shasum": "" }, "require": { - "php": "^5.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.5" + "php": ">=5.3.0" }, - "bin": [ - "bin/jsonlint" - ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { "psr-4": { - "Seld\\JsonLint\\": "src/Seld/JsonLint/" + "Psr\\SimpleCache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3812,66 +3696,62 @@ ], "authors": [ { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be/" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "JSON Linter", + "description": "Common interfaces for simple caching", "keywords": [ - "json", - "linter", - "parser", - "validator" + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" ], - "time": "2017-06-18T15:11:04+00:00" + "time": "2017-10-23T01:57:42+00:00" }, { - "name": "symfony/console", - "version": "v3.3.4", + "name": "symfony/cache", + "version": "v4.1.3", "source": { "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "a97e45d98c59510f085fa05225a1acb74dfe0546" + "url": "https://github.com/symfony/cache.git", + "reference": "c666a5bbfeb1fe05c7b91d46810f405c8bea14cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a97e45d98c59510f085fa05225a1acb74dfe0546", - "reference": "a97e45d98c59510f085fa05225a1acb74dfe0546", + "url": "https://api.github.com/repos/symfony/cache/zipball/c666a5bbfeb1fe05c7b91d46810f405c8bea14cf", + "reference": "c666a5bbfeb1fe05c7b91d46810f405c8bea14cf", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/debug": "~2.8|~3.0", - "symfony/polyfill-mbstring": "~1.0" + "php": "^7.1.3", + "psr/cache": "~1.0", + "psr/log": "~1.0", + "psr/simple-cache": "^1.0" }, "conflict": { - "symfony/dependency-injection": "<3.3" + "symfony/var-dumper": "<3.4" }, - "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" + "provide": { + "psr/cache-implementation": "1.0", + "psr/simple-cache-implementation": "1.0" }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/filesystem": "", - "symfony/process": "" + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/cache": "~1.6", + "doctrine/dbal": "~2.4", + "predis/predis": "~1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.1-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Console\\": "" + "Symfony\\Component\\Cache\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -3883,54 +3763,54 @@ ], "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 Console Component", + "description": "Symfony Cache component with PSR-6, PSR-16, and tags", "homepage": "https://symfony.com/", - "time": "2017-07-03T13:19:36+00:00" + "keywords": [ + "caching", + "psr6" + ], + "time": "2018-07-26T11:24:31+00:00" }, { - "name": "symfony/debug", - "version": "v3.3.4", + "name": "symfony/polyfill-ctype", + "version": "v1.9.0", "source": { "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "63b85a968486d95ff9542228dc2e4247f16f9743" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/63b85a968486d95ff9542228dc2e4247f16f9743", - "reference": "63b85a968486d95ff9542228dc2e4247f16f9743", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", "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" + "php": ">=5.3.3" }, - "require-dev": { - "symfony/http-kernel": "~2.8|~3.0" + "suggest": { + "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "1.9-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Debug\\": "" + "Symfony\\Polyfill\\Ctype\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -3938,62 +3818,57 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" } ], - "description": "Symfony Debug Component", + "description": "Symfony polyfill for ctype functions", "homepage": "https://symfony.com/", - "time": "2017-07-05T13:02:37+00:00" + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-08-06T14:22:27+00:00" }, { - "name": "symfony/event-dispatcher", - "version": "v3.3.4", + "name": "symfony/polyfill-mbstring", + "version": "v1.9.0", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "67535f1e3fd662bdc68d7ba317c93eecd973617e" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/67535f1e3fd662bdc68d7ba317c93eecd973617e", - "reference": "67535f1e3fd662bdc68d7ba317c93eecd973617e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8", + "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8", "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" + "php": ">=5.3.3" }, "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "1.9-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" + "Symfony\\Polyfill\\Mbstring\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -4002,100 +3877,99 @@ ], "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 EventDispatcher Component", + "description": "Symfony polyfill for the Mbstring extension", "homepage": "https://symfony.com/", - "time": "2017-06-09T14:53:08+00:00" + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2018-08-06T14:22:27+00:00" }, { - "name": "symfony/filesystem", - "version": "v3.3.4", + "name": "thecodingmachine/common-factories", + "version": "v0.4.1", "source": { "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "311fa718389efbd8b627c272b9324a62437018cc" + "url": "https://github.com/thecodingmachine/common-factories.git", + "reference": "dffa5eabdc3758e0cf369deedb509ff461991f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/311fa718389efbd8b627c272b9324a62437018cc", - "reference": "311fa718389efbd8b627c272b9324a62437018cc", + "url": "https://api.github.com/repos/thecodingmachine/common-factories/zipball/dffa5eabdc3758e0cf369deedb509ff461991f11", + "reference": "dffa5eabdc3758e0cf369deedb509ff461991f11", "shasum": "" }, "require": { - "php": ">=5.5.9" + "container-interop/service-provider": "^0.4", + "php": ">=5.4", + "psr/container": "^1.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } + "require-dev": { + "mouf/picotainer": "^1.0", + "phpunit/phpunit": "^4.5", + "satooshi/php-coveralls": "^1.0" }, + "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Interop\\Container\\Factories\\": "src/" + } }, "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-06-24T09:29:48+00:00" + "description": "This project provides utility factories that can be used directly in service providers complying with the container-interop/service-provider standard.", + "time": "2018-08-17T21:27:12+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.4.0", + "name": "thecodingmachine/discovery", + "version": "v1.2.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "f29dca382a6485c3cbe6379f0c61230167681937" + "url": "https://github.com/thecodingmachine/discovery.git", + "reference": "8bad73dad00afc1aa7bebefd0675c5e2f3b1094a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937", - "reference": "f29dca382a6485c3cbe6379f0c61230167681937", + "url": "https://api.github.com/repos/thecodingmachine/discovery/zipball/8bad73dad00afc1aa7bebefd0675c5e2f3b1094a", + "reference": "8bad73dad00afc1aa7bebefd0675c5e2f3b1094a", "shasum": "" }, "require": { - "php": ">=5.3.3" + "composer-plugin-api": "^1.0", + "php": ">=7.0.0" }, - "suggest": { - "ext-mbstring": "For best performance" + "require-dev": { + "composer/composer": "^1.0", + "couscous/couscous": "^1.6", + "humbug/humbug": "~1.0", + "phpunit/phpunit": "~5.0", + "satooshi/php-coveralls": "^1.0", + "squizlabs/php_codesniffer": "^2.7.0" }, - "type": "library", + "type": "composer-plugin", "extra": { + "class": "TheCodingMachine\\Discovery\\DiscoveryPlugin", "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] + "TheCodingMachine\\Discovery\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4103,55 +3977,99 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "David Négrier", + "email": "d.negrier@thecodingmachine.com", + "homepage": "http://mouf-php.com/" } ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com/", + "description": "Publish and discover assets in your PHP projects.", + "homepage": "https://github.com/thecodingmachine/discovery", "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" + "assets", + "discovery" + ], + "time": "2018-01-05T09:48:36+00:00" + }, + { + "name": "thecodingmachine/doctrine-annotations-universal-module", + "version": "1.1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/doctrine-annotations-universal-module.git", + "reference": "4e665abc8b288cbd28e74581b2801e18f7c2e141" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/doctrine-annotations-universal-module/zipball/4e665abc8b288cbd28e74581b2801e18f7c2e141", + "reference": "4e665abc8b288cbd28e74581b2801e18f7c2e141", + "shasum": "" + }, + "require": { + "container-interop/service-provider": "^0.4", + "doctrine/annotations": "^1.2", + "php": ">=7.0" + }, + "require-dev": { + "doctrine/cache": "^1.0", + "mnapoli/simplex": "~0.3.0", + "phpunit/phpunit": "^5.0", + "satooshi/php-coveralls": "^1.0" + }, + "suggest": { + "thecodingmachine/psr-6-doctrine-bridge-universal-module": "A service provider providing a bridge between PSR-6 cache pool and Doctrine cache", + "thecodingmachine/stash-universal-module": "A service provider providing a PSR-6 cache pool through the Stash library" + }, + "type": "library", + "autoload": { + "psr-4": { + "TheCodingMachine\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "time": "2017-06-09T14:24:12+00:00" + "description": "Cross-framework module for doctrine/annotations", + "time": "2017-09-25T12:11:53+00:00" }, { - "name": "symfony/process", - "version": "v3.3.4", + "name": "thecodingmachine/funky", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "5ab8949b682b1bf9d4511a228b5e045c96758c30" + "url": "https://github.com/thecodingmachine/funky.git", + "reference": "a973ba2a22d1a192078f123697bfd85104b595bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/5ab8949b682b1bf9d4511a228b5e045c96758c30", - "reference": "5ab8949b682b1bf9d4511a228b5e045c96758c30", + "url": "https://api.github.com/repos/thecodingmachine/funky/zipball/a973ba2a22d1a192078f123697bfd85104b595bc", + "reference": "a973ba2a22d1a192078f123697bfd85104b595bc", "shasum": "" }, "require": { - "php": ">=5.5.9" + "container-interop/service-provider": "^0.4", + "doctrine/annotations": "^1.5.0", + "php": ">=7.1", + "thecodingmachine/common-factories": "^0.4" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.1", + "mnapoli/simplex": "^0.4.1", + "phpstan/phpstan": "^0.9", + "phpunit/phpunit": "^6.4.3", + "satooshi/php-coveralls": "^1.0.1", + "thecodingmachine/phpstan-strict-rules": "^0.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "1.0-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "TheCodingMachine\\Funky\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4159,113 +4077,136 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "David Négrier", + "email": "d.negrier@thecodingmachine.com" } ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com/", - "time": "2017-07-03T08:12:02+00:00" + "description": "Write service providers easily using annotations", + "time": "2017-11-29T16:51:34+00:00" }, { - "name": "twig/twig", - "version": "v1.34.4", + "name": "thecodingmachine/middleware-list-universal-module", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/middleware-list-universal-module.git", + "reference": "ff79cae7e517734e95ff0fe4879132891cb53e5d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/middleware-list-universal-module/zipball/ff79cae7e517734e95ff0fe4879132891cb53e5d", + "reference": "ff79cae7e517734e95ff0fe4879132891cb53e5d", + "shasum": "" + }, + "require": { + "container-interop/service-provider": "~0.4.0", + "php": ">=7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "TheCodingMachine\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Cross-framework module providing a service containing a list of middlewares", + "time": "2018-06-05T13:27:42+00:00" + }, + { + "name": "thecodingmachine/psr-6-doctrine-bridge-universal-module", + "version": "1.1.x-dev", "source": { "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "f878bab48edb66ad9c6ed626bf817f60c6c096ee" + "url": "https://github.com/thecodingmachine/psr-6-doctrine-bridge-universal-module.git", + "reference": "e7506b18a2725b4a0f561ae427a3b68b30b976d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/f878bab48edb66ad9c6ed626bf817f60c6c096ee", - "reference": "f878bab48edb66ad9c6ed626bf817f60c6c096ee", + "url": "https://api.github.com/repos/thecodingmachine/psr-6-doctrine-bridge-universal-module/zipball/e7506b18a2725b4a0f561ae427a3b68b30b976d9", + "reference": "e7506b18a2725b4a0f561ae427a3b68b30b976d9", "shasum": "" }, "require": { - "php": ">=5.3.3" + "cache/psr-6-doctrine-bridge": "^2.1", + "container-interop/service-provider": "^0.4", + "php": ">=7.0", + "thecodingmachine/common-factories": "^0.4" }, "require-dev": { - "psr/container": "^1.0", - "symfony/debug": "~2.7", - "symfony/phpunit-bridge": "~3.3@dev" + "mnapoli/simplex": "~0.3.0", + "phpunit/phpunit": "^5.0", + "satooshi/php-coveralls": "^1.0", + "thecodingmachine/stash-universal-module": "^1.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.34-dev" - } + "suggest": { + "thecodingmachine/stash-universal-module": "A service provider providing a PSR-6 cache pool through the Stash library" }, + "type": "library", "autoload": { - "psr-0": { - "Twig_": "lib/" - }, "psr-4": { - "Twig\\": "src/" + "TheCodingMachine\\": "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" + "MIT" ], - "time": "2017-07-04T13:19:31+00:00" + "description": "Cross-framework module for cache/psr-6-doctrine-bridge", + "time": "2017-09-25T12:06:41+00:00" }, { - "name": "webmozart/assert", - "version": "1.2.0", + "name": "thecodingmachine/splash-router", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" + "url": "https://github.com/thecodingmachine/splash-router.git", + "reference": "5d610394f26f70438bd457db685022c84e0366ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", + "url": "https://api.github.com/repos/thecodingmachine/splash-router/zipball/5d610394f26f70438bd457db685022c84e0366ea", + "reference": "5d610394f26f70438bd457db685022c84e0366ea", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "cache/void-adapter": "^0.3.1", + "doctrine/annotations": "^1.2", + "mouf/utils.common.url-interface": "^1", + "php": ">=7.1", + "psr/cache": "^1.0", + "psr/container": "^1", + "psr/http-message": "^1", + "psr/http-server-handler": "^1", + "psr/http-server-middleware": "^1", + "psr/log": "^1", + "zendframework/zend-diactoros": "^1.3.9" + }, + "conflict": { + "zendframework/zend-stratigility": "<2.0" }, "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" + "bamarni/composer-bin-plugin": "^1.2", + "cache/array-adapter": "^0.4.2", + "maglnet/composer-require-checker": "^1.0", + "mnapoli/simplex": "^0.3", + "mouf/picotainer": "~1.1", + "phpstan/phpstan": "^0.10.1", + "phpunit/phpunit": "^7.2.7", + "satooshi/php-coveralls": "^1.1.0", + "squizlabs/php_codesniffer": "^3.3" }, - "type": "library", + "type": "mouf-library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "10.0.x-dev" } }, "autoload": { "psr-4": { - "Webmozart\\Assert\\": "src/" + "TheCodingMachine\\Splash\\": "src/TheCodingMachine/Splash" } }, "notification-url": "https://packagist.org/downloads/", @@ -4274,278 +4215,278 @@ ], "authors": [ { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "name": "David Négrier", + "email": "d.negrier@thecodingmachine.com", + "homepage": "http://mouf-php.com/" } ], - "description": "Assertions to validate method input/output with nice error messages.", + "description": "Splash is a PHP router. It takes an HTTP request and dispatches it to the appropriate controller.", + "homepage": "http://mouf-php.com/packages/mouf/mvc.splash-common", "keywords": [ - "assert", - "check", - "validate" + "framework", + "mouf", + "mvc", + "splash", + "splash-common" ], - "time": "2016-11-23T20:04:58+00:00" + "time": "2018-07-19T13:55:17+00:00" }, { - "name": "webmozart/console", - "version": "1.0.0-beta5", + "name": "thecodingmachine/splash-service-provider", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/webmozart/console.git", - "reference": "be58c622090e61a2a7c3ad77baae776b46e7f305" + "url": "https://github.com/thecodingmachine/splash-service-provider.git", + "reference": "9161769442af339e48447254495e07be3d1b76d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/console/zipball/be58c622090e61a2a7c3ad77baae776b46e7f305", - "reference": "be58c622090e61a2a7c3ad77baae776b46e7f305", + "url": "https://api.github.com/repos/thecodingmachine/splash-service-provider/zipball/9161769442af339e48447254495e07be3d1b76d3", + "reference": "9161769442af339e48447254495e07be3d1b76d3", "shasum": "" }, "require": { - "php": ">=5.3.9", - "symfony/console": "^2.7|^3.0", - "symfony/event-dispatcher": "^2.5|^3.0", - "symfony/process": "^2.5|^3.0", - "webmozart/assert": "^1.0" + "php": ">=7.1", + "thecodingmachine/funky": "^1", + "thecodingmachine/middleware-list-universal-module": "^1", + "thecodingmachine/splash-router": "^10" }, "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1", - "symfony/filesystem": "^2.3|^3.0" + "mnapoli/simplex": "^0.4.1", + "phpstan/phpstan": "^0.10.1", + "phpunit/phpunit": "^6.4.3", + "satooshi/php-coveralls": "^1.0.1", + "squizlabs/php_codesniffer": "^3.2", + "thecodingmachine/phpstan-strict-rules": "^0.10.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "10.0.x-dev" } }, "autoload": { "psr-4": { - "Webmozart\\Console\\": "src/" + "TheCodingMachine\\Splash\\DI\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "A usable, beautiful and easily testable console toolkit written in PHP.", - "time": "2016-02-05T10:03:13+00:00" + "description": "Cross-framework module for splash", + "time": "2018-07-18T20:23:20+00:00" }, { - "name": "webmozart/expression", - "version": "1.0.0", + "name": "thecodingmachine/stratigility-harmony", + "version": "3.0.x-dev", "source": { "type": "git", - "url": "https://github.com/webmozart/expression.git", - "reference": "35c222fc49533894228e1240cc844ae91d6a9ef2" + "url": "https://github.com/thecodingmachine/stratigility-harmony.git", + "reference": "d8ba391549f8932680e8fca8c4c3a4482f799a2c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/expression/zipball/35c222fc49533894228e1240cc844ae91d6a9ef2", - "reference": "35c222fc49533894228e1240cc844ae91d6a9ef2", + "url": "https://api.github.com/repos/thecodingmachine/stratigility-harmony/zipball/d8ba391549f8932680e8fca8c4c3a4482f799a2c", + "reference": "d8ba391549f8932680e8fca8c4c3a4482f799a2c", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=7.1", + "thecodingmachine/funky": "^1", + "thecodingmachine/middleware-list-universal-module": "^1.1", + "zendframework/zend-diactoros": "^1.3", + "zendframework/zend-httphandlerrunner": "^1.0.1", + "zendframework/zend-stratigility": "^3.0" }, "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" + "mnapoli/simplex": "^0.5.0", + "phpstan/phpstan": "^0.10.3", + "phpunit/phpunit": "^7.3.1", + "satooshi/php-coveralls": "^1.0.1", + "squizlabs/php_codesniffer": "^3.2", + "thecodingmachine/phpstan-strict-rules": "^0.10.3" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "autoload": { "psr-4": { - "Webmozart\\Expression\\": "src/" + "TheCodingMachine\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Formulate expressions and search criteria using PHP objects.", - "keywords": [ - "criteria", - "expression", - "filter", - "formula" - ], - "time": "2015-12-17T10:43:13+00:00" + "description": "Cross-framework module for Stratigility", + "time": "2018-08-23T13:11:13+00:00" }, { - "name": "webmozart/glob", - "version": "4.1.0", + "name": "thecodingmachine/symfony-cache-universal-module", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/webmozart/glob.git", - "reference": "3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe" + "url": "https://github.com/thecodingmachine/symfony-cache-universal-module.git", + "reference": "a1dfe42b05e00259f71ab471ac3e65ceec29cf76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/glob/zipball/3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe", - "reference": "3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe", + "url": "https://api.github.com/repos/thecodingmachine/symfony-cache-universal-module/zipball/a1dfe42b05e00259f71ab471ac3e65ceec29cf76", + "reference": "a1dfe42b05e00259f71ab471ac3e65ceec29cf76", "shasum": "" }, "require": { - "php": "^5.3.3|^7.0", - "webmozart/path-util": "^2.2" + "php": ">=7.1", + "symfony/cache": "^4.1", + "thecodingmachine/funky": "^1" }, "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1", - "symfony/filesystem": "^2.5" + "mnapoli/simplex": "^0.5.0", + "phpstan/phpstan": "^0.10.3", + "phpunit/phpunit": "^7.3.1", + "satooshi/php-coveralls": "^1.0.1", + "squizlabs/php_codesniffer": "^3.2", + "thecodingmachine/phpstan-strict-rules": "^0.10.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "Webmozart\\Glob\\": "src/" + "TheCodingMachine\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "A PHP implementation of Ant's glob.", - "time": "2015-12-29T11:14:33+00:00" + "description": "Cross-framework module for Symfony cache", + "time": "2018-08-19T13:31:43+00:00" }, { - "name": "webmozart/json", - "version": "1.2.2", + "name": "thecodingmachine/twig-universal-module", + "version": "1.1.x-dev", "source": { "type": "git", - "url": "https://github.com/webmozart/json.git", - "reference": "a1fb3da904b8364e3db47eed68f76bfb6cd0031a" + "url": "https://github.com/thecodingmachine/twig-universal-module.git", + "reference": "2b761f6058f39785132465e18c2eacf7ea691a5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/json/zipball/a1fb3da904b8364e3db47eed68f76bfb6cd0031a", - "reference": "a1fb3da904b8364e3db47eed68f76bfb6cd0031a", + "url": "https://api.github.com/repos/thecodingmachine/twig-universal-module/zipball/2b761f6058f39785132465e18c2eacf7ea691a5b", + "reference": "2b761f6058f39785132465e18c2eacf7ea691a5b", "shasum": "" }, "require": { - "justinrainbow/json-schema": "^1.6", - "php": "^5.3.3|^7.0", - "seld/jsonlint": "^1.0", - "webmozart/path-util": "^2.3" + "container-interop/service-provider": "^0.4", + "php": ">=7.0", + "thecodingmachine/common-factories": "^0.4.1", + "twig/twig": "^1.35.4 | ^2.5.0" }, "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1", - "symfony/filesystem": "^2.5" + "mnapoli/simplex": "~0.5.0", + "phpunit/phpunit": "^5.7.9", + "satooshi/php-coveralls": "^1.0.1" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, "autoload": { "psr-4": { - "Webmozart\\Json\\": "src/" + "TheCodingMachine\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "A robust JSON decoder/encoder with support for schema validation.", - "time": "2016-01-14T12:11:46+00:00" + "description": "Cross-framework module for Twig", + "time": "2018-08-19T19:50:02+00:00" }, { - "name": "webmozart/path-util", - "version": "2.3.0", + "name": "twig/twig", + "version": "v2.5.0", "source": { "type": "git", - "url": "https://github.com/webmozart/path-util.git", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" + "url": "https://github.com/twigphp/Twig.git", + "reference": "6a5f676b77a90823c2d4eaf76137b771adf31323" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/6a5f676b77a90823c2d4eaf76137b771adf31323", + "reference": "6a5f676b77a90823c2d4eaf76137b771adf31323", "shasum": "" }, "require": { - "php": ">=5.3.3", - "webmozart/assert": "~1.0" + "php": "^7.0", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" + "psr/container": "^1.0", + "symfony/debug": "^2.7", + "symfony/phpunit-bridge": "^3.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-master": "2.5-dev" } }, "autoload": { + "psr-0": { + "Twig_": "lib/" + }, "psr-4": { - "Webmozart\\PathUtil\\": "src/" + "Twig\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "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": "https://twig.symfony.com/contributors", + "role": "Contributors" } ], - "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", - "time": "2015-12-17T08:42:14+00:00" + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "https://twig.symfony.com/", + "keywords": [ + "templating" + ], + "time": "2018-07-13T07:18:09+00:00" }, { "name": "zendframework/zend-diactoros", - "version": "1.4.0", + "version": "1.8.5", "source": { "type": "git", "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "b03f285a333f51e58c95cce54109a4a9ed691436" + "reference": "3e4edb822c942f37ade0d09579cfbab11e2fee87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/b03f285a333f51e58c95cce54109a4a9ed691436", - "reference": "b03f285a333f51e58c95cce54109a4a9ed691436", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/3e4edb822c942f37ade0d09579cfbab11e2fee87", + "reference": "3e4edb822c942f37ade0d09579cfbab11e2fee87", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0", - "psr/http-message": "~1.0" + "php": "^5.6 || ^7.0", + "psr/http-message": "^1.0" }, "provide": { "psr/http-message-implementation": "1.0" @@ -4553,17 +4494,28 @@ "require-dev": { "ext-dom": "*", "ext-libxml": "*", - "phpunit/phpunit": "^4.6 || ^5.5", - "zendframework/zend-coding-standard": "~1.0.0" + "phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7", + "zendframework/zend-coding-standard": "~1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev", - "dev-develop": "1.5-dev" + "dev-master": "1.8.x-dev", + "dev-develop": "1.9.x-dev", + "dev-release-2.0": "2.0.x-dev" } }, "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/marshal_uri_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php" + ], "psr-4": { "Zend\\Diactoros\\": "src/" } @@ -4579,34 +4531,34 @@ "psr", "psr-7" ], - "time": "2017-04-06T16:18:34+00:00" + "time": "2018-08-10T14:16:32+00:00" }, { "name": "zendframework/zend-escaper", - "version": "2.5.2", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-escaper.git", - "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e" + "reference": "31d8aafae982f9568287cb4dce987e6aff8fd074" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/2dcd14b61a72d8b8e27d579c6344e12c26141d4e", - "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e", + "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/31d8aafae982f9568287cb4dce987e6aff8fd074", + "reference": "31d8aafae982f9568287cb4dce987e6aff8fd074", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^5.6 || ^7.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", + "zendframework/zend-coding-standard": "~1.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev", - "dev-develop": "2.6-dev" + "dev-master": "2.6.x-dev", + "dev-develop": "2.7.x-dev" } }, "autoload": { @@ -4618,37 +4570,97 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-escaper", + "description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs", "keywords": [ + "ZendFramework", "escaper", - "zf2" + "zf" + ], + "time": "2018-04-25T15:48:53+00:00" + }, + { + "name": "zendframework/zend-httphandlerrunner", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-httphandlerrunner.git", + "reference": "5e4c1e82a8bb1585020eafd32c49ece5a6ee98df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-httphandlerrunner/zipball/5e4c1e82a8bb1585020eafd32c49ece5a6ee98df", + "reference": "5e4c1e82a8bb1585020eafd32c49ece5a6ee98df", + "shasum": "" + }, + "require": { + "php": "^7.1", + "psr/http-message": "^1.0", + "psr/http-message-implementation": "^1.0", + "psr/http-server-handler": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.3", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-diactoros": "^1.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, + "zf": { + "config-provider": "Zend\\HttpHandlerRunner\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Zend\\HttpHandlerRunner\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Execute PSR-15 RequestHandlerInterface instances and emit responses they generate.", + "keywords": [ + "ZendFramework", + "components", + "expressive", + "psr-15", + "psr-7", + "zf" ], - "time": "2016-06-30T19:48:38+00:00" + "time": "2018-02-21T20:33:02+00:00" }, { "name": "zendframework/zend-stratigility", - "version": "1.3.3", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/zendframework/zend-stratigility.git", - "reference": "2c4120d2af215c8261a36e0bc3aa8e179e05e148" + "reference": "75b64558201807514734a9f46386816f2900d7f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-stratigility/zipball/2c4120d2af215c8261a36e0bc3aa8e179e05e148", - "reference": "2c4120d2af215c8261a36e0bc3aa8e179e05e148", + "url": "https://api.github.com/repos/zendframework/zend-stratigility/zipball/75b64558201807514734a9f46386816f2900d7f7", + "reference": "75b64558201807514734a9f46386816f2900d7f7", "shasum": "" }, "require": { - "http-interop/http-middleware": "^0.2.0", - "php": "^5.6 || ^7.0", + "fig/http-message-util": "^1.1", + "php": "^7.1", "psr/http-message": "^1.0", + "psr/http-server-middleware": "^1.0", "zendframework/zend-escaper": "^2.3" }, + "conflict": { + "zendframework/zend-diactoros": "<1.7.1" + }, "require-dev": { - "phpunit/phpunit": "^5.6", + "malukenho/docheader": "^0.1.6", + "phpunit/phpunit": "^7.0.1", "zendframework/zend-coding-standard": "~1.0.0", - "zendframework/zend-diactoros": "^1.0" + "zendframework/zend-diactoros": "^1.7.1" }, "suggest": { "psr/http-message-implementation": "Please install a psr/http-message-implementation to consume Stratigility; e.g., zendframework/zend-diactoros" @@ -4656,11 +4668,17 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.0-dev", - "dev-develop": "2.0.0-dev" + "dev-master": "3.0.x-dev", + "dev-develop": "3.1.x-dev" } }, "autoload": { + "files": [ + "src/functions/double-pass-middleware.php", + "src/functions/host.php", + "src/functions/middleware.php", + "src/functions/path.php" + ], "psr-4": { "Zend\\Stratigility\\": "src/" } @@ -4669,45 +4687,47 @@ "license": [ "BSD-3-Clause" ], - "description": "Middleware for PHP", - "homepage": "https://github.com/zendframework/zend-stratigility", + "description": "PSR-7 middleware foundation for building and dispatching middleware pipelines", "keywords": [ + "ZendFramework", "http", "middleware", - "psr-7" + "psr-15", + "psr-7", + "zf" ], - "time": "2017-01-23T22:59:03+00:00" + "time": "2018-07-24T20:39:18+00:00" } ], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1" }, "require-dev": { "athletic/athletic": "~0.1.8", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -4732,41 +4752,47 @@ "constructor", "instantiate" ], - "time": "2015-06-14T21:17:01+00:00" + "time": "2017-07-22T11:58:36+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.6.1", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102" + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102", - "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", "shasum": "" }, "require": { - "php": ">=5.4.0" + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" }, "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" }, "type": "library", "autoload": { "psr-4": { "DeepCopy\\": "src/DeepCopy/" - } + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "description": "Create deep copies (clones) of your objects", - "homepage": "https://github.com/myclabs/DeepCopy", "keywords": [ "clone", "copy", @@ -4774,20 +4800,20 @@ "object", "object graph" ], - "time": "2017-04-12T18:52:22+00:00" + "time": "2018-06-11T23:09:50+00:00" }, { "name": "phpdocumentor/reflection-common", - "version": "1.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", "shasum": "" }, "require": { @@ -4828,33 +4854,39 @@ "reflection", "static analysis" ], - "time": "2015-12-27T11:43:31+00:00" + "time": "2017-09-11T18:02:19+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "3.1.1", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", "shasum": "" }, "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", "webmozart/assert": "^1.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ @@ -4873,24 +4905,24 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30T07:12:33+00:00" + "time": "2017-11-30T07:14:17+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.2.1", + "version": "0.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", "shasum": "" }, "require": { - "php": ">=5.5", + "php": "^5.5 || ^7.0", "phpdocumentor/reflection-common": "^1.0" }, "require-dev": { @@ -4920,37 +4952,37 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-11-25T06:54:22+00:00" + "time": "2017-07-14T14:27:02+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.7.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", - "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1|^2.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8 || ^5.6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -4983,7 +5015,7 @@ "spy", "stub" ], - "time": "2017-03-02T20:05:34+00:00" + "time": "2018-08-05T17:53:17+00:00" }, { "name": "phpunit/php-code-coverage", @@ -5050,16 +5082,16 @@ }, { "name": "phpunit/php-file-iterator", - "version": "1.4.2", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", - "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", "shasum": "" }, "require": { @@ -5093,7 +5125,7 @@ "filesystem", "iterator" ], - "time": "2016-10-03T07:40:28+00:00" + "time": "2017-11-27T13:52:08+00:00" }, { "name": "phpunit/php-text-template", @@ -5187,29 +5219,29 @@ }, { "name": "phpunit/php-token-stream", - "version": "1.4.11", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" + "reference": "791198a2c6254db10131eecfe8c06670700904db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", + "reference": "791198a2c6254db10131eecfe8c06670700904db", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.2.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -5232,20 +5264,20 @@ "keywords": [ "tokenizer" ], - "time": "2017-02-27T10:12:30+00:00" + "time": "2017-11-27T05:48:46+00:00" }, { "name": "phpunit/phpunit", - "version": "5.7.21", + "version": "5.7.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3b91adfb64264ddec5a2dee9851f354aa66327db" + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3b91adfb64264ddec5a2dee9851f354aa66327db", - "reference": "3b91adfb64264ddec5a2dee9851f354aa66327db", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", "shasum": "" }, "require": { @@ -5269,8 +5301,8 @@ "sebastian/global-state": "^1.1", "sebastian/object-enumerator": "~2.0", "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0.3|~2.0", - "symfony/yaml": "~2.1|~3.0" + "sebastian/version": "^1.0.6|^2.0.1", + "symfony/yaml": "~2.1|~3.0|~4.0" }, "conflict": { "phpdocumentor/reflection-docblock": "3.0.2" @@ -5314,7 +5346,7 @@ "testing", "xunit" ], - "time": "2017-06-21T08:11:54+00:00" + "time": "2018-02-01T05:50:59+00:00" }, { "name": "phpunit/phpunit-mock-objects", @@ -5890,23 +5922,27 @@ }, { "name": "symfony/yaml", - "version": "v3.3.4", + "version": "v4.1.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "1f93a8d19b8241617f5074a123e282575b821df8" + "reference": "46bc69aa91fc4ab78a96ce67873a6b0c148fd48c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/1f93a8d19b8241617f5074a123e282575b821df8", - "reference": "1f93a8d19b8241617f5074a123e282575b821df8", + "url": "https://api.github.com/repos/symfony/yaml/zipball/46bc69aa91fc4ab78a96ce67873a6b0c148fd48c", + "reference": "46bc69aa91fc4ab78a96ce67873a6b0c148fd48c", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.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" @@ -5914,7 +5950,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -5941,15 +5977,62 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com/", - "time": "2017-06-15T12:58:50+00:00" + "time": "2018-07-26T11:24:31+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2018-01-29T19:49:41+00:00" } ], "aliases": [], "minimum-stability": "dev", - "stability-flags": { - "puli/composer-plugin": 20, - "puli/cli": 20 - }, + "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": [], diff --git a/discovery.json b/discovery.json new file mode 100644 index 0000000..f18e6e3 --- /dev/null +++ b/discovery.json @@ -0,0 +1,3 @@ +{ + "Interop\\Container\\ServiceProvider": "Mouf\\ServiceProviders\\ControllersServiceProvider" +} \ No newline at end of file diff --git a/mouf/Mouf.php b/mouf/Mouf.php index 0f68d47..980bfc5 100755 --- a/mouf/Mouf.php +++ b/mouf/Mouf.php @@ -17,27 +17,27 @@ } $loader = new \Composer\Autoload\ClassLoader(); -if (file_exists(__DIR__ . '/../../../composer/autoload_namespaces.php')) { - $map = require __DIR__ . '/../../../composer/autoload_namespaces.php'; - foreach ($map as $namespace => $path) { - $loader->add($namespace, $path); +if (file_exists(__DIR__ . '/../../../composer/autoload_namespaces.php')) { + $map = require __DIR__ . '/../../../composer/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->add($namespace, $path); } } -if (file_exists(__DIR__ . '/../../../composer/autoload_psr4.php')) { - $map = require __DIR__ . '/../../../composer/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->addPsr4($namespace, $path); - } -} - -if (file_exists(__DIR__ . '/../../../composer/autoload_classmap.php')) { - $classMap = require __DIR__ . '/../../../composer/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); +if (file_exists(__DIR__ . '/../../../composer/autoload_psr4.php')) { + $map = require __DIR__ . '/../../../composer/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->addPsr4($namespace, $path); } -} -$loader->register(true); +} + +if (file_exists(__DIR__ . '/../../../composer/autoload_classmap.php')) { + $classMap = require __DIR__ . '/../../../composer/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } +} +$loader->register(true); // Now, let's use Mouf autoloader. @@ -61,12 +61,12 @@ require_once __DIR__.'/../config.php'; }*/ -define('MOUF_URL', ROOT_URL); +define('MOUF_URL', ROOT_URL); // We are part of mouf, let's chain with the main autoloader if it exists. -/*if (file_exists(__DIR__.'/../../../../vendor/autoload.php')) { - require_once __DIR__.'/../../../../vendor/autoload.php'; +/*if (file_exists(__DIR__.'/../../../../vendor/autoload.php')) { + require_once __DIR__.'/../../../../vendor/autoload.php'; }*/ // Finally, let's include the MoufUI if it exists. diff --git a/mouf/MoufUI.php b/mouf/MoufUI.php index ab0c2ce..76b4267 100755 --- a/mouf/MoufUI.php +++ b/mouf/MoufUI.php @@ -4,14 +4,8 @@ */ // Files declared in the extra:mouf:adminRequire section. -require_once __DIR__.'/../vendor/mouf/utils.cache.cache-interface/CacheAdmin.php'; +require_once __DIR__.'/../vendor/mouf/utils.cache.purge-ui/CacheAdmin.php'; require_once __DIR__.'/../vendor/mouf/html.utils.weblibrarymanager/src/WebLibraryAdmin.php'; require_once __DIR__.'/../vendor/mouf/utils.i18n.fine/src/FineAdmin.php'; -require_once __DIR__.'/../vendor/mouf/mvc.splash-common/src/SplashCommonAdmin.php'; -require_once __DIR__.'/../vendor/mouf/mvc.splash/src/SplashAdmin.php'; -require_once __DIR__.'/../vendor/mouf/mvc.splash/src/Mouf/Mvc/Splash/SplashGenerateService.php'; -require_once __DIR__.'/../vendor/mouf/mvc.splash/src/Mouf/Mvc/Splash/Controllers/Admin/SplashPurgeCacheController.php'; -require_once __DIR__.'/../vendor/mouf/mvc.splash/src/Mouf/Mvc/Splash/Controllers/Admin/SplashAdminApacheConfigureController.php'; -require_once __DIR__.'/../vendor/mouf/mvc.splash/src/Mouf/Mvc/Splash/Controllers/Admin/SplashInstallController.php'; ?> \ No newline at end of file diff --git a/puli.json b/puli.json deleted file mode 100644 index aa23b1b..0000000 --- a/puli.json +++ /dev/null @@ -1,487 +0,0 @@ -{ - "version": "1.0", - "name": "mouf/mouf", - "config": { - "bootstrap-file": "vendor/autoload.php", - "factory": { - "in": { - "class": "Puli\\GeneratedMoufPuliFactory", - "file": ".puli/GeneratedMoufPuliFactory.php" - }, - "out": { - "file": ".puli/GeneratedMoufPuliFactory.php", - "class": "Puli\\GeneratedMoufPuliFactory" - } - } - }, - "packages": { - "composer/ca-bundle": { - "install-path": "vendor/composer/ca-bundle", - "installer": "composer" - }, - "container-interop/container-interop": { - "install-path": "vendor/container-interop/container-interop", - "installer": "composer" - }, - "doctrine/instantiator": { - "install-path": "vendor/doctrine/instantiator", - "installer": "composer", - "env": "dev" - }, - "filp/whoops": { - "install-path": "vendor/filp/whoops", - "installer": "composer" - }, - "franzl/whoops-middleware": { - "install-path": "vendor/franzl/whoops-middleware", - "installer": "composer" - }, - "http-interop/http-middleware": { - "install-path": "vendor/http-interop/http-middleware", - "installer": "composer" - }, - "justinrainbow/json-schema": { - "install-path": "vendor/justinrainbow/json-schema", - "installer": "composer" - }, - "michelf/php-markdown": { - "install-path": "vendor/michelf/php-markdown", - "installer": "composer" - }, - "mouf/classname-mapper": { - "install-path": "vendor/mouf/classname-mapper", - "installer": "composer" - }, - "mouf/famfamfam": { - "install-path": "vendor/mouf/famfamfam", - "installer": "composer" - }, - "mouf/html.htmlelement": { - "install-path": "vendor/mouf/html.htmlelement", - "installer": "composer" - }, - "mouf/html.renderer": { - "install-path": "vendor/mouf/html.renderer", - "installer": "composer" - }, - "mouf/html.renderer.twig-extensions": { - "install-path": "vendor/mouf/html.renderer.twig-extensions", - "installer": "composer" - }, - "mouf/html.template.bootstrap": { - "install-path": "vendor/mouf/html.template.bootstrap", - "installer": "composer" - }, - "mouf/html.template.menus.basicmenu": { - "install-path": "vendor/mouf/html.template.menus.basicmenu", - "installer": "composer" - }, - "mouf/html.template.mouftemplate": { - "install-path": "vendor/mouf/html.template.mouftemplate", - "installer": "composer" - }, - "mouf/html.template.templateinterface": { - "install-path": "vendor/mouf/html.template.templateinterface", - "installer": "composer" - }, - "mouf/html.utils.bootstrap": { - "install-path": "vendor/mouf/html.utils.bootstrap", - "installer": "composer" - }, - "mouf/html.utils.weblibrarymanager": { - "install-path": "vendor/mouf/html.utils.weblibrarymanager", - "installer": "composer" - }, - "mouf/html.utils.weblibrarymanager.component-installer": { - "install-path": "vendor/mouf/html.utils.weblibrarymanager.component-installer", - "installer": "composer" - }, - "mouf/html.widgets.menu": { - "install-path": "vendor/mouf/html.widgets.menu", - "installer": "composer" - }, - "mouf/html.widgets.messageservice": { - "install-path": "vendor/mouf/html.widgets.messageservice", - "installer": "composer" - }, - "mouf/javascript.ace": { - "install-path": "vendor/mouf/javascript.ace", - "installer": "composer" - }, - "mouf/javascript.jquery.jq-bootstrap-validation": { - "install-path": "vendor/mouf/javascript.jquery.jq-bootstrap-validation", - "installer": "composer" - }, - "mouf/javascript.jquery.jquery": { - "install-path": "vendor/mouf/javascript.jquery.jquery", - "installer": "composer" - }, - "mouf/javascript.jquery.jquery-filetree": { - "install-path": "vendor/mouf/javascript.jquery.jquery-filetree", - "installer": "composer" - }, - "mouf/javascript.jquery.jquery-ui": { - "install-path": "vendor/mouf/javascript.jquery.jquery-ui", - "installer": "composer" - }, - "mouf/javascript.syntaxhighlighter": { - "install-path": "vendor/mouf/javascript.syntaxhighlighter", - "installer": "composer" - }, - "mouf/javascript.underscore": { - "install-path": "vendor/mouf/javascript.underscore", - "installer": "composer" - }, - "mouf/mouf-installer": { - "install-path": "vendor/mouf/mouf-installer", - "installer": "composer" - }, - "mouf/mouf-validators-interface": { - "install-path": "vendor/mouf/mouf-validators-interface", - "installer": "composer" - }, - "mouf/mvc.splash": { - "install-path": "vendor/mouf/mvc.splash", - "installer": "composer" - }, - "mouf/mvc.splash-common": { - "install-path": "vendor/mouf/mvc.splash-common", - "installer": "composer" - }, - "mouf/security.simplelogincontroller": { - "install-path": "vendor/mouf/security.simplelogincontroller", - "installer": "composer" - }, - "mouf/security.userfiledao": { - "install-path": "vendor/mouf/security.userfiledao", - "installer": "composer" - }, - "mouf/security.userservice": { - "install-path": "vendor/mouf/security.userservice", - "installer": "composer" - }, - "mouf/security.userservice-splash": { - "install-path": "vendor/mouf/security.userservice-splash", - "installer": "composer" - }, - "mouf/utils.action.action-interface": { - "install-path": "vendor/mouf/utils.action.action-interface", - "installer": "composer" - }, - "mouf/utils.action.common-action": { - "install-path": "vendor/mouf/utils.action.common-action", - "installer": "composer" - }, - "mouf/utils.cache.apc-cache": { - "install-path": "vendor/mouf/utils.cache.apc-cache", - "installer": "composer" - }, - "mouf/utils.cache.cache-interface": { - "install-path": "vendor/mouf/utils.cache.cache-interface", - "installer": "composer" - }, - "mouf/utils.cache.file-cache": { - "install-path": "vendor/mouf/utils.cache.file-cache", - "installer": "composer" - }, - "mouf/utils.cache.in-memory-cache": { - "install-path": "vendor/mouf/utils.cache.in-memory-cache", - "installer": "composer" - }, - "mouf/utils.cache.no-cache": { - "install-path": "vendor/mouf/utils.cache.no-cache", - "installer": "composer" - }, - "mouf/utils.common.conditioninterface": { - "install-path": "vendor/mouf/utils.common.conditioninterface", - "installer": "composer" - }, - "mouf/utils.common.getvars": { - "install-path": "vendor/mouf/utils.common.getvars", - "installer": "composer" - }, - "mouf/utils.common.url-interface": { - "install-path": "vendor/mouf/utils.common.url-interface", - "installer": "composer" - }, - "mouf/utils.composite-exception": { - "install-path": "vendor/mouf/utils.composite-exception", - "installer": "composer" - }, - "mouf/utils.constants.debug": { - "install-path": "vendor/mouf/utils.constants.debug", - "installer": "composer" - }, - "mouf/utils.constants.secret": { - "install-path": "vendor/mouf/utils.constants.secret", - "installer": "composer" - }, - "mouf/utils.i18n.fine": { - "install-path": "vendor/mouf/utils.i18n.fine", - "installer": "composer" - }, - "mouf/utils.log.errorlog_logger": { - "install-path": "vendor/mouf/utils.log.errorlog_logger", - "installer": "composer" - }, - "mouf/utils.log.log_interface": { - "install-path": "vendor/mouf/utils.log.log_interface", - "installer": "composer" - }, - "mouf/utils.log.psr.errorlog_logger": { - "install-path": "vendor/mouf/utils.log.psr.errorlog_logger", - "installer": "composer" - }, - "mouf/utils.session.session-manager": { - "install-path": "vendor/mouf/utils.session.session-manager", - "installer": "composer" - }, - "mouf/utils.value.common-value": { - "install-path": "vendor/mouf/utils.value.common-value", - "installer": "composer" - }, - "mouf/utils.value.value-interface": { - "install-path": "vendor/mouf/utils.value.value-interface", - "installer": "composer" - }, - "myclabs/deep-copy": { - "install-path": "vendor/myclabs/deep-copy", - "installer": "composer", - "env": "dev" - }, - "nikic/php-parser": { - "install-path": "vendor/nikic/php-parser", - "installer": "composer" - }, - "padraic/humbug_get_contents": { - "install-path": "vendor/padraic/humbug_get_contents", - "installer": "composer" - }, - "padraic/phar-updater": { - "install-path": "vendor/padraic/phar-updater", - "installer": "composer" - }, - "paragonie/random_compat": { - "install-path": "vendor/paragonie/random_compat", - "installer": "composer" - }, - "phpdocumentor/reflection-common": { - "install-path": "vendor/phpdocumentor/reflection-common", - "installer": "composer", - "env": "dev" - }, - "phpdocumentor/reflection-docblock": { - "install-path": "vendor/phpdocumentor/reflection-docblock", - "installer": "composer", - "env": "dev" - }, - "phpdocumentor/type-resolver": { - "install-path": "vendor/phpdocumentor/type-resolver", - "installer": "composer", - "env": "dev" - }, - "phpspec/prophecy": { - "install-path": "vendor/phpspec/prophecy", - "installer": "composer", - "env": "dev" - }, - "phpunit/php-code-coverage": { - "install-path": "vendor/phpunit/php-code-coverage", - "installer": "composer", - "env": "dev" - }, - "phpunit/php-file-iterator": { - "install-path": "vendor/phpunit/php-file-iterator", - "installer": "composer", - "env": "dev" - }, - "phpunit/php-text-template": { - "install-path": "vendor/phpunit/php-text-template", - "installer": "composer", - "env": "dev" - }, - "phpunit/php-timer": { - "install-path": "vendor/phpunit/php-timer", - "installer": "composer", - "env": "dev" - }, - "phpunit/php-token-stream": { - "install-path": "vendor/phpunit/php-token-stream", - "installer": "composer", - "env": "dev" - }, - "phpunit/phpunit": { - "install-path": "vendor/phpunit/phpunit", - "installer": "composer", - "env": "dev" - }, - "phpunit/phpunit-mock-objects": { - "install-path": "vendor/phpunit/phpunit-mock-objects", - "installer": "composer", - "env": "dev" - }, - "psr/container": { - "install-path": "vendor/psr/container", - "installer": "composer" - }, - "psr/http-message": { - "install-path": "vendor/psr/http-message", - "installer": "composer" - }, - "psr/log": { - "install-path": "vendor/psr/log", - "installer": "composer" - }, - "puli/cli": { - "install-path": "vendor/puli/cli", - "installer": "composer" - }, - "puli/composer-plugin": { - "install-path": "vendor/puli/composer-plugin", - "installer": "composer" - }, - "puli/discovery": { - "install-path": "vendor/puli/discovery", - "installer": "composer" - }, - "puli/manager": { - "install-path": "vendor/puli/manager", - "installer": "composer" - }, - "puli/repository": { - "install-path": "vendor/puli/repository", - "installer": "composer" - }, - "puli/url-generator": { - "install-path": "vendor/puli/url-generator", - "installer": "composer" - }, - "ramsey/uuid": { - "install-path": "vendor/ramsey/uuid", - "installer": "composer" - }, - "sebastian/code-unit-reverse-lookup": { - "install-path": "vendor/sebastian/code-unit-reverse-lookup", - "installer": "composer", - "env": "dev" - }, - "sebastian/comparator": { - "install-path": "vendor/sebastian/comparator", - "installer": "composer", - "env": "dev" - }, - "sebastian/diff": { - "install-path": "vendor/sebastian/diff", - "installer": "composer", - "env": "dev" - }, - "sebastian/environment": { - "install-path": "vendor/sebastian/environment", - "installer": "composer", - "env": "dev" - }, - "sebastian/exporter": { - "install-path": "vendor/sebastian/exporter", - "installer": "composer", - "env": "dev" - }, - "sebastian/global-state": { - "install-path": "vendor/sebastian/global-state", - "installer": "composer", - "env": "dev" - }, - "sebastian/object-enumerator": { - "install-path": "vendor/sebastian/object-enumerator", - "installer": "composer", - "env": "dev" - }, - "sebastian/recursion-context": { - "install-path": "vendor/sebastian/recursion-context", - "installer": "composer", - "env": "dev" - }, - "sebastian/resource-operations": { - "install-path": "vendor/sebastian/resource-operations", - "installer": "composer", - "env": "dev" - }, - "sebastian/version": { - "install-path": "vendor/sebastian/version", - "installer": "composer", - "env": "dev" - }, - "seld/jsonlint": { - "install-path": "vendor/seld/jsonlint", - "installer": "composer" - }, - "symfony/console": { - "install-path": "vendor/symfony/console", - "installer": "composer" - }, - "symfony/debug": { - "install-path": "vendor/symfony/debug", - "installer": "composer" - }, - "symfony/event-dispatcher": { - "install-path": "vendor/symfony/event-dispatcher", - "installer": "composer" - }, - "symfony/filesystem": { - "install-path": "vendor/symfony/filesystem", - "installer": "composer" - }, - "symfony/polyfill-mbstring": { - "install-path": "vendor/symfony/polyfill-mbstring", - "installer": "composer" - }, - "symfony/process": { - "install-path": "vendor/symfony/process", - "installer": "composer" - }, - "symfony/yaml": { - "install-path": "vendor/symfony/yaml", - "installer": "composer", - "env": "dev" - }, - "twig/twig": { - "install-path": "vendor/twig/twig", - "installer": "composer" - }, - "webmozart/assert": { - "install-path": "vendor/webmozart/assert", - "installer": "composer" - }, - "webmozart/console": { - "install-path": "vendor/webmozart/console", - "installer": "composer" - }, - "webmozart/expression": { - "install-path": "vendor/webmozart/expression", - "installer": "composer" - }, - "webmozart/glob": { - "install-path": "vendor/webmozart/glob", - "installer": "composer" - }, - "webmozart/json": { - "install-path": "vendor/webmozart/json", - "installer": "composer" - }, - "webmozart/path-util": { - "install-path": "vendor/webmozart/path-util", - "installer": "composer" - }, - "zendframework/zend-diactoros": { - "install-path": "vendor/zendframework/zend-diactoros", - "installer": "composer" - }, - "zendframework/zend-escaper": { - "install-path": "vendor/zendframework/zend-escaper", - "installer": "composer" - }, - "zendframework/zend-stratigility": { - "install-path": "vendor/zendframework/zend-stratigility", - "installer": "composer" - } - } -} diff --git a/src-dev/Mouf/Controllers/MoufLoginController.php b/src-dev/Mouf/Controllers/MoufLoginController.php index e78dd56..bc37cb4 100755 --- a/src-dev/Mouf/Controllers/MoufLoginController.php +++ b/src-dev/Mouf/Controllers/MoufLoginController.php @@ -1,14 +1,15 @@ - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ +/* + * This file is part of the Mouf core package. + * + * (c) 2012 David Negrier + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ namespace Mouf\Controllers; +use Mouf\Mvc\Splash\Annotations\Action; use Mouf\Mvc\Splash\Controllers\Controller; use Mouf\Security\Controllers\SimpleLoginController; @@ -17,7 +18,6 @@ * It is actually getting its behaviour from the SimpleLoginController with one simple addition: * if the MoufUsers.php file does not exist, it will guide the user towards a solution to be able to get logged. * - * @Component */ class MoufLoginController extends SimpleLoginController { @@ -26,7 +26,7 @@ class MoufLoginController extends SimpleLoginController { * The index page will display the login form (from SimpleLoginController) or an explanation on how to setup users * if users are not set up yet. * - * @Action + * @Action() * @param string $login The login to fill by default. * @param string $redirecturl The URL to redirect to when login is done. If not specified, the default login URL defined in the controller will be used instead. */ @@ -40,4 +40,4 @@ public function defaultAction($login = null, $redirect = null) { parent::defaultAction($login, $redirect); } -} \ No newline at end of file +} diff --git a/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php b/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php new file mode 100644 index 0000000..809e7c4 --- /dev/null +++ b/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php @@ -0,0 +1,54 @@ + [self::class, 'declareControllers'], + 'simpleLoginControllerTemplate' => new Alias('moufLoginTemplate'), + 'root_url' => function() { return ROOT_URL; }, + UserServiceInterface::class => new Alias('userService'), + ]; + } + + public static function declareControllers(ContainerInterface $container, callable $previous = null) + { + if ($previous !== null) { + $controllers = $previous(); + } else { + $controllers = []; + } + + $controllers[] = SimpleLoginController::class; + + return $controllers; + } +} \ No newline at end of file diff --git a/src/Mouf/MoufManager.php b/src/Mouf/MoufManager.php index 3725420..93f2dc7 100755 --- a/src/Mouf/MoufManager.php +++ b/src/Mouf/MoufManager.php @@ -11,7 +11,7 @@ namespace Mouf; -use Interop\Container\ServiceProvider; +use Interop\Container\ServiceProviderInterface; use Mouf\Composer\ComposerService; use Mouf\Picotainer\Picotainer; use Mouf\Reflection\MoufReflectionProxy; @@ -313,7 +313,7 @@ private function getContainer() { require_once $compiledContainerFile; $containerName = $this->compiledContainerName; - $this->container = new $containerName($this->delegateLookupContainer); + $this->container = new $containerName(new Registry([], \TheCodingMachine\Discovery\Discovery::getInstance()), $this->delegateLookupContainer); } return $this->container; } @@ -355,13 +355,14 @@ private function writeContainerCachedModification() $cachedModifications = ['moufComponents' => filemtime($componentsFile), 'serviceProviders' => []]; - foreach (\TheCodingMachine\Discovery\Discovery::getInstance()->get(ServiceProvider::class) as $serviceProvider) { + foreach (\TheCodingMachine\Discovery\Discovery::getInstance()->get(ServiceProviderInterface::class) as $serviceProvider) { $reflectionClass = new \ReflectionClass($serviceProvider); $cachedModifications['serviceProviders'][$reflectionClass->getFileName()] = filemtime($reflectionClass->getFileName()); } $code = "get(RequestHandlerRunner::class); +$runner->run(); From 17db1504d4dca1a6471e01db09085d3ac649cb34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 23 Aug 2018 15:53:14 +0200 Subject: [PATCH 14/19] Upgrading to Yaco 1.2 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 15c1555..fa29ab4 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "mouf/mouf-validators-interface" : "^2.0", "container-interop/container-interop" : "^1.0", "mouf/classname-mapper": "^1.0", - "thecodingmachine/yaco": "^1.1", + "thecodingmachine/yaco": "^1.2", "puli/composer-plugin": "^1.0-beta9@dev", "puli/cli": "^1.0-beta9@dev", "thecodingmachine/discovery": "^1.0" From a6d1aeca4fc381ab4cb862aece6e6dbe11bba116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 23 Aug 2018 15:54:19 +0200 Subject: [PATCH 15/19] Fixing travis --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 50a761d..91d3b7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,8 @@ language: php php: - - 7.0 + - 7.1 + - 7.2 env: global: From db3ba38bb88133dc121acc8d9696d5e321d30a3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Fri, 24 Aug 2018 11:30:37 +0200 Subject: [PATCH 16/19] Working on service providers --- composer-mouf.json | 4 +- composer-mouf.lock | 502 +++--------------- discovery.json | 2 +- .../ControllersServiceProvider.php | 60 +-- src/Mouf/Yaco/PhpCodeDefinition.php | 9 +- src/mouf_router.php | 2 +- 6 files changed, 108 insertions(+), 471 deletions(-) diff --git a/composer-mouf.json b/composer-mouf.json index aa7973c..89cf737 100644 --- a/composer-mouf.json +++ b/composer-mouf.json @@ -13,7 +13,7 @@ "mouf/javascript.jquery.jquery-filetree" : "~1.01.0", "mouf/javascript.syntaxhighlighter" : "~3.0.83", "mouf/html.widgets.menu" : "~2.0", - "mouf/security.simplelogincontroller" : "~5.0", + "mouf/security.simplelogincontroller" : "~6.0", "mouf/security.userfiledao" : "~2.0", "mouf/utils.cache.file-cache" : "~2.0", "mouf/utils.common.getvars" : "~2.0", @@ -27,7 +27,7 @@ "thecodingmachine/funky": "^1.0", "mouf/javascript.ace": "1.1.3", "nikic/php-parser": "~2.0", - "mouf/security.userservice-splash": "~8.0", + "mouf/security.userservice-splash": "^10", "mouf/classname-mapper": "~1.0", "thecodingmachine/splash-router": "^10", diff --git a/composer-mouf.lock b/composer-mouf.lock index fe5048b..96ecec9 100644 --- a/composer-mouf.lock +++ b/composer-mouf.lock @@ -4,7 +4,7 @@ "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": "3c8ac157a52bdf6b35199d571a5e7064", + "content-hash": "41fc439e3cc2a2c8ed4e1b148ca7206c", "packages": [ { "name": "cache/adapter-common", @@ -118,59 +118,6 @@ ], "time": "2016-08-07T14:49:33+00:00" }, - { - "name": "cache/psr-6-doctrine-bridge", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-cache/doctrine-bridge.git", - "reference": "dcdb269a72e8d7c451f749b617c748ead42b78f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-cache/doctrine-bridge/zipball/dcdb269a72e8d7c451f749b617c748ead42b78f8", - "reference": "dcdb269a72e8d7c451f749b617c748ead42b78f8", - "shasum": "" - }, - "require": { - "doctrine/cache": "^1.3", - "php": "^5.5 || ^7.0", - "psr/cache-implementation": "^1.0" - }, - "require-dev": { - "cache/doctrine-adapter": "^0.5", - "mockery/mockery": "^0.9", - "phpunit/phpunit": "^4.0 || ^5.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Cache\\Bridge\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Scherer", - "email": "aequasi@gmail.com", - "homepage": "https://github.com/aequasi" - } - ], - "description": "PSR-6 Doctrine bridge", - "homepage": "http://www.php-cache.com/en/latest/", - "keywords": [ - "cache", - "doctrine", - "psr-6" - ], - "time": "2016-08-07T14:49:33+00:00" - }, { "name": "cache/taggable-cache", "version": "0.4.3", @@ -422,81 +369,6 @@ ], "time": "2017-12-06T07:11:42+00:00" }, - { - "name": "doctrine/cache", - "version": "v1.8.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/d768d58baee9a4862ca783840eca1b9add7a7f57", - "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57", - "shasum": "" - }, - "require": { - "php": "~7.1" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "require-dev": { - "alcaeus/mongo-php-adapter": "^1.1", - "doctrine/coding-standard": "^4.0", - "mongodb/mongodb": "^1.1", - "phpunit/phpunit": "^7.0", - "predis/predis": "~1.0" - }, - "suggest": { - "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8.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": "https://www.doctrine-project.org/", - "keywords": [ - "cache", - "caching" - ], - "time": "2018-08-21T18:01:43+00:00" - }, { "name": "doctrine/lexer", "version": "v1.0.1", @@ -601,59 +473,6 @@ ], "time": "2017-02-09T16:10:21+00:00" }, - { - "name": "http-interop/http-middleware", - "version": "0.4.1", - "source": { - "type": "git", - "url": "https://github.com/http-interop/http-middleware.git", - "reference": "9a801fe60e70d5d608b61d56b2dcde29516c81b9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/http-interop/http-middleware/zipball/9a801fe60e70d5d608b61d56b2dcde29516c81b9", - "reference": "9a801fe60e70d5d608b61d56b2dcde29516c81b9", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Interop\\Http\\ServerMiddleware\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side middleware", - "keywords": [ - "factory", - "http", - "middleware", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "abandoned": "http-interop/http-server-middleware", - "time": "2017-01-14T15:23:42+00:00" - }, { "name": "michelf/php-markdown", "version": "1.8.0", @@ -700,6 +519,47 @@ ], "time": "2018-01-15T00:49:33+00:00" }, + { + "name": "mindplay/composer-locator", + "version": "2.1.3", + "source": { + "type": "git", + "url": "https://github.com/mindplay-dk/composer-locator.git", + "reference": "629988d5305cd8ef11adbd6bb485660219c599fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mindplay-dk/composer-locator/zipball/629988d5305cd8ef11adbd6bb485660219c599fc", + "reference": "629988d5305cd8ef11adbd6bb485660219c599fc", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1", + "php": ">= 5.4" + }, + "require-dev": { + "composer/composer": "^1", + "mindplay/testies": "^0.3.0", + "symfony/filesystem": "^2.7 || ^3.0", + "symfony/process": "^2.7 || ^3.0" + }, + "type": "composer-plugin", + "extra": { + "class": "mindplay\\composer_locator\\Plugin" + }, + "autoload": { + "classmap": [ + "src/ComposerLocator.php", + "src/Plugin.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Locates Composer package root folders by package name", + "time": "2017-05-08T12:12:31+00:00" + }, { "name": "mnapoli/simplex", "version": "0.5.0", @@ -1937,161 +1797,27 @@ ], "time": "2013-10-29T18:21:58+00:00" }, - { - "name": "mouf/mvc.splash-common", - "version": "v8.3.0", - "source": { - "type": "git", - "url": "https://github.com/thecodingmachine/mvc.splash-common.git", - "reference": "cf7e63501faecca66eedaa127f2c38fad006adf5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/mvc.splash-common/zipball/cf7e63501faecca66eedaa127f2c38fad006adf5", - "reference": "cf7e63501faecca66eedaa127f2c38fad006adf5", - "shasum": "" - }, - "require": { - "cache/void-adapter": "^0.3.0", - "container-interop/service-provider": "^0.4", - "doctrine/annotations": "^1.2", - "http-interop/http-middleware": "^0.4", - "mouf/html.htmlelement": "^2.0", - "mouf/html.renderer.twig-extensions": "~1.0", - "mouf/html.template.templateinterface": "^2.1", - "mouf/utils.action.common-action": "~1.0", - "mouf/utils.cache.cache-interface": "~2.0", - "mouf/utils.common.conditioninterface": "~2.0", - "mouf/utils.common.url-interface": "~1.0", - "php": ">=7.0", - "psr/cache": "^1.0", - "thecodingmachine/common-factories": "^0.4", - "thecodingmachine/middleware-list-universal-module": "~1.0", - "zendframework/zend-diactoros": "~1.0" - }, - "conflict": { - "zendframework/zend-stratigility": "<2.0" - }, - "require-dev": { - "cache/array-adapter": "^0.4.0", - "mnapoli/simplex": "^0.3", - "mouf/picotainer": "~1.0", - "phpunit/phpunit": "^5.0", - "satooshi/php-coveralls": "^1.0" - }, - "type": "mouf-library", - "extra": { - "mouf": { - "logo": "doc/images/logo.png", - "doc": [ - { - "title": "Installing Splash", - "url": "doc/install/index.md", - "children": [ - { - "title": "Standalone mode", - "url": "doc/install/standalone.md" - }, - { - "title": "Mouf integration", - "url": "doc/install/mouf.md" - }, - { - "title": "Service provider", - "url": "doc/service-provider.md" - } - ] - }, - { - "title": "Writing controllers", - "url": "doc/writing_controllers_manually.md" - }, - { - "title": "Integrations", - "children": [ - { - "title": "Mouf", - "children": [ - { - "title": "Controller creation wizard", - "url": "doc/mouf/writing_controllers.md" - }, - { - "title": "Advanced: configuring routing", - "url": "doc/url_routing.md" - } - ] - } - ] - }, - { - "title": "Managing URL parameters", - "url": "doc/url_parameters.md" - }, - { - "title": "Writing your own filters", - "url": "doc/filters.md" - }, - { - "title": "Migrating from older version", - "url": "doc/migrating.md" - } - ], - "section": { - "name": "MVC", - "description": "All the tools you need to route requests and display pages", - "weight": 10 - } - } - }, - "autoload": { - "psr-4": { - "Mouf\\Annotations\\": "src/Mouf/Annotations", - "Mouf\\Mvc\\Splash\\": "src/Mouf/Mvc/Splash" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com", - "homepage": "http://mouf-php.com/" - } - ], - "description": "Splash is a PHP router. It takes an HTTP request and dispatches it to the appropriate controller.", - "homepage": "http://mouf-php.com/packages/mouf/mvc.splash-common", - "keywords": [ - "framework", - "mouf", - "mvc", - "splash", - "splash-common" - ], - "time": "2018-03-01T14:22:20+00:00" - }, { "name": "mouf/security.simplelogincontroller", - "version": "5.0.x-dev", + "version": "6.0.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/security.simplelogincontroller.git", - "reference": "c4d0600bef6089add7bf1c2223b3a7cc547fb657" + "reference": "03e5071b46f9580581687abb1a8eadd88810ae06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/security.simplelogincontroller/zipball/c4d0600bef6089add7bf1c2223b3a7cc547fb657", - "reference": "c4d0600bef6089add7bf1c2223b3a7cc547fb657", + "url": "https://api.github.com/repos/thecodingmachine/security.simplelogincontroller/zipball/03e5071b46f9580581687abb1a8eadd88810ae06", + "reference": "03e5071b46f9580581687abb1a8eadd88810ae06", "shasum": "" }, "require": { - "mouf/mvc.splash-common": "^8.0.0", "mouf/security.userservice": "^2.1.0", - "mouf/security.userservice-splash": "^8.0.0", + "mouf/security.userservice-splash": "^10", "mouf/utils.action.action-interface": "~1.0", - "php": "^7.0.0" + "php": "^7.1", + "thecodingmachine/funky": "^1", + "thecodingmachine/splash-router": "^10.0" }, "type": "mouf-library", "extra": { @@ -2133,7 +1859,7 @@ "mouf", "security" ], - "time": "2016-09-13T10:04:51+00:00" + "time": "2018-08-23T21:41:31+00:00" }, { "name": "mouf/security.userfiledao", @@ -2264,22 +1990,23 @@ }, { "name": "mouf/security.userservice-splash", - "version": "v8.0.1", + "version": "10.0.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/security.userservice-splash.git", - "reference": "4dacf48fcba71958e7cea1a06b2d958962ae26e9" + "reference": "d34eda222e4b4557542d145adacab18b6028f846" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/security.userservice-splash/zipball/4dacf48fcba71958e7cea1a06b2d958962ae26e9", - "reference": "4dacf48fcba71958e7cea1a06b2d958962ae26e9", + "url": "https://api.github.com/repos/thecodingmachine/security.userservice-splash/zipball/d34eda222e4b4557542d145adacab18b6028f846", + "reference": "d34eda222e4b4557542d145adacab18b6028f846", "shasum": "" }, "require": { - "mouf/mvc.splash-common": "^8.0.0", "mouf/security.userservice": "^2.1.0", - "php": ">=7.0.0" + "php": ">=7.1", + "thecodingmachine/funky": "^1", + "thecodingmachine/splash-router": "^10" }, "type": "library", "extra": { @@ -2316,7 +2043,7 @@ "splash", "user" ], - "time": "2018-07-25T12:49:49+00:00" + "time": "2018-08-24T08:34:21+00:00" }, { "name": "mouf/utils.action.action-interface", @@ -2362,55 +2089,6 @@ ], "time": "2013-10-29T18:21:59+00:00" }, - { - "name": "mouf/utils.action.common-action", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/thecodingmachine/utils.action.common-action.git", - "reference": "9498e24435b96812953cbca91fd20daecbfc549a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/utils.action.common-action/zipball/9498e24435b96812953cbca91fd20daecbfc549a", - "reference": "9498e24435b96812953cbca91fd20daecbfc549a", - "shasum": "" - }, - "require": { - "mouf/utils.action.action-interface": "~1.0", - "mouf/utils.value.value-interface": "~1.0", - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "mouf": { - "logo": "logo.png" - } - }, - "autoload": { - "psr-0": { - "Mouf\\Utils\\Action": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com", - "homepage": "http://mouf-php.com/" - } - ], - "description": "This package contains common classes that implement the ActionInterface interface (from the mouf/utils.action.action-interface package).", - "homepage": "https://mouf-php.com/mouf/utils.action.common-action", - "keywords": [ - "actioninterface", - "mouf" - ], - "time": "2015-01-23T11:09:24+00:00" - }, { "name": "mouf/utils.cache.apc-cache", "version": "v2.2.0", @@ -4038,17 +3716,18 @@ "source": { "type": "git", "url": "https://github.com/thecodingmachine/funky.git", - "reference": "a973ba2a22d1a192078f123697bfd85104b595bc" + "reference": "f3c05ece1f130b228554ffb6a0ff395e9da9d8ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/funky/zipball/a973ba2a22d1a192078f123697bfd85104b595bc", - "reference": "a973ba2a22d1a192078f123697bfd85104b595bc", + "url": "https://api.github.com/repos/thecodingmachine/funky/zipball/f3c05ece1f130b228554ffb6a0ff395e9da9d8ed", + "reference": "f3c05ece1f130b228554ffb6a0ff395e9da9d8ed", "shasum": "" }, "require": { "container-interop/service-provider": "^0.4", "doctrine/annotations": "^1.5.0", + "mindplay/composer-locator": "^2.1.3", "php": ">=7.1", "thecodingmachine/common-factories": "^0.4" }, @@ -4068,7 +3747,8 @@ }, "autoload": { "psr-4": { - "TheCodingMachine\\Funky\\": "src/" + "TheCodingMachine\\Funky\\": "src/", + "FunkyGenerated\\": "generated/FunkyGenerated/" } }, "notification-url": "https://packagist.org/downloads/", @@ -4082,7 +3762,7 @@ } ], "description": "Write service providers easily using annotations", - "time": "2017-11-29T16:51:34+00:00" + "time": "2018-08-23T20:58:07+00:00" }, { "name": "thecodingmachine/middleware-list-universal-module", @@ -4115,48 +3795,6 @@ "description": "Cross-framework module providing a service containing a list of middlewares", "time": "2018-06-05T13:27:42+00:00" }, - { - "name": "thecodingmachine/psr-6-doctrine-bridge-universal-module", - "version": "1.1.x-dev", - "source": { - "type": "git", - "url": "https://github.com/thecodingmachine/psr-6-doctrine-bridge-universal-module.git", - "reference": "e7506b18a2725b4a0f561ae427a3b68b30b976d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/psr-6-doctrine-bridge-universal-module/zipball/e7506b18a2725b4a0f561ae427a3b68b30b976d9", - "reference": "e7506b18a2725b4a0f561ae427a3b68b30b976d9", - "shasum": "" - }, - "require": { - "cache/psr-6-doctrine-bridge": "^2.1", - "container-interop/service-provider": "^0.4", - "php": ">=7.0", - "thecodingmachine/common-factories": "^0.4" - }, - "require-dev": { - "mnapoli/simplex": "~0.3.0", - "phpunit/phpunit": "^5.0", - "satooshi/php-coveralls": "^1.0", - "thecodingmachine/stash-universal-module": "^1.0" - }, - "suggest": { - "thecodingmachine/stash-universal-module": "A service provider providing a PSR-6 cache pool through the Stash library" - }, - "type": "library", - "autoload": { - "psr-4": { - "TheCodingMachine\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Cross-framework module for cache/psr-6-doctrine-bridge", - "time": "2017-09-25T12:06:41+00:00" - }, { "name": "thecodingmachine/splash-router", "version": "dev-master", @@ -4283,12 +3921,12 @@ "source": { "type": "git", "url": "https://github.com/thecodingmachine/stratigility-harmony.git", - "reference": "d8ba391549f8932680e8fca8c4c3a4482f799a2c" + "reference": "1fcea1cf58aaba5ea32867d1045b23faa86a7e80" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/stratigility-harmony/zipball/d8ba391549f8932680e8fca8c4c3a4482f799a2c", - "reference": "d8ba391549f8932680e8fca8c4c3a4482f799a2c", + "url": "https://api.github.com/repos/thecodingmachine/stratigility-harmony/zipball/1fcea1cf58aaba5ea32867d1045b23faa86a7e80", + "reference": "1fcea1cf58aaba5ea32867d1045b23faa86a7e80", "shasum": "" }, "require": { @@ -4318,7 +3956,7 @@ "MIT" ], "description": "Cross-framework module for Stratigility", - "time": "2018-08-23T13:11:13+00:00" + "time": "2018-08-23T13:21:35+00:00" }, { "name": "thecodingmachine/symfony-cache-universal-module", diff --git a/discovery.json b/discovery.json index f18e6e3..1715d9c 100644 --- a/discovery.json +++ b/discovery.json @@ -1,3 +1,3 @@ { - "Interop\\Container\\ServiceProvider": "Mouf\\ServiceProviders\\ControllersServiceProvider" + "Interop\\Container\\ServiceProviderInterface": "Mouf\\ServiceProviders\\ControllersServiceProvider" } \ No newline at end of file diff --git a/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php b/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php index 809e7c4..59b60da 100644 --- a/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php +++ b/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php @@ -5,50 +5,48 @@ use Interop\Container\Factories\Alias; -use Interop\Container\ServiceProvider; +use Interop\Container\ServiceProviderInterface; +use Mouf\Html\Template\TemplateInterface; use Mouf\Security\Controllers\SimpleLoginController; use Mouf\Security\UserService\UserServiceInterface; use Psr\Container\ContainerInterface; +use TheCodingMachine\Funky\Annotations\Extension; +use TheCodingMachine\Funky\Annotations\Factory; +use TheCodingMachine\Funky\ServiceProvider; -class ControllersServiceProvider implements ServiceProvider +class ControllersServiceProvider extends ServiceProvider { + /** + * TODO: UserServiceInterface::class should be created by the user service package. + * @Factory() + */ + public static function createUserService(ContainerInterface $container): UserServiceInterface + { + return $container->get('userService'); + } /** - * Returns a list of all container entries registered by this service provider. - * - * - the key is the entry name - * - the value is a callable that will return the entry, aka the **factory** - * - * Factories have the following signature: - * function(ContainerInterface $container, callable $getPrevious = null) - * - * About factories parameters: - * - * - the container (instance of `Interop\Container\ContainerInterface`) - * - a callable that returns the previous entry if overriding a previous entry, or `null` if not - * - * @return callable[] + * @Factory(name="ROOT_URL") */ - public function getServices() + public static function getRootUrl(): string { - return [ - 'thecodingmachine.splash.controllers' => [self::class, 'declareControllers'], - 'simpleLoginControllerTemplate' => new Alias('moufLoginTemplate'), - 'root_url' => function() { return ROOT_URL; }, - UserServiceInterface::class => new Alias('userService'), - ]; + return \ROOT_URL; } - public static function declareControllers(ContainerInterface $container, callable $previous = null) + /** + * @Factory(name="simpleLoginControllerTemplate") + */ + public static function aliasSimpleLoginControllerTemplate(ContainerInterface $container): TemplateInterface { - if ($previous !== null) { - $controllers = $previous(); - } else { - $controllers = []; - } + return $container->get('moufLoginTemplate'); + } + /** + * @Extension(name="thecodingmachine.splash.controllers") + */ + public static function declareControllers(array $controllers): array + { $controllers[] = SimpleLoginController::class; - return $controllers; } -} \ No newline at end of file +} diff --git a/src/Mouf/Yaco/PhpCodeDefinition.php b/src/Mouf/Yaco/PhpCodeDefinition.php index c90fdee..d1d59fd 100644 --- a/src/Mouf/Yaco/PhpCodeDefinition.php +++ b/src/Mouf/Yaco/PhpCodeDefinition.php @@ -4,6 +4,7 @@ namespace Mouf\Yaco; use TheCodingMachine\Yaco\Definition\DumpableInterface; use TheCodingMachine\Yaco\Definition\InlineEntry; +use TheCodingMachine\Yaco\Definition\InlineEntryInterface; /** * This class represents a parameter or instance declared via PHP code. @@ -42,7 +43,7 @@ public function __construct($identifier, string $phpCode) * * @return string */ - public function getIdentifier() + public function getIdentifier(): ?string { return $this->identifier; } @@ -50,9 +51,9 @@ public function getIdentifier() /** * Returns the value of the parameter. * - * @return mixed + * @return string|null */ - public function getPhpCode() + public function getPhpCode(): ?string { return $this->phpCode; } @@ -66,7 +67,7 @@ public function getPhpCode() * * @return InlineEntryInterface */ - public function toPhpCode($containerVariable, array $usedVariables = array()) + public function toPhpCode(string $containerVariable, array $usedVariables = array()): InlineEntryInterface { $code = sprintf('(function($container) { %s; })(%s)', $this->phpCode, $containerVariable); return new InlineEntry($code, null, $usedVariables, false); diff --git a/src/mouf_router.php b/src/mouf_router.php index 84cd1b6..15071d0 100644 --- a/src/mouf_router.php +++ b/src/mouf_router.php @@ -35,5 +35,5 @@ $container = \Mouf\MoufManager::getMoufManager(); -$container->get(RequestHandlerRunner::class); +$runner = $container->get(RequestHandlerRunner::class); $runner->run(); From 12c6821f061f6b6514608b3082369014a0576095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 30 Aug 2018 23:01:27 +0200 Subject: [PATCH 17/19] Migrating controllers --- composer-mouf.json | 22 +- composer-mouf.lock | 1118 ++++++++--------- mouf/MoufComponents.php | 80 +- mouf/MoufUI.php | 1 - .../Mouf/Controllers/MoufRootController.php | 40 +- .../Controllers/MoufValidatorController.php | 44 +- .../ControllersServiceProvider.php | 39 +- 7 files changed, 649 insertions(+), 695 deletions(-) diff --git a/composer-mouf.json b/composer-mouf.json index 89cf737..740732c 100644 --- a/composer-mouf.json +++ b/composer-mouf.json @@ -4,30 +4,28 @@ "require": { "mouf/mouf-installer": "~2.0", "mouf/mouf-validators-interface": "~2.0", - "mouf/html.template.mouftemplate": "~2.0", - "mouf/html.template.bootstrap": "2.3.2.*", + "mouf/html.template.bootstrap": "~2.3.4", "mouf/utils.i18n.fine": "~3.0", "mouf/javascript.jquery.jquery-ui": "~1.10", "mouf/javascript.underscore": "~1.3.3", - "mouf/utils.log.errorlog_logger": "~2.0", "mouf/javascript.jquery.jquery-filetree" : "~1.01.0", "mouf/javascript.syntaxhighlighter" : "~3.0.83", - "mouf/html.widgets.menu" : "~2.0", + "mouf/html.widgets.menu" : "^4.0", "mouf/security.simplelogincontroller" : "~6.0", - "mouf/security.userfiledao" : "~2.0", + "mouf/security.userfiledao" : "~4.0", "mouf/utils.cache.file-cache" : "~2.0", "mouf/utils.common.getvars" : "~2.0", "mouf/famfamfam" : "~1.3.0", - "mouf/html.template.menus.basicmenu" : "~2.0", - "mouf/utils.session.session-manager" : "~2.0", - "mouf/html.widgets.messageservice": "~2.0", + "mouf/utils.session.session-manager" : "^4", + "mouf/html.widgets.messageservice": "^4", "mouf/utils.cache.apc-cache": "~2.0", "michelf/php-markdown": "~1.3", "mouf/javascript.jquery.jq-bootstrap-validation": "~1.3.0", "thecodingmachine/funky": "^1.0", - "mouf/javascript.ace": "1.1.3", + "mouf/javascript.ace": "~1.1.3", "nikic/php-parser": "~2.0", "mouf/security.userservice-splash": "^10", + "mouf/security.userservice": "^3", "mouf/classname-mapper": "~1.0", "thecodingmachine/splash-router": "^10", @@ -39,7 +37,9 @@ "thecodingmachine/symfony-cache-universal-module": "~1.0", "thecodingmachine/stratigility-harmony": "^3.0", "thecodingmachine/twig-universal-module": "^1.1", - "thecodingmachine/discovery": "^1.0" + "thecodingmachine/monolog-universal-service-provider": "^1.1", + "thecodingmachine/discovery": "^1.0", + "mouf/mvc.splash-common": "^10" }, "require-dev": { "phpunit/phpunit": "~5.0" @@ -54,4 +54,4 @@ } } -} \ No newline at end of file +} diff --git a/composer-mouf.lock b/composer-mouf.lock index 96ecec9..652f86f 100644 --- a/composer-mouf.lock +++ b/composer-mouf.lock @@ -4,7 +4,7 @@ "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": "41fc439e3cc2a2c8ed4e1b148ca7206c", + "content-hash": "8498725b1340bcf235d6ce9975656e9f", "packages": [ { "name": "cache/adapter-common", @@ -239,37 +239,6 @@ ], "time": "2016-08-07T15:04:55+00:00" }, - { - "name": "container-interop/container-interop", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/container-interop/container-interop.git", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "shasum": "" - }, - "require": { - "psr/container": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Interop\\Container\\": "src/Interop/Container/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "homepage": "https://github.com/container-interop/container-interop", - "time": "2017-02-14T19:40:03+00:00" - }, { "name": "container-interop/service-provider", "version": "v0.4.0", @@ -610,6 +579,84 @@ ], "time": "2018-02-13T08:14:36+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": "mouf/classname-mapper", "version": "v1.0.1", @@ -751,35 +798,51 @@ }, { "name": "mouf/html.renderer", - "version": "v1.2.1", + "version": "2.0.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/html.renderer.git", - "reference": "1bba9f6307285eb48cf91f8fdc51bde77729c8ad" + "reference": "f9ef351b93b81c7f78b6d1e86fb814c7798f7c00" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/html.renderer/zipball/1bba9f6307285eb48cf91f8fdc51bde77729c8ad", - "reference": "1bba9f6307285eb48cf91f8fdc51bde77729c8ad", + "url": "https://api.github.com/repos/thecodingmachine/html.renderer/zipball/f9ef351b93b81c7f78b6d1e86fb814c7798f7c00", + "reference": "f9ef351b93b81c7f78b6d1e86fb814c7798f7c00", "shasum": "" }, "require": { + "container-interop/service-provider": "^0.4", + "mindplay/composer-locator": "^2.1.3", "mouf/html.htmlelement": "~2.0", - "mouf/html.renderer.twig-extensions": "~1.0", + "mouf/html.renderer.twig-extensions": "^3", "mouf/utils.cache.apc-cache": "~2.0", - "mouf/utils.cache.in-memory-cache": "~1.0", - "php": ">=5.4.4", + "php": ">=7.1", + "psr/container": "^1", + "psr/http-message": "^1", + "psr/http-server-handler": "^1", + "psr/http-server-middleware": "^1", + "psr/simple-cache": "^1", + "thecodingmachine/funky": "^1", + "thecodingmachine/middleware-list-universal-module": "^1.1.1", "twig/twig": "^1 || ^2" }, - "type": "mouf-library", + "conflict": { + "mouf/mouf": "~2.0.0" + }, + "require-dev": { + "maglnet/composer-require-checker": "^1.0", + "mnapoli/simplex": "^0.5", + "phpstan/phpstan": "^0.10.3", + "phpunit/phpunit": "^7.3.1", + "squizlabs/php_codesniffer": "^3.3.1", + "symfony/cache": "^4.1.3", + "thecodingmachine/phpstan-strict-rules": "^0.10.3", + "thecodingmachine/symfony-cache-universal-module": "^1", + "thecodingmachine/twig-universal-module": "^1" + }, + "type": "library", "extra": { "mouf": { - "install": [ - { - "file": "src/install.php", - "type": "file" - } - ], "logo": "logo.png", "doc": [ { @@ -802,8 +865,8 @@ } }, "autoload": { - "psr-0": { - "Mouf\\Html\\Renderer": "src/" + "psr-4": { + "Mouf\\Html\\Renderer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -825,39 +888,44 @@ "render", "tohtml" ], - "time": "2018-08-07T09:26:08+00:00" + "time": "2018-08-30T16:29:36+00:00" }, { "name": "mouf/html.renderer.twig-extensions", - "version": "1.2.x-dev", + "version": "3.0.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/html.renderer.twig-extensions.git", - "reference": "330369b64f5449fcc6e09658aa4022dee4c18899" + "reference": "a7a541ff1c734ebfa3f38f1c6da9d3cbd4e3a9d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/html.renderer.twig-extensions/zipball/330369b64f5449fcc6e09658aa4022dee4c18899", - "reference": "330369b64f5449fcc6e09658aa4022dee4c18899", + "url": "https://api.github.com/repos/thecodingmachine/html.renderer.twig-extensions/zipball/a7a541ff1c734ebfa3f38f1c6da9d3cbd4e3a9d0", + "reference": "a7a541ff1c734ebfa3f38f1c6da9d3cbd4e3a9d0", "shasum": "" }, "require": { - "container-interop/container-interop": "~1.0", "mouf/html.htmlelement": "~2.0", - "mouf/utils.cache.purge-ui": "^1", - "mouf/utils.constants.debug": "~1.0", - "php": ">=5.4.0", - "twig/twig": "~1.19 | ^2" + "mouf/utils.value.value-interface": "^1", + "php": ">=7.1", + "psr/container": "^1", + "thecodingmachine/funky": "^1", + "twig/twig": "^2" + }, + "conflict": { + "mouf/mouf": "~2.0.0" + }, + "require-dev": { + "maglnet/composer-require-checker": "^1.0", + "mnapoli/simplex": "^0.5", + "phpstan/phpstan": "^0.10.3", + "squizlabs/php_codesniffer": "^3.3.1", + "thecodingmachine/phpstan-strict-rules": "^0.10.3", + "thecodingmachine/twig-universal-module": "^1" }, "type": "mouf-library", "extra": { "mouf": { - "install": [ - { - "type": "class", - "class": "Mouf\\Html\\Renderer\\Twig\\MoufTwigEnvironmentInstaller2" - } - ], "doc": [ { "title": "Twig extensions", @@ -891,42 +959,39 @@ "render", "tohtml" ], - "time": "2018-08-16T21:23:09+00:00" + "time": "2018-08-27T21:56:24+00:00" }, { "name": "mouf/html.template.bootstrap", - "version": "v2.3.2.0", + "version": "2.3.4.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/html.template.bootstrap.git", - "reference": "74c9ebff540582b2af1deafcd918fa6b5bedbf1d" + "reference": "d1b9e4a00e129f61988d3fb29ed80b29c5ae8364" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/html.template.bootstrap/zipball/74c9ebff540582b2af1deafcd918fa6b5bedbf1d", - "reference": "74c9ebff540582b2af1deafcd918fa6b5bedbf1d", + "url": "https://api.github.com/repos/thecodingmachine/html.template.bootstrap/zipball/d1b9e4a00e129f61988d3fb29ed80b29c5ae8364", + "reference": "d1b9e4a00e129f61988d3fb29ed80b29c5ae8364", "shasum": "" }, "require": { - "mouf/html.template.templateinterface": "~2.0", + "mouf/html.template.templateinterface": "^3", "mouf/html.utils.bootstrap": "2.3.*", - "mouf/html.utils.weblibrarymanager": "~2.0", - "mouf/html.widgets.menu": "2.*", - "mouf/html.widgets.messageservice": "~2.2", - "php": ">=5.3.0" + "mouf/html.utils.weblibrarymanager": "~4.0", + "mouf/html.widgets.menu": "^4", + "mouf/html.widgets.messageservice": "~4.0", + "php": ">=7.1" }, - "type": "mouf-library", - "extra": { - "mouf": { - "install": [ - { - "type": "file", - "file": "src/install.php" - } - ], - "logo": "icons/logo.png" - } + "conflict": { + "mouf/mouf": "~2.0.0" }, + "require-dev": { + "phpstan/phpstan": "^0.10.3", + "squizlabs/php_codesniffer": "^3.3.1", + "thecodingmachine/phpstan-strict-rules": "^0.10.3" + }, + "type": "mouf-library", "autoload": { "psr-0": { "Mouf": "src/" @@ -951,114 +1016,36 @@ "mouf", "template" ], - "time": "2013-07-17T15:47:31+00:00" - }, - { - "name": "mouf/html.template.menus.basicmenu", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/thecodingmachine/html.template.menus.basicmenu.git", - "reference": "29ee1265b57bef6148bbedc4facb2d142feee309" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/html.template.menus.basicmenu/zipball/29ee1265b57bef6148bbedc4facb2d142feee309", - "reference": "29ee1265b57bef6148bbedc4facb2d142feee309", - "shasum": "" - }, - "require": { - "mouf/html.widgets.menu": "2.*", - "php": ">=5.3.0" - }, - "type": "mouf-library", - "autoload": { - "psr-0": { - "Mouf": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com", - "homepage": "http://mouf-php.com/" - } - ], - "description": "This package contains a single class in charge of rendering a 'Menu' instance in HTML using the toHtml() method. The rendering is performed using <ul> and <li> tags.", - "homepage": "https://github.com/thecodingmachine/html.template.menus.basicmenu", - "keywords": [ - "basicmenu", - "menu", - "mouf" - ], - "time": "2014-06-03T20:27:41+00:00" - }, - { - "name": "mouf/html.template.mouftemplate", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/thecodingmachine/html.template.mouftemplate.git", - "reference": "2e47823a149fb6a4dfaa97ec945ae6816b23b756" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/html.template.mouftemplate/zipball/2e47823a149fb6a4dfaa97ec945ae6816b23b756", - "reference": "2e47823a149fb6a4dfaa97ec945ae6816b23b756", - "shasum": "" - }, - "require": { - "mouf/html.template.templateinterface": ">=2.0-dev,<3.0", - "php": ">=5.3.0" - }, - "type": "mouf-library", - "autoload": { - "psr-0": { - "Mouf": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com", - "homepage": "http://mouf-php.com/" - } - ], - "description": "This package contains a template for the Mouf administration interface. The content is automatically adjusted to the website page to use all the width. Anyway, you can use this component as a model if you like.", - "homepage": "https://github.com/thecodingmachine/html.template.mouftemplate", - "keywords": [ - "mouf", - "mouftemplate", - "template" - ], - "time": "2014-06-03T20:28:14+00:00" + "time": "2018-08-28T13:48:55+00:00" }, { "name": "mouf/html.template.templateinterface", - "version": "v2.1.1", + "version": "3.0.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/html.template.templateinterface.git", - "reference": "92586fd0542117702054fa348a76ee7da57e48f3" + "reference": "268375e915eec948c84c03b7a5d85b984a8cfe74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/html.template.templateinterface/zipball/92586fd0542117702054fa348a76ee7da57e48f3", - "reference": "92586fd0542117702054fa348a76ee7da57e48f3", + "url": "https://api.github.com/repos/thecodingmachine/html.template.templateinterface/zipball/268375e915eec948c84c03b7a5d85b984a8cfe74", + "reference": "268375e915eec948c84c03b7a5d85b984a8cfe74", "shasum": "" }, "require": { - "mouf/html.renderer": "~1.0", - "mouf/html.utils.weblibrarymanager": ">=2.0-dev,<4.0", - "php": ">=5.3.0" + "mouf/html.htmlelement": "^2", + "mouf/html.renderer": "^2", + "mouf/html.utils.weblibrarymanager": "^4", + "php": ">=7.1" + }, + "conflict": { + "mouf/mouf": "~2.0.0" + }, + "require-dev": { + "maglnet/composer-require-checker": "^1.0", + "phpstan/phpstan": "^0.10.3", + "squizlabs/php_codesniffer": "^3.3.1", + "thecodingmachine/phpstan-strict-rules": "^0.10.3" }, "type": "mouf-library", "autoload": { @@ -1084,7 +1071,7 @@ "template", "templateinterface" ], - "time": "2014-12-10T16:01:57+00:00" + "time": "2018-08-30T20:33:29+00:00" }, { "name": "mouf/html.utils.bootstrap", @@ -1139,41 +1126,54 @@ }, { "name": "mouf/html.utils.weblibrarymanager", - "version": "v2.2.0", + "version": "4.0.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/html.utils.weblibrarymanager.git", - "reference": "761ff34b105c2e3e321bad57f17d9c07ac917c25" + "reference": "e1e5e06d7221a4e77196798ca8bdc3908025eb51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/html.utils.weblibrarymanager/zipball/761ff34b105c2e3e321bad57f17d9c07ac917c25", - "reference": "761ff34b105c2e3e321bad57f17d9c07ac917c25", + "url": "https://api.github.com/repos/thecodingmachine/html.utils.weblibrarymanager/zipball/e1e5e06d7221a4e77196798ca8bdc3908025eb51", + "reference": "e1e5e06d7221a4e77196798ca8bdc3908025eb51", "shasum": "" }, "require": { - "mouf/html.htmlelement": "~2.0", - "mouf/html.utils.weblibrarymanager.component-installer": "2.1.*", - "mouf/mouf-installer": "~2.0", - "php": ">=5.3.0" + "mindplay/composer-locator": "^2.1.3", + "mouf/html.htmlelement": "^2.0", + "mouf/html.renderer": "^2.0", + "php": ">=7.1", + "psr/container": "^1", + "thecodingmachine/funky": "^1" + }, + "conflict": { + "mouf/mouf": "~2.0.0" + }, + "require-dev": { + "maglnet/composer-require-checker": "^1.0", + "mnapoli/simplex": "^0.5", + "phpstan/phpstan": "^0.10.3", + "phpunit/phpunit": "^7.3.1", + "squizlabs/php_codesniffer": "^3.3.1", + "thecodingmachine/discovery": "^1", + "thecodingmachine/phpstan-strict-rules": "^0.10.3", + "thecodingmachine/symfony-cache-universal-module": "^1", + "thecodingmachine/twig-universal-module": "^1" }, "type": "mouf-library", "extra": { "mouf": { - "install": [ + "doc": [ { - "type": "file", - "file": "install.php" + "title": "CHANGELOG", + "url": "doc/CHANGELOG.md" } - ], - "require-admin": [ - "src/WebLibraryAdmin.php" ] } }, "autoload": { - "psr-0": { - "Mouf\\Html\\Utils\\WebLibraryManager": "src/" + "psr-4": { + "Mouf\\Html\\Utils\\WebLibraryManager\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1197,76 +1197,33 @@ "javascript", "mouf" ], - "time": "2017-01-12T15:34:17+00:00" - }, - { - "name": "mouf/html.utils.weblibrarymanager.component-installer", - "version": "v2.1.4", - "source": { - "type": "git", - "url": "https://github.com/thecodingmachine/html.utils.weblibrarymanager.component-installer.git", - "reference": "e2ca65af881bde139a9d101d19808f9d6610fec3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/html.utils.weblibrarymanager.component-installer/zipball/e2ca65af881bde139a9d101d19808f9d6610fec3", - "reference": "e2ca65af881bde139a9d101d19808f9d6610fec3", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0", - "php": ">=5.3.0" - }, - "type": "composer-plugin", - "extra": { - "class": "Mouf\\Html\\Utils\\WebLibraryManager\\ComponentInstaller\\ComponentInstallerPlugin" - }, - "autoload": { - "psr-4": { - "Mouf\\Html\\Utils\\WebLibraryManager\\ComponentInstaller\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com", - "homepage": "http://mouf-php.com/" - } - ], - "description": "This Mouf package contains a Composer installer that will automatically create WebLibrary instances when a 'component' package is installed in Composer. It is designed to be used only with Mouf's WebLibraryManager.", - "homepage": "http://mouf-php/packages/mouf/html.utils.weblibrarymanager.component-installer", - "keywords": [ - "css", - "dependencies", - "dependency", - "html", - "javascript", - "mouf" - ], - "time": "2016-05-12T11:27:15+00:00" + "time": "2018-08-28T07:54:49+00:00" }, { "name": "mouf/html.widgets.menu", - "version": "v2.0.0", + "version": "4.0.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/html.widgets.menu.git", - "reference": "fdac5fc5c6c65ffb603a29cb95cb0fbee17b817e" + "reference": "4c2102de7475cf062feb976ca354fd263d3af043" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/html.widgets.menu/zipball/fdac5fc5c6c65ffb603a29cb95cb0fbee17b817e", - "reference": "fdac5fc5c6c65ffb603a29cb95cb0fbee17b817e", + "url": "https://api.github.com/repos/thecodingmachine/html.widgets.menu/zipball/4c2102de7475cf062feb976ca354fd263d3af043", + "reference": "4c2102de7475cf062feb976ca354fd263d3af043", "shasum": "" }, "require": { + "mouf/html.renderer": "^2", "mouf/utils.common.conditioninterface": "2.*", - "mouf/utils.i18n.fine": "3.*", - "php": ">=5.3.0" + "php": ">=7.1", + "thecodingmachine/funky": "^1" + }, + "require-dev": { + "mouf/utils.i18n.fine.translation-interface": "^4", + "phpstan/phpstan": "^0.10.3", + "squizlabs/php_codesniffer": "^3.3.1", + "thecodingmachine/phpstan-strict-rules": "^0.10.3" }, "type": "mouf-library", "autoload": { @@ -1292,42 +1249,64 @@ "mouf", "template" ], - "time": "2014-04-25T14:27:23+00:00" + "time": "2018-08-27T15:29:36+00:00" }, { "name": "mouf/html.widgets.messageservice", - "version": "v2.2.0", + "version": "4.0.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/html.widgets.messageservice.git", - "reference": "de6448dca47a2df85a982fd87d2afeaf756b89dd" + "reference": "eba0975b8c61809329e131288aadbb3288fefcd8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/html.widgets.messageservice/zipball/de6448dca47a2df85a982fd87d2afeaf756b89dd", - "reference": "de6448dca47a2df85a982fd87d2afeaf756b89dd", + "url": "https://api.github.com/repos/thecodingmachine/html.widgets.messageservice/zipball/eba0975b8c61809329e131288aadbb3288fefcd8", + "reference": "eba0975b8c61809329e131288aadbb3288fefcd8", "shasum": "" }, "require": { "mouf/html.htmlelement": "~2.0", - "mouf/html.utils.weblibrarymanager": "~2.0", - "mouf/utils.session.session-manager": "~2.0", - "php": ">=5.3.0" + "mouf/html.renderer": "^2", + "mouf/html.utils.weblibrarymanager": "^4", + "mouf/utils.action.action-interface": "~1.0", + "mouf/utils.session.session-manager": "^4", + "mouf/utils.value.value-interface": "~1.0", + "php": ">=7.1.0", + "thecodingmachine/funky": "^1" + }, + "conflict": { + "mouf/mouf": "~2.0.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.10.3", + "squizlabs/php_codesniffer": "^3.3.1", + "thecodingmachine/phpstan-strict-rules": "^0.10.3" }, "type": "mouf-library", "extra": { "mouf": { "install": [ { - "type": "file", - "file": "src/install.php" + "file": "src/install.php", + "type": "file" + } + ], + "doc": [ + { + "title": "Using the message service", + "url": "doc/index.md" + }, + { + "title": "Advanced usage", + "url": "doc/advanced.md" } ] } }, "autoload": { "psr-0": { - "Mouf": "src/" + "Mouf\\Html\\Widgets\\MessageService": "src/" }, "files": [ "src/common_functions.php" @@ -1353,24 +1332,23 @@ "widget", "widgets" ], - "time": "2013-06-19T13:17:17+00:00" + "time": "2018-08-28T13:47:46+00:00" }, { "name": "mouf/javascript.ace", - "version": "v1.1.3", + "version": "v1.1.4", "source": { "type": "git", "url": "https://github.com/thecodingmachine/javascript.ace.git", - "reference": "b76425308ba4e90a7ff5dd5ee1615271e87dae85" + "reference": "4b88b25988f2bd2152392802a997b6cf194677cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/javascript.ace/zipball/b76425308ba4e90a7ff5dd5ee1615271e87dae85", - "reference": "b76425308ba4e90a7ff5dd5ee1615271e87dae85", + "url": "https://api.github.com/repos/thecodingmachine/javascript.ace/zipball/4b88b25988f2bd2152392802a997b6cf194677cf", + "reference": "4b88b25988f2bd2152392802a997b6cf194677cf", "shasum": "" }, "require": { - "mouf/html.utils.weblibrarymanager": "~2.0", "php": ">=5.3.0" }, "type": "mouf-library", @@ -1400,36 +1378,37 @@ "javascript", "mouf" ], - "time": "2014-04-08T09:56:23+00:00" + "time": "2018-08-27T16:54:04+00:00" }, { "name": "mouf/javascript.jquery.jq-bootstrap-validation", - "version": "v1.3.6.0", + "version": "1.3.7.x-dev", "source": { "type": "git", "url": "https://github.com/moufmouf/javascript.jquery.jqBootstrapValidation.git", - "reference": "f25987d36c052f2fd4719c8b949409fa934295ea" + "reference": "8996da4668cec9d390d171658b3ca5ab83cd6951" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/moufmouf/javascript.jquery.jqBootstrapValidation/zipball/f25987d36c052f2fd4719c8b949409fa934295ea", - "reference": "f25987d36c052f2fd4719c8b949409fa934295ea", + "url": "https://api.github.com/repos/moufmouf/javascript.jquery.jqBootstrapValidation/zipball/8996da4668cec9d390d171658b3ca5ab83cd6951", + "reference": "8996da4668cec9d390d171658b3ca5ab83cd6951", "shasum": "" }, "require": { - "mouf/html.utils.weblibrarymanager": "~2.0", - "php": ">=5.3.0" + "mouf/html.utils.weblibrarymanager": "^4.0", + "php": ">=5.3.0", + "thecodingmachine/funky": "^1" + }, + "conflict": { + "mouf/mouf": "~2.0.0" }, "type": "mouf-library", "extra": { - "logo": "logo.png", - "mouf": { - "install": [ - { - "type": "file", - "file": "install.php" - } - ] + "logo": "logo.png" + }, + "autoload": { + "psr-4": { + "Mouf\\Javascript\\JqBootstrapValidation\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1450,35 +1429,33 @@ "jqBootstrapValidation", "validator" ], - "time": "2013-06-17T14:11:31+00:00" + "time": "2018-08-28T13:42:32+00:00" }, { "name": "mouf/javascript.jquery.jquery", - "version": "v1.11.0.0", + "version": "1.11.1.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/javascript.jquery.jquery.git", - "reference": "7bae0fbeb391540906ec0ef5e40da6263e5133a3" + "reference": "435aad622cbab1bb6de26fcf35f74dd32d414d0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/javascript.jquery.jquery/zipball/7bae0fbeb391540906ec0ef5e40da6263e5133a3", - "reference": "7bae0fbeb391540906ec0ef5e40da6263e5133a3", + "url": "https://api.github.com/repos/thecodingmachine/javascript.jquery.jquery/zipball/435aad622cbab1bb6de26fcf35f74dd32d414d0f", + "reference": "435aad622cbab1bb6de26fcf35f74dd32d414d0f", "shasum": "" }, "require": { - "mouf/html.utils.weblibrarymanager": ">=2.0-dev,<3.0", - "php": ">=5.3.0" + "mouf/html.utils.weblibrarymanager": "^4.0", + "php": ">=7.1" }, - "type": "mouf-library", - "extra": { - "mouf": { - "install": [ - { - "type": "file", - "file": "install.php" - } - ] + "conflict": { + "mouf/mouf": "~2.0.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Mouf\\Javascript\\JQuery\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1499,7 +1476,7 @@ "jquery", "mouf" ], - "time": "2014-02-18T10:06:30+00:00" + "time": "2018-08-28T07:34:51+00:00" }, { "name": "mouf/javascript.jquery.jquery-filetree", @@ -1659,31 +1636,29 @@ }, { "name": "mouf/javascript.underscore", - "version": "v1.3.3.0", + "version": "1.3.4.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/javascript.underscore.git", - "reference": "e1e1122c51c1b1ab8841c75ce4e7cabd857f558c" + "reference": "3d5d900e0bd429c1b406ade7ed9ac5dd19380748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/javascript.underscore/zipball/e1e1122c51c1b1ab8841c75ce4e7cabd857f558c", - "reference": "e1e1122c51c1b1ab8841c75ce4e7cabd857f558c", + "url": "https://api.github.com/repos/thecodingmachine/javascript.underscore/zipball/3d5d900e0bd429c1b406ade7ed9ac5dd19380748", + "reference": "3d5d900e0bd429c1b406ade7ed9ac5dd19380748", "shasum": "" }, "require": { - "mouf/html.utils.weblibrarymanager": ">=2.0-dev,<3.0", + "mouf/html.utils.weblibrarymanager": "^4.0", "php": ">=5.3.0" }, + "conflict": { + "mouf/mouf": "~2.0.0" + }, "type": "mouf-library", - "extra": { - "mouf": { - "install": [ - { - "type": "file", - "file": "install.php" - } - ] + "autoload": { + "psr-4": { + "Mouf\\Javascript\\Underscore\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1705,7 +1680,7 @@ "underscore", "underscorejs" ], - "time": "2014-06-03T20:45:03+00:00" + "time": "2018-08-28T07:37:44+00:00" }, { "name": "mouf/mouf-installer", @@ -1797,22 +1772,92 @@ ], "time": "2013-10-29T18:21:58+00:00" }, + { + "name": "mouf/mvc.splash-common", + "version": "10.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/mvc.splash-common.git", + "reference": "43c0fc33902623e568de837f54f63b37ac2b5197" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/mvc.splash-common/zipball/43c0fc33902623e568de837f54f63b37ac2b5197", + "reference": "43c0fc33902623e568de837f54f63b37ac2b5197", + "shasum": "" + }, + "require": { + "mouf/html.htmlelement": "^2.0", + "mouf/html.renderer.twig-extensions": "^1 || ^3", + "mouf/html.template.templateinterface": "^2.1 || ^3", + "mouf/mouf": "^2.0", + "mouf/utils.action.common-action": "~1.0", + "mouf/utils.common.conditioninterface": "~2.0", + "php": ">=7.0", + "thecodingmachine/splash-router": "^10" + }, + "require-dev": { + "cache/array-adapter": "^0.4.0", + "mnapoli/simplex": "^0.3", + "mouf/picotainer": "~1.0", + "phpstan/phpstan": "^0.10.1", + "phpunit/phpunit": "^5.0", + "satooshi/php-coveralls": "^1.0" + }, + "type": "mouf-library", + "extra": { + "mouf": { + "logo": "doc/images/logo.png", + "section": { + "name": "MVC", + "description": "All the tools you need to route requests and display pages", + "weight": 10 + } + } + }, + "autoload": { + "psr-4": { + "Mouf\\Mvc\\Splash\\": "src/Mouf/Mvc/Splash" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David Négrier", + "email": "d.negrier@thecodingmachine.com", + "homepage": "http://mouf-php.com/" + } + ], + "description": "Splash is a PHP router. It takes an HTTP request and dispatches it to the appropriate controller.", + "homepage": "http://mouf-php.com/packages/mouf/mvc.splash-common", + "keywords": [ + "framework", + "mouf", + "mvc", + "splash", + "splash-common" + ], + "time": "2018-08-30T20:30:03+00:00" + }, { "name": "mouf/security.simplelogincontroller", "version": "6.0.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/security.simplelogincontroller.git", - "reference": "03e5071b46f9580581687abb1a8eadd88810ae06" + "reference": "8518a218e10589cbd2e18a132ab229d11ab9e24e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/security.simplelogincontroller/zipball/03e5071b46f9580581687abb1a8eadd88810ae06", - "reference": "03e5071b46f9580581687abb1a8eadd88810ae06", + "url": "https://api.github.com/repos/thecodingmachine/security.simplelogincontroller/zipball/8518a218e10589cbd2e18a132ab229d11ab9e24e", + "reference": "8518a218e10589cbd2e18a132ab229d11ab9e24e", "shasum": "" }, "require": { - "mouf/security.userservice": "^2.1.0", + "mouf/security.userservice": "^2.1.0 || ^3", "mouf/security.userservice-splash": "^10", "mouf/utils.action.action-interface": "~1.0", "php": "^7.1", @@ -1859,30 +1904,40 @@ "mouf", "security" ], - "time": "2018-08-23T21:41:31+00:00" + "time": "2018-08-30T20:43:56+00:00" }, { "name": "mouf/security.userfiledao", - "version": "v2.0.0", + "version": "4.0.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/security.userfiledao.git", - "reference": "7d998e2714e9127f6e722fc7fc672b3abdd090d2" + "reference": "dafb3c81d01656c9aefd1efcb107e0bd72b2196b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/security.userfiledao/zipball/7d998e2714e9127f6e722fc7fc672b3abdd090d2", - "reference": "7d998e2714e9127f6e722fc7fc672b3abdd090d2", + "url": "https://api.github.com/repos/thecodingmachine/security.userfiledao/zipball/dafb3c81d01656c9aefd1efcb107e0bd72b2196b", + "reference": "dafb3c81d01656c9aefd1efcb107e0bd72b2196b", "shasum": "" }, "require": { - "mouf/security.userservice": "2.*", - "php": ">=5.3.0" + "mouf/security.userservice": "^3", + "php": ">=7.1", + "thecodingmachine/funky": "^1" + }, + "conflict": { + "mouf/mouf": "~2.0.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.10.3", + "squizlabs/php_codesniffer": "^3.3.1", + "thecodingmachine/discovery": "^1.2.1", + "thecodingmachine/phpstan-strict-rules": "^0.10.3" }, "type": "mouf-library", "autoload": { "psr-0": { - "Mouf": "src/" + "Mouf\\Security\\UserFileDao\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1904,40 +1959,49 @@ "security", "userdao" ], - "time": "2014-06-03T20:31:23+00:00" + "time": "2018-08-28T09:43:10+00:00" }, { "name": "mouf/security.userservice", - "version": "2.1.x-dev", + "version": "3.0.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/security.userservice.git", - "reference": "8915c4703296cf09943f63805d4c1d494872e6de" + "reference": "a5fb27aeaf6fafaf74bb4694f27362e7db75493c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/security.userservice/zipball/8915c4703296cf09943f63805d4c1d494872e6de", - "reference": "8915c4703296cf09943f63805d4c1d494872e6de", + "url": "https://api.github.com/repos/thecodingmachine/security.userservice/zipball/a5fb27aeaf6fafaf74bb4694f27362e7db75493c", + "reference": "a5fb27aeaf6fafaf74bb4694f27362e7db75493c", "shasum": "" }, "require": { "mouf/mouf-validators-interface": "~2.0", - "mouf/utils.common.conditioninterface": "2.*", + "mouf/utils.common.conditioninterface": "^2", "mouf/utils.constants.secret": "~1.0", - "mouf/utils.log.psr.errorlog_logger": "2.*", - "mouf/utils.session.session-manager": "~2.1", + "mouf/utils.session.session-manager": "^4", "mouf/utils.value.value-interface": "~1.0", - "php": ">=5.3.0" + "php": ">=7.1", + "psr/container": "^1", + "psr/log": "^1", + "thecodingmachine/funky": "^1" + }, + "conflict": { + "mouf/mouf": "~2.0.0" + }, + "require-dev": { + "maglnet/composer-require-checker": "^1.0", + "mnapoli/simplex": "^0.5", + "mouf/utils.log.psr.errorlog_logger": "^2", + "phpstan/phpstan": "^0.10.3", + "phpunit/phpunit": "^7.3.1", + "squizlabs/php_codesniffer": "^3.3.1", + "thecodingmachine/discovery": "^1.2.1", + "thecodingmachine/phpstan-strict-rules": "^0.10.3" }, "type": "mouf-library", "extra": { "mouf": { - "install": [ - { - "file": "src/install.php", - "type": "file" - } - ], "doc": [ { "title": "Installation", @@ -1986,7 +2050,7 @@ "security", "user" ], - "time": "2016-07-06T09:32:57+00:00" + "time": "2018-08-30T17:57:56+00:00" }, { "name": "mouf/security.userservice-splash", @@ -1994,16 +2058,16 @@ "source": { "type": "git", "url": "https://github.com/thecodingmachine/security.userservice-splash.git", - "reference": "d34eda222e4b4557542d145adacab18b6028f846" + "reference": "afc48655f39d4b64b0b2d72b7b30f8ef36e9083f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/security.userservice-splash/zipball/d34eda222e4b4557542d145adacab18b6028f846", - "reference": "d34eda222e4b4557542d145adacab18b6028f846", + "url": "https://api.github.com/repos/thecodingmachine/security.userservice-splash/zipball/afc48655f39d4b64b0b2d72b7b30f8ef36e9083f", + "reference": "afc48655f39d4b64b0b2d72b7b30f8ef36e9083f", "shasum": "" }, "require": { - "mouf/security.userservice": "^2.1.0", + "mouf/security.userservice": "^2.1.0 || ^3", "php": ">=7.1", "thecodingmachine/funky": "^1", "thecodingmachine/splash-router": "^10" @@ -2043,7 +2107,7 @@ "splash", "user" ], - "time": "2018-08-24T08:34:21+00:00" + "time": "2018-08-28T08:44:34+00:00" }, { "name": "mouf/utils.action.action-interface", @@ -2089,6 +2153,55 @@ ], "time": "2013-10-29T18:21:59+00:00" }, + { + "name": "mouf/utils.action.common-action", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/utils.action.common-action.git", + "reference": "9498e24435b96812953cbca91fd20daecbfc549a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/utils.action.common-action/zipball/9498e24435b96812953cbca91fd20daecbfc549a", + "reference": "9498e24435b96812953cbca91fd20daecbfc549a", + "shasum": "" + }, + "require": { + "mouf/utils.action.action-interface": "~1.0", + "mouf/utils.value.value-interface": "~1.0", + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "mouf": { + "logo": "logo.png" + } + }, + "autoload": { + "psr-0": { + "Mouf\\Utils\\Action": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David Négrier", + "email": "d.negrier@thecodingmachine.com", + "homepage": "http://mouf-php.com/" + } + ], + "description": "This package contains common classes that implement the ActionInterface interface (from the mouf/utils.action.action-interface package).", + "homepage": "https://mouf-php.com/mouf/utils.action.common-action", + "keywords": [ + "actioninterface", + "mouf" + ], + "time": "2015-01-23T11:09:24+00:00" + }, { "name": "mouf/utils.cache.apc-cache", "version": "v2.2.0", @@ -2255,50 +2368,6 @@ ], "time": "2016-09-22T08:32:19+00:00" }, - { - "name": "mouf/utils.cache.in-memory-cache", - "version": "v1.0.2", - "source": { - "type": "git", - "url": "https://github.com/thecodingmachine/utils.cache.in-memory-cache.git", - "reference": "1e02d9d83d6fa9f86eca0147c80a2659a56a03bd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/utils.cache.in-memory-cache/zipball/1e02d9d83d6fa9f86eca0147c80a2659a56a03bd", - "reference": "1e02d9d83d6fa9f86eca0147c80a2659a56a03bd", - "shasum": "" - }, - "require": { - "mouf/utils.cache.cache-interface": "2.*", - "php": ">=5.3.0" - }, - "type": "mouf-library", - "autoload": { - "psr-0": { - "Mouf\\Utils\\Cache": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com", - "homepage": "http://mouf-php.com/" - } - ], - "description": "This package contains the most basic cache mechanism. It stores cache items in an array. It means the cache is flushed as soon as the script returns. It is very basic, but also very fast. You will usually use this mechanism with another one just behind.", - "homepage": "https://mouf-php/packages/mouf/utils.cache.local-cache", - "keywords": [ - "cache", - "in-memory", - "mouf" - ], - "time": "2015-07-10T13:31:07+00:00" - }, { "name": "mouf/utils.cache.purge-ui", "version": "v1.0.0", @@ -2525,61 +2594,6 @@ "description": "This project contains a simple PHP exception that can aggregate multiple exceptions in one.", "time": "2015-09-18T15:40:51+00:00" }, - { - "name": "mouf/utils.constants.debug", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/thecodingmachine/utils.constants.debug.git", - "reference": "df2122944c8e3aadb1c8221aea732b5de9ce74ca" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/utils.constants.debug/zipball/df2122944c8e3aadb1c8221aea732b5de9ce74ca", - "reference": "df2122944c8e3aadb1c8221aea732b5de9ce74ca", - "shasum": "" - }, - "require": { - "mouf/mouf-installer": "~2.0", - "php": ">=5.3.0" - }, - "type": "mouf-library", - "extra": { - "mouf": { - "install": [ - { - "type": "class", - "class": "Mouf\\Utils\\Constants\\DebugInstaller" - } - ], - "logo": "logo.png" - } - }, - "autoload": { - "psr-0": { - "Mouf\\Utils\\Constants\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com", - "homepage": "http://mouf-php.com/" - } - ], - "description": "This package contains a simple installer for Mouf that will create a constant 'DEBUG' in your project and initialize it to true. Useful for packages supporting a 'debug' mode.", - "homepage": "http://mouf-php.com/packages/mouf/utils.constants.debug", - "keywords": [ - "constant", - "debug", - "mouf" - ], - "time": "2014-06-16T09:18:43+00:00" - }, { "name": "mouf/utils.constants.secret", "version": "v1.0.0", @@ -2723,114 +2737,6 @@ ], "time": "2017-08-04T10:52:04+00:00" }, - { - "name": "mouf/utils.log.errorlog_logger", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/thecodingmachine/utils.log.errorlog_logger.git", - "reference": "352ad3733757685961818c012187945a4c9d04df" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/utils.log.errorlog_logger/zipball/352ad3733757685961818c012187945a4c9d04df", - "reference": "352ad3733757685961818c012187945a4c9d04df", - "shasum": "" - }, - "require": { - "mouf/mouf-installer": "~2.0", - "mouf/utils.log.log_interface": ">=2.0-dev,<3.0", - "php": ">=5.3.0" - }, - "provide": { - "mouf/utils.log.logger": "1.0" - }, - "type": "mouf-library", - "extra": { - "mouf": { - "install": [ - { - "type": "file", - "file": "src/install.php" - } - ], - "logo": "logo.png" - } - }, - "autoload": { - "psr-0": { - "Mouf\\Utils\\Log\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com", - "homepage": "http://mouf-php.com/" - } - ], - "description": "This package contains a logger that logs messages directly to the PHP error log (using the error_log PHP function)", - "homepage": "https://github.com/thecodingmachine/utils.log.errorlog_logger", - "keywords": [ - "error_log", - "log", - "logger" - ], - "time": "2013-10-29T18:22:00+00:00" - }, - { - "name": "mouf/utils.log.log_interface", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/thecodingmachine/utils.log.log_interface.git", - "reference": "9178f74f644e420a4b59f51e801c75415783ca34" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/utils.log.log_interface/zipball/9178f74f644e420a4b59f51e801c75415783ca34", - "reference": "9178f74f644e420a4b59f51e801c75415783ca34", - "shasum": "" - }, - "require": { - "mouf/utils.log.logger": "1.*", - "php": ">=5.3.0" - }, - "type": "mouf-library", - "extra": { - "mouf": { - "logo": "logo.png" - } - }, - "autoload": { - "psr-0": { - "Mouf\\Utils\\Log\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "David Négrier", - "email": "d.negrier@thecodingmachine.com", - "homepage": "http://mouf-php.com/" - } - ], - "description": "This package contains an interface used by many components to log messages. Please download a logger package that implements this interface (like the utils.log.errorlog_logger package)", - "homepage": "https://github.com/thecodingmachine/utils.log.log_interface", - "keywords": [ - "interface", - "log", - "logger" - ], - "time": "2014-06-05T12:51:58+00:00" - }, { "name": "mouf/utils.log.psr.errorlog_logger", "version": "v2.0.1", @@ -2889,35 +2795,36 @@ }, { "name": "mouf/utils.session.session-manager", - "version": "v2.1.1", + "version": "4.0.x-dev", "source": { "type": "git", "url": "https://github.com/thecodingmachine/utils.session.session-manager.git", - "reference": "c9fb28c0726fb8867c9f45755617a4ff44ff8716" + "reference": "59477ff06ac52513f5416cc7b823485856345af7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/utils.session.session-manager/zipball/c9fb28c0726fb8867c9f45755617a4ff44ff8716", - "reference": "c9fb28c0726fb8867c9f45755617a4ff44ff8716", + "url": "https://api.github.com/repos/thecodingmachine/utils.session.session-manager/zipball/59477ff06ac52513f5416cc7b823485856345af7", + "reference": "59477ff06ac52513f5416cc7b823485856345af7", "shasum": "" }, "require": { - "php": ">=5.3.0" + "mouf/utils.action.action-interface": "^1", + "mouf/utils.value.value-interface": "^1", + "php": ">=5.3.0", + "thecodingmachine/funky": "^1" + }, + "conflict": { + "mouf/mouf": "~2.0.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.10.3", + "squizlabs/php_codesniffer": "^3.3.1", + "thecodingmachine/phpstan-strict-rules": "^0.10.3" }, "suggest": { - "thecodingmachine/utils.session.optimistic-session-handler": "Handle session without locking session file during all the PHP script execution" + "mouf/utils.session.optimistic-session-handler": "Session handler that releases session lock quickly. Usefull for multiple ajax calls on the same page." }, "type": "mouf-library", - "extra": { - "mouf": { - "install": [ - { - "type": "file", - "file": "src/install.php" - } - ] - } - }, "autoload": { "psr-0": { "Mouf\\Utils\\Action": "src/", @@ -2941,7 +2848,7 @@ "mouf", "session" ], - "time": "2015-08-10T14:03:37+00:00" + "time": "2018-08-26T19:04:36+00:00" }, { "name": "mouf/utils.value.value-interface", @@ -3390,16 +3297,16 @@ }, { "name": "symfony/cache", - "version": "v4.1.3", + "version": "v4.1.4", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "c666a5bbfeb1fe05c7b91d46810f405c8bea14cf" + "reference": "b8440ff4635c6631aca21a09ab72e0b7e3a6cb7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/c666a5bbfeb1fe05c7b91d46810f405c8bea14cf", - "reference": "c666a5bbfeb1fe05c7b91d46810f405c8bea14cf", + "url": "https://api.github.com/repos/symfony/cache/zipball/b8440ff4635c6631aca21a09ab72e0b7e3a6cb7a", + "reference": "b8440ff4635c6631aca21a09ab72e0b7e3a6cb7a", "shasum": "" }, "require": { @@ -3455,7 +3362,7 @@ "caching", "psr6" ], - "time": "2018-07-26T11:24:31+00:00" + "time": "2018-08-27T09:36:56+00:00" }, { "name": "symfony/polyfill-ctype", @@ -3795,18 +3702,51 @@ "description": "Cross-framework module providing a service containing a list of middlewares", "time": "2018-06-05T13:27:42+00:00" }, + { + "name": "thecodingmachine/monolog-universal-service-provider", + "version": "1.1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/monolog-universal-service-provider.git", + "reference": "2c045a271da5621af1b1a5bf2570dab5aa032bcf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/monolog-universal-service-provider/zipball/2c045a271da5621af1b1a5bf2570dab5aa032bcf", + "reference": "2c045a271da5621af1b1a5bf2570dab5aa032bcf", + "shasum": "" + }, + "require": { + "monolog/monolog": "^1.0", + "php": ">=7.1", + "psr/container": "^1", + "thecodingmachine/funky": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "TheCodingMachine\\Monolog\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Cross-framework module for monolog/monolog", + "time": "2018-08-30T20:07:49+00:00" + }, { "name": "thecodingmachine/splash-router", "version": "dev-master", "source": { "type": "git", "url": "https://github.com/thecodingmachine/splash-router.git", - "reference": "5d610394f26f70438bd457db685022c84e0366ea" + "reference": "2b56ec3d9ffd74a196e44cd6ca0a996caa76d4c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/splash-router/zipball/5d610394f26f70438bd457db685022c84e0366ea", - "reference": "5d610394f26f70438bd457db685022c84e0366ea", + "url": "https://api.github.com/repos/thecodingmachine/splash-router/zipball/2b56ec3d9ffd74a196e44cd6ca0a996caa76d4c7", + "reference": "2b56ec3d9ffd74a196e44cd6ca0a996caa76d4c7", "shasum": "" }, "require": { @@ -3867,7 +3807,7 @@ "splash", "splash-common" ], - "time": "2018-07-19T13:55:17+00:00" + "time": "2018-08-23T21:53:05+00:00" }, { "name": "thecodingmachine/splash-service-provider", @@ -5560,16 +5500,16 @@ }, { "name": "symfony/yaml", - "version": "v4.1.3", + "version": "v4.1.4", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "46bc69aa91fc4ab78a96ce67873a6b0c148fd48c" + "reference": "b832cc289608b6d305f62149df91529a2ab3c314" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/46bc69aa91fc4ab78a96ce67873a6b0c148fd48c", - "reference": "46bc69aa91fc4ab78a96ce67873a6b0c148fd48c", + "url": "https://api.github.com/repos/symfony/yaml/zipball/b832cc289608b6d305f62149df91529a2ab3c314", + "reference": "b832cc289608b6d305f62149df91529a2ab3c314", "shasum": "" }, "require": { @@ -5615,7 +5555,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com/", - "time": "2018-07-26T11:24:31+00:00" + "time": "2018-08-18T16:52:46+00:00" }, { "name": "webmozart/assert", diff --git a/mouf/MoufComponents.php b/mouf/MoufComponents.php index 1dbb384..c8b11d9 100644 --- a/mouf/MoufComponents.php +++ b/mouf/MoufComponents.php @@ -4,6 +4,7 @@ */ use Mouf\MoufManager; use Interop\Container\ContainerInterface; +use Mouf\Html\Utils\WebLibraryManager; MoufManager::initMoufManager(); $moufManager = MoufManager::getMoufManager(); @@ -285,7 +286,7 @@ 'fallback' => 'fileCacheService', ), ), - 'block.content' => + /* 'block.content' => array ( 'class' => 'Mouf\\Html\\HtmlElement\\HtmlBlock', 'external' => false, @@ -297,7 +298,7 @@ 0 => 'messageWidget', ), ), - ), + ),*/ 'block.footer' => array ( 'class' => 'Mouf\\Html\\HtmlElement\\HtmlBlock', @@ -397,7 +398,7 @@ array ( 'template' => 'moufTemplate', 'contentBlock' => 'block.content', - 'validatorService' => 'validatorService', + 'validatorService' => 'Mouf\\Validator\\MoufValidatorService', ), ), 'createNewInstanceByPhpCodeMenuItem' => @@ -2101,7 +2102,29 @@ array ( 'class' => 'Mouf\\Html\\Template\\BootstrapTemplate', 'external' => false, - 'setterBinds' => + 'constructor' => + array ( + 0 => + array ( + 'value' => WebLibraryManager::class, + 'parametertype' => 'object', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + 1 => + array ( + 'value' => 'moufInstallTemplate', + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + + 'setterBinds' => array ( 'setFooter' => 'block.footer', 'setRight' => 'block.right', @@ -2128,48 +2151,7 @@ ), ), ), - 'moufInstallTemplate2' => - array ( - 'class' => 'Mouf\\Html\\Template\\MoufTemplate\\MoufTemplate', - 'external' => false, - 'fieldBinds' => - array ( - 'head' => - array ( - ), - ), - 'fieldProperties' => - array ( - 'logoImg' => - array ( - 'value' => 'src-dev/views/images/MoufLogo.png', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'title' => - array ( - 'value' => 'Mouf - Build your website', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'css_files' => - array ( - 'value' => - array ( - 0 => 'src-dev/views/styles.css', - ), - 'type' => 'string', - 'metadata' => - array ( - ), - ), - ), - ), - 'moufLoginTemplate' => + 'moufLoginTemplate' => array ( 'class' => 'Mouf\\Html\\Template\\BootstrapTemplate', 'external' => false, @@ -2995,10 +2977,10 @@ array ( 'template' => 'moufTemplate', 'contentBlock' => 'block.content', - 'validatorService' => 'validatorService', + 'validatorService' => 'Mouf\\Validator\\MoufValidatorService', ), ), - 'validatorService' => + 'Mouf\\Validator\\MoufValidatorService' => array ( 'class' => 'Mouf\\Validator\\MoufValidatorService', 'external' => false, @@ -4341,7 +4323,7 @@ public static function getValidate() { * @return Mouf\Validator\MoufValidatorService */ public static function getValidatorService() { - return MoufManager::getMoufManager()->get('validatorService'); + return MoufManager::getMoufManager()->get('Mouf\\Validator\\MoufValidatorService'); } /** diff --git a/mouf/MoufUI.php b/mouf/MoufUI.php index 76b4267..b22dad2 100644 --- a/mouf/MoufUI.php +++ b/mouf/MoufUI.php @@ -5,7 +5,6 @@ // Files declared in the extra:mouf:adminRequire section. require_once __DIR__.'/../vendor/mouf/utils.cache.purge-ui/CacheAdmin.php'; -require_once __DIR__.'/../vendor/mouf/html.utils.weblibrarymanager/src/WebLibraryAdmin.php'; require_once __DIR__.'/../vendor/mouf/utils.i18n.fine/src/FineAdmin.php'; ?> \ No newline at end of file diff --git a/src-dev/Mouf/Controllers/MoufRootController.php b/src-dev/Mouf/Controllers/MoufRootController.php index 08cc5a0..c692837 100644 --- a/src-dev/Mouf/Controllers/MoufRootController.php +++ b/src-dev/Mouf/Controllers/MoufRootController.php @@ -1,31 +1,39 @@ - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ +/* + * This file is part of the Mouf core package. + * + * (c) 2012 David Negrier + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ namespace Mouf\Controllers; use Mouf\Mvc\Splash\Controllers\Controller; - +use Mouf\Security\Logged; +use TheCodingMachine\Splash\Annotations\URL; +use Zend\Diactoros\Response\RedirectResponse; + /** * The base controller for Mouf (when the "mouf/" url is typed). * - * @Component */ -class MoufRootController extends Controller { - +class MoufRootController { + + private $rootUrl; + + public function __construct(string $rootUrl) + { + $this->rootUrl = $rootUrl; + } + /** * The default action will redirect to the MoufController defaultAction. * - * @URL / - * @Logged + * @URL("/") + * @Logged() */ public function defaultAction() { - header("Location: ".ROOT_URL."validate/"); + return new RedirectResponse($this->rootUrl.'validate'); } } -?> \ No newline at end of file diff --git a/src-dev/Mouf/Controllers/MoufValidatorController.php b/src-dev/Mouf/Controllers/MoufValidatorController.php index dfaf650..c6902cd 100644 --- a/src-dev/Mouf/Controllers/MoufValidatorController.php +++ b/src-dev/Mouf/Controllers/MoufValidatorController.php @@ -11,49 +11,56 @@ use Mouf\Html\HtmlElement\HtmlBlock; +use Mouf\Html\Template\TemplateInterface; use Mouf\MoufException; use Mouf\Mvc\Splash\Controllers\Controller; +use Mouf\Mvc\Splash\HtmlResponse; use Mouf\Reflection\MoufReflectionProxy; +use Mouf\Security\Logged; +use Mouf\Validator\MoufValidatorService; +use TheCodingMachine\Splash\Annotations\Action; +use TheCodingMachine\Splash\Annotations\URL; /** * The controller that will call all validators on Mouf. * - * @Component */ class MoufValidatorController extends Controller { /** * The validation service. * - * @Property - * @Compulsory * @var MoufValidatorService */ - public $validatorService; + private $validatorService; /** * The template used by the main page for mouf. * - * @Property - * @Compulsory * @var TemplateInterface */ - public $template; + private $template; /** * The content block the template will be writting into. * - * @Property - * @Compulsory * @var HtmlBlock */ - public $contentBlock; - - /** + private $contentBlock; + + public function __construct(MoufValidatorService $validatorService, TemplateInterface $template, HtmlBlock $contentBlock) + { + $this->validatorService = $validatorService; + $this->template = $template; + $this->contentBlock = $contentBlock; + } + + + /** * The default action will redirect to the MoufController defaultAction. * - * @Action - * @Logged + * @URL("validate") + * @Logged() */ public function defaultAction($selfedit = "false") { // Before running the other validation steps, we should make sure we can successfully cURL @@ -61,17 +68,14 @@ public function defaultAction($selfedit = "false") { try { if (!MoufReflectionProxy::checkConnection()) { $this->contentBlock->addFile(ROOT_PATH."src-dev/views/connection-problem.php", $this); - $this->template->toHtml(); - return; + return new HtmlResponse($this->template); } } catch (MoufException $e) { $this->contentBlock->addFile(ROOT_PATH."src-dev/views/connection-problem.php", $this); - $this->template->toHtml(); - return; + return new HtmlResponse($this->template); } $this->contentBlock->addFile(ROOT_PATH."src-dev/views/validate.php", $this); - $this->template->toHtml(); + return new HtmlResponse($this->template); } } -?> \ No newline at end of file diff --git a/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php b/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php index 59b60da..96d4b0c 100644 --- a/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php +++ b/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php @@ -6,9 +6,13 @@ use Interop\Container\Factories\Alias; use Interop\Container\ServiceProviderInterface; +use Mouf\Controllers\MoufRootController; +use Mouf\Controllers\MoufValidatorController; +use Mouf\Html\HtmlElement\HtmlBlock; use Mouf\Html\Template\TemplateInterface; use Mouf\Security\Controllers\SimpleLoginController; use Mouf\Security\UserService\UserServiceInterface; +use Mouf\Validator\MoufValidatorService; use Psr\Container\ContainerInterface; use TheCodingMachine\Funky\Annotations\Extension; use TheCodingMachine\Funky\Annotations\Factory; @@ -17,20 +21,19 @@ class ControllersServiceProvider extends ServiceProvider { /** - * TODO: UserServiceInterface::class should be created by the user service package. - * @Factory() + * @Factory(name="root_url") */ - public static function createUserService(ContainerInterface $container): UserServiceInterface + public static function getRootUrl(): string { - return $container->get('userService'); + return \ROOT_URL; } /** - * @Factory(name="ROOT_URL") + * @Factory(name="userFile") */ - public static function getRootUrl(): string + public static function getUserfile(): string { - return \ROOT_URL; + return __DIR__.'/../../../mouf/no_commit/user.php'; } /** @@ -38,7 +41,24 @@ public static function getRootUrl(): string */ public static function aliasSimpleLoginControllerTemplate(ContainerInterface $container): TemplateInterface { - return $container->get('moufLoginTemplate'); + //return $container->get('moufLoginTemplate'); + return $container->get(TemplateInterface::class); + } + + /** + * @Factory() + */ + public static function createRootController(ContainerInterface $container): MoufRootController + { + return new MoufRootController($container->get('root_url')); + } + + /** + * @Factory() + */ + public static function createValidatorController(MoufValidatorService $validatorService, TemplateInterface $template, ContainerInterface $container): MoufValidatorController + { + return new MoufValidatorController($validatorService, $template, $container->get('block.content')); } /** @@ -46,7 +66,8 @@ public static function aliasSimpleLoginControllerTemplate(ContainerInterface $co */ public static function declareControllers(array $controllers): array { - $controllers[] = SimpleLoginController::class; + $controllers[] = MoufRootController::class; + $controllers[] = MoufValidatorController::class; return $controllers; } } From c8d39c2fde85c00ede95245cd28e78a597e2cfec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Fri, 31 Aug 2018 11:18:11 +0200 Subject: [PATCH 18/19] Migrating installer --- index.php | 2 +- install_screen.php | 6 ++- mouf/MoufComponents.php | 12 +++--- .../Controllers/MoufInstallController.php | 29 ++++++++----- .../Mouf/Controllers/MoufLoginController.php | 43 ------------------- .../ControllersServiceProvider.php | 18 ++++++++ .../views/mouf_installer/moufusers_exists.php | 4 +- src-dev/views/mouf_installer/welcome.php | 6 +-- src/install.php | 26 +++++------ src/mouf_router.php | 2 +- 10 files changed, 66 insertions(+), 82 deletions(-) delete mode 100644 src-dev/Mouf/Controllers/MoufLoginController.php diff --git a/index.php b/index.php index b7cf403..57d86bb 100644 --- a/index.php +++ b/index.php @@ -14,4 +14,4 @@ MoufAdmin::getMoufInstallController()->htaccessNotDetected(); exit; -?> \ No newline at end of file +? \ No newline at end of file diff --git a/install_screen.php b/install_screen.php index 4155dc6..8253a77 100644 --- a/install_screen.php +++ b/install_screen.php @@ -10,8 +10,10 @@ //define('ROOT_URL', $_SERVER["REQUEST_URI"]); +use Mouf\Controllers\MoufInstallController; +use Mouf\MoufManager; + require_once __DIR__.'/mouf/Mouf.php'; -MoufAdmin::getMoufInstallController()->index(); +MoufManager::getMoufManager()->get(MoufInstallController::class)->index(); exit; -?> \ No newline at end of file diff --git a/mouf/MoufComponents.php b/mouf/MoufComponents.php index c8b11d9..8ecd533 100644 --- a/mouf/MoufComponents.php +++ b/mouf/MoufComponents.php @@ -4,7 +4,7 @@ */ use Mouf\MoufManager; use Interop\Container\ContainerInterface; -use Mouf\Html\Utils\WebLibraryManager; +use Mouf\Html\Utils\WebLibraryManager\WebLibraryManager; MoufManager::initMoufManager(); $moufManager = MoufManager::getMoufManager(); @@ -1206,7 +1206,7 @@ ), ), ), - 'installTemplate' => + /*'installTemplate' => array ( 'class' => 'Mouf\\Html\\Template\\MoufTemplate\\MoufTemplate', 'external' => false, @@ -1238,7 +1238,7 @@ ), ), ), - ), + ),*/ 'installedPackagesController' => array ( 'class' => 'Mouf\\Controllers\\Composer\\InstalledPackagesController', @@ -2084,7 +2084,7 @@ 'contentBlock' => 'block.content', ), ), - 'moufInstallController' => +/* 'moufInstallController' => array ( 'class' => 'Mouf\\Controllers\\MoufInstallController', 'external' => false, @@ -2097,7 +2097,7 @@ 'template' => 'moufInstallTemplate', 'contentBlock' => 'block.content', ), - ), + ),*/ 'moufInstallTemplate' => array ( 'class' => 'Mouf\\Html\\Template\\BootstrapTemplate', @@ -2915,7 +2915,7 @@ array ( 'userFile' => array ( - 'value' => '../../../mouf/no_commit/MoufUsers.php', + 'value' => '../../../mouf/no_commit/user.php', 'type' => 'string', 'metadata' => array ( diff --git a/src-dev/Mouf/Controllers/MoufInstallController.php b/src-dev/Mouf/Controllers/MoufInstallController.php index 9eedb94..dcf7fd1 100644 --- a/src-dev/Mouf/Controllers/MoufInstallController.php +++ b/src-dev/Mouf/Controllers/MoufInstallController.php @@ -20,6 +20,7 @@ use Mouf\Html\HtmlElement\HtmlBlock; use Mouf\Mvc\Splash\Controllers\Controller; +use TheCodingMachine\Splash\Annotations\URL; /** @@ -33,16 +34,23 @@ class MoufInstallController extends Controller { * * @var TemplateInterface */ - public $template; + private $template; /** * The content block the template will be writting into. * * @var HtmlBlock */ - public $contentBlock; - - /** + private $contentBlock; + + public function __construct(TemplateInterface $template, HtmlBlock $contentBlock) + { + $this->template = $template; + $this->contentBlock = $contentBlock; + } + + + /** * Displays the page to install Mouf. * Note: this is not a typical controller. This controller is called directly from index.php * @@ -82,10 +90,10 @@ public function htaccessNotDetected() { /** * Performs the installation by creating all required files. * - * @URL install + * @URL("install") */ public function install() { - if (file_exists(__DIR__.'/../../../../../../mouf/no_commit/MoufUsers.php')) { + if (file_exists(__DIR__.'/../../../../../../mouf/no_commit/user.php')) { $this->contentBlock->addFile(dirname(__FILE__)."/../../views/mouf_installer/moufusers_exists.php", $this); $this->template->toHtml(); return; @@ -168,8 +176,8 @@ public function install() { chmod(__DIR__."/../../../../../../config.php", 0664); } - // Finally 3 :), let's generate the MoufUsers.php file: - if (!file_exists(__DIR__."/../../../../../../mouf/no_commit/MoufUsers.php")) { + // Finally 3 :), let's generate the user.php file: + if (!file_exists(__DIR__."/../../../../../../mouf/no_commit/user.php")) { $moufConfig = ""; - file_put_contents(__DIR__."/../../../../../../mouf/no_commit/MoufUsers.php", $moufConfig); - chmod(__DIR__."/../../../../../../mouf/no_commit/MoufUsers.php", 0664); + file_put_contents(__DIR__."/../../../../../../mouf/no_commit/user.php", $moufConfig); + chmod(__DIR__."/../../../../../../mouf/no_commit/user.php", 0664); } umask($oldUmask); @@ -189,4 +197,3 @@ public function install() { } } -?> \ No newline at end of file diff --git a/src-dev/Mouf/Controllers/MoufLoginController.php b/src-dev/Mouf/Controllers/MoufLoginController.php deleted file mode 100644 index bc37cb4..0000000 --- a/src-dev/Mouf/Controllers/MoufLoginController.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ -namespace Mouf\Controllers; - -use Mouf\Mvc\Splash\Annotations\Action; -use Mouf\Mvc\Splash\Controllers\Controller; -use Mouf\Security\Controllers\SimpleLoginController; - -/** - * The MoufLoginController class provides the login page and login/logout mechanism for Mouf. - * It is actually getting its behaviour from the SimpleLoginController with one simple addition: - * if the MoufUsers.php file does not exist, it will guide the user towards a solution to be able to get logged. - * - */ -class MoufLoginController extends SimpleLoginController { - - - /** - * The index page will display the login form (from SimpleLoginController) or an explanation on how to setup users - * if users are not set up yet. - * - * @Action() - * @param string $login The login to fill by default. - * @param string $redirecturl The URL to redirect to when login is done. If not specified, the default login URL defined in the controller will be used instead. - */ - public function defaultAction($login = null, $redirect = null) { - /*if (!file_exists(ROOT_PATH."../../../mouf/MoufUsers.php")) { - $this->contentBlock->addFile(dirname(__FILE__)."/../../views/missing_password_file.php", $this); - $this->template->toHtml(); - return; - }*/ - - parent::defaultAction($login, $redirect); - } - -} diff --git a/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php b/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php index 96d4b0c..97b3b6d 100644 --- a/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php +++ b/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php @@ -6,6 +6,7 @@ use Interop\Container\Factories\Alias; use Interop\Container\ServiceProviderInterface; +use Mouf\Controllers\MoufInstallController; use Mouf\Controllers\MoufRootController; use Mouf\Controllers\MoufValidatorController; use Mouf\Html\HtmlElement\HtmlBlock; @@ -36,6 +37,14 @@ public static function getUserfile(): string return __DIR__.'/../../../mouf/no_commit/user.php'; } + /** + * @Factory(name="moufInstallTemplate") + */ + public static function aliasInstallTemplate(TemplateInterface $template): TemplateInterface + { + return $template; + } + /** * @Factory(name="simpleLoginControllerTemplate") */ @@ -61,6 +70,14 @@ public static function createValidatorController(MoufValidatorService $validator return new MoufValidatorController($validatorService, $template, $container->get('block.content')); } + /** + * @Factory() + */ + public static function createInstallController(TemplateInterface $template, ContainerInterface $container): MoufInstallController + { + return new MoufInstallController($template, $container->get('block.content')); + } + /** * @Extension(name="thecodingmachine.splash.controllers") */ @@ -68,6 +85,7 @@ public static function declareControllers(array $controllers): array { $controllers[] = MoufRootController::class; $controllers[] = MoufValidatorController::class; + $controllers[] = MoufInstallController::class; return $controllers; } } diff --git a/src-dev/views/mouf_installer/moufusers_exists.php b/src-dev/views/mouf_installer/moufusers_exists.php index 909dd36..8357b82 100644 --- a/src-dev/views/mouf_installer/moufusers_exists.php +++ b/src-dev/views/mouf_installer/moufusers_exists.php @@ -3,8 +3,8 @@

Welcome!

Installation problem

-
You cannot run Mouf's installer, the mouf/no_commit/MoufUsers.php file already exists.
+
You cannot run Mouf's installer, the mouf/no_commit/user.php file already exists.
-

If you want to reinstall Mouf, you should delete the mouf/no_commit/MoufUsers.php page and then refresh this page.

+

If you want to reinstall Mouf, you should delete the mouf/no_commit/user.php page and then refresh this page.

You can follow the installation document if you need help.

diff --git a/src-dev/views/mouf_installer/welcome.php b/src-dev/views/mouf_installer/welcome.php index 00a59bd..bd707ed 100644 --- a/src-dev/views/mouf_installer/welcome.php +++ b/src-dev/views/mouf_installer/welcome.php @@ -81,9 +81,9 @@

Apparently, this is the first time you are running Mouf. You will need to install it.

- -

The MoufUsers.php file has been detected. Logins/passwords from this file will be used to access Mouf. - If you want to reset your login or password, delete the MoufUsers.php file and start again the installation procedure.

+ +

The user.php file has been detected. Logins/passwords from this file will be used to access Mouf. + If you want to reset your login or password, delete the user.php file and start again the installation procedure.

In order to connect to Mouf, you will need to create a login and a password.

diff --git a/src/install.php b/src/install.php index e250bb6..b173f80 100644 --- a/src/install.php +++ b/src/install.php @@ -1,13 +1,13 @@ - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - +/* + * This file is part of the Mouf core package. + * + * (c) 2012 David Negrier + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ + /** * This file is used to install the Mouf framework by creating the .htaccess file. */ @@ -94,8 +94,8 @@ chmod("../../../../config.php", 0664); } -// Finally 3 :), let's generate the MoufUsers.php file: -if (!file_exists("../../../../mouf/no_commit/MoufUsers.php")) { +// Finally 3 :), let's generate the user.php file: +if (!file_exists("../../../../mouf/no_commit/user.php")) { $moufConfig = ""; - file_put_contents("../../../../mouf/no_commit/MoufUsers.php", $moufConfig); - chmod("../../../../mouf/no_commit/MoufUsers.php", 0664); + file_put_contents("../../../../mouf/no_commit/user.php", $moufConfig); + chmod("../../../../mouf/no_commit/user.php", 0664); } function install_userinput_to_plainstring($str) { diff --git a/src/mouf_router.php b/src/mouf_router.php index 15071d0..e6b8845 100644 --- a/src/mouf_router.php +++ b/src/mouf_router.php @@ -13,7 +13,7 @@ } unset($moufUI); -if (!file_exists(__DIR__.'/../../../../mouf/no_commit/MoufUsers.php')) { +if (!file_exists(__DIR__.'/../../../../mouf/no_commit/users.php')) { $rootUrl = $_SERVER['BASE']."/"; From e083d843644130281749f73c82477eb5cfc917b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Tue, 16 Oct 2018 14:23:30 +0200 Subject: [PATCH 19/19] Migrating more code to service providers --- composer-mouf.json | 3 +- composer-mouf.lock | 285 ++++++++++- mouf/MoufComponents.php | 461 +++++++----------- .../MoufConfigureLocalUrlController.php | 32 +- src-dev/Mouf/Controllers/MoufController.php | 95 ++-- .../Controllers/MoufInstallController.php | 38 +- .../Controllers/MoufValidatorController.php | 2 +- .../Mouf/Controllers/PhpInfoController.php | 35 +- src-dev/Mouf/Menu/DocumentationMenuItem.php | 2 +- .../ControllersServiceProvider.php | 78 ++- src/direct/install_process_validator.php | 2 +- src/mouf_router.php | 2 +- 12 files changed, 639 insertions(+), 396 deletions(-) diff --git a/composer-mouf.json b/composer-mouf.json index 740732c..0c06d63 100644 --- a/composer-mouf.json +++ b/composer-mouf.json @@ -39,7 +39,8 @@ "thecodingmachine/twig-universal-module": "^1.1", "thecodingmachine/monolog-universal-service-provider": "^1.1", "thecodingmachine/discovery": "^1.0", - "mouf/mvc.splash-common": "^10" + "mouf/mvc.splash-common": "^10", + "thecodingmachine/whoops-middleware-universal-module": "^1" }, "require-dev": { "phpunit/phpunit": "~5.0" diff --git a/composer-mouf.lock b/composer-mouf.lock index 652f86f..866e82a 100644 --- a/composer-mouf.lock +++ b/composer-mouf.lock @@ -4,7 +4,7 @@ "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": "8498725b1340bcf235d6ce9975656e9f", + "content-hash": "7ec495686713dbabf0dcf7263dc19c90", "packages": [ { "name": "cache/adapter-common", @@ -442,6 +442,67 @@ ], "time": "2017-02-09T16:10:21+00:00" }, + { + "name": "filp/whoops", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "181c4502d8f34db7aed7bfe88d4f87875b8e947a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/181c4502d8f34db7aed7bfe88d4f87875b8e947a", + "reference": "181c4502d8f34db7aed7bfe88d4f87875b8e947a", + "shasum": "" + }, + "require": { + "php": "^5.5.9 || ^7.0", + "psr/log": "^1.0.1" + }, + "require-dev": { + "mockery/mockery": "^0.9 || ^1.0", + "phpunit/phpunit": "^4.8.35 || ^5.7", + "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://filp.github.io/whoops/", + "keywords": [ + "error", + "exception", + "handling", + "library", + "throwable", + "whoops" + ], + "time": "2018-03-03T17:56:25+00:00" + }, { "name": "michelf/php-markdown", "version": "1.8.0", @@ -488,6 +549,108 @@ ], "time": "2018-01-15T00:49:33+00:00" }, + { + "name": "middlewares/utils", + "version": "v2.1.1", + "source": { + "type": "git", + "url": "https://github.com/middlewares/utils.git", + "reference": "8e3f2720fa462443e1566c9e3ab78169adcb0468" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/middlewares/utils/zipball/8e3f2720fa462443e1566c9e3ab78169adcb0468", + "reference": "8e3f2720fa462443e1566c9e3ab78169adcb0468", + "shasum": "" + }, + "require": { + "php": "^7.0", + "psr/container": "^1.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "psr/http-server-middleware": "^1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.0", + "guzzlehttp/psr7": "^1.3", + "phpunit/phpunit": "^6.0|^7.0", + "slim/slim": "^3.5", + "squizlabs/php_codesniffer": "^3.0", + "zendframework/zend-diactoros": "^1.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Middlewares\\Utils\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Common utils to create PSR-15 middleware packages", + "homepage": "https://github.com/middlewares/utils", + "keywords": [ + "PSR-11", + "http", + "middleware", + "psr-15", + "psr-17", + "psr-7" + ], + "time": "2018-08-11T07:23:25+00:00" + }, + { + "name": "middlewares/whoops", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/middlewares/whoops.git", + "reference": "4bd8e6553edfc1eba757947c86bc358bd723b40e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/middlewares/whoops/zipball/4bd8e6553edfc1eba757947c86bc358bd723b40e", + "reference": "4bd8e6553edfc1eba757947c86bc358bd723b40e", + "shasum": "" + }, + "require": { + "filp/whoops": "^2.1", + "middlewares/utils": "^2.1", + "php": "^7.0", + "psr/container": "^1.0", + "psr/http-server-middleware": "^1.0" + }, + "require-dev": { + "eloquent/phony-phpunit": "^3.0|^4.0", + "friendsofphp/php-cs-fixer": "^2.0", + "phpunit/phpunit": "^6.0|^7.0", + "squizlabs/php_codesniffer": "^3.0", + "zendframework/zend-diactoros": "^1.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Middlewares\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Middleware to use Whoops as error handler", + "homepage": "https://github.com/middlewares/whoops", + "keywords": [ + "error", + "http", + "middleware", + "psr-15", + "psr-7", + "server", + "whoops" + ], + "time": "2018-08-04T10:41:55+00:00" + }, { "name": "mindplay/composer-locator", "version": "2.1.3", @@ -967,12 +1130,12 @@ "source": { "type": "git", "url": "https://github.com/thecodingmachine/html.template.bootstrap.git", - "reference": "d1b9e4a00e129f61988d3fb29ed80b29c5ae8364" + "reference": "cb83ac96460bc072e563cdd78fe590fd94e9cc1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/html.template.bootstrap/zipball/d1b9e4a00e129f61988d3fb29ed80b29c5ae8364", - "reference": "d1b9e4a00e129f61988d3fb29ed80b29c5ae8364", + "url": "https://api.github.com/repos/thecodingmachine/html.template.bootstrap/zipball/cb83ac96460bc072e563cdd78fe590fd94e9cc1b", + "reference": "cb83ac96460bc072e563cdd78fe590fd94e9cc1b", "shasum": "" }, "require": { @@ -1016,7 +1179,7 @@ "mouf", "template" ], - "time": "2018-08-28T13:48:55+00:00" + "time": "2018-08-31T09:03:28+00:00" }, { "name": "mouf/html.template.templateinterface", @@ -1386,12 +1549,12 @@ "source": { "type": "git", "url": "https://github.com/moufmouf/javascript.jquery.jqBootstrapValidation.git", - "reference": "8996da4668cec9d390d171658b3ca5ab83cd6951" + "reference": "490de66b7136a7b6109f79864ddb8ff7e7a5c2fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/moufmouf/javascript.jquery.jqBootstrapValidation/zipball/8996da4668cec9d390d171658b3ca5ab83cd6951", - "reference": "8996da4668cec9d390d171658b3ca5ab83cd6951", + "url": "https://api.github.com/repos/moufmouf/javascript.jquery.jqBootstrapValidation/zipball/490de66b7136a7b6109f79864ddb8ff7e7a5c2fa", + "reference": "490de66b7136a7b6109f79864ddb8ff7e7a5c2fa", "shasum": "" }, "require": { @@ -1429,7 +1592,7 @@ "jqBootstrapValidation", "validator" ], - "time": "2018-08-28T13:42:32+00:00" + "time": "2018-08-31T09:05:57+00:00" }, { "name": "mouf/javascript.jquery.jquery", @@ -1437,12 +1600,12 @@ "source": { "type": "git", "url": "https://github.com/thecodingmachine/javascript.jquery.jquery.git", - "reference": "435aad622cbab1bb6de26fcf35f74dd32d414d0f" + "reference": "aa897e23843526baa1e766637049e3fcac7d877b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thecodingmachine/javascript.jquery.jquery/zipball/435aad622cbab1bb6de26fcf35f74dd32d414d0f", - "reference": "435aad622cbab1bb6de26fcf35f74dd32d414d0f", + "url": "https://api.github.com/repos/thecodingmachine/javascript.jquery.jquery/zipball/aa897e23843526baa1e766637049e3fcac7d877b", + "reference": "aa897e23843526baa1e766637049e3fcac7d877b", "shasum": "" }, "require": { @@ -1476,7 +1639,7 @@ "jquery", "mouf" ], - "time": "2018-08-28T07:34:51+00:00" + "time": "2018-08-31T09:02:27+00:00" }, { "name": "mouf/javascript.jquery.jquery-filetree", @@ -3044,6 +3207,58 @@ ], "time": "2017-02-14T16:28:37+00:00" }, + { + "name": "psr/http-factory", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "378bfe27931ecc54ff824a20d6f6bfc303bbd04c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/378bfe27931ecc54ff824a20d6f6bfc303bbd04c", + "reference": "378bfe27931ecc54ff824a20d6f6bfc303bbd04c", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "time": "2018-07-30T21:54:04+00:00" + }, { "name": "psr/http-message", "version": "1.0.1", @@ -3981,6 +4196,50 @@ "description": "Cross-framework module for Twig", "time": "2018-08-19T19:50:02+00:00" }, + { + "name": "thecodingmachine/whoops-middleware-universal-module", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/thecodingmachine/whoops-middleware-universal-module.git", + "reference": "bfa71f70fd3664cff82a743afe8bf56afd43f119" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thecodingmachine/whoops-middleware-universal-module/zipball/bfa71f70fd3664cff82a743afe8bf56afd43f119", + "reference": "bfa71f70fd3664cff82a743afe8bf56afd43f119", + "shasum": "" + }, + "require": { + "middlewares/whoops": "^1.1", + "php": ">=7.0", + "thecodingmachine/funky": "^1", + "thecodingmachine/middleware-list-universal-module": "^1.0" + }, + "require-dev": { + "mnapoli/simplex": "^0.5.0", + "phpunit/phpunit": "^7", + "satooshi/php-coveralls": "^2", + "zendframework/zend-diactoros": "^1.7.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "TheCodingMachine\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Cross-framework module for franzliedke/whoops-middleware", + "time": "2018-06-06T13:42:37+00:00" + }, { "name": "twig/twig", "version": "v2.5.0", diff --git a/mouf/MoufComponents.php b/mouf/MoufComponents.php index 8ecd533..a6a5581 100644 --- a/mouf/MoufComponents.php +++ b/mouf/MoufComponents.php @@ -79,17 +79,19 @@ 'external' => false, 'weak' => true, 'anonymous' => true, - 'setterProperties' => - array ( - 'setUrl' => - array ( - 'type' => 'string', - 'value' => 'vendor/mouf/famfamfam/icons/drive_go.png', - 'metadata' => - array ( - ), - ), - ), + 'constructor' => + array ( + 0 => + array ( + 'value' => 'vendor/mouf/famfamfam/icons/drive_go.png', + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), '__anonymous__90fe_197933_1429787454994' => array ( @@ -97,17 +99,18 @@ 'external' => false, 'weak' => true, 'anonymous' => true, - 'setterProperties' => - array ( - 'setUrl' => - array ( - 'value' => 'src-dev/views/images/world_link.png', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - ), + 'constructor' => + array ( + 0 => + array ( + 'value' => 'src-dev/views/images/world_link.png', + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), ), '__anonymous__90fe_81215_1429787382846' => array ( @@ -208,15 +211,7 @@ array ( ), ), - 'setPriority' => - array ( - 'value' => '', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'setPropagatedUrlParameters' => + 'setPropagatedUrlParameters' => array ( 'value' => array ( @@ -447,15 +442,7 @@ array ( ), ), - 'setPriority' => - array ( - 'value' => '', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'setPropagatedUrlParameters' => + 'setPropagatedUrlParameters' => array ( 'value' => array ( @@ -487,17 +474,19 @@ array ( 'class' => 'Mouf\\Html\\Widgets\\Menu\\MenuItemStyleIcon', 'external' => false, - 'setterProperties' => - array ( - 'setUrl' => - array ( - 'value' => 'src-dev/views/images/page_white_php.png', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - ), + 'constructor' => + array ( + 0 => + array ( + 'value' => 'src-dev/views/images/page_white_php.png', + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), 'createNewInstanceMenuItem' => array ( @@ -545,15 +534,7 @@ array ( ), ), - 'setPriority' => - array ( - 'value' => '', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'setPropagatedUrlParameters' => + 'setPropagatedUrlParameters' => array ( 'value' => array ( @@ -585,17 +566,18 @@ array ( 'class' => 'Mouf\\Html\\Widgets\\Menu\\MenuItemStyleIcon', 'external' => false, - 'setterProperties' => - array ( - 'setUrl' => - array ( - 'value' => 'src-dev/views/images/page_add.png', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - ), + 'constructor' => + array ( + 0 => + array ( + 'value' => 'src-dev/views/images/page_add.png', + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), ), 'css.moufCssStyles' => array ( @@ -714,23 +696,7 @@ array ( ), ), - 'setPriority' => - array ( - 'value' => '', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'setPropagatedUrlParameters' => - array ( - 'value' => false, - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'setActivateBasedOnUrl' => + 'setActivateBasedOnUrl' => array ( 'value' => false, 'type' => 'string', @@ -751,17 +717,18 @@ array ( 'class' => 'Mouf\\Html\\Widgets\\Menu\\MenuItemStyleIcon', 'external' => false, - 'setterProperties' => - array ( - 'setUrl' => - array ( - 'value' => 'src-dev/views/images/table.png', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - ), + 'constructor' => + array ( + 0 => + array ( + 'value' => 'src-dev/views/images/table.png', + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), ), 'doc' => array ( @@ -836,15 +803,7 @@ ), 'setPriority' => array ( - 'value' => '999', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'setPropagatedUrlParameters' => - array ( - 'value' => false, + 'value' => 999.0, 'type' => 'string', 'metadata' => array ( @@ -898,15 +857,7 @@ array ( ), ), - 'setPriority' => - array ( - 'value' => '', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'setPropagatedUrlParameters' => + 'setPropagatedUrlParameters' => array ( 'value' => array ( @@ -938,17 +889,19 @@ array ( 'class' => 'Mouf\\Html\\Widgets\\Menu\\MenuItemStyleIcon', 'external' => false, - 'setterProperties' => - array ( - 'setUrl' => - array ( - 'value' => 'src-dev/views/images/download.png', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - ), + 'constructor' => + array ( + 0 => + array ( + 'value' => 'src-dev/views/images/download.png', + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), 'editConfigurationMenuItem' => array ( @@ -996,15 +949,7 @@ array ( ), ), - 'setPriority' => - array ( - 'value' => '', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'setPropagatedUrlParameters' => + 'setPropagatedUrlParameters' => array ( 'value' => array ( @@ -1036,17 +981,19 @@ array ( 'class' => 'Mouf\\Html\\Widgets\\Menu\\MenuItemStyleIcon', 'external' => false, - 'setterProperties' => - array ( - 'setUrl' => - array ( - 'value' => 'src-dev/views/images/note_edit.png', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - ), + 'constructor' => + array ( + 0 => + array ( + 'value' => 'src-dev/views/images/note_edit.png', + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), 'errorLogger' => array ( @@ -1101,17 +1048,18 @@ array ( 'class' => 'Mouf\\Html\\Widgets\\Menu\\MenuItemStyleIcon', 'external' => false, - 'setterProperties' => - array ( - 'setUrl' => - array ( - 'value' => 'src-dev/views/images/page_white_php.png', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - ), + 'constructor' => + array ( + 0 => + array ( + 'value' => 'src-dev/views/images/page_white_php.png', + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), ), 'includes' => array ( @@ -1331,15 +1279,7 @@ ), 'setPriority' => array ( - 'value' => '20', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'setPropagatedUrlParameters' => - array ( - 'value' => false, + 'value' => 20.0, 'type' => 'string', 'metadata' => array ( @@ -1894,23 +1834,7 @@ array ( ), ), - 'setPriority' => - array ( - 'value' => '', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'setPropagatedUrlParameters' => - array ( - 'value' => false, - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'setActivateBasedOnUrl' => + 'setActivateBasedOnUrl' => array ( 'value' => false, 'type' => 'string', @@ -1931,17 +1855,19 @@ array ( 'class' => 'Mouf\\Html\\Widgets\\Menu\\MenuItemStyleIcon', 'external' => false, - 'setterProperties' => - array ( - 'setUrl' => - array ( - 'value' => 'src-dev/views/images/door_open.png', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - ), + 'constructor' => + array ( + 0 => + array ( + 'value' => 'src-dev/views/images/door_open.png', + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), 'mainMenu' => array ( @@ -2058,15 +1984,7 @@ ), 'setPriority' => array ( - 'value' => '100', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'setPropagatedUrlParameters' => - array ( - 'value' => false, + 'value' => 100.0, 'type' => 'string', 'metadata' => array ( @@ -2281,15 +2199,7 @@ array ( ), ), - 'setPriority' => - array ( - 'value' => '', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'setPropagatedUrlParameters' => + 'setPropagatedUrlParameters' => array ( 'value' => array ( @@ -2321,17 +2231,19 @@ array ( 'class' => 'Mouf\\Html\\Widgets\\Menu\\MenuItemStyleIcon', 'external' => false, - 'setterProperties' => - array ( - 'setUrl' => - array ( - 'value' => 'src-dev/views/images/tick.png', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - ), + 'constructor' => + array ( + 0 => + array ( + 'value' => 'src-dev/views/images/tick.png', + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), + ), 'moufTemplate' => array ( @@ -2533,6 +2445,15 @@ array ( ), ), + 1 => + array ( + 'value' => 'root_url', + 'parametertype' => 'object', + 'type' => 'string', + 'metadata' => + array ( + ), + ), ), 'fieldProperties' => array ( @@ -2623,15 +2544,7 @@ ), 'setPriority' => array ( - 'value' => '20', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'setPropagatedUrlParameters' => - array ( - 'value' => false, + 'value' => 20.0, 'type' => 'string', 'metadata' => array ( @@ -2699,21 +2612,13 @@ ), 'setPriority' => array ( - 'value' => '0', + 'value' => 0.0, 'type' => 'string', 'metadata' => array ( ), ), - 'setPropagatedUrlParameters' => - array ( - 'value' => false, - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'setActivateBasedOnUrl' => + 'setActivateBasedOnUrl' => array ( 'value' => false, 'type' => 'string', @@ -3039,15 +2944,7 @@ array ( ), ), - 'setPriority' => - array ( - 'value' => '', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'setPropagatedUrlParameters' => + 'setPropagatedUrlParameters' => array ( 'value' => array ( @@ -3079,17 +2976,18 @@ array ( 'class' => 'Mouf\\Html\\Widgets\\Menu\\MenuItemStyleIcon', 'external' => false, - 'setterProperties' => - array ( - 'setUrl' => - array ( - 'value' => 'src-dev/views/images/page_white_stack.png', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - ), + 'constructor' => + array ( + 0 => + array ( + 'value' => 'src-dev/views/images/page_white_stack.png', + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), ), 'viewDocumentationMenuItem' => array ( @@ -3139,21 +3037,13 @@ ), 'setPriority' => array ( - 'value' => '90', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - 'setPropagatedUrlParameters' => - array ( - 'value' => false, + 'value' => 90.0, 'type' => 'string', 'metadata' => array ( ), ), - 'setActivateBasedOnUrl' => + 'setActivateBasedOnUrl' => array ( 'value' => false, 'type' => 'string', @@ -3174,17 +3064,18 @@ array ( 'class' => 'Mouf\\Html\\Widgets\\Menu\\MenuItemStyleIcon', 'external' => false, - 'setterProperties' => - array ( - 'setUrl' => - array ( - 'value' => 'src-dev/views/images/report.png', - 'type' => 'string', - 'metadata' => - array ( - ), - ), - ), + 'constructor' => + array ( + 0 => + array ( + 'value' => 'src-dev/views/images/report.png', + 'parametertype' => 'primitive', + 'type' => 'string', + 'metadata' => + array ( + ), + ), + ), ), 'weblibrary.qtip2' => array ( diff --git a/src-dev/Mouf/Controllers/MoufConfigureLocalUrlController.php b/src-dev/Mouf/Controllers/MoufConfigureLocalUrlController.php index 29ed9d4..3db4688 100644 --- a/src-dev/Mouf/Controllers/MoufConfigureLocalUrlController.php +++ b/src-dev/Mouf/Controllers/MoufConfigureLocalUrlController.php @@ -11,9 +11,13 @@ use Mouf\Html\HtmlElement\HtmlBlock; +use Mouf\Html\Template\TemplateInterface; use Mouf\MoufException; use Mouf\Mvc\Splash\Controllers\Controller; +use Mouf\Mvc\Splash\HtmlResponse; use Mouf\Reflection\MoufReflectionProxy; +use Mouf\Security\Logged; +use TheCodingMachine\Splash\Annotations\URL; /** * The controller that will enable you to set up the local URL (if needed) @@ -23,30 +27,32 @@ class MoufConfigureLocalUrlController extends Controller { /** * The template used by the main page for mouf. * - * @Property - * @Compulsory * @var TemplateInterface */ - public $template; + private $template; /** * The content block the template will be writting into. * - * @Property - * @Compulsory * @var HtmlBlock */ - public $contentBlock; + private $contentBlock; protected $status; protected $localUrl; protected $selfedit; + public function __construct(TemplateInterface $template, HtmlBlock $contentBlock) + { + $this->template = $template; + $this->contentBlock = $contentBlock; + } + /** * The default action will redirect to the MoufController defaultAction. * - * @Action - * @Logged + * @URL("configureLocalUrl/") + * @Logged() */ public function index($selfedit = "false") { $this->selfedit = $selfedit; @@ -61,16 +67,16 @@ public function index($selfedit = "false") { $this->localUrl = MoufReflectionProxy::getLocalUrlToProject(); $this->contentBlock->addFile(ROOT_PATH."src-dev/views/configureLocalUrl.php", $this); - $this->template->toHtml(); + return new HtmlResponse($this->template); } /** - * @Action - * @Logged + * @URL("configureLocalUrl/setLocalUrl") + * @Logged() */ - public function setLocalUrl($localUrl, $selfedit = "false") { + public function setLocalUrl(string $localUrl, string $selfedit = "false") { $this->selfedit = $selfedit; MoufReflectionProxy::setLocalUrlToProject($localUrl); - $this->index($selfedit); + return $this->index($selfedit); } } diff --git a/src-dev/Mouf/Controllers/MoufController.php b/src-dev/Mouf/Controllers/MoufController.php index b85059b..315cc48 100644 --- a/src-dev/Mouf/Controllers/MoufController.php +++ b/src-dev/Mouf/Controllers/MoufController.php @@ -10,6 +10,7 @@ namespace Mouf\Controllers; +use Mouf\Html\Template\TemplateInterface; use Mouf\MoufCache; use Mouf\MoufClassExplorer; @@ -17,17 +18,20 @@ use Mouf\Composer\ComposerService; use Mouf\Html\HtmlElement\HtmlBlock; +use Mouf\Mvc\Splash\HtmlResponse; use Mouf\Reflection\MoufReflectionProxy; use Mouf\MoufManager; use Mouf\MoufSearchable; use Mouf\Mvc\Splash\Controllers\Controller; +use Mouf\Security\Logged; +use TheCodingMachine\Splash\Annotations\URL; +use Zend\Diactoros\Response\RedirectResponse; /** * The controller allowing access to the Mouf framework. * - * @Component */ class MoufController extends Controller implements MoufSearchable { @@ -48,20 +52,16 @@ class MoufController extends Controller implements MoufSearchable { /** * The template used by the main page for mouf. * - * @Property - * @Compulsory * @var TemplateInterface */ - public $template; + private $template; /** * The content block the template will be writting into. * - * @Property - * @Compulsory * @var HtmlBlock */ - public $contentBlock; + private $contentBlock; /** * Array of all instances sorted by package and by class. @@ -98,12 +98,18 @@ class MoufController extends Controller implements MoufSearchable { */ protected $anonymousNames = array(); + public function __construct(TemplateInterface $template, HtmlBlock $contentBlock) + { + $this->template = $template; + $this->contentBlock = $contentBlock; + } + /** * Redirects the user to the right controller. - * This can be the detail controller, or any other controller, depending on the @ExtendedAction annotation. + * This can be the detail controller, or any other controller, depending on the #@ExtendedAction annotation. * - * @Action - * @Logged + * @URL("mouf/displayComponent") + * @Logged() * @param string $name the name of the component to display * @param string $selfedit If true, the name of the component must be a component from the Mouf framework itself (internal use only) */ @@ -133,8 +139,7 @@ public function displayComponent($name, $selfedit = "false") { } // Note: performing a redirect is not optimal as it requires a reload of the page! - header("Location: ".$destinationUrl."?name=".urlencode($name)."&selfedit=".urlencode($selfedit)); - exit; + return new RedirectResponse($destinationUrl."?name=".urlencode($name)."&selfedit=".urlencode($selfedit)); } /** @@ -149,8 +154,8 @@ public function displayComponent($name, $selfedit = "false") { /** * Lists all the instances available, sorted by "package" (directory of the class). * - * @Action - * @Logged + * @URL("mouf/") + * @Logged() */ public function defaultAction($selfedit = "false", $query = null, $show_anonymous = "false") { //$test = new ComposerService(); @@ -357,7 +362,7 @@ public function defaultAction($selfedit = "false", $query = null, $show_anonymou } else { $this->contentBlock->addFile(dirname(__FILE__)."/../../views/listComponentsByDirectory.php", $this); //$this->contentBlock->addFile(dirname(__FILE__)."/../views/listComponentsByDirectory.php", $this); - $this->template->toHtml(); + return new HtmlResponse($this->template); } } @@ -383,8 +388,8 @@ private function getAnonymousInstanceName($instanceName) { /** * Lists all the components available, ordered by creation date, in order to edit them. * - * @Action - * @Logged + * @URL("mouf/instancesByDate") + * @Logged() */ public function instancesByDate($selfedit = "false") { $this->selfedit = $selfedit; @@ -396,7 +401,7 @@ public function instancesByDate($selfedit = "false") { } $this->contentBlock->addFile(dirname(__FILE__)."/../views/listComponents.php", $this); - $this->template->toHtml(); + return new HtmlResponse($this->template->toHtml()); } /** @@ -405,7 +410,7 @@ public function instancesByDate($selfedit = "false") { * @Action * @Logged */ - public function newInstance($selfedit = "false", $instanceName=null, $instanceClass=null) { + /*public function newInstance($selfedit = "false", $instanceName=null, $instanceClass=null) { //$componentsList = Moufspector::getComponentsList(); $this->selfedit = $selfedit; $componentsList = MoufReflectionProxy::getComponentsList($selfedit=="true"); @@ -415,13 +420,13 @@ public function newInstance($selfedit = "false", $instanceName=null, $instanceCl $template->addContentFunction(array($this, "displayNewInstanceScreen"), $componentsList, $selfedit, $instanceName, $instanceClass); //$template->addContentFile(dirname(__FILE__)."/../views/displayNewInstance.php", $this); $template->toHtml(); - } + }*/ /** * Displays the screen allowing to create new instances. * - * @Action - * @Logged + * @URL("mouf/newInstance2") + * @Logged() */ public function newInstance2($selfedit = "false", $instanceName=null, $instanceClass=null) { $this->instanceName = $instanceName; @@ -429,20 +434,20 @@ public function newInstance2($selfedit = "false", $instanceName=null, $instanceC $this->selfedit = $selfedit; $this->contentBlock->addFile(dirname(__FILE__)."/../../views/instances/newInstance.php", $this); - $this->template->toHtml(); + return new HtmlResponse($this->template); } /** * Purge the cache and redisplays the screen allowing to create new instances. * - * @Action - * @Logged + * @URL("mouf/refreshNewInstance") + * @Logged() */ public function refreshNewInstance($selfedit = "false", $instanceName=null, $instanceClass=null) { $moufCache = new MoufCache(); $moufCache->purgeAll(); - header("Location: newInstance2?selfedit=".$selfedit."&instanceName=".urlencode($instanceName)."&instanceClass=".urlencode($instanceClass)); + return new RedirectResponse("newInstance2?selfedit=".$selfedit."&instanceName=".urlencode($instanceName)."&instanceClass=".urlencode($instanceClass)); } /** @@ -456,8 +461,8 @@ public function displayNewInstanceScreen($componentsList, $selfedit, $instanceNa /** * The action that creates a new component instance. * - * @Action - * @Logged + * @URL("mouf/createComponent") + * @Logged() * @param string $instanceName The name of the instance to create * @param string $instanceClass The class of the component to create */ @@ -481,8 +486,8 @@ public function createComponent($instanceName, $instanceClass, $selfedit) { /** * Removes the instance passed in parameter. * - * @Action - * @Logged + * @URL("mouf/deleteInstance") + * @Logged() */ public function deleteInstance($selfedit = "false", $instanceName=null, $returnurl = null) { $this->selfedit = $selfedit; @@ -497,16 +502,16 @@ public function deleteInstance($selfedit = "false", $instanceName=null, $returnu $this->moufManager->rewriteMouf(); if ($returnurl) { - header("Location:".$returnurl); + return new RedirectResponse($returnurl); } else { - header("Location: .?selfedit=".$selfedit); + return new RedirectResponse(".?selfedit=".$selfedit); } } /** * Removes all the instances passed in parameter - * @Action - * @Logged + * @URL("mouf/deleteInstances") + * @Logged() * @param string $selfedit * @param array $instancesNames * @param string $returnurl @@ -529,9 +534,9 @@ public function deleteInstances($selfedit = "false", $instancesNames = array(), } if ($returnurl) { - header("Location:".$returnurl); + return new RedirectResponse($returnurl); } else { - header("Location: .?selfedit=".$selfedit); + return new RedirectResponse(".?selfedit=".$selfedit); } } @@ -539,13 +544,14 @@ public function deleteInstances($selfedit = "false", $instancesNames = array(), * Outputs HTML that will be displayed in the search result screen. * If there are no results, this should not return anything. * - * @Action + * @URL("mouf/search") + * @Logged() * @param string $query The full-text search query performed. * @param string $selfedit Whether we are in self-edit mode or not. */ public function search($query, $selfedit = "false") { $this->ajax = true; - $this->defaultAction($selfedit, $query); + return $this->defaultAction($selfedit, $query); } /** @@ -561,22 +567,22 @@ public function getSearchModuleName() { /** * Displays the screen allowing to create a new instance by PHP code. * - * @Action - * @Logged + * @URL("mouf/newInstanceByCallback") + * @Logged() */ public function newInstanceByCallback($selfedit = "false", $instanceName=null) { $this->instanceName = $instanceName; $this->selfedit = $selfedit; $this->contentBlock->addFile(dirname(__FILE__)."/../../views/instances/newInstanceByCallback.php", $this); - $this->template->toHtml(); + return new HtmlResponse($this->template); } /** * Performs the action of creating a new instance. * - * @Action - * @Logged + * @URL("mouf/createInstanceByCode") + * @Logged() */ public function createInstanceByCode($selfedit = "false", $instanceName=null) { if (!$instanceName) { @@ -594,7 +600,6 @@ public function createInstanceByCode($selfedit = "false", $instanceName=null) { $this->moufManager->createInstanceByCode()->setName($instanceName); $this->moufManager->rewriteMouf(); - header("Location: ".MOUF_URL."ajaxinstance/?name=".urlencode($instanceName)."&selfedit=".$selfedit); + return new RedirectResponse(MOUF_URL."ajaxinstance/?name=".urlencode($instanceName)."&selfedit=".$selfedit); } } -?> \ No newline at end of file diff --git a/src-dev/Mouf/Controllers/MoufInstallController.php b/src-dev/Mouf/Controllers/MoufInstallController.php index dcf7fd1..b56c8cb 100644 --- a/src-dev/Mouf/Controllers/MoufInstallController.php +++ b/src-dev/Mouf/Controllers/MoufInstallController.php @@ -20,7 +20,13 @@ use Mouf\Html\HtmlElement\HtmlBlock; use Mouf\Mvc\Splash\Controllers\Controller; +use Mouf\Mvc\Splash\HtmlResponse; +use Mouf\Security\UserFileDao\UserFileBean; +use Mouf\Security\UserFileDao\UserFileDao; +use Psr\Http\Message\ResponseInterface; +use TheCodingMachine\Splash\Annotations\Post; use TheCodingMachine\Splash\Annotations\URL; +use Zend\Diactoros\Response\RedirectResponse; /** @@ -43,10 +49,16 @@ class MoufInstallController extends Controller { */ private $contentBlock; - public function __construct(TemplateInterface $template, HtmlBlock $contentBlock) + /** + * @var UserFileDao + */ + private $userFileDao; + + public function __construct(TemplateInterface $template, HtmlBlock $contentBlock, UserFileDao $userFileDao) { $this->template = $template; $this->contentBlock = $contentBlock; + $this->userFileDao = $userFileDao; } @@ -91,12 +103,12 @@ public function htaccessNotDetected() { * Performs the installation by creating all required files. * * @URL("install") + * @Post() */ - public function install() { + public function install(string $login, string $password): ResponseInterface { if (file_exists(__DIR__.'/../../../../../../mouf/no_commit/user.php')) { $this->contentBlock->addFile(dirname(__FILE__)."/../../views/mouf_installer/moufusers_exists.php", $this); - $this->template->toHtml(); - return; + return new HtmlResponse($this->template); } $oldUmask = umask(); @@ -178,22 +190,14 @@ public function install() { // Finally 3 :), let's generate the user.php file: if (!file_exists(__DIR__."/../../../../../../mouf/no_commit/user.php")) { - $moufConfig = "".var_export(sha1(userinput_to_plainstring($_REQUEST['password'])), true).", 'options'=>null); - -?>"; - - file_put_contents(__DIR__."/../../../../../../mouf/no_commit/user.php", $moufConfig); - chmod(__DIR__."/../../../../../../mouf/no_commit/user.php", 0664); + $user = new UserFileBean($login); + $user->setClearTextPassword($password); + $this->userFileDao->registerUser($user); + $this->userFileDao->write(); } umask($oldUmask); - header("Location: ".ROOT_URL); - - + return new RedirectResponse(ROOT_URL); } } diff --git a/src-dev/Mouf/Controllers/MoufValidatorController.php b/src-dev/Mouf/Controllers/MoufValidatorController.php index c6902cd..d1a90fd 100644 --- a/src-dev/Mouf/Controllers/MoufValidatorController.php +++ b/src-dev/Mouf/Controllers/MoufValidatorController.php @@ -32,7 +32,7 @@ class MoufValidatorController extends Controller { * * @var MoufValidatorService */ - private $validatorService; + protected $validatorService; /** * The template used by the main page for mouf. diff --git a/src-dev/Mouf/Controllers/PhpInfoController.php b/src-dev/Mouf/Controllers/PhpInfoController.php index 0b67729..fc5e908 100644 --- a/src-dev/Mouf/Controllers/PhpInfoController.php +++ b/src-dev/Mouf/Controllers/PhpInfoController.php @@ -1,31 +1,36 @@ - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ +/* + * This file is part of the Mouf core package. + * + * (c) 2012 David Negrier + * + * For the full copyright and license information, please view the LICENSE.txt + * file that was distributed with this source code. + */ namespace Mouf\Controllers; use Mouf\Mvc\Splash\Controllers\Controller; - +use Mouf\Security\Logged; +use TheCodingMachine\Splash\Annotations\URL; +use Zend\Diactoros\Response\HtmlResponse; + + /** * The controller displaying the PHP Info page. * - * @Component */ -class PhpInfoController extends Controller { +class PhpInfoController { /** * Displays the PHP info page. * - * @Action - * @Logged + * @URL("phpInfo/") + * @Logged() */ public function defaultAction() { - echo phpinfo(); + \ob_start(); + phpinfo(); + $html = \ob_get_clean(); + return new HtmlResponse($html); } } -?> \ No newline at end of file diff --git a/src-dev/Mouf/Menu/DocumentationMenuItem.php b/src-dev/Mouf/Menu/DocumentationMenuItem.php index bbdc243..1b24a99 100644 --- a/src-dev/Mouf/Menu/DocumentationMenuItem.php +++ b/src-dev/Mouf/Menu/DocumentationMenuItem.php @@ -40,7 +40,7 @@ public function __construct() { * (non-PHPdoc) * @see \Mouf\Html\Widgets\Menu\MenuItem::getChildren() */ - public function getChildren() { + public function getChildren(): array { return $this->getMenuTree(); } diff --git a/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php b/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php index 97b3b6d..6c30852 100644 --- a/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php +++ b/src-dev/Mouf/ServiceProviders/ControllersServiceProvider.php @@ -6,18 +6,25 @@ use Interop\Container\Factories\Alias; use Interop\Container\ServiceProviderInterface; +use Mouf\Controllers\MoufConfigureLocalUrlController; +use Mouf\Controllers\MoufController; use Mouf\Controllers\MoufInstallController; use Mouf\Controllers\MoufRootController; use Mouf\Controllers\MoufValidatorController; +use Mouf\Controllers\PhpInfoController; use Mouf\Html\HtmlElement\HtmlBlock; use Mouf\Html\Template\TemplateInterface; +use Mouf\Html\Utils\WebLibraryManager\InlineWebLibrary; +use Mouf\Html\Utils\WebLibraryManager\WebLibrary; use Mouf\Security\Controllers\SimpleLoginController; +use Mouf\Security\UserFileDao\UserFileDao; use Mouf\Security\UserService\UserServiceInterface; use Mouf\Validator\MoufValidatorService; use Psr\Container\ContainerInterface; use TheCodingMachine\Funky\Annotations\Extension; use TheCodingMachine\Funky\Annotations\Factory; use TheCodingMachine\Funky\ServiceProvider; +use TheCodingMachine\Funky\Annotations\Tag; class ControllersServiceProvider extends ServiceProvider { @@ -34,7 +41,7 @@ public static function getRootUrl(): string */ public static function getUserfile(): string { - return __DIR__.'/../../../mouf/no_commit/user.php'; + return '../../../mouf/no_commit/user.php'; } /** @@ -73,9 +80,33 @@ public static function createValidatorController(MoufValidatorService $validator /** * @Factory() */ - public static function createInstallController(TemplateInterface $template, ContainerInterface $container): MoufInstallController + public static function createInstallController(TemplateInterface $template, ContainerInterface $container, UserFileDao $userFileDao): MoufInstallController { - return new MoufInstallController($template, $container->get('block.content')); + return new MoufInstallController($template, $container->get('block.content'), $userFileDao); + } + + /** + * @Factory() + */ + public static function createConfigureLocalUrlController(MoufValidatorService $validatorService, TemplateInterface $template, ContainerInterface $container): MoufConfigureLocalUrlController + { + return new MoufConfigureLocalUrlController($template, $container->get('block.content')); + } + + /** + * @Factory() + */ + public static function createMoufController(MoufValidatorService $validatorService, TemplateInterface $template, ContainerInterface $container): MoufController + { + return new MoufController($template, $container->get('block.content')); + } + + /** + * @Factory() + */ + public static function createPhpInfoController(): PhpInfoController + { + return new PhpInfoController(); } /** @@ -86,6 +117,47 @@ public static function declareControllers(array $controllers): array $controllers[] = MoufRootController::class; $controllers[] = MoufValidatorController::class; $controllers[] = MoufInstallController::class; + $controllers[] = PhpInfoController::class; + $controllers[] = MoufConfigureLocalUrlController::class; + $controllers[] = MoufController::class; return $controllers; } + + /** + * @Extension(name="block.header") + */ + public static function registerNavBarInHeader(HtmlBlock $block, ContainerInterface $container): HtmlBlock + { + $block->addHtmlElement($container->get('navBar')); + return $block; + } + + /** + * @Factory(name="mouf.weblibrary", tags={@Tag(name="webLibraries", priority=0.0)}) + */ + public static function createWebLibrary(): WebLibrary + { + return new WebLibrary([ + 'src-dev/views/instances/messages.js', + 'src-dev/views/instances/utils.js', + 'src-dev/views/instances/instances.js', + 'src-dev/views/instances/defaultRenderer.js', + 'src-dev/views/instances/moufui.js', + 'src-dev/views/instances/saveManager.js', + 'src-dev/views/instances/jquery.scrollintoview.js', + 'src-dev/views/instances/codeValidator.js', + ], + [ + 'src-dev/views/instances/defaultRenderer.css', + 'src-dev/views/styles.css' + ]); + } + + /** + * @Factory(name="mouf.setRootUrl.weblibrary", tags={@Tag(name="webLibraries", priority=10.0)}) + */ + public static function createSetRootUrlWebLibrary(ContainerInterface $container): InlineWebLibrary + { + return new InlineWebLibrary(null, null, $container->get('rootUrlJsFile')); + } } diff --git a/src/direct/install_process_validator.php b/src/direct/install_process_validator.php index 78b1d32..afbeafd 100644 --- a/src/direct/install_process_validator.php +++ b/src/direct/install_process_validator.php @@ -32,7 +32,7 @@ //require_once 'utils/check_rights.php'; MoufUtils::checkRights(); -MoufAdmin::getSessionManager()->write_close(); +MoufAdmin::getSessionManager()->writeClose(); if (!isset($_REQUEST["selfedit"]) || $_REQUEST["selfedit"]!="true") { diff --git a/src/mouf_router.php b/src/mouf_router.php index e6b8845..5ddd486 100644 --- a/src/mouf_router.php +++ b/src/mouf_router.php @@ -13,7 +13,7 @@ } unset($moufUI); -if (!file_exists(__DIR__.'/../../../../mouf/no_commit/users.php')) { +if (!file_exists(__DIR__.'/../../../../mouf/no_commit/user.php')) { $rootUrl = $_SERVER['BASE']."/";