bluecadet / bluecadet_gcse
Adds searching through Google Custom Search Engine.
Package info
github.com/bluecadet/bluecadet_gcse
Type:custom-drupal-module
pkg:composer/bluecadet/bluecadet_gcse
Requires
- php: ^8.2||^8.3||^8.4
- bluecadet/bc_drupal_package_manager: ^1.1
- composer/installers: ^1.9||^2.0
- drupal/core: ^10.6||^11.3
- oomphinc/composer-installers-extender: ^2.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- 2.1.x-dev
- 2.1.0
- 2.1.0-rc2
- 2.1.0-rc1
- 2.0.x-dev
- 2.0.0
- 2.0.0-alpha8
- 2.0.0-alpha7
- 2.0.0-alpha6
- 2.0.0-alpha5
- 2.0.0-alpha4
- v2.0.0-alpha3
- v2.0.0-alpha2
- v2.0.0-alpha1
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v1.0.0-alpha1
- dev-feature/test-coverage
- dev-feature/deps-and-readme
- dev-feature/ci-workflow-update
- dev-feature/readme-template-update
- dev-master
- dev-title-update
This package is auto-updated.
Last update: 2026-10-16 01:44:05 UTC
README
Adds a Google Custom Search Engine (GCSE) integration to Drupal — a settings form to configure the GCSE ID and search page path, a search block/form, and a search results page that renders Google's results widget.
Requirements
- Drupal 10.6+ or Drupal 11.3+
- PHP 8.2 or higher
Versions
2.1 Branch
- 2.1.x: Drupal 10.6+/11.3+ support (PHP 8.2+)
2.0 Branch
- 2.0.x: Drupal 9/10 support -- outdated, do not use.
Includes
- Admin settings form (
/admin/config/search/g-search-settings) to configure the GCSE ID and the search results page path - A dynamically-registered route for the search results page, built from the configured path
- A search results page that attaches the GCSE JS library and renders the
gcse_pagetheme - A search form (
GSearch) and a corresponding block plugin (Google Custom Search Form) that can be placed anywhere to submit queries to the results page - Update status integration via
bc_drupal_package_manager, so this module's version is checked against Bluecadet's package feed on the module updates report
Not using Composer
If you are not using composer, you can delete all unneeded files.
- composer.json
Using Composer
If you are using composer to manage Drupal modules, make sure you add custom location for this module to be downloaded to. You must add the installer types line as well as the location for the module.
... "installer-types": ["custom-drupal-module"], "installer-paths": { "web/core": ["type:drupal-core"], "web/modules/contrib/{$name}": ["type:drupal-module"], "web/modules/custom/{$name}": ["type:custom-drupal-module"], "web/profiles/contrib/{$name}": ["type:drupal-profile"], "web/themes/contrib/{$name}": ["type:drupal-theme"], "drush/contrib/{$name}": ["type:drupal-drush"] }, ...
Testing
This module includes automated tests that run via GitHub Actions against Drupal 10.6.x-11.5.x, plus 12.0.x as an expected-to-fail early warning (see .github/drupal-ci.yml for the exact PHP/MariaDB matrix).
Test Plan
Automated Tests (GitHub Actions)
The CI pipeline runs the following for each Drupal version:
- PHPCS - Drupal coding standards validation (
DrupalandDrupalPracticestandards) - PHPStan - static analysis for deprecated API usage
- PHPUnit - automated tests
Current coverage
Unit, Kernel and Functional tests cover every class: the search controller and its title, the dynamic route, both forms (including the settings save and route rebuild), the search form block, and the search page and settings page access.
Changelog
2.1.x
- Narrowed Drupal core support to
^10.6 || ^11.3(dropping EOL Drupal 9 and anything older than what CI tests);composer.jsonpreviously had nodrupal/coreconstraint at all - Adopted the reusable GitHub Actions workflow architecture; moved CI to a shared, config-driven orchestrator in
bluecadet/web-gh-actions - Converted every
\Drupal::static service call to real constructor-based dependency injection across the controller, both forms, the block plugin, and the dynamic route-callback class - Fixed direct
$_GETsuperglobal access in the search form's submit handler - Fixed a stale
bluecadet_gse(missing "c") repo URL inpackage.json - Fixed several postcss plugins that were silently relying on an old transitive dependency rather than being declared directly; updated
@bluecadet/dropsto^1.2.1and@bluecadet/bldrfrom a pinned 1.x version to2.0.0-alpha.12 - Added
extra.bluecadet-package-managercomposer.json metadata - Added Unit, Kernel and Functional test coverage for every class
- Aligned the CI matrix with the other Should Support modules (10.6 / 11.3-11.5, plus 12.0.x as an early warning)
2.1.0
- Updates for Drupal 11 compatibility
2.0.0
- Support Drupal 10
- Support PHP 8
- Adds in update status to check module version updates
8.x-1.0.5
- Updated dependencies so we can use Composer v2