Skip to content

Commit 92c0217

Browse files
committed
Update roadmap
1 parent 4db281b commit 92c0217

2 files changed

Lines changed: 0 additions & 48 deletions

File tree

docs/todo.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ within the same impact tier.
2525
| --- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------ | ---------- |
2626
| T18 | [Method-level template parameter resolution at call sites](todo/type-inference.md#t18-method-level-template-parameter-resolution-at-call-sites) | Medium | Medium |
2727
| B21 | [Builder `__call` return type drops chain type for dynamic `where{Column}` calls](todo/bugs.md#b21-builder-__call-return-type-drops-chain-type-for-dynamic-wherecolumn-calls) | Medium | Medium |
28-
| L12 | [`App::make` / `App::makeWith` class-string return type dispatch](todo/laravel.md#l12-appmake--appmakewith-class-string-return-type-dispatch) | Medium | Low |
2928
| | **Release 0.7.0** | | |
3029

3130
## Sprint 5 — Polish for office adoption

docs/todo/laravel.md

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -463,50 +463,3 @@ accessors, so in most cases the accessor method itself already produces
463463
the virtual property. Parsing `$appends` would only help when the
464464
accessor is defined in an unloaded parent class.
465465

466-
#### L12. `App::make` / `App::makeWith` class-string return type dispatch
467-
468-
**Impact: Medium · Effort: Low**
469-
470-
`App::make(Foo::class)` and `App::makeWith(Foo::class, [...])` are
471-
the standard ways to resolve a service from Laravel's container.
472-
The first argument is `class-string<T>`, and the return type should
473-
be `T`. PHPantom currently resolves the return as `mixed`, so any
474-
method call on the result fails with "subject type could not be
475-
resolved".
476-
477-
**Reproducer:**
478-
479-
```php
480-
$connection = App::makeWith(Connection::class, ['token' => $token]);
481-
$connection->request(...);
482-
// diagnostic: "Cannot resolve type of '$connection'"
483-
484-
$service = App::make(LinkCampaignService::class);
485-
$service->isAvailable();
486-
// diagnostic: "Cannot resolve type of '$service'"
487-
```
488-
489-
**Expected:** When the first argument to `App::make`, `App::makeWith`,
490-
`app()`, or `resolve()` is a `Foo::class` literal, the return type
491-
should be `Foo`.
492-
493-
**Scope:** This only needs to handle the `::class` literal form. String
494-
aliases like `app('cache')` require container binding knowledge and
495-
are out of scope.
496-
497-
**Where to fix:**
498-
- The `Application::make` stub declares `@template TClass` with
499-
`@param class-string<TClass> $abstract` and `@return TClass`. This
500-
should already work through template binding if PHPantom resolves
501-
`class-string<Foo>` literals to bind `TClass = Foo`. The gap is
502-
likely that `Foo::class` as an argument does not bind the template
503-
parameter. Check `resolve_method_level_templates` in
504-
`call_resolution.rs`.
505-
- For `app(Foo::class)`, the global `app()` function has a similar
506-
`class-string<TClass>` signature in stubs.
507-
508-
**Impact in shared codebase:** ~2 diagnostics
509-
(`ChargebackEventListener:34`, `LinkCampaign:149`).
510-
511-
**Discovered in:** analyze-triage iteration 10.
512-

0 commit comments

Comments
 (0)