Commit 90863aee authored by alexpott's avatar alexpott
Browse files

Issue #2234277 by cilefen, hussainweb, Xano, netlooker, martin107: Composer...

Issue #2234277 by cilefen, hussainweb, Xano, netlooker, martin107: Composer update (includes security fixes).
parent 7189de5d
This diff is collapsed.
This diff is collapsed.
......@@ -7,7 +7,7 @@
return array(
$vendorDir . '/guzzlehttp/streams/src/functions.php',
$vendorDir . '/kriswallsmith/assetic/src/functions.php',
$vendorDir . '/guzzlehttp/guzzle/src/functions.php',
$vendorDir . '/kriswallsmith/assetic/src/functions.php',
$baseDir . '/core/lib/Drupal.php',
);
......@@ -30,6 +30,7 @@
'Gliph' => array($vendorDir . '/sdboyer/gliph/src'),
'Egulias\\' => array($vendorDir . '/egulias/email-validator/src'),
'EasyRdf_' => array($vendorDir . '/easyrdf/easyrdf/lib'),
'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src'),
'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/lib'),
'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib'),
'Doctrine\\Common\\Collections\\' => array($vendorDir . '/doctrine/collections/lib'),
......
......@@ -8,10 +8,8 @@
return array(
$vendorDir . '/phpunit/php-text-template',
$vendorDir . '/phpunit/php-timer',
$vendorDir . '/phpunit/php-token-stream',
$vendorDir . '/phpunit/php-file-iterator',
$vendorDir . '/phpunit/php-code-coverage',
$vendorDir . '/phpunit/phpunit',
$vendorDir . '/symfony/yaml',
$vendorDir . '/phpunit/phpunit-mock-objects',
);
This diff is collapsed.
......@@ -184,4 +184,14 @@ public static function optimizerPlusSaveComments()
"You have to enable opcache.save_comments=1 or zend_optimizerplus.save_comments=1."
);
}
/**
* @return AnnotationException
*/
public static function optimizerPlusLoadComments()
{
return new self(
"You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1."
);
}
}
......@@ -162,6 +162,15 @@ public function __construct()
throw AnnotationException::optimizerPlusSaveComments();
}
if (extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.load_comments') === "0" || ini_get('opcache.load_comments') === "0")) {
throw AnnotationException::optimizerPlusLoadComments();
}
if (extension_loaded('Zend OPcache') && ini_get('opcache.load_comments') == 0) {
throw AnnotationException::optimizerPlusLoadComments();
}
AnnotationRegistry::registerFile(__DIR__ . '/Annotation/IgnoreAnnotation.php');
$this->parser = new DocParser;
......
......@@ -354,6 +354,8 @@ private function findInitialTokenPosition($input)
$pos++;
}
return null;
}
/**
......@@ -843,16 +845,7 @@ private function MethodCall()
*/
private function Values()
{
$values = array();
// Handle the case of a single array as value, i.e. @Foo({....})
if ($this->lexer->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) {
$values['value'] = $this->Value();
return $values;
}
$values[] = $this->Value();
$values = array($this->Value());
while ($this->lexer->isNextToken(DocLexer::T_COMMA)) {
$this->match(DocLexer::T_COMMA);
......
......@@ -2,7 +2,6 @@
namespace Doctrine\Tests\Common\Annotations;
use Doctrine\Common\Annotations\Annotation\IgnoreAnnotation;
use Doctrine\Common\Annotations\DocParser;
use Doctrine\Common\Annotations\AnnotationRegistry;
use Doctrine\Common\Annotations\Annotation\Target;
......@@ -98,6 +97,28 @@ public function testBasicAnnotations()
$this->assertNull($annot->value);
}
public function testDefaultValueAnnotations()
{
$parser = $this->createTestParser();
// Array as first value
$result = $parser->parse('@Name({"key1"="value1"})');
$annot = $result[0];
$this->assertTrue($annot instanceof Name);
$this->assertTrue(is_array($annot->value));
$this->assertEquals('value1', $annot->value['key1']);
// Array as first value and additional values
$result = $parser->parse('@Name({"key1"="value1"}, foo="bar")');
$annot = $result[0];
$this->assertTrue($annot instanceof Name);
$this->assertTrue(is_array($annot->value));
$this->assertEquals('value1', $annot->value['key1']);
$this->assertEquals('bar', $annot->foo);
}
public function testNamespacedAnnotations()
{
$parser = new DocParser;
......
......@@ -5,7 +5,6 @@
use Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetClass;
use Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetAll;
use Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetPropertyMethod;
use Doctrine\Tests\Common\Annotations\Fixtures\AnnotationTargetNestedAnnotation;
/**
* @AnnotationTargetClass("Some data")
......@@ -38,4 +37,4 @@ public function someFunction()
*/
public $nested;
}
\ No newline at end of file
}
......@@ -9,4 +9,4 @@
use Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Route;
use Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Template;
class EqualNamespacesPerFileWithClassAsLast {}
\ No newline at end of file
class EqualNamespacesPerFileWithClassAsLast {}
......@@ -2,10 +2,6 @@
namespace Doctrine\Tests\Common\Annotations\Fixtures;
use ReflectionClass, ReflectionProperty, ReflectionMethod;
use Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Secure;
use Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Route;
class NamespacedSingleClassLOC1000
{
const TEST1 = 1234567890;
......@@ -1006,4 +1002,4 @@ public function test39()
return $val;
}
}
\ No newline at end of file
}
<?php
use Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Secure;
use Doctrine\Tests\Common\Annotations\Fixtures\Annotation\Route;
class SingleClassLOC1000
{
const TEST1 = 1234567890;
......@@ -1003,4 +1000,4 @@ public function test39()
return $val;
}
}
\ No newline at end of file
}
......@@ -2,8 +2,6 @@
/*
* This file bootstraps the test environment.
*/
namespace Doctrine\Tests;
error_reporting(E_ALL | E_STRICT);
// register silently failing autoloader
......
# for php-coveralls
service_name: travis-ci
src_dir: lib
coverage_clover: build/logs/clover.xml
vendor/
build/
phpunit.xml
composer.lock
\ No newline at end of file
......@@ -3,6 +3,29 @@ language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
services:
- riak
- mongodb
- memcached
- redis-server
before_script:
- sh -c "if [ $TRAVIS_PHP_VERSION != 'hhvm' ]; then pecl install riak-beta; fi"
- sh -c "if [[ $TRAVIS_PHP_VERSION != 'hhvm' && `php-config --vernum` -ge 50500 ]] ; then pecl config-set preferred_state beta; printf "yes\n" | pecl install apcu ; else echo 'extension="apc.so"' >> ./tests/travis/php.ini ;fi"
- composer self-update
- composer --prefer-source --dev install
- sh -c "if [ $TRAVIS_PHP_VERSION != 'hhvm' ]; then phpenv config-add ./tests/travis/php.ini; fi"
script:
- ./vendor/bin/phpunit -c ./tests/travis/phpunit.travis.xml -v
after_script:
- php vendor/bin/coveralls -v
matrix:
allow_failures:
- php: hhvm
# Doctrine Cache
Master: [![Build Status](https://secure.travis-ci.org/doctrine/cache.png?branch=master)](http://travis-ci.org/doctrine/cache) [![Coverage Status](https://coveralls.io/repos/doctrine/cache/badge.png?branch=master)](https://coveralls.io/r/doctrine/cache?branch=master)
[![Latest Stable Version](https://poser.pugx.org/doctrine/cache/v/stable.png)](https://packagist.org/packages/doctrine/cache) [![Total Downloads](https://poser.pugx.org/doctrine/cache/downloads.png)](https://packagist.org/packages/doctrine/cache)
Cache component extracted from the Doctrine Common project.
## Changelog
### v1.2
* Added support for MongoDB as Cache Provider
* Fix namespace version reset
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment