diff --git a/core/composer.json b/core/composer.json index ac90480..2fce523 100644 --- a/core/composer.json +++ b/core/composer.json @@ -17,7 +17,8 @@ "guzzle/http": "3.1.0", "kriswallsmith/assetic": "1.1.0-alpha1", "symfony-cmf/routing": "dev-master#ea4a10", - "easyrdf/easyrdf": "0.8.0-beta.1" + "easyrdf/easyrdf": "0.8.0-beta.1", + "psr/log": "1.0.0" }, "minimum-stability": "dev" } diff --git a/core/composer.lock b/core/composer.lock index 6709d12..2e8f32e 100644 --- a/core/composer.lock +++ b/core/composer.lock @@ -1,5 +1,5 @@ { - "hash": "ab5b183002f04155958ac5b57ed29032", + "hash": "b8d930ad435d31683fa00ab2f5db60e5", "packages": [ { "name": "doctrine/common", @@ -63,11 +63,11 @@ "description": "Common Library for Doctrine projects", "homepage": "http://www.doctrine-project.org", "keywords": [ + "annotations", "collections", - "spl", "eventmanager", - "annotations", - "persistence" + "persistence", + "spl" ] }, { @@ -92,8 +92,8 @@ }, "require-dev": { "phpunit/phpunit": ">=3.5.15", - "squizlabs/php_codesniffer": ">=1.4.3", - "sami/sami": "dev-master" + "sami/sami": "dev-master", + "squizlabs/php_codesniffer": ">=1.4.3" }, "time": "2013-01-18 15:54:28", "type": "library", @@ -117,11 +117,11 @@ "description": "EasyRdf is a PHP library designed to make it easy to consume and produce RDF.", "homepage": "http://www.easyrdf.org/", "keywords": [ - "rdfa", + "Linked Data", "RDF", "Semantic Web", "Turtle", - "Linked Data" + "rdfa" ] }, { @@ -162,10 +162,10 @@ "description": "Common libraries used by Guzzle", "homepage": "http://guzzlephp.org/", "keywords": [ - "event", - "exception", + "collection", "common", - "collection" + "event", + "exception" ] }, { @@ -184,11 +184,11 @@ "shasum": "" }, "require": { - "php": ">=5.3.2", "ext-curl": "*", "guzzle/common": "self.version", "guzzle/parser": "self.version", - "guzzle/stream": "self.version" + "guzzle/stream": "self.version", + "php": ">=5.3.2" }, "time": "2013-01-13 05:09:32", "type": "library", @@ -216,11 +216,11 @@ "description": "HTTP libraries used by Guzzle", "homepage": "http://guzzlephp.org/", "keywords": [ + "Guzzle", + "client", "curl", "http", - "http client", - "client", - "Guzzle" + "http client" ] }, { @@ -260,11 +260,11 @@ "description": "Interchangeable parsers used by Guzzle", "homepage": "http://guzzlephp.org/", "keywords": [ + "URI Template", + "cookie", "http", - "url", "message", - "cookie", - "URI Template" + "url" ] }, { @@ -283,8 +283,8 @@ "shasum": "" }, "require": { - "php": ">=5.3.2", - "guzzle/common": "self.version" + "guzzle/common": "self.version", + "php": ">=5.3.2" }, "time": "2012-12-07 16:45:11", "type": "library", @@ -312,9 +312,9 @@ "description": "Guzzle stream wrapper component", "homepage": "http://guzzlephp.org/", "keywords": [ - "stream", "Guzzle", - "component" + "component", + "stream" ] }, { @@ -336,16 +336,16 @@ "symfony/process": "2.1.*" }, "require-dev": { - "twig/twig": ">=1.6.0,<2.0", "leafo/lessphp": "*", "leafo/scssphp": "*", - "ptachoire/cssembed": "*" + "ptachoire/cssembed": "*", + "twig/twig": ">=1.6.0,<2.0" }, "suggest": { - "twig/twig": "Assetic provides the integration with the Twig templating engine", "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler", "leafo/scssphp": "Assetic provides the integration with the scssphp SCSS compiler", - "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris" + "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris", + "twig/twig": "Assetic provides the integration with the Twig templating engine" }, "time": "2012-08-28 05:33:44", "type": "library", @@ -433,8 +433,8 @@ }, "require": { "php": ">=5.3.2", - "symfony/routing": ">=2.1,<2.3-dev", - "symfony/http-kernel": ">=2.1,<2.3-dev" + "symfony/http-kernel": ">=2.1,<2.3-dev", + "symfony/routing": ">=2.1,<2.3-dev" }, "time": "2013-01-21 20:33:16", "type": "library", @@ -476,7 +476,7 @@ }, "dist": { "type": "zip", - "url": "https://github.com/symfony/ClassLoader/archive/v2.2.0-BETA2.zip", + "url": "https://api.github.com/repos/symfony/ClassLoader/zipball/v2.2.0-BETA2", "reference": "v2.2.0-BETA2", "shasum": "" }, @@ -534,12 +534,12 @@ "php": ">=5.3.3" }, "require-dev": { - "symfony/yaml": "2.2.*", - "symfony/config": "2.2.*" + "symfony/config": "2.2.*", + "symfony/yaml": "2.2.*" }, "suggest": { - "symfony/yaml": "2.2.*", - "symfony/config": "2.2.*" + "symfony/config": "2.2.*", + "symfony/yaml": "2.2.*" }, "time": "2013-01-23 20:21:00", "type": "library", @@ -685,15 +685,15 @@ }, "dist": { "type": "zip", - "url": "https://github.com/symfony/HttpKernel/archive/v2.2.0-BETA2.zip", + "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/v2.2.0-BETA2", "reference": "v2.2.0-BETA2", "shasum": "" }, "require": { "php": ">=5.3.3", + "psr/log": ">=1.0,<2.0", "symfony/event-dispatcher": "2.2.*", - "symfony/http-foundation": "2.2.*", - "psr/log": ">=1.0,<2.0" + "symfony/http-foundation": "2.2.*" }, "require-dev": { "symfony/browser-kit": "2.2.*", @@ -796,7 +796,7 @@ }, "dist": { "type": "zip", - "url": "https://github.com/symfony/Routing/archive/v2.2.0-BETA2.zip", + "url": "https://api.github.com/repos/symfony/Routing/zipball/v2.2.0-BETA2", "reference": "v2.2.0-BETA2", "shasum": "" }, @@ -804,16 +804,16 @@ "php": ">=5.3.3" }, "require-dev": { + "doctrine/common": ">=2.2,<2.4-dev", + "psr/log": ">=1.0,<2.0", "symfony/config": "2.2.*", - "symfony/yaml": "2.2.*", "symfony/http-kernel": "2.2.*", - "doctrine/common": ">=2.2,<2.4-dev", - "psr/log": ">=1.0,<2.0" + "symfony/yaml": "2.2.*" }, "suggest": { + "doctrine/common": ">=2.2,<2.4-dev", "symfony/config": "2.2.*", - "symfony/yaml": "2.2.*", - "doctrine/common": ">=2.2,<2.4-dev" + "symfony/yaml": "2.2.*" }, "time": "2013-01-21 16:57:32", "type": "library", @@ -966,16 +966,16 @@ "symfony/translation": "2.2.*" }, "require-dev": { + "symfony/config": "2.2.*", "symfony/http-foundation": "2.2.*", "symfony/locale": "2.2.*", - "symfony/yaml": "2.2.*", - "symfony/config": "2.2.*" + "symfony/yaml": "2.2.*" }, "suggest": { "doctrine/common": ">=2.1,<2.4-dev", + "symfony/config": "2.2.*", "symfony/http-foundation": "2.2.*", - "symfony/yaml": "2.2.*", - "symfony/config": "2.2.*" + "symfony/yaml": "2.2.*" }, "time": "2013-01-21 16:57:12", "type": "library", @@ -1017,7 +1017,7 @@ }, "dist": { "type": "zip", - "url": "https://github.com/symfony/Yaml/archive/v2.2.0-BETA2.zip", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.2.0-BETA2", "reference": "v2.2.0-BETA2", "shasum": "" }, diff --git a/core/lib/Drupal/Core/ControllerResolver.php b/core/lib/Drupal/Core/ControllerResolver.php index c1674fb..ce37f56 100644 --- a/core/lib/Drupal/Core/ControllerResolver.php +++ b/core/lib/Drupal/Core/ControllerResolver.php @@ -8,7 +8,7 @@ namespace Drupal\Core; use Symfony\Component\HttpKernel\Controller\ControllerResolver as BaseControllerResolver; -use Symfony\Component\HttpKernel\Log\LoggerInterface; +use Psr\Log\LoggerInterface; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -41,7 +41,7 @@ class ControllerResolver extends BaseControllerResolver { * * @param Symfony\Component\DependencyInjection\ContainerInterface $container * A ContainerInterface instance. - * @param Symfony\Component\HttpKernel\Log\LoggerInterface $logger + * @param \Psr\Log\LoggerInterface $logger * (optional) A LoggerInterface instance. */ public function __construct(ContainerInterface $container, LoggerInterface $logger = NULL) { diff --git a/core/lib/Drupal/Core/CoreBundle.php b/core/lib/Drupal/Core/CoreBundle.php index 035f282..b990449 100644 --- a/core/lib/Drupal/Core/CoreBundle.php +++ b/core/lib/Drupal/Core/CoreBundle.php @@ -124,7 +124,8 @@ public function build(ContainerBuilder $container) { $container->register('event_dispatcher', 'Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher') ->addArgument(new Reference('service_container')); $container->register('controller_resolver', 'Drupal\Core\ControllerResolver') - ->addArgument(new Reference('service_container')); + ->addArgument(new Reference('service_container')) + ->addArgument(new Reference('logger.watchdog')); $container ->register('cache.cache', 'Drupal\Core\Cache\CacheBackendInterface') @@ -270,6 +271,8 @@ public function build(ContainerBuilder $container) { $container->register('flood', 'Drupal\Core\Flood\DatabaseBackend') ->addArgument(new Reference('database')); + $container->register('logger.watchdog', 'Drupal\Core\WatchdogLogger'); + $container->addCompilerPass(new RegisterMatchersPass()); $container->addCompilerPass(new RegisterRouteFiltersPass()); // Add a compiler pass for registering event subscribers. @@ -318,7 +321,8 @@ protected function registerRouting(ContainerBuilder $container) { ->addMethodCall('setFinalMatcher', array(new Reference('router.matcher.final_matcher'))); $container->register('router.generator', 'Drupal\Core\Routing\UrlGenerator') ->addArgument(new Reference('router.route_provider')) - ->addArgument(new Reference('path.alias_manager.cached')); + ->addArgument(new Reference('path.alias_manager.cached')) + -addArgument(new Reference('logger.watchdog')); $container->register('router.dynamic', 'Symfony\Cmf\Component\Routing\DynamicRouter') ->addArgument(new Reference('router.request_context')) ->addArgument(new Reference('router.matcher')) diff --git a/core/lib/Drupal/Core/EventSubscriber/RouteProcessorSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/RouteProcessorSubscriber.php index 0061530..55ee2e4 100644 --- a/core/lib/Drupal/Core/EventSubscriber/RouteProcessorSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/RouteProcessorSubscriber.php @@ -12,7 +12,6 @@ use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; -use Symfony\Component\HttpKernel\Log\LoggerInterface; use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\Routing\Matcher\UrlMatcherInterface; use Symfony\Component\Routing\Exception\ResourceNotFoundException; diff --git a/core/lib/Drupal/Core/Routing/UrlGenerator.php b/core/lib/Drupal/Core/Routing/UrlGenerator.php index 75779a2..a501300 100644 --- a/core/lib/Drupal/Core/Routing/UrlGenerator.php +++ b/core/lib/Drupal/Core/Routing/UrlGenerator.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Routing; -use Symfony\Component\HttpKernel\Log\LoggerInterface; +use Psr\Log\LoggerInterface; use Symfony\Cmf\Component\Routing\ProviderBasedGenerator; use Symfony\Cmf\Component\Routing\RouteProviderInterface; @@ -33,7 +33,7 @@ class UrlGenerator extends ProviderBasedGenerator { * The route provider to be searched for routes. * @param \Drupal\Core\Path\AliasManagerInterface $alias_manager * The alias manager responsible for path aliasing. - * @param \Symfony\Component\HttpKernel\Log\LoggerInterface $logger + * @param \Psr\Log\LoggerInterface $logger * An optional logger for recording errors. */ public function __construct(RouteProviderInterface $provider, AliasManagerInterface $alias_manager, LoggerInterface $logger = NULL) { diff --git a/core/lib/Drupal/Core/WatchdogLogger.php b/core/lib/Drupal/Core/WatchdogLogger.php new file mode 100644 index 0000000..60b38e1 --- /dev/null +++ b/core/lib/Drupal/Core/WatchdogLogger.php @@ -0,0 +1,85 @@ + $element) { + if ($key != 'exception') { + $variables['@' . $key] = $element; + } + } + + watchdog($type, $message, $variables, $this->mapLevel($level), $link); + } + + /** + * Converts a PSR Log level to a Watchdog log level. + * + * @param string $level + * A PSR-3 logging level string. + * + * @return int + * The corresponding Watchdog constant. + */ + protected function mapLevel($level) { + if (empty($this->levelTranslation)) { + $this->levelTranslation = array( + LogLevel::ALERT => WATCHDOG_ALERT, + LogLevel::CRITICAL => WATCHDOG_CRITICAL, + LogLevel::DEBUG => WATCHDOG_DEBUG, + LogLevel::EMERGENCY => WATCHDOG_EMERGENCY, + LogLevel::ERROR => WATCHDOG_ERROR, + LogLevel::INFO => WATCHDOG_INFO, + LogLevel::NOTICE => WATCHDOG_NOTICE, + LogLevel::WARNING => WATCHDOG_WARNING, + ); + } + + return $this->levelTranslation[$level]; + } + +} diff --git a/core/vendor/autoload.php b/core/vendor/autoload.php index 299fea1..50cd6eb 100644 --- a/core/vendor/autoload.php +++ b/core/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInitf05567eba27abe19ce0204f90ff18248::getLoader(); +return ComposerAutoloaderInit989e7198c9f881503af8115974566b87::getLoader(); diff --git a/core/vendor/composer/autoload_real.php b/core/vendor/composer/autoload_real.php index b67069e..e7aa906 100644 --- a/core/vendor/composer/autoload_real.php +++ b/core/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php generated by Composer -class ComposerAutoloaderInitf05567eba27abe19ce0204f90ff18248 +class ComposerAutoloaderInit989e7198c9f881503af8115974566b87 { private static $loader; @@ -19,9 +19,9 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitf05567eba27abe19ce0204f90ff18248', 'loadClassLoader')); + spl_autoload_register(array('ComposerAutoloaderInit989e7198c9f881503af8115974566b87', 'loadClassLoader')); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInitf05567eba27abe19ce0204f90ff18248', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit989e7198c9f881503af8115974566b87', 'loadClassLoader')); $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); diff --git a/core/vendor/composer/installed.json b/core/vendor/composer/installed.json index 5b3d732..7d12376 100644 --- a/core/vendor/composer/installed.json +++ b/core/vendor/composer/installed.json @@ -114,11 +114,11 @@ "description": "Common Library for Doctrine projects", "homepage": "http://www.doctrine-project.org", "keywords": [ + "annotations", "collections", - "spl", "eventmanager", - "annotations", - "persistence" + "persistence", + "spl" ] }, { @@ -185,16 +185,16 @@ "symfony/process": "2.1.*" }, "require-dev": { - "twig/twig": ">=1.6.0,<2.0", "leafo/lessphp": "*", "leafo/scssphp": "*", - "ptachoire/cssembed": "*" + "ptachoire/cssembed": "*", + "twig/twig": ">=1.6.0,<2.0" }, "suggest": { - "twig/twig": "Assetic provides the integration with the Twig templating engine", "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler", "leafo/scssphp": "Assetic provides the integration with the scssphp SCSS compiler", - "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris" + "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris", + "twig/twig": "Assetic provides the integration with the Twig templating engine" }, "time": "2012-08-28 05:33:44", "type": "library", @@ -388,15 +388,15 @@ }, "dist": { "type": "zip", - "url": "https://github.com/symfony/HttpKernel/archive/v2.2.0-BETA2.zip", + "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/v2.2.0-BETA2", "reference": "v2.2.0-BETA2", "shasum": "" }, "require": { "php": ">=5.3.3", + "psr/log": ">=1.0,<2.0", "symfony/event-dispatcher": "2.2.*", - "symfony/http-foundation": "2.2.*", - "psr/log": ">=1.0,<2.0" + "symfony/http-foundation": "2.2.*" }, "require-dev": { "symfony/browser-kit": "2.2.*", @@ -459,7 +459,7 @@ }, "dist": { "type": "zip", - "url": "https://github.com/symfony/Routing/archive/v2.2.0-BETA2.zip", + "url": "https://api.github.com/repos/symfony/Routing/zipball/v2.2.0-BETA2", "reference": "v2.2.0-BETA2", "shasum": "" }, @@ -467,16 +467,16 @@ "php": ">=5.3.3" }, "require-dev": { + "doctrine/common": ">=2.2,<2.4-dev", + "psr/log": ">=1.0,<2.0", "symfony/config": "2.2.*", - "symfony/yaml": "2.2.*", "symfony/http-kernel": "2.2.*", - "doctrine/common": ">=2.2,<2.4-dev", - "psr/log": ">=1.0,<2.0" + "symfony/yaml": "2.2.*" }, "suggest": { + "doctrine/common": ">=2.2,<2.4-dev", "symfony/config": "2.2.*", - "symfony/yaml": "2.2.*", - "doctrine/common": ">=2.2,<2.4-dev" + "symfony/yaml": "2.2.*" }, "time": "2013-01-21 16:57:32", "type": "library", @@ -526,8 +526,8 @@ }, "require": { "php": ">=5.3.2", - "symfony/routing": ">=2.1,<2.3-dev", - "symfony/http-kernel": ">=2.1,<2.3-dev" + "symfony/http-kernel": ">=2.1,<2.3-dev", + "symfony/routing": ">=2.1,<2.3-dev" }, "time": "2013-01-24 16:09:01", "type": "library", @@ -582,8 +582,8 @@ }, "require-dev": { "phpunit/phpunit": ">=3.5.15", - "squizlabs/php_codesniffer": ">=1.4.3", - "sami/sami": "dev-master" + "sami/sami": "dev-master", + "squizlabs/php_codesniffer": ">=1.4.3" }, "time": "2013-01-18 15:54:28", "type": "library", @@ -608,11 +608,11 @@ "description": "EasyRdf is a PHP library designed to make it easy to consume and produce RDF.", "homepage": "http://www.easyrdf.org/", "keywords": [ - "rdfa", + "Linked Data", "RDF", "Semantic Web", "Turtle", - "Linked Data" + "rdfa" ] }, { @@ -627,7 +627,7 @@ }, "dist": { "type": "zip", - "url": "https://github.com/symfony/ClassLoader/archive/v2.2.0-BETA2.zip", + "url": "https://api.github.com/repos/symfony/ClassLoader/zipball/v2.2.0-BETA2", "reference": "v2.2.0-BETA2", "shasum": "" }, @@ -679,7 +679,7 @@ }, "dist": { "type": "zip", - "url": "https://github.com/symfony/Yaml/archive/v2.2.0-BETA2.zip", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.2.0-BETA2", "reference": "v2.2.0-BETA2", "shasum": "" }, @@ -794,16 +794,16 @@ "symfony/translation": "2.2.*" }, "require-dev": { + "symfony/config": "2.2.*", "symfony/http-foundation": "2.2.*", "symfony/locale": "2.2.*", - "symfony/yaml": "2.2.*", - "symfony/config": "2.2.*" + "symfony/yaml": "2.2.*" }, "suggest": { "doctrine/common": ">=2.1,<2.4-dev", + "symfony/config": "2.2.*", "symfony/http-foundation": "2.2.*", - "symfony/yaml": "2.2.*", - "symfony/config": "2.2.*" + "symfony/yaml": "2.2.*" }, "time": "2013-01-21 16:57:12", "type": "library", @@ -904,12 +904,12 @@ "php": ">=5.3.3" }, "require-dev": { - "symfony/yaml": "2.2.*", - "symfony/config": "2.2.*" + "symfony/config": "2.2.*", + "symfony/yaml": "2.2.*" }, "suggest": { - "symfony/yaml": "2.2.*", - "symfony/config": "2.2.*" + "symfony/config": "2.2.*", + "symfony/yaml": "2.2.*" }, "time": "2013-01-23 20:21:00", "type": "library", @@ -981,10 +981,10 @@ "description": "Common libraries used by Guzzle", "homepage": "http://guzzlephp.org/", "keywords": [ - "event", - "exception", + "collection", "common", - "collection" + "event", + "exception" ] }, { @@ -1004,8 +1004,8 @@ "shasum": "" }, "require": { - "php": ">=5.3.2", - "guzzle/common": "self.version" + "guzzle/common": "self.version", + "php": ">=5.3.2" }, "time": "2012-12-07 16:45:11", "type": "library", @@ -1034,9 +1034,9 @@ "description": "Guzzle stream wrapper component", "homepage": "http://guzzlephp.org/", "keywords": [ - "stream", "Guzzle", - "component" + "component", + "stream" ] }, { @@ -1078,11 +1078,11 @@ "description": "Interchangeable parsers used by Guzzle", "homepage": "http://guzzlephp.org/", "keywords": [ + "URI Template", + "cookie", "http", - "url", "message", - "cookie", - "URI Template" + "url" ] }, { @@ -1102,11 +1102,11 @@ "shasum": "" }, "require": { - "php": ">=5.3.2", "ext-curl": "*", "guzzle/common": "self.version", "guzzle/parser": "self.version", - "guzzle/stream": "self.version" + "guzzle/stream": "self.version", + "php": ">=5.3.2" }, "time": "2013-01-13 05:09:32", "type": "library", @@ -1135,11 +1135,11 @@ "description": "HTTP libraries used by Guzzle", "homepage": "http://guzzlephp.org/", "keywords": [ + "Guzzle", + "client", "curl", "http", - "http client", - "client", - "Guzzle" + "http client" ] } ]