Skip to content

Commit ad9d5d9

Browse files
authored
Added Support for Drupal 11
2 parents 2b52573 + ff25ba6 commit ad9d5d9

File tree

7 files changed

+31
-25
lines changed

7 files changed

+31
-25
lines changed

.github/workflows/php.yml

+14-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: test_and_lint
22
env:
33
SIMPLETEST_DB: "sqlite://localhost//tmp/test.sqlite"
4-
SIMPLETEST_BASE_URL: "http://127.0.0.1:8000"
4+
SIMPLETEST_BASE_URL: "http://127.0.0.1:8000"
55
APIGEE_EDGE_AUTH_TYPE: ${{ secrets.APIGEE_EDGE_AUTH_TYPE }}
66
APIGEE_EDGE_ORGANIZATION: ${{ secrets.APIGEE_EDGE_ORGANIZATION }}
77
APIGEE_EDGE_USERNAME: ${{ secrets.APIGEE_EDGE_USERNAME }}
@@ -22,7 +22,7 @@ on:
2222
jobs:
2323
build:
2424

25-
runs-on: ubuntu-latest
25+
runs-on: ubuntu-24.04
2626

2727
name: "PHP ${{ matrix.php-version }} | Drupal ${{ matrix.drupal-core }}"
2828
strategy:
@@ -34,8 +34,13 @@ jobs:
3434
- "8.3"
3535
drupal-core:
3636
# Should update the following as the minimum supported version from Drupal.org
37-
- "10.2.x"
3837
- "10.3.x"
38+
- "11.1.x"
39+
exclude:
40+
- php-version: "8.1"
41+
drupal-core: "11.1.x"
42+
- php-version: "8.2"
43+
drupal-core: "11.1.x"
3944

4045
steps:
4146

@@ -51,7 +56,7 @@ jobs:
5156
coverage: "xdebug"
5257
php-version: "${{ matrix.php-version }}"
5358
tools: composer:v2
54-
extensions: dom, curl, libxml, mbstring, zip, pdo, mysql, pdo_mysql, bcmath, gd, exif, iconv, opcache, imagick
59+
extensions: date, dom, filter, hash, json, curl, libxml, mbstring, zip, pdo, sqlite3, mysqli, mysql, pdo_mysql, bcmath, gd, exif, iconv, opcache, imagick, openssl
5560

