WHAT IT DOES / THE PROBLEM IT SOLVES
Real-time domain availability checking inside Drupal. It queries every configured TLD in one parallel sweep through a chain of pluggable providers — an authoritative HTTP API, RDAP, WHOIS, and a DNS fallback — tried per TLD in priority order. Results are strictly three-state (available / registered / unknown): availability is never guessed, so "unknown" is returned rather than a false answer when no provider can respond. It also ships an optional domain registration-request workflow (content entity, status lifecycle, admin listing, private-file certificate upload, mail notifications).
Providers are extensible via a tagged-service interface, so a new protocol is a new tagged service with no change to existing code.
AUTOMATED REVIEW
- Coder / phpcs (Drupal + DrupalPractice): 0 errors, 0 warnings (php, module, install, inc, yml, twig, css, js).
- PHPStan (phpstan-drupal) level 4: clean, with only documented, justified baseline exceptions.
- PHPUnit: full Unit + Kernel + Functional suite green on both Drupal 10.3 (PHPUnit 9.6) and Drupal 11 (PHPUnit 11.5), no new deprecations.
MANUAL REVIEW NOTES
- All service access is via dependency injection; no \Drupal:: static calls in business logic, and no error suppression with the @ operator.
- User input is validated and never trusted; the JSON endpoint and public routes are rate-limited and permission-gated; the provider API key is write-only in the settings form and never rendered back.
- A stable release (1.0.1) is published; commits on the 1.0.x branch are my own.
DEPENDENCY
This project depends on saudi_id_validator (https://www.drupal.org/project/saudi_id_validator), also my project and published on Drupal.org — all Saudi ID validation is delegated to it by design; no ID-validation logic is duplicated here.
Comments
Comment #2
abdelwahiedReview bonus
As part of the review-bonus program, I have reviewed these three applications:
- https://www.drupal.org/project/projectapplications/issues/3611786 (Smart 404)
- https://www.drupal.org/project/projectapplications/issues/3611460 (Protected Pages Extra)
- https://www.drupal.org/project/projectapplications/issues/3608209 (Simple Parallax JS)
Comment #3
vishal.kadamComment #4
avpadernoThank you for applying!
Before giving links helpful to understand how the review process works, what to expect from a review, and what to do to avoid a review takes more time than needed, I would like to thank all the reviewers for the work they do.
These applications are volunters-driven, which also means it is not possible to predict when an application will be marked fixed and the applicant will get the permission to opt projects into security advisory policy. While we aim to make an application as quick as possible, it is also important for us that more people review the project used for an application. In this way, we make sure applications do not miss some important points that should be instead reported.
Applications are not meant to be complete debugging sessions that eliminate every existing bug, though. I apologize if sometimes applications seem to go into too-detailed reviews.
Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.
The important notes are the following.
Keep in mind that once the project is opted into security advisory coverage, only Security Team members may change coverage.
To the reviewers
Please read How to review security advisory coverage applications, Application workflow, What to cover in an application review, and Tools to use for reviews.
The important notes are the following.
For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues.
Comment #5
vishal.kadam1. FILE: domain_availability.module
A new module that aims to be compatible with latest Drupal releases is expected to implement hooks as class methods as described in Support for object oriented hook implementations using autowired services.
2. FILE: src/Entity/DomainRegistrationRequest.php
Projects that are compatible with Drupal 10 or higher versions should use attributes instead of annotations.
3. FILE: src/Form/RegistrationSettingsForm.php, src/Form/SettingsForm.php
With Drupal 10 and Drupal 11, there is no longer need to use #default_value for each form element, when the parent class is ConfigFormBase: It is sufficient to use #config_target, as in the following code.
Using that code, it is no longer needed to save the configuration values in the form submission handler: The parent class will take care of that.
Comment #6
abdelwahiedAll three points are addressed.
1. Hooks as class methods — FIXED
hook_help(), hook_theme(), hook_mail() and hook_preprocess_HOOK() are now #[Hook] methods on classes in src/Hook/, alongside the existing hook_runtime_requirements() implementation. hook_mail() takes the date formatter and translator by injection rather than calling \Drupal::service().
The module supports ^10.3 || ^11, and Drupal 10.3 dispatches no object-oriented hooks: core/lib/Drupal/Core/Hook/HookCollectorPass.php does not exist on 10.3.x, and core's own Hook attribute there states it "will not have an effect until Drupal 11.1.0". Each procedural function therefore remains as a thin delegate marked #[LegacyHook], which HookCollectorPass skips wherever that attribute is present.
Verified that only the class implementation runs on 11.1+, with no HookCollectorPass deprecation notices.
2. Attributes instead of annotations on the entity — NOT CHANGED, reasoning below
Attribute-based entity discovery arrived in Drupal 11.1, not 11.0:
- core/lib/Drupal/Core/Entity/Attribute/ContentEntityType.php — absent on 10.3.x and 11.0.x, present from 11.1.0.
- EntityTypeManager::__construct() uses new AnnotatedClassDiscovery('Entity', $namespaces, 'Drupal\Core\Entity\Annotation\EntityType') on 10.3.x and 11.0.x, and new AttributeDiscoveryWithAnnotations($this->subdir, $this->namespaces, EntityType::class, 'Drupal\Core\Entity\Annotation\EntityType') from 11.1.0.
An attributes-only entity is therefore not discovered on Drupal 10.3 or 11.0, both inside the declared ^10.3 || ^11. The class carries the #[ContentEntityType] attribute and a matching @ContentEntityType annotation.
Carrying both emits no deprecation on any version in that range: 10.3 and 11.0 discover annotations without deprecating them, 11.1 does not deprecate annotation discovery, and from 11.2 AttributeDiscoveryWithAnnotations::parseClass() parses the attribute first and returns before the annotation branch is reached.
The annotation will remain while the module supports Drupal versions that require annotation-based entity discovery. It can be removed once the minimum supported Drupal version no longer requires annotation-based entity discovery.
3. #config_target — FIXED
Both settings forms declare their configuration with #config_target, and RegistrationSettingsForm::submitForm() is removed entirely. Transformed values — the TLD lists, trimmed strings, the two fallbacks — carry their conversion in a ConfigTarget.
Two values in SettingsForm keep manual handling:
- pricing is assembled from every registered pricing strategy, including ones not currently selected, so it is not a single element's value; its mode radio keeps #default_value.
- saudinic_api_key is write-only. Under #config_target, ConfigFormBase::loadDefaultValuesFromConfig() sets #default_value from the stored value, which would render the key into the page.
#config_target and ConfigTarget both exist on 10.3.x, so the supported range is unchanged.
All tests pass, and PHPCS (Drupal and DrupalPractice) is clean.
Comment #7
abdelwahiedComment #8
abdelwahiedThe three points from #5 are now pushed and visible on the 1.2.x branch:
- Hooks implemented as class methods in src/Hook/ using #[Hook], with #[LegacyHook] procedural counterparts retained for Drupal 10.3, where OOP hook discovery is unavailable. The classes are registered explicitly in domain_availability.services.yml so classResolver() hands the same configured object to the procedural delegates on 10.3; the two never both run.
- Entity definitions retain annotations alongside attributes: attribute-based entity discovery arrived in Drupal 11.1, and this module supports ^10.3 || ^11.
- #config_target now declares configuration on both settings forms. Two values remain handled manually and are documented inline: the pricing table assembly, and the write-only API key, where a blank submission means keep the stored key rather than clear it.
CI passes on Drupal ~10.3.0 (PHP 8.3), Drupal ^11 (PHP 8.3) and Drupal ^11 (PHP 8.5). PHPCS (Drupal + DrupalPractice) is clean on the changed files.
I've also updated the issue title to the branch that carries this work. Apologies for the earlier confusion — my previous comment described these changes before they were actually pushed.