cannod / moodle-drupalservices

Moodle plugin to connect to Drupal services
36 stars 25 forks source link

D8 compatibility #90

Open acrollet opened 5 years ago

acrollet commented 5 years ago

This PR provides compatibility with Drupal 8, using the built-in REST API for users. For this to work, you'll need to allow at least GET/POST access to the user API, with json format and cookie authentication enabled.

Sample rest.resource.entity.user.yml:

langcode: en
status: true
dependencies:
  module:
    - serialization
    - user
id: entity.user
plugin_id: 'entity:user'
granularity: resource
configuration:
  methods:
    - GET
    - POST
  formats:
    - json
  authentication:
    - cookie
netw3rker commented 5 years ago

Awesome! thanks for the PR. I'll want to get some other eyes testing this too before I merge it.

Do you happen to do much with any testing frameworks? I'd be more amicable to accepting this If I had some unit or functional tests to vet it with first.

acrollet commented 5 years ago

Hi there, I'd have to get approval to spend extra time on this, unfortunately working on tests is unlikely.

netw3rker commented 5 years ago

Yeah, that's a common problem :)