Commit Graph

297 Commits

Author SHA1 Message Date
Phil Young
c66022e7bf Add A Default Variable Value
This is always set now
2021-06-22 11:27:41 +01:00
Phil Young
aa43a1ea36 Move To Shorthand False Checks
This seems to be the preferred way to do them
2021-06-22 11:16:25 +01:00
Phil Young
63b11374f2 Move SSL Setting To An Array
This will match the add function and help with PHPMD errors
2021-06-22 11:13:53 +01:00
Phil Young
410b8bebff Merge remote-tracking branch 'origin' into 179-missing-support-for-custom-hostname-update-properties 2021-06-22 11:06:10 +01:00
Phil Young
60cdacdfcf Merge pull request #1 from cloudflare/master
Update My Fork
2021-06-22 11:05:57 +01:00
Jacob Bednarz
2030e29593 Merge pull request #182 from phily245/181-add-support-for-custom-hostname-fallback-origin-retrieval
Add Custom Hostname Fallback Origin Retrieval
2021-06-21 09:55:44 +10:00
Phil Young
5394ec3cc8 Add Cuystom Hostname Fallback Origin Retrieval
I would like to surface this endpoint via the SDK
2021-06-15 13:55:41 +01:00
Phil Young
aea57e4994 Update A Docblock
I missed adding the new properties in earlier
2021-06-15 11:12:57 +01:00
Phil Young
f8124e76cb Shorten Longer Lines
The properties I've added have made these some pretty long lines
2021-06-15 11:12:37 +01:00
Phil Young
da3d10c4ee Add More Properties To Custom Hostname Updating
These are documented but not provided by the SDK
2021-06-15 11:10:23 +01:00
Phil Young
135b9a6813 Update A Docblock
PHPStorm pointed out that this was missing
2021-06-15 11:02:17 +01:00
Jacob Bednarz
1e58a65888 Merge pull request #164 from cloudflare/apalaistras/fix-request-error-handling
Adapter/Guzzle: Fix error handling for v4 API
2021-05-28 10:49:26 +10:00
Jacob Bednarz
658ab3fe47 Merge pull request #96 from rbayliss/remove_phars
Remove phar files
2021-05-28 10:37:53 +10:00
Jacob Bednarz
d2c4d225e0 suppress warnings on static access 2021-05-28 10:32:02 +10:00
Alex Palaistras
c58f340633 Adapter/Guzzle: Fix error handling for v4 API
This commit represents a partial overhaul of error handling for requests
made against the v4 Cloudflare API, with an aim of unifying disparate
kinds of exceptions under a single `ResponseException` type, and the
covering of additional cases where errors were unhandled. Specifically:

  - The `Guzzle::request()` function will now catch Guzzle exceptions
    normally thrown in cases of client and server errors (4xx and 5xx)
    response codes, and convert these to `ResponseException` types
    before re-throwing. These types of errors were previously not caught
    and were instead returned verbatim, expecting downstream clients to
    be aware of internal details of how these functions operate.

  - Conversely, we no longer assume that all responses are JSON-encoded,
    and no longer try to derive errors from non-4xx or 5xx responses.
    All public endpoints under the v4 API are expected to be
    well-behaved in that regard, and never return an error response
    where none is indicated in the HTTP code.

Code has been moved around and test-cases added in support of these
changes. In most cases, these changes won't break any existing
expectations and won't require any changes to downstream code, but users
of the Cloudflare SDK should ensure that they are indeed set up for
catching `ResponseException` instances thrown during requests, and
should not expect to see Guzzle exceptions directly (though these are
still available in calls to `ResponseException::getPrevious()`).