5661
- name: Checkout Drupal core
5762
run: |
@@ -111,17 +116,17 @@ jobs:
111116
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
112117
113118
- name: "Run PHPUnit Tests"
114-
if: ${{ matrix.drupal-core != '10.2.x' || matrix.php-version != '8.2' }}
119+
if: ${{ matrix.drupal-core != '10.3.x' || matrix.php-version != '8.2' }}
115120
run: |
116121
cd drupal
117-
vendor/bin/phpunit -c core --verbose --color --group apigee_api_catalog --testsuite unit,kernel,functional,functional-javascript modules/contrib/apigee_api_catalog
122+
vendor/bin/phpunit -c core --color --group apigee_api_catalog --testsuite unit,kernel,functional,functional-javascript modules/contrib/apigee_api_catalog
118123
119124
- name: "Run PHPUnit Tests with Code Coverage"
120-
if: ${{ matrix.drupal-core == '10.2.x' && matrix.php-version == '8.2' }}
125+
if: ${{ matrix.drupal-core == '10.3.x' && matrix.php-version == '8.2' }}
121126
run: |
122127
cd drupal
123128
cp modules/contrib/apigee_api_catalog/phpunit.core.xml.dist core/phpunit.xml
124-
vendor/bin/phpunit -c core --verbose --color --group apigee_api_catalog --testsuite unit,kernel,functional,functional-javascript --coverage-clover /tmp/coverage.xml modules/contrib/apigee_api_catalog
129+
vendor/bin/phpunit -c core --color --group apigee_api_catalog --testsuite unit,kernel,functional,functional-javascript --coverage-clover /tmp/coverage.xml modules/contrib/apigee_api_catalog
125130
126131
- name: Artifacts
127132
if: failure()
@@ -131,7 +136,7 @@ jobs:
131136
path: drupal/sites/simpletest/browser_output/*
132137

133138
- name: Upload Coverage to Codecov
134-
if: ${{ matrix.drupal-core == '10.2.x' && matrix.php-version == '8.2' }}
139+
if: ${{ matrix.drupal-core == '10.3.x' && matrix.php-version == '8.2' }}
135140
uses: codecov/codecov-action@v4
136141
with:
137142
token: ${{ secrets.CODECOV_TOKEN }}

apigee_api_catalog.info.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 'Apigee API Catalog'
22
type: module
33
description: 'Display OpenAPI documentation of your APIs to your developers.'
4-
core_version_requirement: ^10
4+
core_version_requirement: ^10 || ^11
55
package: 'Apigee'
66
dependencies:
77
- drupal:text

composer.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
"description": "Apigee API Catalog for Drupal",
66
"require": {
77
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
8-
"drupal/entity": "^1.1",
9-
"drupal/file_link": "^2.0",
10-
"drupal/apigee_edge": "^3.0.8",
11-
"webonyx/graphql-php": "^14.11"
8+
"drupal/entity": "^1.6",
9+
"drupal/file_link": "^2.2",
10+
"drupal/apigee_edge": "^3.0.8 || ^4.0.0",
11+
"webonyx/graphql-php": "^15.19"
1212
},
1313
"require-dev": {
14-
"cweagans/composer-patches": "^1.6",
15-
"drupal/core-dev": "^10.2",
16-
"drush/drush": "^12.4.3",
17-
"mglaman/drupal-check": "^1.3",
18-
"phpmd/phpmd": "^2.8.2",
19-
"phpmetrics/phpmetrics": "^2.5",
20-
"phpstan/phpstan": "^1.5"
14+
"cweagans/composer-patches": "^1.7",
15+
"drupal/core-dev": "^10.3 || ^11.1",
16+
"drush/drush": "^12.4.3 || ^13.3",
17+
"mglaman/drupal-check": "^1.5",
18+
"phpmd/phpmd": "^2.15.0",
19+
"phpmetrics/phpmetrics": "^2.8",
20+
"phpstan/phpstan": "^1.12"
2121
},
2222
"config": {
2323
"sort-packages": true

modules/apigee_asyncapi_doc/apigee_asyncapi_doc.info.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: AsyncAPI for Apigee
22
type: module
33
description: AsyncAPI for Apigee
44
package: Apigee (Experimental)
5-
core_version_requirement: ^10
5+
core_version_requirement: ^10 || ^11
66
dependencies:
77
- apigee_api_catalog
88
- file_link

modules/apigee_freeform_doc/apigee_freeform_doc.info.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Free-form documentation for Apigee
22
type: module
33
description: Free-form documentation for Apigee
44
package: Apigee (Experimental)
5-
core_version_requirement: ^10
5+
core_version_requirement: ^10 || ^11
66
dependencies:
77
- apigee_api_catalog
88
- file

modules/apigee_graphql_doc/apigee_graphql_doc.info.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: GraphQL for Apigee
22
type: module
33
description: GraphQL for Apigee
44
package: Apigee (Experimental)
5-
core_version_requirement: ^10
5+
core_version_requirement: ^10 || ^11
66
dependencies:
77
- apigee_api_catalog
88
- file_link

tests/src/Functional/ApiDocsAdminTest.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
use Drupal\Core\Url;
2525
use Drupal\Tests\BrowserTestBase;
2626
use Drupal\Tests\TestFileCreationTrait;
27+
use Drupal\TestTools\Random;
2728
use Drupal\file\Entity\File;
2829
use Drupal\file\FileInterface;
2930

@@ -129,7 +130,7 @@ public function testApiDocAdministration() {
129130

130131
$page = $this->getSession()->getPage();
131132
$random_name = $this->randomMachineName();
132-
$random_description = $this->randomGenerator->sentences(5);
133+
$random_description = Random::getGenerator()->sentences(5);
133134
$page->fillField('title[0][value]', $random_name);
134135
$page->fillField('body[0][value]', $random_description);
135136
$page->fillField('field_apidoc_spec_file_source', 'file');

0 commit comments

Comments
 (0)