Skip to content

7.x-2.4

Compare
Choose a tag to compare
@e0ipso e0ipso released this 17 Dec 13:25
· 41 commits to 7.x-2.x since this release

[BUGFIX] Allow OPTIONS requests with access token

2cdf7aa by Mateu Aguiló Bosch (G)

Add the OPTIONS HTTP method to the allowed methods

:100644 100644 f552044... 7782658... M  modules/restful_token_auth/src/Plugin/resource/AccessToken__1_0.php

[FEATURE] Performance improvements

c2d0a50 by Mateu Aguiló Bosch (G)

Add minor improvements to methods that are called a lot. A small
bit can add up when called tens of thousands of times.

:100644 100644 a9e4a9e... 9cfda2a... M  src/Formatter/FormatterManager.php
:100644 100644 62d300e... 04f1baf... M  src/Plugin/resource/DataProvider/DataProvider.php
:100644 100644 1cb8f67... 10d029e... M  src/Plugin/resource/Field/ResourceField.php
:100644 100644 cb9dcb0... 31b43d2... M  src/Plugin/resource/Field/ResourceFieldEntity.php
:100644 100644 d446974... 1e203a7... M  src/Resource/ResourceManager.php
:100644 100644 1c8b71a... b96ebd2... M  tests/RestfulAuthenticationTestCase.test
:100644 100644 6492168... 8f2bdd0... M  tests/RestfulCreateEntityTestCase.test
:100644 100644 e4d9ab2... bb6a98e... M  tests/RestfulReferenceTestCase.test

[FEATURE] Introduce fast cache clear

0abdfe3 by Mateu Aguiló Bosch (G)

Avoid entity related slowness given that those features are not
leveraged by core. Allow the user to re-enable them if necessary.

:100644 100644 99409b9... bc6a21f... M  .travis.yml
:100644 100644 66fe45a... b5a77a7... M  restful.admin.inc
:100644 100644 e5a64dd... 7d7e6ed... M  restful.entity.inc
:100644 100644 576a07f... f5fe7ec... M  restful.module
:100644 100644 5b8d6d9... 2b0465a... M  src/RenderCache/Entity/CacheFragmentController.php

[BUGFIX] Remove unprocesable entities from embedded lists

2e9e30e by Mateu Aguiló Bosch (G)

Return NULL if the embedded entity does not exist

:100644 100644 1478305... cb9dcb0... M  src/Plugin/resource/Field/ResourceFieldEntity.php
:100644 100644 3357563... d059281... M  tests/RestfulJsonApiTestCase.test

[FEATURE] Allow a generic field reference

d84bbf3 by Mateu Aguiló Bosch (G)

This includes adding support for arbitrary fields that return an ID
to be used as a reference as long as they include the corresponding
'resource' information.

:100644 100644 0ad5f82... ec1e7b3... M  src/Plugin/formatter/Formatter.php
:100644 100644 d53d726... 1cb8f67... M  src/Plugin/resource/Field/ResourceField.php
:100644 100644 81b856d... dd00968... M  src/Plugin/resource/Field/ResourceFieldEntityReference.php
:000000 100644 0000000... 5cd60ae... A  src/Plugin/resource/Field/ResourceFieldReference.php
:100644 100644 811781a... 3357563... M  tests/RestfulJsonApiTestCase.test
:000000 100644 0000000... e8469e6... A  tests/modules/restful_test/src/Plugin/resource/entity_test/main/v1/Main__1_8.php

[FEATURE] More semantic error codes on access check

3d94c6e by Antonio De Marco (G)

If a request is denied access via a RESTful exception do not discard
the error code. Instead return a well formatted error response.

:100644 100644 e101652... 576a07f... M  restful.module
:100644 100644 63b7bcb... caa7caa... M  tests/RestfulCsrfTokenTestCase.test
:100644 100644 5d8d385... a21c0a7... M  tests/RestfulRenderCacheTestCase.test

[CLEANUP] Error message cleanup (part 2)

8a87def by Mateu Aguiló Bosch (G)

An extra typo was left from the last commit.

:100644 100644 4720628... 1b0129a... M  src/Plugin/resource/ResourceEntity.php

[CLEANUP] Fix a typo in th error message

d5e8f9b by jeff-h (G)

Improve error message by removing a typo.

:100644 100644 cddcda5... 5feb304... M  src/Plugin/resource/Resource.php
:100644 100644 fb2b2f4... 4720628... M  src/Plugin/resource/ResourceEntity.php

[BUGFIX] Turn update result into array for DB queries.

4a2f639 by jeff-h (G)

Data providers' update() method must return an array. The returned value
from this method is ultimately passed via $page_callback_result to
drupal_deliver_page() which expects it the value to be:

 * @param $page_callback_result
 *   The result of a page callback. Can be one of:
 *   - NULL: to indicate no content.
 *   - An integer menu status constant: to indicate an error condition.
 *   - A string of HTML content.
 *   - A renderable array of content.
:100644 100644 1b7c386... 8c7da11... M  src/Plugin/resource/DataProvider/DataProviderDbQuery.php

[BUGFIX] Return 422 when a consumer request invalid operations

4c5f88e by jeff-h (G)

Things like filtering by disabled fields, sorting by a computed
property, etc.
commit f661c14
Author: jeff-h [email protected]
Date: Fri Dec 11 12:13:32 2015 +1300

Update DataProvider.php

Throw 422 not 503 when invalid urlParams are present.
:100644 100644 c47114a... 62d300e... M  src/Plugin/resource/DataProvider/DataProvider.php
:100644 100644 5cc2b06... 5bc40d7... M  tests/RestfulListTestCase.test

[CLEANUP] Fixed c&p description in Users resource

a24c2b5 by Theodoros Ploumis (G)

It was showing the articles resource instead.

:100644 100644 2282779... bb5bdf2... M  src/Plugin/resource/Users__1_0.php

[CLEANUP] Fix docs in the hook_help

a71ad60 by Theodoros Ploumis (G)

To point them to the correct version and display in the correct
place.

:100644 100644 9623915... e101652... M  restful.module

[BUGFIX] Re-index array after taking out unauthorized entities

5b02042 by Mateu Aguiló Bosch (G)

Not doing this could cause false negatives in isArrayNumeric.

:100644 100644 889259d... 12e5a71... M  modules/restful_example/src/Plugin/resource/variables/DataProviderVariable.php
:100644 100644 b0fc62e... a5e8aad... M  src/Plugin/resource/DataProvider/CacheDecoratedDataProvider.php
:100644 100644 c097361... 6d3dcf1... M  src/Plugin/resource/DataProvider/DataProviderEntity.php
:100644 100644 d210480... 7be2f7e... M  src/Plugin/resource/DataProvider/DataProviderPlug.php

[CLEANUP] Depencencies: README.md improvement

e4fc3ad by jeff-h (G)

Make optional Entity Validator module version dependency more explicit.

:100644 100644 c542080... f714a84... M  README.md

[BUGFIX] Add multiverse sources to fix Travis CI builds

054e315 by Mateu Aguiló Bosch (G)

Travis CI stopped working all of the sudden. Apace fastcgi support
package was failing to install.

:100644 100644 ce0a01f... 99409b9... M  .travis.yml

[BUGFIX] Remove Content-Length header

15274ed by Mateu Aguiló Bosch (G)

Under some data conditions reporting an invalid content lenght can
result in invalid JSON for some Content-Type. Remove the
Content-Length header.

:100644 100644 98de87c... a9e4a9e... M  src/Formatter/FormatterManager.php
:100644 100644 7c2534e... 65a7df1... M  src/Http/Response.php

[CLEANUP] Use helper function to init query

8a8ca98 by jeff-h (G)

Instead of initializing the query directly, use the helper function
to get it.

:100644 100644 01cbcec... 1b7c386... M  src/Plugin/resource/DataProvider/DataProviderDbQuery.php