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

Commit cce1529

Browse files
committed
Update 4.1 docs to refer to version 5
1 parent 29a1163 commit cce1529

10 files changed

+102
-44
lines changed

CHANGELOG.md

+80-24
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,93 @@
11
# CHANGELOG
22

3-
As you may have already noticed, the Facebook SDK v4 does not follow strict [semver](http://semver.org/). The versioning format used for this SDK follows `4.MAJOR.(MINOR|PATCH)`. The `MINOR` and `PATCH` versions are squashed together but there shouldn't be any breaking changes between `MINOR|PATCH` releases.
3+
Starting with version 5, the Facebook PHP SDK follows [SemVer](http://semver.org/).
44

55

6-
## 4.1.x
6+
## 5.0.x
77

8-
- 4.1.0 (2015-??-??)
9-
- Added batch support
10-
- Added `graph.beta.facebook.com` support
11-
- Moved exception classes to `Exception\*` directory
12-
- Moved response collection objects to `GraphNodes\*` directory
13-
- Moved helpers to `Helpers\*` directory
14-
- Moved `FacebookRequest` and `FacebookResponse` to `Entities\*` directory
15-
- Killed `FacebookSession` in favor of `Facebook\AccessToken`
16-
- Added `FacebookClient` service
17-
- Renamed `FacebookRequestException` to `FacebookResponseException`
18-
- Renamed `FacebookHttpable` to `FacebookHttpClientInterface`
19-
- Updated the API for the helpers.
20-
- Refactored request/response handling
21-
- Added support for "rerequest" authorization
22-
- [`AccessToken`] Added serialization support
23-
- Added `ext-mbstring` to composer require
24-
- Added `Facebook\FacebookApp` entity
25-
- Namespaced tests
26-
- Grouped functional tests under `functional` group
27-
- Added `Facebook\Facebook` super service
28-
- Added this CHANGELOG. Hi! :)
8+
Version 5 of the Facebook PHP SDK is a complete refactor of version 4. It comes loaded with lots of new features and a friendlier API.
9+
10+
- 5.0 (2015-??-??)
11+
- New features
12+
- Added the `Facebook\Facebook` super service for an easier API
13+
- Improved "reauthentication" and "rerequest" support
14+
- Requests/Responses
15+
- Added full batch support
16+
- Added full file upload support for videos & photos
17+
- Added methods to make pagination easier
18+
- Added "deep" pagination support so that Graph edges embedded in a Graph node can be paginated over easily
19+
- Beta support at `graph.beta.facebook.com`
20+
- Added `getMetaData()` to `GraphList` to obtain all the metadata associated with a list of Graph nodes
21+
- Full nested param support
22+
- Many improvements to the Graph node subtypes
23+
- New injectable interfaces
24+
- Added a `PersistentDataInterface` for custom persistent data handling
25+
- Added a `PseudoRandomStringGeneratorInterface` for customizable CSPRNG's
26+
- Added a `UrlDetectionInterface` for custom URL-detection logic
27+
- Codebase changes
28+
- Moved exception classes to `Exception\*` directory
29+
- Moved response collection objects to `GraphNodes\*` directory
30+
- Moved helpers to `Helpers\*` directory
31+
- Killed `FacebookSession` in favor of the `AccessToken` entity
32+
- Added `FacebookClient` service
33+
- Renamed `FacebookRequestException` to `FacebookResponseException`
34+
- Renamed `FacebookHttpable` to `FacebookHttpClientInterface`
35+
- Added `FacebookApp` entity that contains info about the Facebook app
36+
- Updated the API for the helpers
37+
- Tests
38+
- Added namespaces to the tests
39+
- Grouped functional tests under `functional` group
40+
- Other changes
41+
- Made PSR-2 compliant
42+
- Adopted SemVer
43+
- Completely refactored request/response handling
44+
- Refactored the OAuth 2.0 logic
45+
- Added `ext-mbstring` to composer require
46+
- Added this CHANGELOG. Hi! :)
47+
48+
49+
## 4.1-dev
50+
51+
Since the Facebook PHP SDK didn't follow SemVer in version 4.x, the master branch was going to be released as 4.1. However, the SDK switched to SemVer in v5.0. So any references on the internet to version 4.1 can be assumed to be an alias to version `5.0.0`
2952