Fixes: #152
2021-05-28 10:23:50 +10:00
Jacob Bednarz
6fbf95f480 Merge pull request #176 from cloudflare/move-to-github-actions
move test and lint workflows to GitHub Actions
2021-05-28 10:22:57 +10:00
Jacob Bednarz
af14a5f003 move test and lint workflows to GitHub Actions 2021-05-28 10:21:16 +10:00
Keith Brink
7db3d6e62c Update to Guzzle 7 (#143) 2020-09-14 16:53:51 +01:00
Ha Phan
6d9b4ddffe [RFR]: Added Origin CA Certificate endpoint (#123)
* Added Certificate endpoint

* Implement all calls in /certificates endpoint

* Added to travis more php versions

* Fix package compatibility

* Added CertificateTest

* Added test for Certificate endpoint

* Added more tests

* Updated README

Co-authored-by: haphan <thanhha.phan@myrepublic.net>
2020-07-07 11:19:15 +01:00
bnalonezi
fab493d2d3 Add Browser Cache TTL endpoint (#127)
Co-authored-by: bnalonezi <b.alenezi@zid.sa>
2020-07-07 11:18:40 +01:00
kamilsolarczyk
afd332a747 Maximum value of Edge Cache TTL (#125)
It is possible to choose a month value, so the value parameter can be greater
2020-07-07 11:18:10 +01:00
Constantin Cuciurcă
ffc3989607 Dns analytics report (#121)
* Add DNS Analytics report endpoint


Add DNS Analytics report endpoint


Add DNS Analytics report endpoint

* Remove useless response error test

* Add tests for DNS analytics report class methods

* Implement methods for listing grouped by time metrics report
2020-07-07 11:17:48 +01:00
bubbleupdotnet
06de5b0c04 Add custom hostname options (#131)
* Add ability to set additional SSL settings

* Add ability to specify a custom origin server

* Add ability to set wildcard

* Fix json parsing error with empty 'ssl' key

Co-authored-by: Craig Menning <craig@bubbleup.net>
2020-07-07 11:16:24 +01:00
Junade
8879ba4c0a Merge pull request #135 from pjjonesnz/pjjonesnz-fix-mx-priority-0
Fix for MX with priority 0
2020-07-07 11:15:18 +01:00
Junade
d1b6dd577f Merge pull request #138 from NathanStrobbe/fix/purge_cache
Fix purge cache
2020-07-07 11:14:43 +01:00
Nathan S
c575b3bc9b Replace DELETE method by POST according to the Cloudflare [documentation](https://api.cloudflare.com/#zone-purge-all-files) 2020-06-21 14:52:11 +02:00
Paul Jones
251ab5247d Fix for MX with priority 0
Author:    Paul Jones <info@beyondthebox.co.nz>
Date:      Sun Jun 21 07:42:38 2020 +0000
2020-06-21 07:47:06 +00:00
Junade
694342f718 Merge pull request #98 from llbbl/firewall-rules
Adding new Firewall rules Class
2020-02-03 17:23:45 +00:00
Junade
ca426abc32 Merge pull request #101 from ProfiCloS/feature/api-token
feature/api-token
2020-02-03 17:22:40 +00:00
Junade
2a83d24954 Merge pull request #102 from umbrellio/add_endpoints_zones_settings
add endpoint for server-side exclude setting
2020-02-03 17:22:17 +00:00
Junade
445bc30be7 Merge pull request #114 from Pezhvak/patch-1
Fixing fatal error in PHP 7.4
2020-02-03 17:21:31 +00:00
Junade
2dc59ddcca Merge pull request #115 from kanasite/master
Add Domain Registrar and pause zone
2020-02-03 17:21:12 +00:00
Junade
54545a371e Merge pull request #118 from axelabhay/cf-new-page-rules-action
Adding new function setOriginCacheControl as a new page rule action.
2020-02-03 17:19:48 +00:00
Junade
27ae3718d4 Merge pull request #119 from axelabhay/cf-new-edit-page-rule-function
New function editPageRule to allow PUT method supporting removal of rule action items
2020-02-03 17:19:24 +00:00
Abhay Saraf
f2e0d6cbe3 Adding new function editPageRule to allow put method to support removal of rule settings or rule action items from the page rule which is not supported by updatePageRule. 2020-01-28 15:26:35 +05:30
Abhay Saraf
ed91e639be Adding new function setOriginCacheControl as a new page rule action. 2020-01-28 11:11:05 +05:30
Pezhvak
adfb6d28d2 Update SSLTest.php
fixed curly braces in this file as @aaronhuisinga reported
2019-12-20 17:12:58 +03:30
Kyle Yee
9d0df44838 remove test 2019-12-16 18:02:49 +08:00
Kyle Yee
6e6a850d62 fix test case 2019-12-16 17:58:04 +08:00
Kyle Yee
b9051fc1f2 fix lint 2019-12-16 17:55:48 +08:00
Kyle Yee
b54c3481a3 fix typo in test case 2019-12-16 17:39:38 +08:00
Kyle Yee
8310111b11 Merge branch 'master' into master 2019-12-16 17:32:56 +08:00
Kyle Yee
f0892ac64f fix return type 2019-12-14 15:40:29 +08:00
Kyle Yee
d918f7b99e fix typo 2019-12-14 15:36:38 +08:00
Kyle Yee
f4c2f546b0 Feature: add lock and unlock domain 2019-12-14 15:24:43 +08:00
Pezhvak
1be0e794d9 Update DNS.php
fixing php 7.4 deprecation of curly braces
2019-12-03 17:29:32 +03:30
Junade
7276b61e20 Merge pull request #106 from beltofte/ssl-status-retry-option
Add retry option to getSSLVerificationStatus()
2019-09-20 02:45:40 +01:00
Junade
4e1a12bdea Merge pull request #107 from beltofte/ssl-change-verify-method
Add method to change SSL certificate pack validation method
2019-09-20 02:45:08 +01:00
Junade
61e80bd25f Merge pull request #99 from benedict-erwin/master
Add Method Delete Zone
2019-09-20 02:44:22 +01:00
Junade
ffefe1480a Merge pull request #109 from indeed-a-genius/patch-1
Incorrect listPageRules() conditions for optional parameters
2019-09-20 02:43:43 +01:00