Commit b726e434 authored by catch's avatar catch

Issue #1894002 by scor, msonnabaum, effulgentsia: Update vendor libraries and...

Issue #1894002 by scor, msonnabaum, effulgentsia: Update vendor libraries and pin them to specific versions in composer.json.
parent d29b1303
......@@ -3,21 +3,21 @@
"description": "Drupal is an open source content management platform powering millions of websites and applications.",
"license": "GPL-2.0+",
"require": {
"symfony/class-loader": "<2.4",
"symfony/dependency-injection": "<2.4",
"symfony/event-dispatcher": "<2.4",
"symfony/http-foundation": "<2.4",
"symfony/http-kernel": "<2.4",
"symfony/routing": "<2.4",
"symfony/class-loader": "2.2.0-BETA2",
"symfony/dependency-injection": "2.2.0-BETA2",
"symfony/event-dispatcher": "2.2.0-BETA2",
"symfony/http-foundation": "2.2.0-BETA2",
"symfony/http-kernel": "2.2.0-BETA2",
"symfony/routing": "2.2.0-BETA2",
"symfony/serializer": "2.2.0-BETA2",
"symfony/validator": "<2.4",
"symfony/yaml": "<2.4",
"twig/twig": "1.*@stable",
"doctrine/common": "2.3.*@stable",
"guzzle/http": "3.1.*@stable",
"kriswallsmith/assetic": "1.1.*@alpha",
"symfony/validator": "2.2.0-BETA2",
"symfony/yaml": "2.2.0-BETA2",
"twig/twig": "1.12.1",
"doctrine/common": "2.3.0",
"guzzle/http": "3.1.0",
"kriswallsmith/assetic": "1.1.0-alpha1",
"symfony-cmf/routing": "dev-master#ea4a10",
"easyrdf/easyrdf": "dev-master"
"easyrdf/easyrdf": "0.8.0-beta.1"
},
"minimum-stability": "dev"
}
This diff is collapsed.
......@@ -118,8 +118,7 @@ public function build(ContainerBuilder $container) {
// object and get reconstructed when the request object changes (e.g.,
// during a subrequest).
$container->addScope(new Scope('request'));
$container->register('request', 'Symfony\Component\HttpFoundation\Request')
->setSynthetic(TRUE);
$container->register('request', 'Symfony\Component\HttpFoundation\Request');
$container->register('event_dispatcher', 'Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher')
->addArgument(new Reference('service_container'));
......
......@@ -67,17 +67,17 @@ class CompiledRoute extends SymfonyCompiledRoute {
* An array of tokens to use to generate URL for this route
* @param array $pathVariables
* An array of path variables
* @param string|null $hostnameRegex
* Hostname regex
* @param array $hostnameTokens
* Hostname tokens
* @param array $hostnameVariables
* An array of hostname variables
* @param string|null $hostRegex
* Host regex
* @param array $hostTokens
* Host tokens
* @param array $hostVariables
* An array of host variables
* @param array $variables
* An array of variables (variables defined in the path and in the hostname patterns)
* An array of variables (variables defined in the path and in the host patterns)
*/
public function __construct(Route $route, $fit, $pattern_outline, $num_parts, $staticPrefix, $regex, array $tokens, array $pathVariables, $hostnameRegex = null, array $hostnameTokens = array(), array $hostnameVariables = array(), array $variables = array()) {
parent::__construct($staticPrefix, $regex, $tokens, $pathVariables, $hostnameRegex, $hostnameTokens, $hostnameVariables, $variables);
public function __construct(Route $route, $fit, $pattern_outline, $num_parts, $staticPrefix, $regex, array $tokens, array $pathVariables, $hostRegex = null, array $hostTokens = array(), array $hostVariables = array(), array $variables = array()) {
parent::__construct($staticPrefix, $regex, $tokens, $pathVariables, $hostRegex, $hostTokens, $hostVariables, $variables);
$this->route = $route;
$this->fit = $fit;
......
......@@ -40,14 +40,14 @@ class RouteCompiler extends SymfonyRouteCompiler implements RouteCompilerInterfa
* @return \Drupal\Core\Routing\CompiledRoute
* A CompiledRoute instance.
*/
public function compile(Route $route) {
public static function compile(Route $route) {
$symfony_compiled = parent::compile($route);
// The Drupal-specific compiled information.
$stripped_path = $this->getPathWithoutDefaults($route);
$fit = $this->getFit($stripped_path);
$pattern_outline = $this->getPatternOutline($stripped_path);
$stripped_path = static::getPathWithoutDefaults($route);
$fit = static::getFit($stripped_path);
$pattern_outline = static::getPatternOutline($stripped_path);
$num_parts = count(explode('/', trim($pattern_outline, '/')));
return new CompiledRoute(
......@@ -60,9 +60,9 @@ public function compile(Route $route) {
$symfony_compiled->getRegex(),
$symfony_compiled->getTokens(),
$symfony_compiled->getPathVariables(),
$symfony_compiled->getHostnameRegex(),
$symfony_compiled->getHostnameTokens(),
$symfony_compiled->getHostnameVariables(),
$symfony_compiled->getHostRegex(),
$symfony_compiled->getHostTokens(),
$symfony_compiled->getHostVariables(),
$symfony_compiled->getVariables()
);
}
......@@ -79,7 +79,7 @@ public function compile(Route $route) {
* @return string
* The path pattern outline.
*/
public function getPatternOutline($path) {
public static function getPatternOutline($path) {
return preg_replace('#\{\w+\}#', '%', $path);
}
......@@ -92,7 +92,7 @@ public function getPatternOutline($path) {
* @return int
* The fitness of the path, as an integer.
*/
public function getFit($path) {
public static function getFit($path) {
$parts = explode('/', trim($path, '/'), static::MAX_PARTS);
$number_parts = count($parts);
// We store the highest index of parts here to save some work in the fit
......@@ -124,7 +124,7 @@ public function getFit($path) {
* @return string
* The path string, stripped of placeholders that have default values.
*/
protected function getPathWithoutDefaults(Route $route) {
protected static function getPathWithoutDefaults(Route $route) {
$path = $route->getPattern();
$defaults = $route->getDefaults();
......
......@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit4166b4dc5e0c1c9d89ac8e8f9eefcd74::getLoader();
return ComposerAutoloaderInitf05567eba27abe19ce0204f90ff18248::getLoader();
......@@ -19,6 +19,7 @@
'Symfony\\Component\\DependencyInjection\\' => $vendorDir . '/symfony/dependency-injection/',
'Symfony\\Component\\ClassLoader\\' => $vendorDir . '/symfony/class-loader/',
'Symfony\\Cmf\\Component\\Routing' => $vendorDir . '/symfony-cmf/routing/',
'Psr\\Log\\' => $vendorDir . '/psr/log/',
'Guzzle\\Stream' => $vendorDir . '/guzzle/stream/',
'Guzzle\\Parser' => $vendorDir . '/guzzle/parser/',
'Guzzle\\Http' => $vendorDir . '/guzzle/http/',
......
......@@ -2,7 +2,7 @@
// autoload_real.php generated by Composer
class ComposerAutoloaderInit4166b4dc5e0c1c9d89ac8e8f9eefcd74
class ComposerAutoloaderInitf05567eba27abe19ce0204f90ff18248
{
private static $loader;
......@@ -19,9 +19,9 @@ public static function getLoader()
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit4166b4dc5e0c1c9d89ac8e8f9eefcd74', 'loadClassLoader'));
spl_autoload_register(array('ComposerAutoloaderInitf05567eba27abe19ce0204f90ff18248', 'loadClassLoader'));
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit4166b4dc5e0c1c9d89ac8e8f9eefcd74', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitf05567eba27abe19ce0204f90ff18248', 'loadClassLoader'));
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
......
This diff is collapsed.
doap.rdf
docs
samicache
lib/arc/
reports
*.tar.gz
vendor
composer.phar
composer.lock
PACKAGE = easyrdf
VERSION = $(shell php -r "print json_decode(file_get_contents('composer.json'))->version;")
distdir = $(PACKAGE)-$(VERSION)
PHP = $(shell which php)
COMPOSER_FLAGS=--no-ansi --no-interaction
PHPUNIT = vendor/bin/phpunit
PHPUNIT_FLAGS = -c config/phpunit.xml
PHPCS = vendor/bin/phpcs
PHPCS_FLAGS = --standard=./config/phpcs_ruleset.xml --encoding=utf8 --extensions=php
SAMI = vendor/bin/sami.php
EXAMPLE_FILES = examples/*.php
SOURCE_FILES = lib/EasyRdf.php \
lib/EasyRdf/*.php \
lib/EasyRdf/*/*.php
TEST_FILES = test/*/*Test.php \
test/*/*/*Test.php
TEST_SUPPORT = Makefile test/cli_example_wrapper.php \
test/TestHelper.php \
test/EasyRdf/TestCase.php \
test/EasyRdf/Http/MockClient.php \
test/EasyRdf/Serialiser/NtriplesArray.php \
test/fixtures/*
DOC_FILES = composer.json \
doap.rdf \
docs/api \
README.md \
LICENSE.md \
CHANGELOG.md
DISTFILES = $(EXAMPLE_FILES) $(SOURCE_FILES) $(TEST_FILES) \
$(TEST_SUPPORT) $(DOC_FILES)
.DEFAULT: help
all: help
# TARGET:test Run all the PHPUnit tests
.PHONY: test
test: $(PHPUNIT)
mkdir -p reports
$(PHP) $(PHPUNIT) $(PHPUNIT_FLAGS)
# TARGET:test-examples Run PHPUnit tests for each of the examples
.PHONY: test-examples
test-examples: $(PHPUNIT)
mkdir -p reports
$(PHP) $(PHPUNIT) $(PHPUNIT_FLAGS) --testsuite "EasyRdf Examples"
# TARGET:test-lib Run PHPUnit tests for the library
.PHONY: test-lib
test-lib: $(PHPUNIT)
mkdir -p reports
$(PHP) $(PHPUNIT) $(PHPUNIT_FLAGS) --testsuite "EasyRdf Library"
# TARGET:coverage Run the library tests and generate a code coverage report
.PHONY: coverage
coverage: $(PHPUNIT)
mkdir -p reports/coverage
$(PHP) $(PHPUNIT) $(PHPUNIT_FLAGS) --coverage-html ./reports/coverage --testsuite "EasyRdf Library"
# TARGET:apidocs Generate HTML API documentation
.PHONY: apidocs
apidocs: $(SAMI)
$(PHP) $(SAMI) update config/sami.php -n -v --force
docs/api: apidocs
doap.rdf: doap.php composer.json
$(PHP) doap.php > doap.rdf
# TARGET:cs Check the code style of the PHP source code
.PHONY: cs
cs: $(PHPCS)
$(PHPCS) $(PHPCS_FLAGS) lib test
# TARGET:lint Perform basic PHP syntax check on all files
.PHONY: lint
lint: $(EXAMPLE_FILES) $(SOURCE_FILES) $(TEST_FILES)
@for file in $^; do \
$(PHP) -l $$file || exit -1; \
done
# TARGET:dist Build tarball for distribution
.PHONY: dist
dist: $(distdir)
tar zcf $(distdir).tar.gz $(distdir)
rm -Rf $(distdir)
@echo "Created $(distdir).tar.gz"
$(distdir): $(DISTFILES)
@for file in $^; do \
dir=$(distdir)/`dirname "$$file"`; \
test -d "$$dir" || mkdir -p "$$dir" || exit -1; \
cp -Rfp "$$file" "$(distdir)/$$file" || exit -1; \
done
# TARGET:clean Delete any temporary and generated files
.PHONY: clean
clean:
-rm -Rf $(distdir) reports vendor
-rm -Rf docs/api samicache
-rm -f composer.phar composer.lock
-rm -f doap.rdf
# TARGET:check-fixme Scan for files containing the words TODO or FIXME
.PHONY: check-fixme
check-fixme:
@git grep -n -E 'FIXME|TODO' || echo "No FIXME or TODO lines found."
# TARGET:help You're looking at it!
.PHONY: help
help:
# Usage:
# make <target> [OPTION=value]
#
# Targets:
@egrep "^# TARGET:" [Mm]akefile | sed 's/^# TARGET:/# /'
#
# Options:
# PHP Path to php
# Composer rules
composer.phar:
curl -s -z composer.phar -o composer.phar http://getcomposer.org/composer.phar
composer-install: composer.phar
$(PHP) composer.phar $(COMPOSER_FLAGS) install --dev
composer-update: clean composer.phar
$(PHP) composer.phar $(COMPOSER_FLAGS) update --dev
vendor/bin/phpunit: composer-install
vendor/bin/phpcs: composer-install
vendor/bin/sami.php: composer-install
......@@ -64,31 +64,6 @@ Features
* Comes with a number of examples
Property Paths
--------------
EasyRdf supports querying the data in a graph using basic property paths.
This is a small subset of the property paths described in [SPARQL 1.1 query language].
You may use the caret character (^) to get an inverse property, for example:
$person = $homepage->get('^foaf:homepage');
You can use the pipe character (|) to get alternate properties, for example:
$title = $document->get('dc:title|dc11:title');
You can use a forward slash (/) to follow a property sequence, for example to get
the names of all my friends:
$names = $me->all('foaf:knows/foaf:name');
Finally, in order to use a full property URI, enclose it in angle brackets:
$name = $me->get('<http://xmlns.com/foaf/0.1/name>');
More Examples
-------------
......
{
"name": "easyrdf/easyrdf",
"description": "EasyRdf is a PHP library designed to make it easy to consume and produce RDF.",
"version": "0.8.0",
"version": "0.8.0-beta.1",
"type": "library",
"keywords": ["RDF", "Semantic Web", "Linked Data", "Turtle", "RDFa"],
"homepage": "http://www.easyrdf.org/",
......
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . './lib/');
require_once "EasyRdf.php";
require_once "vendor/autoload.php";
// Load some properties from the composer file
$composer = json_decode(file_get_contents('composer.json'));
$composer = json_decode(file_get_contents(__DIR__."/composer.json"));
// Start building up a RDF graph
$doap = new EasyRdf_Graph($composer->homepage.'doap.rdf');
......
Copyright (c) 2012 PHP Framework Interoperability Group
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<?php
namespace Psr\Log;
/**
* This is a simple Logger implementation that other Loggers can inherit from.
*
* It simply delegates all log-level-specific methods to the `log` method to
* reduce boilerplate code that a simple Logger that does the same thing with
* messages regardless of the error level has to implement.
*/
abstract class AbstractLogger implements LoggerInterface
{
/**
* System is unusable.
*
* @param string $message
* @param array $context
* @return null
*/
public function emergency($message, array $context = array())
{
$this->log(LogLevel::EMERGENCY, $message, $context);
}
/**
* Action must be taken immediately.
*
* Example: Entire website down, database unavailable, etc. This should
* trigger the SMS alerts and wake you up.
*
* @param string $message
* @param array $context
* @return null
*/
public function alert($message, array $context = array())
{
$this->log(LogLevel::ALERT, $message, $context);
}
/**
* Critical conditions.
*
* Example: Application component unavailable, unexpected exception.
*
* @param string $message
* @param array $context
* @return null
*/
public function critical($message, array $context = array())
{
$this->log(LogLevel::CRITICAL, $message, $context);
}
/**
* Runtime errors that do not require immediate action but should typically
* be logged and monitored.
*
* @param string $message
* @param array $context
* @return null
*/
public function error($message, array $context = array())
{
$this->log(LogLevel::ERROR, $message, $context);
}
/**
* Exceptional occurrences that are not errors.
*
* Example: Use of deprecated APIs, poor use of an API, undesirable things
* that are not necessarily wrong.
*
* @param string $message
* @param array $context
* @return null
*/
public function warning($message, array $context = array())
{
$this->log(LogLevel::WARNING, $message, $context);
}
/**
* Normal but significant events.
*
* @param string $message
* @param array $context
* @return null
*/
public function notice($message, array $context = array())
{
$this->log(LogLevel::NOTICE, $message, $context);
}
/**
* Interesting events.
*
* Example: User logs in, SQL logs.
*
* @param string $message
* @param array $context
* @return null
*/
public function info($message, array $context = array())
{
$this->log(LogLevel::INFO, $message, $context);
}
/**
* Detailed debug information.
*
* @param string $message
* @param array $context
* @return null
*/
public function debug($message, array $context = array())
{
$this->log(LogLevel::DEBUG, $message, $context);
}
}
<?php
namespace Psr\Log;
class InvalidArgumentException extends \InvalidArgumentException
{
}
<?php
namespace Psr\Log;
/**
* Describes log levels
*/
class LogLevel
{
const EMERGENCY = 'emergency';
const ALERT = 'alert';
const CRITICAL = 'critical';
const ERROR = 'error';
const WARNING = 'warning';
const NOTICE = 'notice';
const INFO = 'info';
const DEBUG = 'debug';
}
<?php
namespace Psr\Log;
/**
* Describes a logger-aware instance
*/
interface LoggerAwareInterface
{
/**
* Sets a logger instance on the object
*
* @param LoggerInterface $logger
* @return null
*/
public function setLogger(LoggerInterface $logger);
}
<?php
namespace Psr\Log;
/**
* Basic Implementation of LoggerAwareInterface.
*/
trait LoggerAwareTrait
{
/** @var LoggerInterface */
protected $logger;