WordPress / WordPress/phpdoc-parser
Compatibility updates required
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- PHP
- Estrellas
- 239
- Forks
- 81
- Merge medio
- 16 h 29 min
- PR fusionados (30 d)
- 8
Descripción
This package / library / plugin is severely outdated, and no longer operates correctly on PHP 8.1.
I believe this library needs a fundamental rewrite.
Unfortunately the main dependency of it, "phpdocumentor/reflection" : "~3.0", (PHP 5.3.3+) has made several rewrites of the library in v4, v5, and v6. https://github.com/phpDocumentor/Reflection/releases
Additionally, v5.2 supported PHP >=7.2 (PHP8 support unknown), but v5.3 requires PHP 7.4/8.x, and v6 is PHP 8.1+ only.
I have previously gone done this path, and there's some changes here, but I have no recollection of the status or whether it worked / etc. https://github.com/WordPress/phpdoc-parser/compare/master...dd32:phpdoc-parser:try/upgrade-phpdocumentor
If you incorrectly run the parser on the develop.svn checkout without specifying the src/ folder as the base to parse, it'll run into this error on PHP 7.4 + WP 6.5+, which I'm assuming is newer PHP syntax that the parser doesn't understand in the tests/ folder.
[28-Apr-2025 03:14:29 UTC] PHP Fatal error: Uncaught Error: Object of class PhpParser\Node\Stmt\Class_ could not be converted to string in /var/www/html/wp-content/plugins/phpdoc-parser/vendor/phpdocumentor/reflection/src/phpDocumentor/Reflection/BaseReflector.php:172
But even without tests/ included, parsing will often throw errors like Parse Error: Syntax error, unexpected '?', expecting T_VARIABLE on line 62 Parse Error: Syntax error, unexpected '?', expecting T_VARIABLE on line 127 and I have no idea what impact that is having :)
ref https://meta.trac.wordpress.org/ticket/7963 https://meta.trac.wordpress.org/ticket/7964
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza revisando el intento de actualización existente y reproduciendo los fallos del parser en PHP 7.4 y 8.1, comparando el comportamiento con y sin la ruta base src/. Inspecciona vendor/phpdocumentor/reflection/src/phpDocumentor/Reflection/BaseReflector.php y el manejo de tests/ por parte del parser. Se considera terminado cuando el parser funciona con la dependencia compatible de la era de PHP 8.1 y deja de informar de los errores de sintaxis o de conversión de objetos descritos.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- php
- Área
- documentation, tooling
- Tipo de issue
- Error
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Tranquilo
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100