Skip to content

Commit

Permalink
Merge pull request #5 from shahariaazam/support-symfony-4x
Browse files Browse the repository at this point in the history
Added support for Symfony 4.x
  • Loading branch information
mSprunskas authored Jan 7, 2021
2 parents afbe72c + 8c9d3aa commit 6377c39
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.0.2
### Added
- Added support for Symfony 4.x

## 1.0.1
### Fixed
- Fixed faulty strict type declaration in `\Paysera\Bundle\LockBundle\Service\LockManager`
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
},
"require": {
"php": "^7.0",
"symfony/lock": "^3.0",
"symfony/symfony": "^2.8 || ^3.0"
"symfony/lock": "^3.0 || ^4.0",
"symfony/symfony": "^2.8 || ^3.0 || ^4.0"
},
"suggest": {
"predis/predis": "To store locks in Redis"
Expand Down
7 changes: 5 additions & 2 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('paysera_lock');
$treeBuilder = new TreeBuilder('paysera_lock');
$rootNode = method_exists($treeBuilder, 'getRootNode')
? $treeBuilder->getRootNode()
: $treeBuilder->root('paysera_lock')
;

$rootNode
->children()
Expand Down

0 comments on commit 6377c39

Please sign in to comment.