From 2d196cc9eb54cd79c60e595cca1813ad28582b4e Mon Sep 17 00:00:00 2001 From: EmanueleMinotto Date: Fri, 5 Jul 2019 22:31:28 +0200 Subject: [PATCH 1/7] Remove dev-only inclusions --- composer.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2a655a0..09b9076 100755 --- a/composer.json +++ b/composer.json @@ -21,7 +21,11 @@ }, "autoload": { "psr-4": { - "SammyK\\FacebookQueryBuilder\\": "src", + "SammyK\\FacebookQueryBuilder\\": "src" + } + }, + "autoload-dev": { + "psr-4": { "SammyK\\FacebookQueryBuilderTests\\": "tests" } } From 55a19a0c6a1679927539c45fc90e058b7da17bf5 Mon Sep 17 00:00:00 2001 From: EmanueleMinotto Date: Fri, 5 Jul 2019 22:32:15 +0200 Subject: [PATCH 2/7] Include PHP 7.3 in build matrix --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 22b121a..5da8ece 100755 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ php: - 7.0 - 7.1 - 7.2 + - 7.3 before_script: - composer self-update From 261626ceb4fd483bb8b5985717aee317e3b7d5b6 Mon Sep 17 00:00:00 2001 From: EmanueleMinotto Date: Fri, 5 Jul 2019 22:33:23 +0200 Subject: [PATCH 3/7] Remove legacy composer option --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5da8ece..3f7c467 100755 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ php: before_script: - composer self-update - - composer install --prefer-source --no-interaction --dev + - composer install --prefer-source --no-interaction script: - phpunit --coverage-text From b9ccb1a70e46b4b6095555219aee7df64107a03d Mon Sep 17 00:00:00 2001 From: EmanueleMinotto Date: Fri, 5 Jul 2019 22:33:39 +0200 Subject: [PATCH 4/7] Use required PHPUnit version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3f7c467..df10e60 100755 --- a/.travis.yml +++ b/.travis.yml @@ -14,4 +14,4 @@ before_script: - composer install --prefer-source --no-interaction script: - - phpunit --coverage-text + - php vendor/bin/phpunit --coverage-text From e44e9aa79123d1ebdfb9c3132c51a9d888eb0b11 Mon Sep 17 00:00:00 2001 From: EmanueleMinotto Date: Fri, 5 Jul 2019 22:43:53 +0200 Subject: [PATCH 5/7] Adapt old executions on Travis --- .travis.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index df10e60..d33e65a 100755 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,19 @@ language: php php: - - 5.4 - - 5.5 - 5.6 - 7.0 - 7.1 - 7.2 - 7.3 +matrix: + include: + - php: 5.4 + dist: trusty + - php: 5.5 + dist: trusty + before_script: - composer self-update - composer install --prefer-source --no-interaction From 6b9dbd909d5fcad20ed9857db48b287f606b48a1 Mon Sep 17 00:00:00 2001 From: EmanueleMinotto Date: Fri, 5 Jul 2019 22:47:47 +0200 Subject: [PATCH 6/7] Allow PHPUnit v5 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 09b9076..7c0b7b9 100755 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.0", + "phpunit/phpunit": "~4.0 || ~5.0", "squizlabs/php_codesniffer": "~2.0" }, "autoload": { From 456b4676ce9c7a11e926da4d5b020d7f8d072fe8 Mon Sep 17 00:00:00 2001 From: EmanueleMinotto Date: Fri, 5 Jul 2019 22:58:56 +0200 Subject: [PATCH 7/7] Bump Graph API version to v3.3 --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 5e606ae..2d2ef09 100755 --- a/README.md +++ b/README.md @@ -101,10 +101,10 @@ $fqb = new SammyK\FacebookQueryBuilder\FQB; $request = $fqb->node('me') ->fields(['id', 'email']) ->accessToken('user-access-token') - ->graphVersion('v3.1'); + ->graphVersion('v3.3'); echo $request; -# https://graph.facebook.com/v3.1/me?access_token=user-access-token&fields=id,email +# https://graph.facebook.com/v3.3/me?access_token=user-access-token&fields=id,email $response = file_get_contents((string) $request); @@ -176,7 +176,7 @@ The recommended way to send requests & receive responses is to use the official $fb = new Facebook\Facebook([ 'app_id' => 'your-app-id', 'app_secret' => 'your-app-secret', - 'default_graph_version' => 'v3.1', + 'default_graph_version' => 'v3.3', ]); $fqb = new SammyK\FacebookQueryBuilder\FQB; @@ -208,7 +208,7 @@ As you've already seen in the basic examples above, you can simply use PHP's fle ```php $fqb = new SammyK\FacebookQueryBuilder\FQB([ - 'default_graph_version' => 'v3.1', + 'default_graph_version' => 'v3.3', 'app_secret' => 'your-app-secret', ]); @@ -216,7 +216,7 @@ $fqb = new SammyK\FacebookQueryBuilder\FQB([ $request = $fqb->node('4')->accessToken('my-access-token'); echo $request; -# https://graph.facebook.com/v3.1/4?access_token=my-access-token&appsecret_proof=2ad43b865030f51531ac36bb00ce4f59d9f879ecce31b0977dbfd73fa4eca7b6 +# https://graph.facebook.com/v3.3/4?access_token=my-access-token&appsecret_proof=2ad43b865030f51531ac36bb00ce4f59d9f879ecce31b0977dbfd73fa4eca7b6 $response = file_get_contents((string) $request); @@ -248,7 +248,7 @@ A number of configuration settings can be set via the `FQB` constructor. ```php $fqb = new SammyK\FacebookQueryBuilder\FQB([ 'default_access_token' => 'your-access-token', - 'default_graph_version' => 'v3.1', + 'default_graph_version' => 'v3.3', 'app_secret' => 'your-app-secret', ]); ``` @@ -285,12 +285,12 @@ If you're using some other HTTP client, you can set the default fallback Graph v ```php $fqb = new SammyK\FacebookQueryBuilder\FQB([ - 'default_graph_version' => 'v3.1', + 'default_graph_version' => 'v3.3', ]); $request = $fqb->node('me'); echo $request->asEndpoint(); -# /v3.1/me +# /v3.3/me $request = $fqb->node('me')->graphVersion('v1.0'); echo $request->asEndpoint(); @@ -403,7 +403,7 @@ modifiers(array $modifiers): FQB Some endpoints of the Graph API support additional parameters called "modifiers". -An example endpoint that supports modifiers is the [`/{object-id}/comments` edge](https://developers.facebook.com/docs/graph-api/reference/v3.1/object/comments#readmodifiers). +An example endpoint that supports modifiers is the [`/{object-id}/comments` edge](https://developers.facebook.com/docs/graph-api/reference/v3.3/object/comments#readmodifiers). ```php // Order the comments in chronological order @@ -456,10 +456,10 @@ graphVersion(string $graphApiVersion): FQB You can set the Graph version URL prefix for a specific request with the `graphVersion()` method. ```php -$request = $fqb->node('me')->graphVersion('v3.1'); +$request = $fqb->node('me')->graphVersion('v3.3'); echo $request->asEndpoint(); -# /v3.1/me +# /v3.3/me ```