Skip to content

Commit 7a7cc06

Browse files
temppl-github
authored andcommitted
allow symfony 3, use phpunit 6, refactorings (#5)
* allow symfony 3, use phpunit 6, refactorings * removed setUpdatedAt(), since we are in a new major version * remove unsupported version from travis config * remove unnecessary type cast * allow failure for nightly builds * remove phpunit config path
1 parent 0f5b132 commit 7a7cc06

40 files changed

Lines changed: 1150 additions & 883 deletions

.travis.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
language: php
22

33
php:
4-
- 5.5
5-
- 5.6
6-
- 7
7-
- hhvm
4+
- 7.1
5+
- nightly
6+
7+
matrix:
8+
allow_failures:
9+
- php:
10+
- nightly
811

912
before_script: composer install
1013

11-
script: vendor/bin/phpunit -c tests --coverage-clover=coverage.clover
14+
script: vendor/bin/phpunit --coverage-clover=coverage.clover
1215

1316
after_script:
14-
- sh -c 'if [ $(phpenv version-name) = "5.6" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi;'
17+
- sh -c 'if [ $(phpenv version-name) = "7.1" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi;'
1518

CHANGELOG

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
3.0
2+
3+
- Blocker::isBlocked() now returns boolean. Use Blocker::getBlock() to retrieve Block.
4+
- Block::setUpdatedAt() removed. Use Block::touch().
5+
- Block uses DateTimeImmutable.
6+
- Identifier::__construct() only takes one string Argument.

README.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
Blocking Component
1+
Blocking Component [![Build Status](https://travis-ci.org/brainbits/blocking.png?branch=master)](https://travis-ci.org/brainbits/blocking) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/bc35527c-11d8-45a1-a482-18d376cfe382/mini.png)](https://insight.sensiolabs.com/projects/bc35527c-11d8-45a1-a482-18d376cfe382)
22
==================
3-
4-
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/bc35527c-11d8-45a1-a482-18d376cfe382/mini.png)](https://insight.sensiolabs.com/projects/bc35527c-11d8-45a1-a482-18d376cfe382)
5-
[![Build Status](https://travis-ci.org/brainbits/blocking.svg?branch=master)](https://travis-ci.org/brainbits/blocking)
6-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/brainbits/blocking/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/brainbits/blocking/?branch=master)
7-
[![Scrutinizer Code Coverage](https://scrutinizer-ci.com/g/brainbits/blocking/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/brainbits/blocking/?branch=master)
8-
[![Latest Stable Version](https://poser.pugx.org/brainbits/blocking/v/stable.svg)](https://packagist.org/packages/brainbits/blocking)
9-
[![Total Downloads](https://poser.pugx.org/brainbits/blocking/downloads.svg)](https://packagist.org/packages/brainbits/blocking)
10-
[![Dependency Status](https://www.versioneye.com/php/brainbits:blocking/master/badge.svg)](https://www.versioneye.com/php/brainbits:blocking/master)
11-
123
The Blocking Component provides methods to manage content based blocking.
134

145
<?php

composer.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@
1111
}
1212
],
1313
"require": {
14-
"php": ">=5.4.0"
14+
"php": "^7.1"
1515
},
1616
"require-dev": {
17-
"php": ">=5.5.0",
18-
"mikey179/vfsStream": "~1.2",
19-
"phpunit/phpunit": "~4.5",
20-
"symfony/http-foundation": "~2.3"
17+
"mikey179/vfsStream": "^1.2",
18+
"phpunit/phpunit": "^6.0",
19+
"symfony/http-foundation": "^2.8|^3.0"
2120
},
2221
"autoload": {
2322
"psr-4": { "Brainbits\\Blocking\\": "src/" }
2423
},
25-
"autoload-dev": {
26-
"psr-4": { "Brainbits\\Blocking\\Tests\\": "tests/" }
24+
"extra": {
25+
"branch-alias": {
26+
"dev-master": "3.0-dev"
27+
}
2728
}
2829
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
convertNoticesToExceptions="true"
66
convertWarningsToExceptions="true"
77
syntaxCheck="true">
8-
<testsuite name="brainbits">
9-
<directory>./</directory>
8+
<testsuite name="blocking">
9+
<directory>Tests</directory>
1010
</testsuite>
1111
<filter>
1212
<whitelist>
13-
<directory suffix=".php">../src/</directory>
13+
<directory suffix=".php">src</directory>
1414
</whitelist>
1515
</filter>
1616
</phpunit>

sami.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
use Sami\Sami;
4+
use Symfony\Component\Finder\Finder;
5+
6+
$iterator = Finder::create()
7+
->files()
8+
->name('*.php')
9+
->exclude('build')
10+
->exclude('Resources')
11+
->exclude('Tests')
12+
->exclude('vendor')
13+
->in(__DIR__)
14+
;
15+
16+
return new Sami($iterator, array(
17+
'title' => 'blocking API',
18+
'build_dir' => __DIR__.'/build/apidocs',
19+
'cache_dir' => __DIR__.'/build/cache',
20+
'default_opened_level' => 2,
21+
));

src/Adapter/AdapterInterface.php

Lines changed: 0 additions & 63 deletions
This file was deleted.

src/Adapter/FilesystemAdapter.php

Lines changed: 0 additions & 159 deletions
This file was deleted.

0 commit comments

Comments
 (0)