Skip to content

[Bug] TextDomainMismatch if checking a plugin via path #774

Open

Description

Expected behavior

When running wp plugin check path/to/my-plugin, the checked text domain should be my-plugin

Actual behavior

When running wp plugin check path/to/my-plugin, the checked text domain actually is the full path: wp plugin check path/to/my-plugin

Context

After the explanation in #773 that a local zip file is not supported yet, I now tried to check my plugin via path:

  1. I am creating a scoped package of my plugin using php-scoper. The scoped package is created in a subfolder of my plugin with the same name as my plugin. Seen from the plugins folder it looks like this: ./my-plugin/my-plugin
  2. I make sure plugin-checker is available in wp-env
  3. I check the subfolder in wp-env
{
    "composer scoped:create",
    "npx wp-env run cli wp plugin install plugin-check --activate",
    "npx wp-env run cli wp plugin check wp-content/plugins/my-plugin/my-plugin"
}

The plugin check works this time, except for one issue: The expected text domain contains the full path wp-content/plugins/my-plugin/my-plugin instead of simply my-plugin, which produces a lot of WordPress.WP.I18n.TextDomainMismatch errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    [Type] BugAn existing feature is broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions