Skip to content

Commit 81ca18c

Browse files
committed
- Add support for Lumen
- Code cleanup
1 parent adb30bf commit 81ca18c

File tree

12 files changed

+290
-199
lines changed

12 files changed

+290
-199
lines changed

.gitignore

100755100644
File mode changed.

.travis.yml

100755100644
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
language: php
22

3-
php:
4-
- 5.3
5-
- 5.4
3+
php:
64
- 5.5
5+
- 5.6
6+
- 7.0
7+
- hhvm
8+
9+
matrix:
10+
allow_failures:
11+
- php: 7.0
712

813
before_script:
914
- curl -s http://getcomposer.org/installer | php

LICENCE

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The BSD 2-Clause License
2-
Copyright (c) 2013, Daniel Stainback
2+
Copyright (c) 2013-2016, Daniel Stainback
33
All rights reserved.
44

55
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

README.md

100755100644
Lines changed: 45 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,50 @@
1010
- [Laravel Asana on GitHub](https://github.com/torann/laravel-asana)
1111
- [Laravel 4 Installation](https://github.com/Torann/laravel-asana/tree/0.1.2)
1212

13-
To get the latest version of Laravel Asana simply require it in your `composer.json` file.
13+
### Composer
1414

15-
~~~
16-
"torann/laravel-asana": "0.2.*@dev"
17-
~~~
15+
From the command line run:
1816

19-
You'll then need to run `composer install` to download it and have the autoloader updated.
17+
```
18+
$ composer require torann/laravel-asana
19+
```
20+
21+
### Laravel
2022

2123
Once installed you need to register the service provider with the application. Open up `config/app.php` and find the `providers` key.
2224

23-
```php
24-
'providers' => array(
25-
'Torann\LaravelAsana\ServiceProvider',
26-
)
25+
``` php
26+
'providers' => [
27+
28+
\Torann\LaravelAsana\ServiceProvider::class,
29+
30+
]
31+
```
32+
33+
### Lumen
34+
35+
For Lumen register the service provider in `bootstrap/app.php`.
36+
37+
``` php
38+
$app->register(\Torann\LaravelAsana\ServiceProvider::class);
2739
```
2840

29-
Laravel Asana also ships with a facade which provides the static syntax for creating collections. You can register the facade in the aliases key of your `config/app.php` file.
41+
### Facade
42+
43+
This package also ships with a facade which provides the static syntax for creating collections. You can register the facade in the aliases key of your `config/app.php` file.
3044

3145
```php
32-
'aliases' => array(
46+
'aliases' => [
3347
'Asana' => 'Torann\LaravelAsana\Facade',
34-
)
48+
]
3549
```
3650

37-
### Create configuration file using artisan
51+
### Publish the configurations
52+
53+
Run this on the command line from the root of your project:
3854

3955
```
40-
$ php artisan vendor:publish
56+
$ php artisan vendor:publish --provider="Torann\LaravelAsana\ServiceProvider"
4157
```
4258

4359
A configuration file will be publish to `config/asana.php`.
@@ -81,12 +97,12 @@ Asana::getSubTasks($task_id);
8197
#### Creating a task
8298

8399
```php
84-
Asana::createTask(array(
100+
Asana::createTask([
85101
'workspace' => '176825', // Workspace ID
86102
'name' => 'Hello World!', // Name of task
87103
'assignee' => '[email protected]', // Assign task to...
88-
'followers' => array('3714136', '5900783') // We add some followers to the task... (this time by ID)
89-
));
104+
'followers' => ['3714136', '5900783'] // We add some followers to the task... (this time by ID)
105+
]);
90106
```
91107

92108
#### Delete a task
@@ -134,11 +150,11 @@ Asana::removeTagFromTask($task_id, $tag_id);
134150
#### Create a project
135151

136152
```php
137-
Asana::createProject(array(
153+
Asana::createProject([
138154
"workspace" => "1768",
139155
"name" => "Foo Project!",
140156
"notes" => "This is a test project"
141-
));
157+
]);
142158
```
143159

144160
#### Getting projects in all workspaces
@@ -158,10 +174,10 @@ Asana::getProjectsInWorkspace($workspace_id, $archived);
158174
#### Updating project info
159175

160176
```php
161-
Asana::updateProject($project_id, array(
177+
Asana::updateProject($project_id, [
162178
'name' => 'This is a new cool project!',
163179
'notes' => 'At first, it wasn't cool, but after this name change, it is!'
164-
));
180+
]);
165181
```
166182

167183
#### Get project tasks
@@ -225,7 +241,7 @@ Asana::getWorkspaces();
225241
#### Update workspace
226242

227243
```php
228-
$data = array('name' => '');
244+
$data = ['name' => ''];
229245

230246
Asana::updateWorkspace($workspace_i, $data);
231247
```
@@ -255,15 +271,20 @@ Asana::getWorkspaceUsers($workspace_id);
255271
If you specify an assignee, you must also specify a workspace to filter on.
256272

257273
```php
258-
Asana::getTasksByFilter(array(
274+
Asana::getTasksByFilter([
259275
'assignee' => 1121,
260276
'project' => 37373729,
261277
'workspace' => 111221
262-
));
278+
]);
263279
```
264280

265281
## Change Log
266282

283+
#### v0.2.1
284+
285+
- Add support for Lumen
286+
- Code cleanup
287+
267288
#### v0.2.0
268289

269290
- Update to Laravel 5

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
],
1212
"require": {
13-
"php": ">=5.4.0",
13+
"php": ">=5.5.9",
1414
"illuminate/support": "~5.0",
1515
"illuminate/database": "~5.0"
1616
},

phpunit.xml

100755100644
File mode changed.

0 commit comments

Comments
 (0)