utopia-php / utopia-php/domains

Parsing blogspot.com subdomains fails

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
56
Forks
22
Avg merge
35m
Merged PRs (30d)
2

Description

I dont think that this result is expected, also getRegisterable returns the complete domain name with the subdomain in it.
Example:

Utopia\Domains\Domain Object
(
    [domain:protected] => notcivil.blogspot.com
    [TLD:protected] =>
    [suffix:protected] =>
    [name:protected] =>
    [sub:protected] =>
    [parts:protected] => Array
        (
            [0] => notcivil
            [1] => blogspot
            [2] => com
        )

)

Invoked via

require_once(dirname(__FILE__) . "/vendor/autoload.php");
$domain = new \Utopia\Domains\Domain("notcivil.blogspot.com");

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the example through the Utopia\Domains\Domain constructor and inspect how notcivil.blogspot.com is split into its domain parts. Done means blogspot.com is recognized correctly and getRegisterable no longer includes the subdomain, with regression coverage added wherever this behavior is tested.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.