diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..81b9258 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +composer.lock +phpunit.xml +vendor diff --git a/.php_cs.dist b/.php_cs.dist new file mode 100644 index 0000000..657bfea --- /dev/null +++ b/.php_cs.dist @@ -0,0 +1,11 @@ +in(__DIR__); + +return PhpCsFixer\Config::create() + ->setRules([ + 'array_syntax' => ['syntax' => 'short'], + '@PSR2' => true, + '@Symfony' => true, + ]) + ->setFinder($finder); diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..89b70f6 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,35 @@ +CHANGE LOG +========== + + +## V4.0 (Mar 31, 2019) + +* Require PHP 7.0 or higher +* Require intercom/intercom-php v4.x +* Update facade location => `Facades/Intercom.php` +* CS formating file added +* Update composer.json file +* Changed config location from `services.intercom` => `intercom` +* Added sample config file + +## V3.2.0 (Sep 7, 2018) + +* Upgraded to laravel 5.0 +* Increased the minimum upstream version + + +## V3.1.8 (Aug 15, 2017) + +* Increased the minimum upstream version +* Moved to the MIT license + + +## V1.1.4 (May 24, 2016) + +* Increased the minimum upstream version +* Other minor tweaks + + +## V1.0 Alpha (May 24, 2016) + +* Initial testing release diff --git a/composer.json b/composer.json index 0097af8..ae769f9 100644 --- a/composer.json +++ b/composer.json @@ -8,22 +8,25 @@ "email": "alex@alexslaughter.com" }], "require": { - "intercom/intercom-php": "3.2.0", - "laravel/framework": ">=5.0" + "php": "^7.1", + "intercom/intercom-php": "^4.0", + "laravel/framework": ">=5.1" }, "autoload": { "psr-4": { "Shadow\\IntercomLaravel\\": "src/" } }, + "config": { + "preferred-install": "dist" + }, "extra": { "laravel": { "providers": [ "Shadow\\IntercomLaravel\\ServiceProvider" - ], - "aliases": { - "Intercom": "Shadow\\IntercomLaravel\\Facade" - } + ] } - } + }, + "minimum-stability": "dev", + "prefer-stable": true } diff --git a/config/intercom.php b/config/intercom.php new file mode 100644 index 0000000..8f4fe8e --- /dev/null +++ b/config/intercom.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +return [ + /* + |-------------------------------------------------------------------------- + | Application ID + |-------------------------------------------------------------------------- + | + | Can be either an Application ID or a Token + | If you already have an access token you can find it [here](https://app.intercom.com/a/apps/_/developer-hub). + | If you want to create or learn more about access tokens then you can find more info [here](https://developers.intercom.com/building-apps/docs/authorization#section-access-tokens). + | + */ + 'app_id' => 'main', + /* + |-------------------------------------------------------------------------- + | Application Password + |-------------------------------------------------------------------------- + | + */ + 'api_key' => '', +]; diff --git a/src/Facade.php b/src/Facades/Intercom.php similarity index 82% rename from src/Facade.php rename to src/Facades/Intercom.php index 94de193..d828d8a 100644 --- a/src/Facade.php +++ b/src/Facades/Intercom.php @@ -1,6 +1,6 @@ intercom = new IntercomClient($id, $key); diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index 0524e5d..c864c6b 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -10,8 +10,8 @@ class ServiceProvider extends IlluminateServiceProvider public function register() { $this->app->bind('intercom', function () { - $id = Config::get('services.intercom.app_id'); - $key = Config::get('services.intercom.api_key'); + $id = Config::get('intercom.app_id'); + $key = Config::get('intercom.api_key'); return new IntercomLaravel($id, $key); });