Skip to content
This repository was archived by the owner on Jan 13, 2022. It is now read-only.

Removed "Facebook" prefix form all classes #888

Merged
merged 7 commits into from
Dec 5, 2017

Conversation

Nyholm
Copy link

@Nyholm Nyholm commented Dec 2, 2017

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.

Copy link
Author

@Nyholm Nyholm left a 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
Copy link
Contributor

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?

Copy link
Author

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
Copy link
Contributor

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

use Facebook\Authentication\AccessToken;
use PHPUnit\Framework\TestCase;

class FacebookAppTest extends TestCase
class AppTest extends TestCase
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then InMemoryPersistentDataHandlerTest here

Copy link
Contributor

@yguedidi yguedidi left a 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

@Nyholm
Copy link
Author

Nyholm commented Dec 3, 2017

Thank you for the review. I've fixed your comments and I've updated the docs

Copy link
Contributor

@yguedidi yguedidi left a 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?

@yguedidi yguedidi requested a review from SammyK December 4, 2017 00:12
@yguedidi
Copy link
Contributor

yguedidi commented Dec 4, 2017

@SammyK can you have a look at this PR please? thanks

@Nyholm
Copy link
Author

Nyholm commented Dec 4, 2017

I've aligned the doc blocks and made sure they follow PSR5 with some help from PHPcs fixer.

@yguedidi
Copy link
Contributor

yguedidi commented Dec 4, 2017

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?

@Nyholm
Copy link
Author

Nyholm commented Dec 4, 2017

The PR is rebased..

@Nyholm
Copy link
Author

Nyholm commented Dec 4, 2017

Oh... new conflicts.. Rebasing again =)

@Nyholm
Copy link
Author

Nyholm commented Dec 4, 2017

There, I've rebased again. Please have a look

Copy link
Contributor

@yguedidi yguedidi left a 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

@@ -87,7 +86,7 @@ public function getAccessToken()
}

/**
* Serializes the FacebookApp entity as a string.
* Serializes the App entity as a string.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Application

@@ -97,7 +96,7 @@ public function serialize()
}

/**
* Unserializes a string as a FacebookApp entity.
* Unserializes a string as a App entity.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Application

@@ -44,16 +41,16 @@ class OAuth2Client
const BASE_AUTHORIZATION_URL = 'https://www.facebook.com';

/**
* The FacebookApp entity.
* The App entity.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Application

@@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Application

{
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.');
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Application

@yguedidi
Copy link
Contributor

yguedidi commented Dec 4, 2017

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

@Nyholm
Copy link
Author

Nyholm commented Dec 5, 2017

Updated!

@Nyholm
Copy link
Author

Nyholm commented Dec 5, 2017

Wohoo tests are green!

@yguedidi yguedidi merged commit 8875d3c into facebookarchive:master Dec 5, 2017
@yguedidi
Copy link
Contributor

yguedidi commented Dec 5, 2017

Thanks a lot @Nyholm!!

@Nyholm
Copy link
Author

Nyholm commented Dec 5, 2017

Awesome. Thanks!

@Nyholm Nyholm deleted the prefix branch December 5, 2017 15:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants