-
Notifications
You must be signed in to change notification settings - Fork 2k
Removed "Facebook" prefix form all classes #888
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ive done a review and it all looks good
src/App.php
Outdated
|
||
class FacebookApp implements \Serializable | ||
class App implements \Serializable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as this PR is about renaming, what about naming this one Application
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
* @package Facebook | ||
*/ | ||
class FacebookMemoryPersistentDataHandler implements PersistentDataInterface | ||
class MemoryPersistentDataHandler implements PersistentDataInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about InMemoryPersistentDataHandler
here? I feel it's more common
tests/AppTest.php
Outdated
use Facebook\Authentication\AccessToken; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class FacebookAppTest extends TestCase | ||
class AppTest extends TestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then ApplicationTest
there if you agree on the tested class name :)
use PHPUnit\Framework\TestCase; | ||
|
||
class FacebookMemoryPersistentDataHandlerTest extends TestCase | ||
class MemoryPersistentDataHandlerTest extends TestCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then InMemoryPersistentDataHandlerTest
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add a commit that update names by "Find in Path..." so PHPDocs and the doc get updated too ;)
So this PR will become bigger haha
Thank you for the review. I've fixed your comments and I've updated the docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last request, as you updated PHPDocs, can you fix tag, type, and description alignment please?
@SammyK can you have a look at this PR please? thanks |
I've aligned the doc blocks and made sure they follow PSR5 with some help from PHPcs fixer. |
Thanks a lot for PHPCSFixer!!!! Looks like I merged a PR that create lots of conflicts with yours... Can you please rebase on latest master? |
The PR is rebased.. |
Oh... new conflicts.. Rebasing again =) |
There, I've rebased again. Please have a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be Application then in PHPDoc, please check everywhere else and also InMemory.. Thanks a lot
src/Application.php
Outdated
@@ -87,7 +86,7 @@ public function getAccessToken() | |||
} | |||
|
|||
/** | |||
* Serializes the FacebookApp entity as a string. | |||
* Serializes the App entity as a string. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Application
src/Application.php
Outdated
@@ -97,7 +96,7 @@ public function serialize() | |||
} | |||
|
|||
/** | |||
* Unserializes a string as a FacebookApp entity. | |||
* Unserializes a string as a App entity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Application
src/Authentication/OAuth2Client.php
Outdated
@@ -44,16 +41,16 @@ class OAuth2Client | |||
const BASE_AUTHORIZATION_URL = 'https://www.facebook.com'; | |||
|
|||
/** | |||
* The FacebookApp entity. | |||
* The App entity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Application
src/BatchRequest.php
Outdated
@@ -114,26 +112,26 @@ public function add($request, $options = null) | |||
} | |||
|
|||
/** | |||
* Ensures that the FacebookApp and access token fall back when missing. | |||
* Ensures that the App and access token fall back when missing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Application
src/BatchRequest.php
Outdated
{ | ||
if (!$request->getApp()) { | ||
$app = $this->getApp(); | ||
if (!$app) { | ||
throw new FacebookSDKException('Missing FacebookApp on FacebookRequest and no fallback detected on FacebookBatchRequest.'); | ||
throw new SDKException('Missing App on Request and no fallback detected on BatchRequest.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Application
src/Helper/PageTabHelper.php
Outdated
* @param FacebookApp $app The FacebookApp entity. | ||
* @param FacebookClient $client The client to make HTTP requests. | ||
* @param string $graphVersion The version of Graph to use. | ||
* @param Application $app the App entity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Application
*/ | ||
protected $signedRequest; | ||
|
||
/** | ||
* @var FacebookApp The FacebookApp entity. | ||
* @var Application the App entity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Application
* @param FacebookApp $app The FacebookApp entity. | ||
* @param FacebookClient $client The client to make HTTP requests. | ||
* @param string $graphVersion The version of Graph to use. | ||
* @param Application $app the App entity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Application
I'm really sorry @Nyholm, I did a mistake when merging 5.x into master, so tests were broken (looks like I'm tired..), so you will need to rebase again, sorry |
Updated! |
Wohoo tests are green! |
Thanks a lot @Nyholm!! |
Awesome. Thanks! |
This will fix #609.
I've used PHPStorms "rename class" functionality to rename all the classes named Facebook*.
PS. Sorry fo an another massive PR.