Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Compatibility updates required

Đang mở
#246 9 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
php
Lĩnh vực
documentation, tooling

Hướng nghiên cứu

Bắt đầu bằng cách xem xét nỗ lực nâng cấp hiện có và tái hiện các lỗi của parser trên PHP 7.4 và 8.1, đồng thời so sánh hành vi khi có và không có đường dẫn cơ sở src/. Kiểm tra vendor/phpdocumentor/reflection/src/phpDocumentor/Reflection/BaseReflector.php và cách parser xử lý tests/. Được xem là hoàn tất khi parser hoạt động với dependency được hỗ trợ của thời kỳ PHP 8.1 và không còn báo các lỗi cú pháp hoặc chuyển đổi đối tượng đã mô tả.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
PHP
Star
239
Fork
81
Merge trung bình
16 giờ 29 phút
Pull request đã merge (30 ngày)
8

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của WordPress/phpdoc-parser

Tất cả issue của WordPress/phpdoc-parser

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.