Skip to content

Commit

Permalink
Merge pull request #6 from nicolasmure/feature/symfony4-support
Browse files Browse the repository at this point in the history
symfony4 support
  • Loading branch information
nicolasmure authored Dec 2, 2017
2 parents f57e2e3 + 256f7e0 commit b7fe6ba
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ language: php

matrix:
include:
- php: 5.3
- php: 7.1
env:
- SYMFONY_VERSION='2.5.*'
- php: 7.0
env:
- SYMFONY_VERSION='3.0.*'
- SYMFONY_VERSION='4.0.*'

before_install:
- mkdir -p build/logs
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ class as a service (`crawler_detect`) to make it easier to use with Symfony

Download the bundle using composer :

```bash
$ composer require nmure/crawler-detect-bundle "^2.0.0"
```

For Symfony < 4.0, run :

```bash
$ composer require nmure/crawler-detect-bundle "^1.0.0"
```
Expand Down
2 changes: 1 addition & 1 deletion Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</parameters>

<services>
<service id="crawler_detect" class="%crawler_detect.class%">
<service id="crawler_detect" class="%crawler_detect.class%" public="true">
<argument type="service" id="request_stack" />
</service>
</services>
Expand Down
2 changes: 2 additions & 0 deletions Tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

include __DIR__.'/Functional/Fixtures/app/AppKernel.php';

if (!is_file($autoloadFile = __DIR__ . '/../vendor/autoload.php')) {
throw new \LogicException('Could not find autoload.php in vendor/. Try to run "composer install"');
}
Expand Down
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@
}
],
"require": {
"php": ">=5.3.0",
"symfony/framework-bundle": "~2.5|~3.0",
"php": ">=7.1",
"symfony/framework-bundle": "~4.0",
"jaybizzle/crawler-detect": "1.*"
},
"autoload": {
"psr-4": { "Nmure\\CrawlerDetectBundle\\": "" }
},
"require-dev": {
"phpunit/phpunit": "^6.5",
"symfony/yaml": "^4.0"
}
}
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
</filter>

<php>
<server name="KERNEL_DIR" value="./Tests/Functional/Fixtures/app" />
<server name="KERNEL_CLASS" value="\AppKernel" />
</php>
</phpunit>

0 comments on commit b7fe6ba

Please sign in to comment.