Use partial function application in the engine source once PHP 8.6 is the minimum
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
- Hơn một tuần
- Mức phù hợp với người mới
- 8/100
Hướng nghiên cứu
This is a blocked tracking issue, not a task to start: partial function application needs PHP 8.6 as the minimum version, and PHPStan and php-cs-fixer do not yet support it. The candidate sites are in src/Instrument/PathResolver.php, src/Aop/Pointcut/PointcutGrammar.php, src/Core/Container.php, src/Console/CommandLoader.php and src/Aop/Pointcut/ReturnTypePointcut.php. Done would mean the tooling supports 8.6 and the minimum version is raised, which is outside a first contribution.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
A tracking issue for using PFA in src/. It is blocked until the minimum PHP version is ^8.6 and the tooling supports the syntax.
Blockers (checked on 8.6.0RC2)
- PHPStan 2.3.4 crashes on any
?placeholder: "Internal error: ArgumentsHandler::matchArgParameter(): Argument #2 ($arg) must be of type PhpParser\Node\Arg, PhpParser\Node\ArgPlaceholder given". - php-cs-fixer 3.95 supports syntax only up to PHP 8.5.
composer.jsonrequiresphp: ^8.4.
Candidates (cosmetic only: no runtime gain, a PFA costs the same as a closure)
| Place | Today | With PFA |
|---|---|---|
src/Instrument/PathResolver.php:47 |
static fn(string $path) => self::realpath($path, $shouldCheckExistence) |
self::realpath(?, $shouldCheckExistence) |
src/Aop/Pointcut/PointcutGrammar.php:328 |
fn(int $group, ModifierPointcut $matcher) => self::addModifierGroup($matcher, $group) |
self::addModifierGroup(group: ?, matcher: ?) (named placeholders keep the written order) |
src/Core/Container.php:278 |
fn(): object => $factory($this) |
$factory($this, ...) (thunk) |
src/Console/CommandLoader.php:57 |
static fn(): Command => $instantiate($commandClass) |
$instantiate($commandClass, ...) |
src/Aop/Pointcut/ReturnTypePointcut.php:145 |
fn($a, $b) => $this->atomMatches($a, $b) |
$this->atomMatches(...): FCC, already possible today |
Must stay closures
src/Aop/Pointcut/PointcutGrammar.php:330:fn(int $group) => self::addModifierGroup(new ModifierPointcut(), $group). PFA evaluates its arguments when the closure is created, so every match would share oneModifierPointcutinstance.src/Aop/Framework/StaticTraitAliasMethodInvocation.php:75, theforward_static_call_array()shim. It is rebound withbindTo(null, $scope)to carry late static binding. A PFA closure can't be rebound to another scope ("Cannot rebind scope of closure created from function", returnsnull).- Closures that compose calls (
Enumerator.php:85,:150,:200) or call a method on a varying receiver (AndPointcut/OrPointcut). 8.6 has no placeholder for the object a method is called on.
Generated code
No change proposed. Proxies already use first-class callables ($this->mOriginalAlias(...), The::aspect(X::class)->m(...)), and PFA can't express an unbound method reference (see #796).
Part of #789.
- Ngôn ngữ chính
- PHP
- Star
- 1.7k
- Fork
- 166
- Merge trung bình
- 1 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 38
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của goaop/framework
-
Enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
cache:warmup:opcache runs out of memory with the default memory_limit (128M) on larger applicationsĐang mởBug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug To Be Discussed
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 56/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của goaop/framework
Issue tương tự
-
enhancement priority Sales
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
novalo-dev/Prestashop-MCP-Server#201 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Include flows spanning the full report time windowCó thể đã có người làm @somethingwithproof đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Cacti/plugin_flowview#306 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug origin: upstream priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
mattytap/Mattytap-Sermons#105 ·
-
priority:low type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
crazy-goat/workerman-bundle#1189 ·
Maintainer thường phản hồi trong vòng 1 ngày