Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

push-md: e2e suite only exercises the unscoped source, not the built (scoped) zip

Abierto
#70 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
68/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
bash, docker, git, github-actions, php

Línea de trabajo

Empieza con bin/build-plugins.sh, bin/run-push-md-playground.sh, bin/inspect-push-md-zip.sh y el workflow push-md-e2e.yml existente para seguir cómo se construye y ejecuta el flujo actual con el código fuente montado. Añade una ruta nueva de Playground que instale dist/plugins/push-md.zip y, después, ejecuta el flujo existente de clonado, edición de Markdown, commit y push. Se considera terminado cuando el artefacto delimitado se carga funcionalmente, el push se completa sin un error fatal ni un error de bad line length character y la ruta del artefacto se ejecuta en CI.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Summary

The push-md e2e suite never functionally imports the built (scoped) plugin zip — it mounts the unscoped source tree directly. This is the testing gap that let the scoping regression in #68 (fixed by #69) ship in v0.6.6 / v0.6.7 uncaught: clone worked, but the first Markdown import/push fataled on the scoped build, and no automated test loaded the scoped artifact.

Details

bin/run-push-md-playground.sh boots Playground against the live source, not the release artifact:

--mount="$ROOT_DIR:/workspace"
--mount="$ROOT_DIR/vendor:/wordpress/wp-content/vendor"
--mount="$ROOT_DIR/components:/wordpress/wp-content/components"
--mount="$ROOT_DIR/plugins/push-md:/wordpress/wp-content/plugins/push-md"

So the e2e flow runs with:

  • the unscoped namespaces (Nette\…, League\…, …), where inline qualified references resolve fine, and
  • the dev bootstrap / composer autoloader, not the generated/scoped php-toolkit/vendor/composer/* classmap.

bin/build-plugins.sh produces the scoped dist/plugins/push-md.zip, but it's only checked structurally by bin/inspect-push-md-zip.sh (file presence + content greps). Nothing ever loads the scoped classes through their autoloader and pushes Markdown, so a scoping bug that fatals at class-load time passes every gate.

Proposed follow-up

Add an e2e path that exercises the built zip:

  1. bash bin/build-plugins.sh to produce dist/plugins/push-md.zip.
  2. Install that zip on a fresh Playground site (a blueprint step that installs the artifact, rather than mounting source).
  3. Run the existing import/push flow: git clone …/wp-json/git/v1/md.git, edit a post/*.md, commit, git push.
  4. Assert success (no bad line length character: <br, no PHP fatal in the receive-pack response).

Wire this into CI (e.g. push-md-e2e.yml) so every change that touches the scoper, prune list, or bundle layout is validated against the shipped artifact.

Notes
  • #69 already adds a cheap static canary in inspect-push-md-zip.sh (rejects in-class trait use of a scoped name missing a leading backslash). This issue is about the functional gate that a static grep can't cover.
  • Keep the unscoped-source e2e too (fast inner loop); the scoped-zip run is the release-artifact gate.

Follow-up to #69 / #68.

Lenguaje dominante
PHP
Estrellas
22
Forks
5
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Automattic/php-toolkit

Todos los issues de Automattic/php-toolkit

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.