Skip to content

Commit

Permalink
Merge pull request #29 from szymach/master
Browse files Browse the repository at this point in the history
Fixed Symfony 4.x deprecation
  • Loading branch information
rn0 authored Aug 7, 2019
2 parents a6745b4 + 9174342 commit c7f7944
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/vendor
vendor
composer.lock
composer.phar
autoload.php
bin
11 changes: 3 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
language: php

sudo: false

matrix:
include:
- php: 7.1
env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
- php: 7.3

before_install:
- composer self-update

install:
- composer update $COMPOSER_FLAGS

script:
- bin/phpspec run -f pretty
- bin/phpstan analyze --level 5
- bin/behat --no-snippets --verbose
- vendor/bin/phpspec run -f pretty
- vendor/bin/phpstan analyze --level 5
- vendor/bin/behat --no-snippets --verbose
9 changes: 7 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('fsi_teryt_db');
if (true === method_exists(TreeBuilder::class, 'getRootNode')) {
$treeBuilder = new TreeBuilder('fsi_teryt_db');
$rootNode = $treeBuilder->getRootNode();
} else {
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('fsi_teryt_db');
}

$rootNode
->children()
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "fsi/teryt-database-bundle",
"type": "symfony-bundle",
"description": "Teryt database bundle",
"keywords": ["teryt", "bundle", "symfony2", "fsi"],
"keywords": ["teryt", "bundle", "symfony", "fsi"],
"license": "MIT",
"authors": [
{
Expand Down Expand Up @@ -39,7 +39,7 @@
"phpstan/phpstan-doctrine": "^0.11.2"
},
"config": {
"bin-dir": "bin"
"bin-dir": "vendor/bin"
},
"autoload": {
"psr-4": { "FSi\\Bundle\\TerytDatabaseBundle\\": "" }
Expand Down

0 comments on commit c7f7944

Please sign in to comment.