Skip to content

Commit f8b538b

Browse files
authored
Upgrade to symfony/mercure 0.2 (#11)
* Upgrade to symfony/mercure 0.2 * Update CHANGELOG.md
1 parent e2ee4fa commit f8b538b

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ cache:
1414
- $HOME/.composer/cache
1515

1616
before_install:
17-
- if [[ $lint = '1' ]]; then wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.14.2/php-cs-fixer.phar; fi
18-
- if [[ $lint = '1' ]]; then wget https://github.com/phpstan/phpstan/releases/download/0.10.5/phpstan.phar; fi
17+
- if [[ $lint = '1' ]]; then wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.15.1/php-cs-fixer.phar; fi
18+
- if [[ $lint = '1' ]]; then wget https://github.com/phpstan/phpstan/releases/download/0.11.8/phpstan.phar; fi
1919

2020
before_script:
2121
- phpenv config-rm xdebug.ini

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
CHANGELOG
22
=========
33

4+
0.1.2
5+
-----
6+
7+
* Inject the `http_client` service when available
8+
49
0.1.1
510
-----
611

712
* Fix a deprecation triggered by the `TreeBuilder`
8-

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"symfony/config": "^3.4|^4.0",
2121
"symfony/dependency-injection": "^3.4|^4.0",
2222
"symfony/http-kernel": "^3.4|^4.0",
23-
"symfony/mercure": "*"
23+
"symfony/mercure": "^0.2"
2424
},
2525
"autoload": {
2626
"psr-4": { "Symfony\\Bundle\\MercureBundle\\": "src/" }

phpstan.neon

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
parameters:
22
autoload_files:
3-
- vendor/bin/.phpunit/phpunit-6.5/vendor/autoload.php
3+
- vendor/bin/.phpunit/phpunit-7.4/vendor/autoload.php
44
ignoreErrors:
55
# Intended
66
- '#Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::.*\.#'
7-

src/DependencyInjection/MercureExtension.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
use Symfony\Component\Config\Definition\ConfigurationInterface;
1717
use Symfony\Component\DependencyInjection\ContainerBuilder;
18+
use Symfony\Component\DependencyInjection\ContainerInterface;
1819
use Symfony\Component\DependencyInjection\Reference;
1920
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
2021
use Symfony\Component\Mercure\Jwt\StaticJwtProvider;
@@ -60,7 +61,8 @@ public function load(array $configs, ContainerBuilder $container)
6061

6162
$publisherDefinition = $container->register($hubId, Publisher::class)
6263
->addArgument($hub['url'])
63-
->addArgument(new Reference($jwtProvider));
64+
->addArgument(new Reference($jwtProvider))
65+
->addArgument(new Reference('http_client', ContainerInterface::IGNORE_ON_INVALID_REFERENCE));
6466

6567
$bus = $hub['bus'] ?? null;
6668
$attributes = null === $bus ? [] : ['bus' => $hub['bus']];

0 commit comments

Comments
 (0)