Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
compatible with drupal 9 (#5)
Browse files Browse the repository at this point in the history
* compatible with drupal 9
  • Loading branch information
vincent-gao authored Oct 19, 2021
1 parent 0198210 commit 83a3937
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ aliases:
- &job-build
working_directory: /app
docker:
- image: &builder-image integratedexperts/ci-builder
- image: &builder-image singledigital/bay-ci-builder:4.x
environment:
INSTALL_NEW_SITE: 1
LAGOON_ENVIRONMENT_TYPE: ci
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"type": "drupal-module",
"license": "GPL-2.0-or-later",
"require": {
"dpc-sdp/tide_core": "^2.0.0",
"dpc-sdp/tide_landing_page": "^2.0.0",
"dpc-sdp/tide_media": "^1.5.1"
"dpc-sdp/tide_core": "^3.0.0",
"dpc-sdp/tide_landing_page": "^3.0.0",
"dpc-sdp/tide_media": "^3.0.0"
},
"suggest": {
"dpc-sdp/tide_api:^1.2.6": "Allows to use Drupal in headless mode"
"dpc-sdp/tide_api:^3.0.0": "Allows to use Drupal in headless mode"
},
"repositories": {
"drupal": {
Expand Down
6 changes: 3 additions & 3 deletions tests/behat/features/jsonapi.profile.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: JSON API Profile
Scenario: Request to "profile" collection endpoint
Given I am an anonymous user
When I send a GET request to "api/v1/node/profile"
Then the rest response status code should be 200
Then the response code should be 200
And the response should be in JSON
And the JSON node "jsonapi.version" should be equal to "1.0"
And the JSON node "links" should exist
Expand All @@ -24,7 +24,7 @@ Feature: JSON API Profile
Given I am an anonymous user

When I send a GET request to "api/v1/node/profile/99999999-aaaa-bbbb-ccc-000000000001"
Then the rest response status code should be 200
Then the response code should be 200
And the response should be in JSON
And the JSON node "links" should exist
And the JSON node "links.self.href" should contain "api/v1/node/profile"
Expand All @@ -33,7 +33,7 @@ Feature: JSON API Profile
And the JSON node "data.id" should be equal to "99999999-aaaa-bbbb-ccc-000000000001"

When I send a GET request to "api/v1/node/profile?sort=-created"
Then the rest response status code should be 200
Then the response code should be 200
And the response should be in JSON
And the JSON node "jsonapi.version" should be equal to "1.0"
And the JSON node "links" should exist
Expand Down
2 changes: 1 addition & 1 deletion tide_profile.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: module
description: 'Provides Profile content type and related configuration. '
type: module
package: Tide
core: 8.x
core_version_requirement: ^8.9 || ^9
dependencies:
- dpc-sdp:tide_core
- dpc-sdp:tide_landing_page
Expand Down
2 changes: 2 additions & 0 deletions tide_profile.install
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function tide_profile_install() {
$bundles = $config->get('bundles');
if ($bundles) {
foreach ($bundles as $bundle) {
$enabled_bundles = [];
$enabled_bundles[] = $bundle['bundle'];
}
if (!in_array('profile', $enabled_bundles)) {
Expand Down Expand Up @@ -185,6 +186,7 @@ function tide_profile_update_8002() {
$bundles = $config->get('bundles');
if ($bundles) {
foreach ($bundles as $bundle) {
$enabled_bundles = [];
$enabled_bundles[] = $bundle['bundle'];
}
if (!in_array('profile', $enabled_bundles)) {
Expand Down

0 comments on commit 83a3937

Please sign in to comment.