Skip to content

Commit

Permalink
fixing too much logins issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Davis Peixoto committed Aug 11, 2016
1 parent addfd46 commit ffea9c8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,25 @@ This Laravel 4 package provides an interface for using [Salesforce CRM](http://w
[![Latest Stable Version](https://img.shields.io/packagist/v/davispeixoto/laravel-salesforce.svg)](https://packagist.org/packages/davispeixoto/laravel-salesforce)
[![Total Downloads](https://img.shields.io/packagist/dt/davispeixoto/laravel-salesforce.svg)](https://packagist.org/packages/davispeixoto/laravel-salesforce)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/davispeixoto/Laravel-4-Salesforce/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/davispeixoto/Laravel-4-Salesforce/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/davispeixoto/Laravel-4-Salesforce/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/davispeixoto/Laravel-4-Salesforce/?branch=master)
[![Codacy Badge](https://www.codacy.com/project/badge/a0e8c76d048d441194d4cfb03642bd0c)](https://www.codacy.com/app/davis-peixoto/Laravel-4-Salesforce)
[![Code Climate](https://codeclimate.com/github/davispeixoto/Laravel-4-Salesforce/badges/gpa.svg)](https://codeclimate.com/github/davispeixoto/Laravel-4-Salesforce)
[![Build Status](https://travis-ci.org/davispeixoto/Laravel-4-Salesforce.svg?branch=2.0.5)](https://travis-ci.org/davispeixoto/Laravel-4-Salesforce)
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/3b9313d5-1340-4459-9973-070e19c289bc/small.png)](https://insight.sensiolabs.com/projects/3b9313d5-1340-4459-9973-070e19c289bc)

## Major update notice (3.*)
I have recently changed this package structure for addressing [this issue](https://github.com/davispeixoto/Laravel-4-Salesforce/issues/13).
This change will require the alias declaration into `app/config/app.php` once the package initialization is now deferred.
**Please verify aliases before upgrading existing implementations to use this version**

## Installation

Begin by installing this package through Composer. Edit your project's `composer.json` file to require `davispeixoto/laravel-salesforce`.

```json
"require": {
"laravel/framework": "4.*",
"davispeixoto/laravel-salesforce": "2.0.*"
"davispeixoto/laravel-salesforce": "3.0.*"
}
```

Expand All @@ -41,10 +47,20 @@ Ensure you put [your WSDL file](https://www.salesforce.com/us/developer/docs/api

**IMPORTANT:** the PHP Force.com Toolkit for PHP only works with Enterprise WSDL

Finally add the service provider. Open `app/config/app.php`, and add a new item to the providers array.
Finally add the service provider. Open `app/config/app.php`, and add a new item to the providers and aliases arrays.

```php
'Davispeixoto\LaravelSalesforce\LaravelSalesforceServiceProvider'
'providers' => array(
// other Laravel service providers ...
'Davispeixoto\LaravelSalesforce\LaravelSalesforceServiceProvider'
),

...

'aliases' => array(
// other Laravel aliases
'Salesforce' => 'Davispeixoto\LaravelSalesforce\Facades\Salesforce'
);
```

That's it! You're all set to go. Just use:
Expand Down Expand Up @@ -84,4 +100,4 @@ who kindly empower this project with a free open-source license for [PhpStorm](h
[1]: https://www.jetbrains.com/
[2]: https://www.jetbrains.com/company/docs/logo_jetbrains.png
[3]: https://www.jetbrains.com/phpstorm/
[4]: https://www.jetbrains.com/phpstorm/documentation/docs/logo_phpstorm.png
[4]: https://d3nmt5vlzunoa1.cloudfront.net/phpstorm/files/2015/12/PhpStorm_400x400_Twitter_logo_white.png
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class LaravelSalesforceServiceProvider extends ServiceProvider
*
* @var bool
*/
protected $defer = false;
protected $defer = true;

/**
* Bootstrap the application events.
Expand All @@ -34,7 +34,6 @@ public function register()
$this->app->booting(function () {
$loader = \Illumintate\Foundation\AliasLoader::getInstance();
$loader->alias('Salesforce', 'Davispeixoto\LaravelSalesforce\Facades\Salesforce');
$loader->alias('SF', 'Davispeixoto\LaravelSalesforce\Facades\Salesforce');
});

$this->app['salesforce'] = $this->app->share(function ($app) {
Expand Down
1 change: 1 addition & 0 deletions src/Davispeixoto/LaravelSalesforce/Salesforce.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use Davispeixoto\ForceDotComToolkitForPhp\SforceEnterpriseClient as Client;
use SalesforceException;
use Exception;
use Illuminate\Config\Repository;

/**
Expand Down

0 comments on commit ffea9c8

Please sign in to comment.