Skip to content

Commit

Permalink
Merge pull request #8 from rdohms/2.dev
Browse files Browse the repository at this point in the history
[WiP] 2.dev
  • Loading branch information
rdohms committed Jan 17, 2014
2 parents e642c92 + 618e1dd commit 4ede7bb
Show file tree
Hide file tree
Showing 93 changed files with 3,592 additions and 647 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tests/_reports
vendor
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: php

php:
- 5.3
- 5.4
- 5.5
- hhvm

before_script:
- composer self-update
- composer install --dev

script: phpunit

matrix:
allow_failures:
- php: hhvm
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

This library provides a service that can be used to filter object values based on annotations

## Installation
## Install

### Composer
Use composer to add DMS\Filter to your app

composer.phar require dms/dms-filter=~1.1
`composer require dms/dms-filter:~2.0`

This will get you the latest compatible version with 2.0 without BC breaks.

## Usage

Your Entity:
Your Entity:

```php
<?php
Expand Down Expand Up @@ -43,7 +45,7 @@ class User

}
?>
```
```

Filtering:

Expand Down Expand Up @@ -75,15 +77,15 @@ Filtering:
echo $user->name; //"My name"
echo $user->email; //"[email protected]"
?>
```
```

Full example: https://gist.github.com/1098352

## Dependencies

This package relies on these external libraries:

* Doctrine Common: Reader and Cache
* Doctrine Annotations

## Contributing

Expand All @@ -92,12 +94,11 @@ Feel free to send pull requests, just follow these guides:
* Fork
* Code
* Test
* Tests are in: https://github.com/rdohms/DMS
* Just create Testcase and run `phpunit` inside the `tests` folder
* Just create FilterTestCase and run `phpunit`
* Submit PR

## Credits

This library is inspired by the Symfony 2 Validator component and is meant to work alongside it.
This library is inspired by the Symfony 2 Validator component and is meant to work alongside it.

Symfony 2 Validator: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator
23 changes: 0 additions & 23 deletions Rules/StripNewlines.php

This file was deleted.

72 changes: 0 additions & 72 deletions Rules/ToLower.php

This file was deleted.

72 changes: 0 additions & 72 deletions Rules/ToUpper.php

This file was deleted.

44 changes: 0 additions & 44 deletions Rules/Trim.php

This file was deleted.

29 changes: 0 additions & 29 deletions Version.php

This file was deleted.

25 changes: 20 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "library",
"description": "DMS Filter provides Annotation based entity filtering.",
"keywords": ["filter", "dms"],
"homepage": "https://github.com/rdohms/DMS-Filter",
"homepage": "https://github.com/rdohms/dms-filter",
"license": "MIT",

"authors": [
Expand All @@ -15,14 +15,29 @@

"require": {
"php": ">=5.3.2",
"doctrine/common": ">=2.1"
"doctrine/annotations": "~1.1"
},

"autoload": {
"psr-0": {
"DMS\\Filter": ""
"DMS": ["src","tests"]
}
},

"target-dir": "DMS/Filter"
}
"require-dev": {
"phpunit/phpunit": "~3.7",
"doctrine/cache": "~1.3",
"zendframework/zend-filter": "~2.0"
},

"suggest": {
"zendframework/zend-filter": "Use Zend Filters via DMS Filter"
},

"repositories": [
{
"type": "composer",
"url": "https://packages.zendframework.com/"
}
]
}
Loading

0 comments on commit 4ede7bb

Please sign in to comment.