Skip to content

Commit a11daa5

Browse files
author
Norbert Orzechowicz
committed
Merge pull request #65 from norzechowicz/cleanup
Cleanup before stable release
2 parents ae724fd + c54376c commit a11daa5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+145
-188
lines changed

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# 2.0
2+
3+
* Added support for PHP7
4+
* Updated dependencies to support Symfony3 components
5+
* Added ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\MatchRegexTest`` expander - [email protected]
6+
* Added ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\IsEmpty`` expander - [email protected]
7+
* Added PHPMatcher facade in order to improve developers experience
8+
9+
10+
# 1.1
11+
12+
* Added pattern expanders mechanism with following expanders:
13+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\Contains``
14+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\EndsWith``
15+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\GreaterThan``
16+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\InArray``
17+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\IsDateTime``
18+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\IsEmail``
19+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\IsUrl``
20+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\LowerThan``
21+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\MatchRegex``
22+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\OneOf``
23+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\StartsWith``
24+
25+
# 1.0
26+
27+
* PHPMatcher initial release with following matchers:
28+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\ArrayMatcher``
29+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\CallbackMatcher``
30+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\CaptureMatcher``
31+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\ChainMatcher``
32+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\ExpressionMatcher``
33+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\JsonMatcher``
34+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\NullMatcher``
35+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\ScalarMatcher``
36+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\TypeMatcher``
37+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\WildcardMatcher``
38+
* ``Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander\XmlMatcher``

CONTRIBUTING.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#A quick guide to contribute to the project:
2+
3+
##Installing the dev environment
4+
5+
1. Fork the repo
6+
2. Clone the repo to local
7+
3. Install dependencies: `composer update` (this assumes you have 'composer' aliased to whereever your composer.phar lives)
8+
4. Run the tests. We only take pull requests with passing tests, and it's great to know that you have a clean slate:
9+
`./bin/phpunit`
10+
11+
##Coding Standards
12+
13+
Try use similar coding standards to what you see in the project to keep things clear to the contributors. If you're unsure, it's always a safe bet to fall-back to the PSR standards.
14+
15+
[PSR-1: Basic Coding Standard](http://www.php-fig.org/psr/psr-1/)
16+
17+
[PSR-2: Coding Style Guide](http://www.php-fig.org/psr/psr-2/)
18+
19+
##Adding new features
20+
21+
Pull requests with new features needs to be created against master branch.
22+
23+
If new feature require BC Breake please note that in your PR comment, it will added in next major version.
24+
New features that does not have any BC Breakes are going to be added in next minor version.
25+
26+
##Patches and bugfixes
27+
28+
1. Check the oldest version that patch/bug fix can be applied.
29+
2. Create PR against that version
30+
31+
For example if you are fixing pattern expander that was introduced in version 1.1 make sure that PR with fix
32+
is created against version 1.1, not master or 2.0
33+
34+
##The actual contribution
35+
36+
1. Make the changes/additions to the code, committing often and making clear what you've done
37+
2. Make sure you write tests for your code, located in the folder structure `tests/Coduo/PHPMatcher/...`
38+
3. Run your tests (often and while coding): `./bin/phpunit`
39+
4. Create Pull Request on github to against proper branch

LICENCE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014 Michal Dabrowski, Norbert Orzechowicz
1+
Copyright (c) 2014-2016 Michal Dabrowski, Norbert Orzechowicz
22

33
Permission is hereby granted, free of charge, to any person
44
obtaining a copy of this software and associated documentation

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ $match = $matcher->match("lorem ipsum dolor", "@string@")
5252
* ``isDateTime()``
5353
* ``isEmail()``
5454
* ``isUrl()``
55-
* ``notEmpty()``
5655
* ``isEmpty()``
56+
* ``isNotEmpty()``
5757
* ``lowerThan($boundry)``
5858
* ``greaterThan($boundry)``
5959
* ``inArray($value)``

UPGRADE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Upgrade from 1.1 to 2.0
2+
3+
* All classes are now marked as final in order to close extra extension points
4+
* ``Coduo\PHPMatcher\Matcher\CaptureMatcher`` was removed
5+
* ``Coduo\PHPMatcher\Matcher\TypeMatcher`` was removed
6+
* ``Coduo\PHPMatcher\Matcher\PropertyMatcher`` interface was remved
7+
* Removed ``match`` function, use PHPMatcher facade instead
8+
* Renamed ``@[email protected]()`` expander into ``@[email protected]()``
9+
10+
# Upgrade from 1.0 to 1.1
11+
12+
*No known BC Breakes*

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "coduo/php-matcher",
33
"type": "library",
4-
"keywords": ["json", "matcher", "tests"],
4+
"keywords": ["json", "matcher", "tests", "match"],
55
"license": "MIT",
66
"authors": [
77
{

src/Coduo/PHPMatcher/AST/Expander.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Coduo\PHPMatcher\AST;
44

5-
class Expander implements Node
5+
final class Expander implements Node
66
{
77
/**
88
* @var

src/Coduo/PHPMatcher/AST/Pattern.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Coduo\PHPMatcher\AST;
44

5-
class Pattern implements Node
5+
final class Pattern implements Node
66
{
77
/**
88
* @var Type

src/Coduo/PHPMatcher/AST/Type.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Coduo\PHPMatcher\AST;
44

5-
class Type implements Node
5+
final class Type implements Node
66
{
77
/**
88
* @var string

src/Coduo/PHPMatcher/Lexer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Doctrine\Common\Lexer\AbstractLexer;
66

7-
class Lexer extends AbstractLexer
7+
final class Lexer extends AbstractLexer
88
{
99
const T_NONE = 1;
1010
const T_EXPANDER_NAME = 2;

0 commit comments

Comments
 (0)