Commit 04e4f03c authored by alexpott's avatar alexpott

Issue #2325779 by astrocling | not_chx: Upgrade to Doctrine v1.2.0.

parent bd8cb79b
...@@ -4,20 +4,20 @@ ...@@ -4,20 +4,20 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "8afb97667c2791fec2fb1fc43853da24", "hash": "7d34fdcf5f05caf22258954b560e70f6",
"packages": [ "packages": [
{ {
"name": "doctrine/annotations", "name": "doctrine/annotations",
"version": "dev-master", "version": "v1.2.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/annotations.git", "url": "https://github.com/doctrine/annotations.git",
"reference": "463d926a8dcc49271cb7db5a08364a70ed6e3cd3" "reference": "d9b1a37e9351ddde1f19f09a02e3d6ee92e82efd"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/463d926a8dcc49271cb7db5a08364a70ed6e3cd3", "url": "https://api.github.com/repos/doctrine/annotations/zipball/d9b1a37e9351ddde1f19f09a02e3d6ee92e82efd",
"reference": "463d926a8dcc49271cb7db5a08364a70ed6e3cd3", "reference": "d9b1a37e9351ddde1f19f09a02e3d6ee92e82efd",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -25,12 +25,13 @@ ...@@ -25,12 +25,13 @@
"php": ">=5.3.2" "php": ">=5.3.2"
}, },
"require-dev": { "require-dev": {
"doctrine/cache": "1.*" "doctrine/cache": "1.*",
"phpunit/phpunit": "4.*"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0.x-dev" "dev-master": "1.3.x-dev"
} }
}, },
"autoload": { "autoload": {
...@@ -65,7 +66,7 @@ ...@@ -65,7 +66,7 @@
{ {
"name": "Johannes Schmitt", "name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com", "email": "schmittjoh@gmail.com",
"homepage": "http://jmsyst.com", "homepage": "https://github.com/schmittjoh",
"role": "Developer of wrapped JMSSerializerBundle" "role": "Developer of wrapped JMSSerializerBundle"
} }
], ],
...@@ -76,7 +77,7 @@ ...@@ -76,7 +77,7 @@
"docblock", "docblock",
"parser" "parser"
], ],
"time": "2013-11-19 05:59:59" "time": "2014-07-06 15:52:21"
}, },
{ {
"name": "doctrine/cache", "name": "doctrine/cache",
...@@ -2493,7 +2494,6 @@ ...@@ -2493,7 +2494,6 @@
"stability-flags": { "stability-flags": {
"symfony/yaml": 20, "symfony/yaml": 20,
"doctrine/common": 20, "doctrine/common": 20,
"doctrine/annotations": 20,
"kriswallsmith/assetic": 15, "kriswallsmith/assetic": 15,
"phpunit/phpunit-mock-objects": 20 "phpunit/phpunit-mock-objects": 20
}, },
......
...@@ -711,80 +711,6 @@ ...@@ -711,80 +711,6 @@
"spl" "spl"
] ]
}, },
{
"name": "doctrine/annotations",
"version": "dev-master",
"version_normalized": "9999999-dev",
"source": {
"type": "git",
"url": "https://github.com/doctrine/annotations.git",
"reference": "463d926a8dcc49271cb7db5a08364a70ed6e3cd3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/463d926a8dcc49271cb7db5a08364a70ed6e3cd3",
"reference": "463d926a8dcc49271cb7db5a08364a70ed6e3cd3",
"shasum": ""
},
"require": {
"doctrine/lexer": "1.*",
"php": ">=5.3.2"
},
"require-dev": {
"doctrine/cache": "1.*"
},
"time": "2013-11-19 05:59:59",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"Doctrine\\Common\\Annotations\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com",
"homepage": "http://www.jwage.com/",
"role": "Creator"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com",
"homepage": "http://www.instaclick.com"
},
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com",
"homepage": "http://jmsyst.com",
"role": "Developer of wrapped JMSSerializerBundle"
}
],
"description": "Docblock Annotations Parser",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"annotations",
"docblock",
"parser"
]
},
{ {
"name": "twig/twig", "name": "twig/twig",
"version": "v1.15.0", "version": "v1.15.0",
...@@ -2564,5 +2490,80 @@ ...@@ -2564,5 +2490,80 @@
"keywords": [ "keywords": [
"stack" "stack"
] ]
},
{
"name": "doctrine/annotations",
"version": "v1.2.0",
"version_normalized": "1.2.0.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/annotations.git",
"reference": "d9b1a37e9351ddde1f19f09a02e3d6ee92e82efd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/d9b1a37e9351ddde1f19f09a02e3d6ee92e82efd",
"reference": "d9b1a37e9351ddde1f19f09a02e3d6ee92e82efd",
"shasum": ""
},
"require": {
"doctrine/lexer": "1.*",
"php": ">=5.3.2"
},
"require-dev": {
"doctrine/cache": "1.*",
"phpunit/phpunit": "4.*"
},
"time": "2014-07-06 15:52:21",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"Doctrine\\Common\\Annotations\\": "lib/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com",
"homepage": "http://www.jwage.com/",
"role": "Creator"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com",
"homepage": "http://www.instaclick.com"
},
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com",
"homepage": "https://github.com/schmittjoh",
"role": "Developer of wrapped JMSSerializerBundle"
}
],
"description": "Docblock Annotations Parser",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"annotations",
"docblock",
"parser"
]
} }
] ]
vendor/
composer.lock
composer.phar
...@@ -4,7 +4,8 @@ php: ...@@ -4,7 +4,8 @@ php:
- 5.3 - 5.3
- 5.4 - 5.4
- 5.5 - 5.5
- 5.6
- hhvm
before_script: before_script:
- composer --prefer-source --dev install - composer --prefer-source --dev install
- phpunit
Copyright (c) 2006-2013 Doctrine Project
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.
...@@ -2,10 +2,18 @@ ...@@ -2,10 +2,18 @@
[![Build Status](https://travis-ci.org/doctrine/annotations.png?branch=master)](https://travis-ci.org/doctrine/annotations) [![Build Status](https://travis-ci.org/doctrine/annotations.png?branch=master)](https://travis-ci.org/doctrine/annotations)
Docblock Annotations Parser library (extracted from Doctrine Common). Docblock Annotations Parser library (extracted from [Doctrine Common](https://github.com/doctrine/common)).
## Changelog ## Changelog
### v1.2.0
* HHVM support
* Allowing dangling comma in annotations
* Excluded annotations are no longer autoloaded
* Importing namespaces also in traits
* Added support for `::class` 5.5-style constant, works also in 5.3 and 5.4
### v1.1 ### v1.1
* Add Exception when ZendOptimizer+ or Opcache is configured to drop comments * Add Exception when ZendOptimizer+ or Opcache is configured to drop comments
...@@ -17,14 +17,15 @@ ...@@ -17,14 +17,15 @@
"doctrine/lexer": "1.*" "doctrine/lexer": "1.*"
}, },
"require-dev": { "require-dev": {
"doctrine/cache": "1.*" "doctrine/cache": "1.*",
"phpunit/phpunit": "4.*"
}, },
"autoload": { "autoload": {
"psr-0": { "Doctrine\\Common\\Annotations\\": "lib/" } "psr-0": { "Doctrine\\Common\\Annotations\\": "lib/" }
}, },
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0.x-dev" "dev-master": "1.3.x-dev"
} }
} }
} }
...@@ -20,12 +20,12 @@ ...@@ -20,12 +20,12 @@
namespace Doctrine\Common\Annotations; namespace Doctrine\Common\Annotations;
/** /**
* Annotations class * Annotations class.
* *
* @author Benjamin Eberlei <kontakt@beberlei.de> * @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com> * @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org> * @author Roman Borschel <roman@code-factory.org>
*/ */
class Annotation class Annotation
{ {
...@@ -37,9 +37,9 @@ class Annotation ...@@ -37,9 +37,9 @@ class Annotation
public $value; public $value;
/** /**
* Constructor * Constructor.
* *
* @param array $data Key-value for properties to be defined in this class * @param array $data Key-value for properties to be defined in this class.
*/ */
public final function __construct(array $data) public final function __construct(array $data)
{ {
...@@ -51,7 +51,7 @@ class Annotation ...@@ -51,7 +51,7 @@ class Annotation
/** /**
* Error handler for unknown property accessor in Annotation class. * Error handler for unknown property accessor in Annotation class.
* *
* @param string $name Unknown property name * @param string $name Unknown property name.
* *
* @throws \BadMethodCallException * @throws \BadMethodCallException
*/ */
...@@ -65,8 +65,8 @@ public function __get($name) ...@@ -65,8 +65,8 @@ public function __get($name)
/** /**
* Error handler for unknown property mutator in Annotation class. * Error handler for unknown property mutator in Annotation class.
* *
* @param string $name Unkown property name * @param string $name Unknown property name.
* @param mixed $value Property value * @param mixed $value Property value.
* *
* @throws \BadMethodCallException * @throws \BadMethodCallException
*/ */
......
...@@ -48,7 +48,7 @@ final class Enum ...@@ -48,7 +48,7 @@ final class Enum
public $literal; public $literal;
/** /**
* Annotation construct * Annotation constructor.
* *
* @param array $values * @param array $values
* *
...@@ -81,5 +81,4 @@ public function __construct(array $values) ...@@ -81,5 +81,4 @@ public function __construct(array $values)
$this->value = $values['value']; $this->value = $values['value'];
$this->literal = $values['literal']; $this->literal = $values['literal'];
} }
}
}
\ No newline at end of file
...@@ -34,7 +34,7 @@ final class IgnoreAnnotation ...@@ -34,7 +34,7 @@ final class IgnoreAnnotation
public $names; public $names;
/** /**
* Constructor * Constructor.
* *
* @param array $values * @param array $values
* *
......
...@@ -40,11 +40,11 @@ final class Target ...@@ -40,11 +40,11 @@ final class Target
* @var array * @var array
*/ */
private static $map = array( private static $map = array(
'ALL' => self::TARGET_ALL, 'ALL' => self::TARGET_ALL,
'CLASS' => self::TARGET_CLASS, 'CLASS' => self::TARGET_CLASS,
'METHOD' => self::TARGET_METHOD, 'METHOD' => self::TARGET_METHOD,
'PROPERTY' => self::TARGET_PROPERTY, 'PROPERTY' => self::TARGET_PROPERTY,
'ANNOTATION' => self::TARGET_ANNOTATION, 'ANNOTATION' => self::TARGET_ANNOTATION,
); );
/** /**
...@@ -67,7 +67,7 @@ final class Target ...@@ -67,7 +67,7 @@ final class Target
public $literal; public $literal;
/** /**
* Annotation construct * Annotation constructor.
* *
* @param array $values * @param array $values
* *
...@@ -97,7 +97,7 @@ public function __construct(array $values) ...@@ -97,7 +97,7 @@ public function __construct(array $values)
$literal, implode(', ', array_keys(self::$map))) $literal, implode(', ', array_keys(self::$map)))
); );
} }
$bitmask += self::$map[$literal]; $bitmask |= self::$map[$literal];
} }
$this->targets = $bitmask; $this->targets = $bitmask;
......
...@@ -22,11 +22,11 @@ ...@@ -22,11 +22,11 @@
/** /**
* Description of AnnotationException * Description of AnnotationException
* *
* @since 2.0 * @since 2.0
* @author Benjamin Eberlei <kontakt@beberlei.de> * @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com> * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com> * @author Jonathan Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org> * @author Roman Borschel <roman@code-factory.org>
*/ */
class AnnotationException extends \Exception class AnnotationException extends \Exception
{ {
...@@ -34,6 +34,7 @@ class AnnotationException extends \Exception ...@@ -34,6 +34,7 @@ class AnnotationException extends \Exception
* Creates a new AnnotationException describing a Syntax error. * Creates a new AnnotationException describing a Syntax error.
* *
* @param string $message Exception message * @param string $message Exception message
*
* @return AnnotationException * @return AnnotationException
*/ */
public static function syntaxError($message) public static function syntaxError($message)
...@@ -45,6 +46,7 @@ public static function syntaxError($message) ...@@ -45,6 +46,7 @@ public static function syntaxError($message)
* Creates a new AnnotationException describing a Semantical error. * Creates a new AnnotationException describing a Semantical error.
* *
* @param string $message Exception message * @param string $message Exception message
*
* @return AnnotationException * @return AnnotationException
*/ */
public static function semanticalError($message) public static function semanticalError($message)
...@@ -53,54 +55,75 @@ public static function semanticalError($message) ...@@ -53,54 +55,75 @@ public static function semanticalError($message)
} }
/** /**
* Creates a new AnnotationException describing a constant semantical error. * Creates a new AnnotationException describing an error which occurred during
* the creation of the annotation.
*
* @since 2.2
*
* @param string $message
* *
* @since 2.3
* @param string $identifier
* @param string $context