You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Follows PSR-4 conventions and coding standard: autoload friendly
10
-
* API entry points implementation state :
11
-
* OK Attachments
12
-
* OK Groups
13
-
* OK Custom Fields
14
-
* OK Issues
15
-
* OK Issue Categories
16
-
* OK Issue Priorities
17
-
**NOK Issue Relations - only partially implemented*
18
-
* OK Issue Statuses
19
-
* OK News
20
-
* OK Projects
21
-
* OK Project Memberships
22
-
* OK Queries
23
-
* OK Roles
24
-
* OK Time Entries
25
-
* OK Time Entry Activities
26
-
* OK Trackers
27
-
* OK Users
28
-
* OK Versions
29
-
* OK Wiki
10
+
* Choose between using native `cURL` function or any
11
+
[PSR-18](https://www.php-fig.org/psr/psr-18/) http client like
12
+
[Guzzle](https://github.com/guzzle/guzzle) for handling http connections
13
+
* API entry points implementation state:
14
+
* OK Attachments
15
+
* OK Groups
16
+
* OK Custom Fields
17
+
* OK Issues
18
+
* OK Issue Categories
19
+
* OK Issue Priorities
20
+
**NOK Issue Relations - only partially implemented*
21
+
* OK Issue Statuses
22
+
* OK News
23
+
* OK Projects
24
+
* OK Project Memberships
25
+
* OK Queries
26
+
* OK Roles
27
+
* OK Time Entries
28
+
* OK Time Entry Activities
29
+
* OK Trackers
30
+
* OK Users
31
+
* OK Versions
32
+
* OK Wiki
30
33
31
34
## Todo
32
35
33
36
* Check header's response code (especially for POST/PUT/DELETE requests)
34
37
* See http://stackoverflow.com/questions/9183178/php-curl-retrieving-response-headers-and-body-in-a-single-request/9183272#9183272
35
-
* Maybe Guzzle for handling http connections
36
-
*https://github.com/guzzle/guzzle
37
38
38
-
## Limitations
39
+
## Limitations / Missing Redmine-API
39
40
40
-
Redmine is missing some APIs for a full remote management of the data:
41
-
* List of activities & roles: http://www.redmine.org/issues/11464
42
-
*...
41
+
Redmine is missing some APIs for a full remote management of the data:
42
+
* List of activities & roles: http://www.redmine.org/issues/11464
43
+
*Closing a project: https://www.redmine.org/issues/13725
43
44
44
-
A possible solution to this would be to create an extra APIs implementing the missing entry points. See existing effort in doing so : https://github.com/rschobbert/redmine-miss-api
45
+
A possible solution to this would be to create an extra APIs implementing the
46
+
missing entry points. See existing effort in doing so:
47
+
https://github.com/rschobbert/redmine-miss-api
45
48
46
49
## Requirements
47
50
48
51
* PHP ^7.4 || ^8.0
49
-
* The PHP [cURL](http://php.net/manual/en/book.curl.php) extension
50
52
* The PHP [SimpleXML](http://php.net/manual/en/book.simplexml.php) extension
51
53
* The PHP [JSON](http://php.net/manual/en/book.json.php) extension
52
-
*[PHPUnit](https://phpunit.de/) >= 9.0 (optional) to run the test suite
53
54
* "Enable REST web service" for your Redmine project (/settings/edit?tab=authentication)
54
55
* then obtain your *API access key* in your profile page : /my/account
55
56
* or use your *username & password* (not recommended)
56
57
58
+
### Optional
59
+
60
+
* The PHP [cURL](http://php.net/manual/en/book.curl.php) extension if you want to use the native `cURL` functions.
61
+
*[PHPUnit](https://phpunit.de/) >= 9.0 (optional) to run the test suite
62
+
57
63
## Install
58
64
59
65
### Composer
@@ -75,7 +81,7 @@ For example,
75
81
// This file is generated by Composer
76
82
require_once 'vendor/autoload.php';
77
83
78
-
$client = new Redmine\Client('http://redmine.example.com', 'username', 'password');
84
+
$client = new \Redmine\Client\NativeCurlClient('http://redmine.example.com', 'username', 'password');
$client = new Redmine\Client('http://redmine.example.com', 'username', 'password');
109
+
$client = new \Redmine\Client\NativeCurlClient('http://redmine.example.com', 'username', 'password');
104
110
```
105
111
106
112
### Running the test suite
@@ -141,21 +147,26 @@ Create your project e.g. in the `index.php` by require the `vendor/autoload.php`
141
147
142
148
### Instantiate a Redmine Client
143
149
144
-
You can choose between the navite curl client or the PSR-18 compatible client.
150
+
You can choose between:
151
+
152
+
1. a native curl client or
153
+
2. the PSR-18 compatible client.
145
154
146
-
> :bulb: Since `php-redmine-api` v1.7.0 there is a new PSR-18 based client `Redmine\Client\Psr18Client`. [See this guide if you want to switch to this client.](docs/migrate-to-psr18client.md).
> :bulb: This client was introduced in `v1.7.0` of this library. If you are using the old `Redmine\Client` please [follow this migration guide](docs/migrate-to-psr18client.md).
0 commit comments