Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some phan issues and make tests pass in CI #62

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ jobs:

strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
# All supported PHP versions https://www.php.net/supported-versions.php
php: [ '7.3', '7.4', '8.0', '8.1' ]
os: [ ubuntu-latest ]
php: [ '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
include:
- os: macos-latest
php: '8.3'
- os: windows-latest
php: '8.3'

runs-on: ${{matrix.os}}

Expand Down
2 changes: 0 additions & 2 deletions .phan/baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

return [
'file_suppressions' => [
'src/ActivityApi.php' => ['PhanUnextractableAnnotation'],
'src/BlogsApi.php' => ['PhanUnextractableAnnotation'],
'src/CamerasApi.php' => ['PhanUnextractableAnnotation'],
'src/CollectionsApi.php' => ['PhanUnextractableAnnotation'],
'src/CommonsApi.php' => ['PhanUnextractableAnnotation'],
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"minus-x check . -q",
"phpcs -sp",
"@phan",
"phpunit",
"phpunit --exclude-group auth",
"git status | grep 'nothing to commit, working tree clean'"
]
}
Expand Down
4 changes: 2 additions & 2 deletions src/ActivityApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ActivityApi extends ApiMethodGroup
* omitted, it defaults to 10. The maximum allowed value is 50.
* @param string $page The page of results to return. If this argument is omitted,
* it defaults to 1.
* @return
* @return array
*/
public function userComments($perPage = null, $page = null)
{
Expand All @@ -41,7 +41,7 @@ public function userComments($perPage = null, $page = null)
* omitted, it defaults to 10. The maximum allowed value is 50.
* @param string $page The page of results to return. If this argument is omitted,
* it defaults to 1.
* @return
* @return array
*/
public function userPhotos($timeframe = null, $perPage = null, $page = null)
{
Expand Down
6 changes: 3 additions & 3 deletions src/BlogsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class BlogsApi extends ApiMethodGroup
* @param string $service Optionally only return blogs for a given service id. You
* can get a list of from <a
* href="/services/api/flickr.blogs.getServices.html">flickr.blogs.getServices()</a>.
* @return
* @return array
*/
public function getList($service = null)
{
Expand All @@ -30,7 +30,7 @@ public function getList($service = null)
*
* @link https://www.flickr.com/services/api/flickr.blogs.getServices.html
*
* @return
* @return array
*/
public function getServices()
{
Expand All @@ -50,7 +50,7 @@ public function getServices()
* a blog id you can pass a service id and we'll post to the first blog of that
* service we find.
* @param string $blogId The id of the blog to post to.
* @return
* @return array
*/
public function postPhoto($photoId, $title, $description, $blogPassword = null, $service = null, $blogId = null)
{
Expand Down
6 changes: 3 additions & 3 deletions tests/ApiMethodGroup/PhotosApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use Samwilson\PhpFlickr\Tests\TestCase;
use Samwilson\PhpFlickr\Util;

/**
* @group auth
*/
class PhotosApiTest extends TestCase
{
/** @var int */
Expand All @@ -23,9 +26,6 @@ protected function getTestPhotoId(PhpFlickr $flickr)
return $this->testPhotoId;
}

/**
* @group auth
*/
public function testAddTags()
{
$flickr = $this->getFlickr(true);
Expand Down
3 changes: 3 additions & 0 deletions tests/ApiMethodGroup/PhotosetsApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

use Samwilson\PhpFlickr\Tests\TestCase;

/**
* @group auth
*/
class PhotosetsApiTest extends TestCase
{
protected $testPhotoId;
Expand Down