Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Merge pull request #9 from LaraChimp/release/v1.0.0
Browse files Browse the repository at this point in the history
Release v1.0.0
  • Loading branch information
percymamedy authored Oct 22, 2019
2 parents d6a456e + 438b6d5 commit af696bb
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 20 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/vendor
/.env
composer.phar
composer.lock
.DS_Store
Thumbs.db
/phpunit.xml
/.idea
/.vscode
.phpunit.result.cache
28 changes: 23 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
dist: xenial
language: php

php:
- 7.1
- 7.2
env:
global:
- SETUP=stable

sudo: false
matrix:
fast_finish: true
include:
- php: 7.2
- php: 7.2
env: SETUP=lowest
- php: 7.3
- php: 7.3
env: SETUP=lowest
- php: 7.4snapshot
- php: 7.4snapshot
env: SETUP=lowest

install: travis_retry composer install --no-interaction --prefer-source
cache:
directories:
- $HOME/.composer/cache

install:
- if [[ $SETUP = 'stable' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --no-suggest; fi
- if [[ $SETUP = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable --no-suggest; fi

script: vendor/bin/phpunit --verbose
18 changes: 10 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "larachimp/pine-annotations",
"description": "Easing annotations reading in Laravel 5",
"keywords": ["php", "Laravel5", "annotations", "reader"],
"description": "Easing annotations reading in Laravel",
"keywords": ["php", "Laravel", "annotations", "reader"],
"license": "MIT",
"authors": [
{
Expand All @@ -10,14 +10,16 @@
}
],
"require": {
"php": "^7.1.3",
"doctrine/annotations": "~1.4",
"doctrine/cache": "^1.6",
"illuminate/support": "~5.6",
"php": "^7.2",
"doctrine/annotations": "^1.7",
"doctrine/cache": "^1.8",
"illuminate/support": "^6.0",
"symfony/finder": "^4.0"
},
"require-dev": {
"orchestra/testbench": "~3.6"
"mockery/mockery": "^1.1",
"orchestra/testbench": "^4.0",
"phpunit/phpunit": "^8.0"
},
"autoload": {
"psr-4": {
Expand All @@ -31,7 +33,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "0.3.x-dev"
"dev-master": "1.x-dev"
},
"laravel": {
"providers": [
Expand Down
6 changes: 4 additions & 2 deletions phpunit.xml → phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
beStrictAboutTestsThatDoNotTestAnything="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
syntaxCheck="false"
verbose="true"
>
<testsuites>
<testsuite name="PineAnnotations Test Suite">
<directory suffix=".php">./tests/</directory>
<directory suffix=".php">./tests</directory>
</testsuite>
</testsuites>
<php>
Expand Down
12 changes: 8 additions & 4 deletions src/Support/Reader/AnnotationsReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ protected function readSpecificAnnotationFor($reflection)
protected function getReflectionFrom($argument)
{
// Method name to use.
$reflectionMethodName = Str::camel('getreflection'.$this->target.'from');
$reflectionMethodName = Str::camel('get_reflection_'.$this->target.'_from');

// Return Reflection
return $this->{$reflectionMethodName}($argument);
Expand All @@ -214,6 +214,7 @@ protected function getReflectionFrom($argument)
* @param mixed $argument
*
* @return ReflectionClass
* @throws \ReflectionException
*/
protected function getReflectionClassFrom($argument)
{
Expand All @@ -231,9 +232,10 @@ protected function getReflectionClassFrom($argument)
*
* @param mixed $argument
*
* @throws InvalidArgumentException
*
* @return ReflectionProperty
*
* @throws InvalidArgumentException
* @throws \ReflectionException
*/
protected function getReflectionPropertyFrom($argument)
{
Expand All @@ -257,6 +259,8 @@ protected function getReflectionPropertyFrom($argument)
* @param mixed $argument
*
* @return ReflectionMethod
*
* @throws \ReflectionException
*/
protected function getReflectionMethodFrom($argument)
{
Expand Down Expand Up @@ -290,7 +294,7 @@ protected function constructReadMethod()
$endsWith = 'annotation';
}

return Str::camel('get'.$this->target.$endsWith);
return Str::camel('get_'.$this->target.'_'.$endsWith);
}

/**
Expand Down

0 comments on commit af696bb

Please sign in to comment.