Skip to content

Commit

Permalink
Update for Symfoy 5
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Ogilvie committed May 23, 2020
1 parent af74432 commit 58399f3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('miracode_stripe');
$treeBuilder = new TreeBuilder('miracode_stripe');

if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// for symfony/config 4.1 and older
$rootNode = $treeBuilder->root('miracode_stripe');
}

$supportedDrivers = array('orm', /** coming soon) */);

Expand Down
2 changes: 1 addition & 1 deletion Event/StripeEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Miracode\StripeBundle\StripeException;
use Stripe\StripeObject;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;

class StripeEvent extends Event
{
Expand Down

0 comments on commit 58399f3

Please sign in to comment.