3053

3154
## 4.0.x
3255

56+
Version 4.0 of the Facebook PHP SDK did not follow [SemVer](http://semver.org/). The versioning format used was as follows: `4.MAJOR.(MINOR|PATCH)`. The `MINOR` and `PATCH` versions were squashed together.
57+
58+
- 4.0.23 (2015-04-03)
59+
- Added support for new JSON response types in Graph v2.3 when requesting access tokens
60+
- 4.0.22 (2015-04-02)
61+
- Fixed issues related to multidimensional params
62+
- **Bumped default fallback Graph version to `v2.3`**
63+
- 4.0.21 (2015-03-31)
64+
- Added a `FacebookPermissions` class to reference all the Facebook permissions
65+
- 4.0.20 (2015-03-02)
66+
- Fixed a bug introduced in `4.0.19` related to CSRF comparisons
67+
- 4.0.19 (2015-03-02)
68+
- Added stricter CSRF comparison checks to `SignedRequest` and `FacebookRedirectLoginHelper`
69+
- 4.0.18 (2015-02-24)
70+
- [`FacebookHttpable`] Reverted a breaking change from `4.0.17` that changed the method signatures
71+
- 4.0.17 (2015-02-19)
72+
- [`FacebookRedirectLoginHelper`] Added multiple auth types to `getLoginUrl()`
73+
- [`GraphUser`] Added `getTimezone()`
74+
- [`FacebookCurl`] Additional fix for `curl_init()` handling
75+
- Added support for https://graph-video.facebook.com when path ends with `/videos`
76+
- 4.0.16 (2015-02-03)
77+
- [`FacebookRedirectLoginHelper`] Added "reauthenticate" functionality to `getLoginUrl()`
78+
- [`FacebookCurl`] Fixed `curl_init()` issue
79+
- 4.0.15 (2015-01-06)
80+
- [`FacebookRedirectLoginHelper`] Added guard against accidental exposure of app secret via the logout link
81+
- 4.0.14 (2014-12-29)
82+
- [`GraphUser`] Added `getGender()`
83+
- [`FacebookRedirectLoginHelper`] Added CSRF protection for rerequest links
84+
- [`GraphAlbum`] Fixed bugs in getter methods
85+
- 4.0.13 (2014-12-12)
86+
- [`FacebookRedirectLoginHelper`] Added `$displayAsPopup` param to `getLoginUrl()`
87+
- [`FacebookResponse`] Fixed minor pagination bug
88+
- Removed massive cert bundle and replaced with `DigiCertHighAssuranceEVRootCA` for peer verification
3389
- 4.0.12 (2014-10-30)
34-
- Added Graph v2.2 support
90+
- **Updated default fallback Graph version to `v2.2`**
3591
- Fixed potential duplicate `type` param in URL's
3692
- [`FacebookRedirectLoginHelper`] Added `getReRequestUrl()`
3793
- [`GraphUser`] Added `getEmail()`

CONTRIBUTING.md

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ We accept contributions via Pull Requests on [Github](https://github.com/faceboo
1717

1818
- **Document any change in behaviour** - Make sure the README and the [documentation](https://github.com/facebook/facebook-php-sdk-v4/tree/master/docs) are kept up-to-date.
1919

20+
- **Consider our release cycle** - As of version 5.0.0, we try to follow [SemVer](http://semver.org/). Randomly breaking public APIs is not an option.
21+
2022
- **Create topic branches** - Don't ask us to pull from your master branch.
2123

2224
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Build Status](https://img.shields.io/travis/facebook/facebook-php-sdk-v4/master.svg)](https://travis-ci.org/facebook/facebook-php-sdk-v4)
44
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/facebook/facebook-php-sdk-v4/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/facebook/facebook-php-sdk-v4/?branch=master)
5-
[![Development Version](https://img.shields.io/badge/Development%20Version-4.1.0-orange.svg)](https://packagist.org/packages/facebook/php-sdk-v4)
5+
[![Development Version](https://img.shields.io/badge/Development%20Version-5.0-orange.svg)](https://packagist.org/packages/facebook/php-sdk-v4)
66

77

88
This repository contains the open source PHP SDK that allows you to access the Facebook Platform from your PHP app.
@@ -15,7 +15,7 @@ The Facebook PHP SDK can be installed with [Composer](https://getcomposer.org/).
1515
```json
1616
{
1717
"require": {
18-
"facebook/php-sdk-v4": "~4.1.0"
18+
"facebook/php-sdk-v4": "~5.0@dev"
1919
}
2020
}
2121
```
@@ -31,7 +31,7 @@ Simple GET example of a user's profile.
3131
$fb = new Facebook\Facebook([
3232
'app_id' => '{app-id}',
3333
'app_secret' => '{app-secret}',
34-
'default_graph_version' => 'v2.2',
34+
'default_graph_version' => 'v2.3',
3535
//'default_access_token' => '{access-token}', // optional
3636
]);
3737

docs/sdk_downloads.fbmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<card>
2-
# Downloads for the Facebook SDK 4.x for PHP
2+
# Downloads for the Facebook PHP SDK
33

44
For full details on what changed between each version release, see the [CHANGELOG](https://github.com/facebook/facebook-php-sdk-v4/blob/master/CHANGELOG.md).
55

docs/sdk_getting_started.fbmd

+11-11
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Whether you're developing a website with Facebook login, creating a Facebook Can
77
<card>
88
## Autoloading & namespaces {#psr-4}
99

10-
The Facebook PHP SDK v4.x is coded in compliance with [PSR-4](http://www.php-fig.org/psr/psr-4/). This means it relies heavily on namespaces so that class files can be loaded for you automatically.
10+
The Facebook PHP SDK v5 is coded in compliance with [PSR-4](http://www.php-fig.org/psr/psr-4/). This means it relies heavily on namespaces so that class files can be loaded for you automatically.
1111

1212
It would be advantageous to familiarize yourself with the concepts of [namespacing](http://php.net/manual/en/language.namespaces.rationale.php) and [autoloading](http://php.net/manual/en/function.spl-autoload-register.php) if you are not already acquainted with them.
1313
</card>
@@ -34,14 +34,14 @@ There are two methods to install the Facebook PHP SDK. The recommended installat
3434
~~~
3535
{
3636
"require" : {
37-
"facebook/php-sdk-v4" : "~4.1.0"
37+
"facebook/php-sdk-v4" : "~5.0"
3838
}
3939
}
4040
~~~
4141

4242
%FB(devsite:markdown-wiki:info-card {
43-
content: "The Facebook SDK v4 does not follow [SemVer](http://semver.org/). The versioning format used for the SDK is `4.MAJOR.(MINOR|PATCH)`. The `MINOR` and `PATCH` versions are squashed together but there shouldn't be any breaking changes between `MINOR|PATCH` releases. That's why it is important to use all three version numbers in composer when using the `~` operator, e.g. `~4.1.0`. This will ensure you don't inadvertently download a version with breaking changes in it.",
44-
type: 'warning',
43+
content: "The Facebook SDK starting adhering to [SemVer](http://semver.org/) with version 5. Previous to version 5, the SDK did not follow SemVer.",
44+
type: 'info',
4545
})
4646

4747
Then run `composer install` from the command line, and composer will download the latest version of the SDK and put it in the `/vendor/` directory.
@@ -59,8 +59,8 @@ require_once __DIR__ . '/vendor/autoload.php';
5959
First, download the source code and unzip it wherever you like in your project.
6060

6161
%FB(devsite:markdown-wiki:button {
62-
text: 'Download the PHP SDK v4.1',
63-
href: 'https://github.com/facebook/facebook-php-sdk-v4/archive/4.1-dev.zip',
62+
text: 'Download the PHP SDK v5.0',
63+
href: 'https://github.com/facebook/facebook-php-sdk-v4/archive/5.0-dev.zip',
6464
size: 'large',
6565
use: 'special',
6666
})
@@ -85,21 +85,21 @@ The source code includes myriad files that aren't necessary for use in a product
8585

8686
After downloading the source code with the button above, extract the files in a temporary directory.
8787

88-
Move the folder `src/Facebook` to the root of your website installation or where ever you like to put 3rd-party code. For this example we'll rename the `Facebook` directory to `facebook-sdk-v4.1`.
88+
Move the folder `src/Facebook` to the root of your website installation or where ever you like to put 3rd-party code. For this example we'll rename the `Facebook` directory to `facebook-sdk-v5`.
8989

90-
The path the the core SDK files should now be located in `/var/html/facebook-sdk-v4.1` and inside will also be the `autolaoder.php` file.
90+
The path the the core SDK files should now be located in `/var/html/facebook-sdk-v5` and inside will also be the `autolaoder.php` file.
9191

9292
Assuming we have a script called `index.php` in the root of our web project, we need to include the autoloader at the top of our script.
9393

9494
~~~
95-
require_once __DIR__ . '/facebook-sdk-v4.1/autoload.php';
95+
require_once __DIR__ . '/facebook-sdk-v5/autoload.php';
9696
~~~
9797

9898
If the autoloader is having trouble detecting the path to the source files, we can define the location of the source code before the `require_once` statement.
9999

100100
~~~
101-
define('FACEBOOK_SDK_V4_SRC_DIR', __DIR__ . '/facebook-sdk-v4.1/');
102-
require_once __DIR__ . '/facebook-sdk-v4.1/autoload.php';
101+
define('FACEBOOK_SDK_V4_SRC_DIR', __DIR__ . '/facebook-sdk-v5/');
102+
require_once __DIR__ . '/facebook-sdk-v5/autoload.php';
103103
~~~
104104
</card>
105105

docs/sdk_landing_page.fbmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<card>
2-
# Facebook SDK v4.1 for PHP
2+
# Facebook SDK v5 for PHP
33

44
The Facebook SDK for PHP is a library with powerful features that enable PHP developers to easily integrate Facebook login and make requests to the Graph API. It also plays well with the [Facebook SDK for JavaScript](/docs/reference/javascript/) to give the front-end user the best possible user experience. But it doesn't end there, the Facebook PHP SDK makes it easy to upload photos and videos and send batch requests to the Graph API among other things. And PHP SDK has many extensibility points giving PHP developers full control of how the PHP SDK interacts with their specific hosting environment and web framework.
55

docs/sdk_reference.fbmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<card>
2-
# Facebook SDK for PHP Reference (v4.1)
2+
# Facebook SDK for PHP Reference (v5)
33

44
Below is the API reference for the Facebook PHP SDK.
55
</card>

phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
stopOnFailure="false"
88
bootstrap="tests/bootstrap.php">
99
<testsuites>
10-
<testsuite name="Facebook PHP SDK v4 Test Suite">
10+
<testsuite name="Facebook PHP SDK Test Suite">
1111
<directory>./tests</directory>
1212
</testsuite>
1313
</testsuites>

src/Facebook/Facebook.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class Facebook
5757
/**
5858
* @const string Version number of the Facebook PHP SDK.
5959
*/
60-
const VERSION = '4.1.0-dev';
60+
const VERSION = '5.0.0';
6161

6262
/**
6363
* @const string Default Graph API version for requests.

src/Facebook/autoload.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030

3131
if (version_compare(PHP_VERSION, '5.4.0', '<')) {
32-
throw new Exception('The Facebook SDK v4 requires PHP version 5.4 or higher.');
32+
throw new Exception('The Facebook SDK requires PHP version 5.4 or higher.');
3333
}
3434

3535
/**

0 commit comments

Comments
 (0)