Update libraries/vendor_jcb/VDM.Joomla/src/Utilities/String/ComponentCodeNameHelper.php #1305

Closed
oxido wants to merge 3 commits from oxido/Component-Builder:oxido-patch-1 into 6.x
pull from: oxido/Component-Builder:oxido-patch-1
First-time contributor

I don't see any reason to force the component name in the code to start with a capital letter.
$string = ucfirst($string);

Pull Request for Issue gh-#1304 .

Summary of Changes

Refactor safe() method: remove leading ucfirst transformation and replace trim with full whitespace removal, simplifying string sanitization while maintaining alphanumeric filtering for namespace-safe output.

Testing Instructions

Create or edit the name of the component in the filed "Name in Code"

Expected result

Input string is stripped of whitespace (at start, midle or end) and non-alphanumeric characters, returning a clean namespace-safe identifier without case transformation.

Actual result

Documentation Changes Required

I don't see any reason to force the component name in the code to start with a capital letter. $string = ucfirst($string); Pull Request for Issue gh-[#1304](https://git.vdm.dev/joomla/Component-Builder/issues/1304) . ### Summary of Changes Refactor safe() method: remove leading ucfirst transformation and replace trim with full whitespace removal, simplifying string sanitization while maintaining alphanumeric filtering for namespace-safe output. ### Testing Instructions Create or edit the name of the component in the filed "Name in Code" ### Expected result Input string is stripped of whitespace (at start, midle or end) and non-alphanumeric characters, returning a clean namespace-safe identifier without case transformation. ### Actual result ### Documentation Changes Required
oxido added 1 commit 2026-04-23 10:42:50 +00:00
I don't see any reason to force the component name in the code to start with a capital letter.
$string = ucfirst($string);
oxido closed this pull request 2026-05-05 21:11:58 +00:00
oxido deleted branch oxido-patch-1 2026-05-05 21:12:16 +00:00

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.