Skip to content

Use non-empty-string instead of string for Provider properties #232

Open
westonruter wants to merge 1 commit into
trunkfrom
update/non-empty-string
Open

Use non-empty-string instead of string for Provider properties #232
westonruter wants to merge 1 commit into
trunkfrom
update/non-empty-string

Conversation

@westonruter
Copy link
Copy Markdown
Member

The non-empty-string is a more specific type than string. It's clear that this is the intended type. For example, a ProviderMetadata constructor throws an exception if an empty string is provided: !preg_match('/^[a-z0-9\-_]+$/', $id).

This addresses some issues uncovered in WordPress/wordpress-develop#11701.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: westonruter <westonruter@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.12%. Comparing base (6317042) to head (a484e60).

Additional details and impacted files
@@            Coverage Diff            @@
##              trunk     #232   +/-   ##
=========================================
  Coverage     88.12%   88.12%           
  Complexity     1213     1213           
=========================================
  Files            60       60           
  Lines          3934     3934           
=========================================
  Hits           3467     3467           
  Misses          467      467           
Flag Coverage Δ
unit 88.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@westonruter westonruter requested a review from felixarntz May 7, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant