Skip to content

Commit

Permalink
moved from fungku/hubspot-php@0.9 to `ryanwinchester/hubspot-php@1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
prgTW committed Aug 31, 2017
1 parent 62bbc3b commit 94f3eb3
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 31 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
vendor
.idea
.idea
composer.lock
2 changes: 1 addition & 1 deletion HubSpotBundle.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HubSpotBundle;
namespace DocPlanner\Bundle\HubSpotBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 ZnanyLekarz.pl

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
18 changes: 0 additions & 18 deletions Resources/config/hubspot-services.xml

This file was deleted.

21 changes: 15 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
{
"name": "docplanner/hubspot-bundle",
"description": "HubSpot Bundle",
"minimum-stability": "dev",
"license": "MIT",
"minimum-stability": "stable",
"authors": [
{
"name": "Bartłomiej Kuleszewicz",
"email": "[email protected]"
},
{
"name": "Tomasz Wójcik",
"email": "[email protected]"
},
{
"name": "Adam Klimczyk",
"email": "[email protected]"
}
],
"require": {
"fungku/hubspot-php": "0.9.*"
"ryanwinchester/hubspot-php": "^1.1",
"symfony/dependency-injection": "^2.8 || ^3.0",
"symfony/config": "^2.8 || ^3.0",
"symfony/http-kernel": "^2.8 || ^3.0"
},
"autoload": {
"psr-4": {
"HubSpotBundle\\": ""
"DocPlanner\\Bundle\\HubSpotBundle\\": "src/"
}
},
"require-dev": {
"matthiasnoback/symfony-config-test": "0.*"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HubSpotBundle\DependencyInjection;
namespace DocPlanner\Bundle\HubSpotBundle\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HubSpotBundle\DependencyInjection;
namespace DocPlanner\Bundle\HubSpotBundle\DependencyInjection;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
Expand All @@ -20,11 +20,11 @@ class HubSpotExtension extends Extension
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$config = $this->processConfiguration($configuration, $configs);

$container->setParameter('hubspot.api_key', $config['api_key']);

$loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('hubspot-services.xml');
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('hubspot-services.yml');
}
}
10 changes: 10 additions & 0 deletions src/Resources/config/hubspot-services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
parameters:
hubspot.client.class: 'SevenShores\Hubspot\Factory'
hubspot.factory.class: 'SevenShores\Hubspot\Factory'

services:
hubspot:
class: "%hubspot.client.class%"
factory: ["%hubspot.factory.class%", 'create']
arguments:
- "%hubspot.api_key%"

0 comments on commit 94f3eb3

Please sign in to comment.