CI and fixtures: make PHP 8.6 a supported target

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
22/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github-actions, php
Lĩnh vực
ci-cd, testing

Hướng nghiên cứu

This is a tracking issue with several separate tasks. Start with the CI matrix in phpunit.yml (the experimental flag on 8.6) and phpstan.yml (add 8.6), then look at the weaving fixtures under tests/Instrument/Transformer/_files/. Done means the matrix changes land and each listed 8.6 syntax case has a skipped-below-8.6 functional test. Dropping experimental must wait for 8.6.0 GA, and the fixture tasks need maintainer guidance.

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

Mô tả

Enhancement PHP-8.6

Current state

  • phpunit.yml runs PHP 8.6 (lowest and highest dependencies) with experimental: true, so a failure doesn't fail the build.
  • phpstan.yml only runs on 8.4 and 8.5. Locally, composer analyze passes on 8.6 for the current code.
  • No fixture or functional test contains 8.6 syntax. The whole suite passes on 8.6.0RC2 and RC3 (3359 tests).

Tasks

  • Drop experimental for 8.6 in phpunit.yml once 8.6.0 GA is released and setup-php provides it.
  • Add 8.6 to the phpstan.yml matrix.
  • Add weaving fixtures (tests/Instrument/Transformer/_files/php86-*) and functional tests for 8.6 syntax in woven code. They should be skipped below 8.6, or loaded through a version-gated fixture project. Cover:
    • PFA in method bodies, including a PFA of an intercepted method ($this->sum(?, 1)), static PFA (self::make(1, ?)), and PFA after |>;
    • PFA in constant expressions: property/parameter defaults (#791) and attribute arguments (these already work);
    • readonly property defaults in readonly and non-readonly classes, and re-initialisation in an intercepted __clone() (#792);
    • #[\Override] on class constants and enum cases (#794);
    • parameter doc comments (#793);
    • __debugInfo() on enums, which is already woven and intercepted correctly.
  • tests/AGENTS.md: describe the 8.6 test setup. Optionally pin goaop/parser-reflection / nikic/php-parser to versions that parse 8.6 (php-parser 5.9 already has ArgPlaceholder).

No action needed for these 8.6 changes, which were checked against the engine:

  • stateless closure caching: no code relies on closure identity;
  • the limit of 16 filters per php://filter URL: the loader uses one filter per URL;
  • the 8.6 deprecations: the suite runs with failOnDeprecation;
  • __construct() return-value deprecation: generated constructors don't return.

Part of #789.

Ngôn ngữ chính
PHP
Star
1.7k
Fork
166
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
30

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 goaop/framework

Tất cả issue của goaop/framework

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.