Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
language: php
php:
- "7.3"
- "7.2"
- "7.1"
- "7.0"
- "5.6"
- "5.5"
- "5.4"
before_script: composer install -n --dev
script: "phpunit --coverage-text --bootstrap ./tests/bootstrap.php tests"
script: "./vendor/bin/phpunit --coverage-text --bootstrap ./tests/bootstrap.php tests/"
16 changes: 8 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"name": "moodev/Weasel",
"name": "moodev/weasel",
"type": "library",
"description": "Object marshalling library for PHP supporting JSON and XML",
"keywords": ["marshall", "marshalling", "json", "serialization", "deserialization", "jackson"],
"homepage": "http://github.com/moodev/php-weasel",
"license": "ISC",
"require": {
"php": ">=5.3.0",
"psr/log": "~1.0",
"doctrine/annotations": "~1.1",
"doctrine/cache": "~1.0",
"symfony/Console": ">=2.3"
"php": "^5.5.9|>=7.0.8",
"psr/log": "~1.1",
"doctrine/annotations": "~1.4",
"doctrine/cache": "~1.6",
"symfony/console": "~3.4"
},
"require-dev": {
"mockery/mockery": "dev-master",
"phpunit/phpunit": "4.3.*"
"mockery/mockery": "~1.2",
"phpunit/phpunit": "~5.7|^6.0|^7.0"
},
"suggest": {
"monolog/monolog": "A logging framework that implements PSR 3"
Expand Down
1 change: 1 addition & 0 deletions lib/Weasel/Annotation/Config/AnnotationConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function getAnnotations()

public function getAnnotation($class)
{
$class = "\\" . ltrim($class, "\\");
return isset($this->annotations[$class]) ? $this->annotations[$class] : null;
}

Expand Down
2 changes: 2 additions & 0 deletions lib/Weasel/Annotation/DocblockParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ protected function _DocBlock(DocblockLexer $lexer, $location, $namespaces)
// Skip because it doesn't have an annotation at the start
continue;
}

$pos = $lexer->cur();
try {
$annotation = $this->_Annotation($lexer, $location, $namespaces);
Expand All @@ -105,6 +106,7 @@ protected function _DocBlock(DocblockLexer $lexer, $location, $namespaces)
}
}
}

return $annotations;
}

Expand Down
Loading