Skip to content

Commit

Permalink
Upgrade web-push-php to v6
Browse files Browse the repository at this point in the history
  • Loading branch information
Minishlink committed Aug 2, 2020
1 parent 6277d97 commit e6d2dd8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 19 deletions.
8 changes: 0 additions & 8 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ public function getConfigTreeBuilder()

$treeBuilder->getRootNode()
->children()
->arrayNode('api_keys')
->addDefaultsIfNotSet()
->children()
->scalarNode('GCM')
->defaultValue('')
->end()
->end()
->end()
->arrayNode('VAPID')
->children()
->scalarNode('subject')
Expand Down
8 changes: 1 addition & 7 deletions DependencyInjection/MinishlinkWebPushExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,7 @@ public function load(array $configs, ContainerBuilder $container)
'topic' => $config['topic'],
);

if (array_key_exists('VAPID', $config)) {
$auth = array_merge($config['api_keys'], array('VAPID' => $config['VAPID']));
} else {
$auth = $config['api_keys'];
}

$container->setParameter('minishlink_web_push.auth', $auth);
$container->setParameter('minishlink_web_push.auth', $config['VAPID']);
$container->setParameter('minishlink_web_push.default_options', $defaultOptions);
$container->setParameter('minishlink_web_push.timeout', $config['timeout']);
$container->setParameter('minishlink_web_push.automatic_padding', $config['automatic_padding']);
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ Here is the default configuration, you may change it in your `app/config/config.

```yml
minishlink_web_push:
api_keys: # you should put api keys in your "app/config/parameters.yml" file
GCM: ''
VAPID:
subject: https://yoursite.com # can be an URL or a mailto:
publicKey: ~88 chars # uncompressed public key P-256 encoded in Base64-URL
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
}
],
"require": {
"php": "^7.1",
"minishlink/web-push": "^5.0"
"php": "^7.2",
"minishlink/web-push": "^6.0"
},
"require-dev": {
"symfony/framework-bundle": "^4.2|^5.0",
Expand Down

0 comments on commit e6d2dd8

Please sign in to comment.