Skip to content

Decouple method documentation into individual files#14

Merged
viniciusvts merged 3 commits intomainfrom
copilot/refactor-docs-methods-structure
Dec 30, 2025
Merged

Decouple method documentation into individual files#14
viniciusvts merged 3 commits intomainfrom
copilot/refactor-docs-methods-structure

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 30, 2025

Splits consolidated method documentation files into 33 individual method files to prevent merge conflicts and simplify maintenance, mirroring the Transformer class structure in the codebase.

Changes

Documentation structure

  • Created individual .md files for all 33 methods in flat structure under docs/docs/methods/
  • Each file includes Jekyll front matter with title, parent: Methods, and nav_order for alphabetical navigation
  • Enhanced method descriptions to be more human-friendly while preserving all original code examples

Navigation

  • Updated index.md with categorized links (String Manipulation, Case Conversion, Trimming, Brazilian Masks)
  • Added has_children: true to enable parent-child relationship in Jekyll navigation

Removed files

  • a-lot-of-manipulators.md (24 methods)
  • case-manipulators.md (8 methods)
  • brazilian-maskers.md (5 methods)

Before/After

Before: 3 large files, high merge conflict risk

docs/docs/methods/
├── index.md
├── a-lot-of-manipulators.md (293 lines)
├── brazilian-maskers.md (72 lines)
└── case-manipulators.md (107 lines)

After: 33 focused files, independent updates

docs/docs/methods/
├── index.md
├── capitalize.md
├── from-base64.md
├── limit.md
... (30 more method files)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/sebastianbergmann/exporter/zipball/3473f61172093b2da7de1fb5782e1f24cc036dc3
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/Ugdz8p /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/Ugdz8p /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/Ugdz8p /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/Ugdz8p /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/694d156164372abbd149a4b85ccda2e4670c0e16
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/Ugdz8p /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/type/zipball/a8a7e30534b0eb0c77cd9d07e82de1a114389f5e
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/Ugdz8p /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/Ugdz8p /usr/bin/composer install --quiet (http block)
  • https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/Ugdz8p /usr/bin/composer install --quiet (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Objetivo

Desacoplar a documentação de métodos, criando um arquivo .md individual para cada método. Isso facilita a manutenção e previne conflitos de merge, similar à estrutura dos Transformers no código.

Estrutura Atual

docs/docs/methods/
├── index.md
├── a-lot-of-manipulators.md (arquivo grande com vários métodos)
├── brazilian-maskers.md (arquivo com vários métodos)
└── case-manipulators.md (arquivo com vários métodos)

Estrutura Desejada

Todos os métodos no mesmo nível (estrutura plana), sem agrupamentos:

docs/docs/methods/
├── index.md
├── capitalize.md
├── from-base64.md
├── limit.md
├── normalize.md
├── only-alpha.md
├── only-numbers.md
├── pad-l.md
├── pad-r.md
├── replace.md
├── replace-regex.md
├── reverse.md
├── sub.md
├── to-base64.md
├── to-camel-case.md
├── to-dot-case.md
├── to-flat-case.md
├── to-kebab-case.md
├── to-lower.md
├── to-pascal-case.md
├── to-snake-case.md
├── to-train-case.md
├── to-upper.md
├── to-upper-first.md
├── to-upper-snake-case.md
├── trim.md
├── ltrim.md
├── rtrim.md
├── without-spaces.md
├── mask-br-cep.md
├── mask-br-cnpj.md
├── mask-br-cpf.md
├── mask-br-phone.md
└── mask-br-real.md

Requisitos

  1. Criar arquivos individuais: Cada método deve ter seu próprio arquivo .md em docs/docs/methods/
  2. Estrutura plana: Todos os arquivos no mesmo nível, sem subdiretórios
  3. Front matter Jekyll: Cada arquivo deve ter:
    ---
    title: "Nome do Método"
    parent: Methods
    nav_order: N
    ---
  4. Melhorar descrições: Tornar as descrições mais humanas e claras
    • Exemplo: "Capitalize each word" → "This method capitalizes each word of the current payload."
    • Manter sucinto mas mais natural e amigável
  5. Manter exemplos: Preservar todos os exemplos de código dos arquivos originais
  6. Atualizar index.md: Criar uma lista organizada com links para todos os métodos
  7. Remover arquivos antigos: Deletar a-lot-of-manipulators.md, brazilian-maskers.md e case-manipulators.md
  8. Ordem alfabética: Usar nav_order para manter ordem alfabética na navegação

Template para cada arquivo

---
title: "methodName"
parent: Methods
nav_order: N
---

# methodName

Descrição melhorada e mais humana do método.

## Usage

```php
$string = 'example';
$string = SM::methodName($string);
// or
$string = SM::make($string)
    ->methodName();
echo $string; // resultado
```

## Examples

(incluir todos os exemplos relevantes do arquivo original)

Conteúdo Base

Extrair o conteúdo dos seguintes arquivos:

  • docs/docs/methods/a-lot-of-manipulators.md
  • docs/docs/methods/brazilian-maskers.md
  • docs/docs/methods/case-manipulators.md

Observações

  • Facilitar manutenção individual de cada método
  • Prevenir conflitos de merge (merge hell)
  • Seguir o mesmo padrão de desacoplamento dos Transformers no código
  • Manter consistência na documentação

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Decouple method documentation into individual markdown files Decouple method documentation into individual files Dec 30, 2025
Copilot AI requested a review from viniciusvts December 30, 2025 01:40
@viniciusvts viniciusvts marked this pull request as ready for review December 30, 2025 02:41
@viniciusvts viniciusvts merged commit cc16ac9 into main Dec 30, 2025
3 checks passed
@viniciusvts viniciusvts deleted the copilot/refactor-docs-methods-structure branch December 30, 2025 02:44
@viniciusvts viniciusvts added the enhancement New feature or request label Jan 3, 2026
@viniciusvts viniciusvts added this to the v1.0.8 milestone Jan 3, 2026
@viniciusvts viniciusvts moved this to Done in String Morpher Jan 3, 2026
@github-project-automation github-project-automation Bot moved this from Done to Backlog in String Morpher Jan 3, 2026
@viniciusvts viniciusvts moved this from Backlog to Done in String Morpher Jan 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants