RFC: decompose WeavingTransformer into TokenStreamEditor + TraitConverter
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
The target is src/Instrument/Transformer/WeavingTransformer.php (1037 lines, 20 methods); read it whole and map which methods belong to token surgery, class/enum→trait conversion, and orchestration. The safety net is the fixture suite under tests/Core/Instrument/Transformer/_files/*, which must stay byte-for-byte identical. Done means the two new services are extracted, WeavingTransformer only matches advisors → converts → writes cache, and the fixtures still pass unchanged — but cut lines are explicitly still under discussion, so the first step is agreeing on the boundaries, not editing.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
src/Instrument/Transformer/WeavingTransformer.php is 1037 lines / 20 methods owning: advisor-matching orchestration, class→trait conversion (:255), enum→trait conversion (:454), #[\Override] stripping (:543), attribute-group stripping (:345), promoted-property demotion (:766), constructor-assignment injection (:830), token-blanking helpers (:386, :404, :894, :935), function proxying (:958), and cache writing (~:996). It is the highest-churn, highest-risk file in the repo — most recent audit commits touched it.
Proposed decomposition (for discussion)
- TokenStreamEditor: the token surgery helpers (blanking, splicing, line-preserving edits) as a directly unit-testable service.
- TraitConverter: class→trait and enum→trait conversion, including
#[\Override]/attribute handling and promoted-property demotion. WeavingTransformerkeeps orchestration: match advisors → convert → write cache.
Pure refactor; the fixture suite (tests/Core/Instrument/Transformer/_files/*) must stay byte-for-byte green. Effort L, risk medium. Needs discussion on cut lines before implementation.
- Lingua principale
- PHP
- Stelle
- 1.7k
- Fork
- 166
- Merge medio
- 1g 5h
- PR unite (30g)
- 30
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di goaop/framework
-
Enhancement PHP-8.6
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Enhancement PHP-8.6 To Be Discussed
Difficoltà 4/5 Più di una settimana Idoneità per principianti 8/100
I maintainer di solito rispondono entro 1 giorno
-
Enhancement PHP-8.6
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
I maintainer di solito rispondono entro 1 giorno
-
Static $__joinPoint keeps the first instance of every woven class aliveForse già presa @lisachenko l’ha presa 1 giorno fa. ApertaBug PHP-8.4 PHP-8.5 PHP-8.6
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
I maintainer di solito rispondono entro 1 giorno
-
#[\SensitiveParameter] values leak through joinpoint frames in stack tracesForse già presa @lisachenko l’ha presa 1 giorno fa. ApertaBug PHP-8.4 PHP-8.5 PHP-8.6
Difficoltà 4/5 3-5 giorni Idoneità per principianti 18/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di goaop/framework
Issue simili
-
Author mapping step: "create new user" and "assign to existing user" fields have no spacing between themForse già presa @umeshnevase l’ha presa oggi. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
WordPress/wordpress-importer#275 ·
-
security/openvpn-legacy: read-only user can stop a running VPNForse già presa @besendorf l’ha presa oggi. Apertaincomplete
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
opnsense/plugins#5887 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
jira-created
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
-
No Code Attached Yet
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
joomla/joomla-cms#48786 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Icinga/icingaweb2-module-director#3188 ·
I maintainer di solito rispondono entro 4 giorni