Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
304 commits
Select commit Hold shift + click to select a range
af50ef3
feat: enforce configuration boundaries for environment readers
binaryfire Nov 5, 2026
113c4c4
docs: record configuration analysis and the independent audit boundary
binaryfire Nov 5, 2026
75e1a6b
fix: honor configuration PHPDoc and clarify getter diagnostics
binaryfire Nov 5, 2026
b6f14b7
fix: align collection contracts with runtime keys and callbacks
binaryfire Nov 5, 2026
ee8cae5
fix: refine support utility return types
binaryfire Nov 5, 2026
5eee15a
fix: describe optional and conditional helper contracts
binaryfire Nov 5, 2026
16c66e3
feat: infer higher-order collection and optional proxy calls
binaryfire Nov 5, 2026
9acbd34
feat: analyze Arr lookups and pulled array shapes
binaryfire Nov 5, 2026
19deee2
feat: infer collection construction and narrowing
binaryfire Nov 5, 2026
51e7e36
feat: port framework helper return inference
binaryfire Nov 5, 2026
3ca5560
feat: diagnose unnecessary value and with calls safely
binaryfire Nov 5, 2026
51d5857
feat: recommend all for collections without Arrayable values
binaryfire Nov 5, 2026
efddefd
refactor: simplify framework collection and helper consumers
binaryfire Nov 5, 2026
a274921
refactor: adopt precise collection access in framework integrations
binaryfire Nov 5, 2026
16b971d
docs: publish static analysis guidance and remaining port work
binaryfire Nov 5, 2026
b9e9431
fix: preserve numeric string lengths and offset types in split
binaryfire Nov 5, 2026
75e80d7
test: cover supported bleeding-edge collection inference
binaryfire Nov 5, 2026
c1f45ba
chore: remove stale Eloquent and nested-set analysis suppressions
binaryfire Nov 5, 2026
c19554d
chore: remove stale authentication and request property ignores
binaryfire Nov 5, 2026
cbea090
chore: remove obsolete MCP analysis ignores
binaryfire Nov 5, 2026
797f4c4
chore: remove stale runtime adapter analysis suppressions
binaryfire Nov 5, 2026
05ed65e
chore: restore unmatched-ignore reporting
binaryfire Nov 5, 2026
44a623a
docs: explain collection typing and remaining analyzer work
binaryfire Nov 5, 2026
4c6616d
docs: focus editing guidance on coherent changes
binaryfire Nov 5, 2026
6b9a7d9
fix: reject manager driver names that collide with the dispatcher
binaryfire Nov 5, 2026
d03dfbe
feat: preserve target signatures in analyzer forwarding
binaryfire Nov 5, 2026
5f45e15
feat: infer manager forwarding without constructing drivers
binaryfire Nov 5, 2026
93b2b65
feat: discover macros and configured guard forwarding
binaryfire Nov 5, 2026
9014774
feat: type facade and storage calls through their targets
binaryfire Nov 5, 2026
3bbb422
feat: infer factory helper types from container bindings
binaryfire Nov 5, 2026
51e50d9
chore: remove suppressions covered by macro and facade analysis
binaryfire Nov 5, 2026
091ffd2
docs: record macro forwarding behavior and remaining analyzer work
binaryfire Nov 5, 2026
b6a6cfd
fix: simplify identical conditional facade return types
binaryfire Nov 5, 2026
4e5a8a0
fix: preserve request input values and default types
binaryfire Nov 5, 2026
c207b06
fix: share JSON request input in the Swoole bridge
binaryfire Nov 5, 2026
258a633
fix: type environment calls and preserve named arguments
binaryfire Nov 5, 2026
5324293
feat: describe validated input subsets with optional keys
binaryfire Nov 5, 2026
e4aefa7
feat: narrow conditions after abort and throw helpers
binaryfire Nov 5, 2026
faf6570
feat: infer filesystem disk types without constructing backends
binaryfire Nov 5, 2026
c24c1d7
feat: preserve Redis command casing and connection ownership
binaryfire Nov 5, 2026
754884f
fix: reject cached manager drivers outside the inferred class
binaryfire Nov 5, 2026
caa5712
test: cover source-declared testing mock types
binaryfire Nov 5, 2026
d001a71
docs: integrate request storage and Redis analysis
binaryfire Nov 5, 2026
c8ed69a
Merge 0.4 into the PHPStan package branch
binaryfire Nov 8, 2026
cc8eab2
Use the first-party schema parser in the PHPStan plan
binaryfire Nov 8, 2026
cbb0578
Require patched Symfony 8.1.11 components
binaryfire Nov 8, 2026
5a56d20
Align queue worker test mocks with cache contract reads
binaryfire Nov 8, 2026
9921adc
Describe relation and type changes in schema parser results
binaryfire Nov 8, 2026
5d6c596
Preserve inherited method templates in collection and Sentry overrides
binaryfire Nov 8, 2026
8743360
Handle native SQLite JSON numbers and accurately declare cast inputs
binaryfire Nov 8, 2026
7e86438
Declare Eloquent accessor variance and model serialization types
binaryfire Nov 8, 2026
77e2336
Dump schemas from the configured migration connection
binaryfire Nov 8, 2026
9ab481a
Infer Eloquent properties from connection-aware schema and cast facts
binaryfire Nov 8, 2026
53e5265
Cover model schema inference and warm-cache dependency changes
binaryfire Nov 8, 2026
d238158
Record the reviewed model schema checkpoint and remaining port work
binaryfire Nov 8, 2026
46e433e
Allow extension of PHPStan classes without unnecessary final restrict…
binaryfire Nov 8, 2026
dd2a748
Keep new schema impact value classes readonly without forbidding inhe…
binaryfire Nov 8, 2026
a34ccb6
Record completion of the separate final-keyword cleanup checkpoint
binaryfire Nov 8, 2026
cae0bc7
Remove unnecessary final restrictions from schema parser classes
binaryfire Nov 8, 2026
0885b1f
Remove duplicated bulk-edit approval rule
binaryfire Nov 8, 2026
50e948e
Refine Eloquent query callbacks and relation result contracts
binaryfire Nov 8, 2026
bc8c6df
Preserve paginator collection types through replacement and mapping
binaryfire Nov 8, 2026
eed3f2c
Resolve model-specific builders collections and relationship paths
binaryfire Nov 8, 2026
19ee1a5
Preserve Eloquent forwarding and macro registration semantics
binaryfire Nov 8, 2026
a2b384c
Refine Eloquent query results and relationship callback types
binaryfire Nov 8, 2026
ea51672
Validate model columns without losing dynamic forwarding types
binaryfire Nov 8, 2026
0cd4c53
Port Eloquent stubs with standalone stub validation coverage
binaryfire Nov 8, 2026
8a0caa0
Remove obsolete local macro binding suppressions
binaryfire Nov 8, 2026
62254c6
Record the reviewed Eloquent forwarding checkpoint
binaryfire Nov 8, 2026
d5f29fa
Restore fluent query builder identity annotations
binaryfire Nov 8, 2026
5e97276
Preserve schema casts and nullable helper input contracts
binaryfire Nov 8, 2026
f83f983
Expose increment methods through model forwarding
binaryfire Nov 8, 2026
18a0b1f
Link morph query callbacks to their target models
binaryfire Nov 8, 2026
ecac1d5
Check relation names against their runtime query semantics
binaryfire Nov 8, 2026
247246f
Port model and query integration diagnostics
binaryfire Nov 8, 2026
f477f0c
Document relation diagnostics and remaining port work
binaryfire Nov 8, 2026
6858b31
Restore fluent authentication and provider contracts
binaryfire Nov 8, 2026
f818196
Restore fluent broadcasting and event contracts
binaryfire Nov 8, 2026
9c6cc0d
Restore fluent dispatch and queue contracts
binaryfire Nov 8, 2026
1a77ad9
Restore fluent cache and rate limiter contracts
binaryfire Nov 8, 2026
6a7b362
Restore fluent collection and support contracts
binaryfire Nov 8, 2026
4e798ff
Restore fluent console and scheduling contracts
binaryfire Nov 8, 2026
299d8d7
Restore fluent container and pipeline contracts
binaryfire Nov 8, 2026
27dfe01
Restore fluent database configuration and model contracts
binaryfire Nov 8, 2026
32f4781
Restore fluent storage and request state configuration
binaryfire Nov 8, 2026
6ef0624
Restore fluent application configuration contracts
binaryfire Nov 8, 2026
21dbd35
Restore fluent HTTP and routing contracts
binaryfire Nov 8, 2026
77dac9f
Restore fluent mail and notification contracts
binaryfire Nov 8, 2026
cde6eef
Restore fluent process contracts
binaryfire Nov 8, 2026
40ee422
Restore fluent testing assertion contracts
binaryfire Nov 8, 2026
0e534e2
Restore fluent validation rule contracts
binaryfire Nov 8, 2026
cd0f6f1
Restore fluent view and translation contracts
binaryfire Nov 8, 2026
d7b2a34
Restore fluent framework integration contracts
binaryfire Nov 8, 2026
8847bcb
Record completed fluent annotation restoration
binaryfire Nov 8, 2026
a8187bb
Refine Eloquent collection and paginator type declarations
binaryfire Nov 8, 2026
a0d1705
Type eager-loading constraints by their individual map keys
binaryfire Nov 8, 2026
910d487
Preserve custom model query builders through collection queries
binaryfire Nov 8, 2026
3a13ff3
Port Eloquent mapping and collection inference coverage
binaryfire Nov 8, 2026
1624447
Verify keyed eager-loading callbacks and custom collection selection
binaryfire Nov 8, 2026
ca1d9f7
Document collection inference boundaries and completed port flow
binaryfire Nov 8, 2026
5c91287
Isolate factory eager-loading suppression and honor model collections
binaryfire Nov 9, 2026
1e12ee6
Track factory count state through supported creation flows
binaryfire Nov 9, 2026
868b9b4
Resolve model factories through declarations and runtime selection rules
binaryfire Nov 9, 2026
ae3c540
Validate factory relationships and refine creation attributes
binaryfire Nov 9, 2026
2268678
Port factory selection fixture models and factories
binaryfire Nov 9, 2026
19b10fe
Cover factory inference and attribute diagnostics
binaryfire Nov 9, 2026
2878680
Document factory analysis and scoped eager-loading suppression
binaryfire Nov 9, 2026
6e15397
Cache complete property metadata across class hierarchies
binaryfire Nov 9, 2026
224614b
Preserve inherited private state and raw values in queued jobs
binaryfire Nov 9, 2026
32a05e4
Preserve model backing state without invoking property hooks
binaryfire Nov 9, 2026
6ca87ab
Include inherited private models in Horizon job tags
binaryfire Nov 9, 2026
a3dfebd
Retain inherited private state in Telescope extraction
binaryfire Nov 9, 2026
b033234
Validate every job after closures in batch chains
binaryfire Nov 9, 2026
0848461
Wrap pruned Reverb connections in the event contract type
binaryfire Nov 9, 2026
8349462
Track job metadata sources and handle unit enum defaults
binaryfire Nov 9, 2026
11ccf6a
Check job and event dispatch arguments against constructors
binaryfire Nov 9, 2026
7ec4c8d
Add queue safety rules with configuration-aware transaction checks
binaryfire Nov 9, 2026
ee5862f
Verify queue diagnostics against warm result-cache edits
binaryfire Nov 9, 2026
f8b6b59
Remove unreachable callable guards from analyzer callbacks
binaryfire Nov 9, 2026
0be2187
Document queue analysis and the completed dispatch checkpoint
binaryfire Nov 9, 2026
3b6029e
Preserve enum and attributed accessor values during serialization
binaryfire Nov 9, 2026
9f11313
Share inherited class attribute lookup across analyzer rules
binaryfire Nov 9, 2026
9bcd5a0
Share model equivalence and scope metadata for analyzer rules
binaryfire Nov 9, 2026
4aac372
Distinguish primitive casts from class casts in model analysis
binaryfire Nov 9, 2026
3ff9d84
Infer custom collection classes from model property defaults
binaryfire Nov 9, 2026
bfe470c
Validate model appends and default eager relations
binaryfire Nov 9, 2026
8d3635e
Check model scope conventions without changing public APIs
binaryfire Nov 9, 2026
1901cc3
Offer explicit model query fixes only for equivalent forwarding
binaryfire Nov 9, 2026
df433d8
Recommend direct model construction only when behavior is equivalent
binaryfire Nov 9, 2026
9f607a1
Restrict collection query recommendations to equivalent results
binaryfire Nov 9, 2026
7a9a5fd
Document model analysis policies and completed rule coverage
binaryfire Nov 9, 2026
1c33e76
Preserve job attributes when applying chain defaults
binaryfire Nov 9, 2026
5737c41
Share first-job preparation between real and fake chains
binaryfire Nov 9, 2026
016afae
Retain selected connections when partial queue fakes dispatch jobs
binaryfire Nov 9, 2026
9d01bc5
Read nullable property default expressions during dependency tracking
binaryfire Nov 9, 2026
f66281d
Share constructor source lookup and bounded setting-write inspection
binaryfire Nov 9, 2026
d5aeaf3
Read legacy property metadata for attribute migration diagnostics
binaryfire Nov 9, 2026
7552db4
Recommend model attributes only for equivalent current settings
binaryfire Nov 9, 2026
b1c3703
Recommend queue attributes using actual dispatch consumer precedence
binaryfire Nov 9, 2026
25f9968
Preserve pivot and notification model customization contracts
binaryfire Nov 9, 2026
73bdcfc
Document compatibility exceptions for replaceable authentication models
binaryfire Nov 9, 2026
a3264c0
Preserve configuration overrides on conversation and Telescope models
binaryfire Nov 9, 2026
61abea3
Retain public queue setting storage used by framework consumers
binaryfire Nov 9, 2026
b6b74a2
Adapt analyzer fixtures to default-enabled property authoring rules
binaryfire Nov 9, 2026
408c440
Document model and queue attribute migration boundaries
binaryfire Nov 9, 2026
b61bd3a
Preserve enclosing PHPStan call context after invalidation
binaryfire Nov 9, 2026
d7eb862
Infer configured concurrency drivers without constructing them
binaryfire Nov 9, 2026
8598015
Add cancellation and coroutine execution analysis rules
binaryfire Nov 9, 2026
78a4923
Preserve carried cancellation in coroutine and task lifecycles
binaryfire Nov 9, 2026
a824ce4
Preserve cancellation while maintaining connection and object pools
binaryfire Nov 9, 2026
dd349f2
Keep cancellation primary during database cleanup
binaryfire Nov 9, 2026
8db515d
Propagate carried cancellation through Redis lifecycle cleanup
binaryfire Nov 9, 2026
d84d0d9
Preserve cancellation during cache and filesystem cleanup
binaryfire Nov 9, 2026
763a162
Propagate cancellation before framework exception translation
binaryfire Nov 9, 2026
470b851
Preserve cancellation through command and process shutdown
binaryfire Nov 9, 2026
e6d1bc7
Apply cancellation precedence consistently during test cleanup
binaryfire Nov 9, 2026
c438295
Preserve cancellation identity in diagnostic checks and repairs
binaryfire Nov 9, 2026
9a7eef1
Preserve cancellation across gRPC translation and termination
binaryfire Nov 9, 2026
faa36ed
Propagate cancellation through HTTP transport boundaries
binaryfire Nov 9, 2026
8fdf133
Preserve cancellation during Reverb and WebSocket delivery
binaryfire Nov 9, 2026
3450112
Preserve cancellation identity through AI and image operations
binaryfire Nov 9, 2026
e3eee7b
Preserve cancellation across queue and MCP failure handling
binaryfire Nov 9, 2026
e3514c6
Keep fake connection forwarding helpers internal
binaryfire Nov 9, 2026
0ebb676
Preserve cancellation during telemetry collection and export
binaryfire Nov 9, 2026
5b27c29
Preserve cancellation and real timing in terminal tools
binaryfire Nov 9, 2026
5af5f5f
Document coroutine analysis and remaining telemetry work
binaryfire Nov 9, 2026
d5ebbae
Use current PHP parser modifier constants in AOP helpers
binaryfire Nov 9, 2026
0a0d222
Reset Carbon options through the default factory
binaryfire Nov 9, 2026
015503e
Use current PHPStan reflection APIs in model rules
binaryfire Nov 9, 2026
35b911f
Enable deprecation reporting while retaining validation compatibility
binaryfire Nov 9, 2026
c603613
Invalidate PHPStan results when attribute services change
binaryfire Nov 9, 2026
7226b9b
Retain helper default return branches for possibly empty unpacks
binaryfire Nov 9, 2026
207bc89
Record completed PHPStan workarounds and retained validation contracts
binaryfire Nov 9, 2026
e8b921a
Share contained failure reporting across lifecycle boundaries
binaryfire Nov 9, 2026
0a94bdf
Complete HTTP and scheduler lifecycles when coroutines are canceled
binaryfire Nov 9, 2026
18d0e6d
Finish gRPC, view and Scout observers on cancellation
binaryfire Nov 9, 2026
fc5c274
Complete queue attempt and producer cancellation observations
binaryfire Nov 9, 2026
d557092
Close OpenTelemetry spans and metrics at cancellation boundaries
binaryfire Nov 9, 2026
fd089c1
Complete Sentry transactions and integrations on cancellation
binaryfire Nov 9, 2026
a0aacbb
Record telemetry completion and the final analyzer optimization pass
binaryfire Nov 9, 2026
7b4a2d3
Respect fresh controller lifetimes in route caching
binaryfire Nov 10, 2026
6ad02de
Detect request state retained across worker executions
binaryfire Nov 10, 2026
65a1c05
Verify worker-state diagnostics after cached dependency edits
binaryfire Nov 10, 2026
ac05370
Record worker-state detection boundaries and completion
binaryfire Nov 10, 2026
b507550
Accept validation rules in textarea form builders
binaryfire Nov 10, 2026
992243c
Report pipe-separated validation rules at their authoring sites
binaryfire Nov 10, 2026
fff0520
Preserve forwarded Conditionable builder and relation return types
binaryfire Nov 10, 2026
668dede
Complete remaining framework type declarations and upstream fixtures
binaryfire Nov 10, 2026
e2b500a
Record validation and remaining type-port checkpoint completion
binaryfire Nov 10, 2026
b28d61e
Preserve auth model and cached attribute types without suppressions
binaryfire Nov 10, 2026
7da9478
Remove redundant checks exposed by the suppression audit
binaryfire Nov 10, 2026
255f3c8
Strip explained framework config ignores from generated skeletons
binaryfire Nov 10, 2026
56c8e68
Explain nested-set trait method suppressions
binaryfire Nov 10, 2026
d2b6074
Explain supported framework and fixture suppressions
binaryfire Nov 10, 2026
9a0fe16
Require explained PHPStan ignores and record audit completion
binaryfire Nov 10, 2026
db3653a
Document PHPStan configuration and model type inference
binaryfire Nov 10, 2026
35569dd
Record upstream PHPStan documentation merge completion
binaryfire Nov 10, 2026
c182011
Fix application Composer discovery under PHAR tools
binaryfire Nov 11, 2026
5a596a0
Track boot-derived PHPStan facts through runtime input dependencies
binaryfire Nov 11, 2026
f354321
Cover runtime-input invalidation and unchanged warm-cache reuse
binaryfire Nov 11, 2026
52fe3b8
Limit macro boot dependencies to classes that can consume them
binaryfire Nov 11, 2026
80ff917
Update PHPStan plan after the components efficiency pass
binaryfire Nov 11, 2026
405d3ec
Clarify source-first PHPStan guidance
binaryfire Nov 11, 2026
61a03d7
Avoid treating package config defaults as fixed consumer values
binaryfire Nov 11, 2026
ddf3c75
Enable framework-aware analysis in the application skeleton
binaryfire Nov 11, 2026
3c3b531
Document centralized static analysis and package configuration bounda…
binaryfire Nov 11, 2026
5b06e74
Remove obsolete trait analysis suppressions
binaryfire Nov 11, 2026
85b1da1
Declare directly used framework package dependencies
binaryfire Nov 11, 2026
f650f4c
Clarify static analysis boundaries and final audit guidance
binaryfire Nov 11, 2026
f2ebd5f
Accept trait-only authenticated users in verification events
binaryfire Nov 11, 2026
4b4655b
Record verification fix and pre-merge integration review
binaryfire Nov 11, 2026
51e5f2c
Explain textarea validation parameter compatibility
binaryfire Nov 11, 2026
1ea96da
Use consistent American spelling in new analysis work
binaryfire Nov 11, 2026
6d997a0
Record completed pre-merge integration review
binaryfire Nov 11, 2026
285d38f
Refine static analysis and lifecycle documentation
binaryfire Nov 11, 2026
54e126b
Cancel parallel children when context copying wraps cancellation
binaryfire Nov 11, 2026
5073de7
Fix empty lookups and preserve test process isolation
binaryfire Nov 11, 2026
850c7b3
Correct schema and Eloquent cast inference
binaryfire Nov 11, 2026
8c9ba8a
Track runtime-selected service sources across cached analysis
binaryfire Nov 11, 2026
790a03d
Preserve helper defaults and conditional callback return types
binaryfire Nov 11, 2026
ce06df7
Follow request helpers and tighten queue diagnostics
binaryfire Nov 11, 2026
32f8719
Recognize mail view arrays and case-insensitive method calls
binaryfire Nov 11, 2026
75f2f5e
Document the corrected analysis behavior and boundaries
binaryfire Nov 11, 2026
acf5122
Normalize primitive casts when assigning model attributes
binaryfire Nov 11, 2026
7d1aac7
Isolate Testbench vendor-link tests and size analyzer test workers
binaryfire Nov 11, 2026
e06c71d
Preserve schema and cast behavior in model analysis
binaryfire Nov 11, 2026
97d58b3
Retain job-list alternatives when checking batch requirements
binaryfire Nov 11, 2026
7f6008a
Resolve named config arguments and empty container parameters
binaryfire Nov 11, 2026
26c8f28
Respect macro registries and cover inherited driver declarations
binaryfire Nov 11, 2026
eb7c03b
Document migration boundaries and batch alternative checks
binaryfire Nov 11, 2026
971fd04
Track inherited migration code and newly discovered schema directories
binaryfire Nov 11, 2026
af4e076
Preserve uncertainty when package defaults merge into optional config
binaryfire Nov 11, 2026
48ec07d
Resolve dynamic model relations and retain late static types
binaryfire Nov 11, 2026
bd91b5b
Keep forwarded argument values separate from caller references
binaryfire Nov 11, 2026
8d6bcde
Respect auth manager selection and receiver boundaries
binaryfire Nov 11, 2026
0aa4b5c
Collect view usage from constant names and Blade arguments
binaryfire Nov 11, 2026
172e5e4
Document expanded relation and migration analysis
binaryfire Nov 11, 2026
2dba1c4
Preserve null in JSON casts after connection fetch options
binaryfire Nov 11, 2026
0991fda
Stabilize the macro dependency cache regression test
binaryfire Nov 11, 2026
ea5f6ab
Correct schema inference for uncertain migrations and binary values
binaryfire Nov 11, 2026
5ec3835
Distinguish Eloquent query factories in inferred builder types
binaryfire Nov 11, 2026
8693fb9
Track linked view and translation files without stale cache results
binaryfire Nov 11, 2026
18b6856
Document query factory and linked-resource inference boundaries
binaryfire Nov 11, 2026
ea6e527
Preserve configured boot-file paths in analysis cache keys
binaryfire Nov 11, 2026
1335033
Preserve migration guard timing and invalidate unknown schema changes
binaryfire Nov 11, 2026
fa01611
Resolve registered Blade components and report invalid translation lo…
binaryfire Nov 11, 2026
4c165a1
Document migration analysis boundaries and translation locale diagnos…
binaryfire Nov 11, 2026
cb6ddfd
Cover raw migration SQL through schema builder connections
binaryfire Nov 11, 2026
055e200
Resolve migration guards against the correct database and schema
binaryfire Nov 12, 2026
c458a86
Keep migration guards uncertain after queued table drops and renames
binaryfire Nov 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ jobs:
- name: Run Permission suite with the database cache store
run: CACHE_STORE=database vendor/bin/paratest -c phpunit.xml.dist tests/Permission

- name: Run PHPStan analyzer suite
run: vendor/bin/paratest -c phpunit.phpstan.xml.dist

- name: Run Testbench package-mode suite
run: php src/testbench/bin/testbench package:test --parallel tests/Testbench

Expand Down
2 changes: 2 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@
->notPath('src/data/src/Support/Creation/NativeScalar.php')
->notPath('tests/Data/Fixtures/PhpDocTypeContext.php')
->notPath('tests/Foundation/Fixtures/fake-compiled-view.php')
// Analyzer data and the fixture application mirror upstream Larastan fixtures, whose syntax and line numbers are deliberate.
->notPath('#^tests/PHPStan/((.+/)?data|application)/#')
->name('hypervel-test-profile')
->in(__DIR__)
)
Expand Down
29 changes: 17 additions & 12 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ ParaTest defaults to the machine CPU count when no process count is specified. R

To run a single test class: `./vendor/bin/phpunit --no-progress path/to/TestClass.php`.

The analyzer tests in `tests/PHPStan` run as a separate suite: use `composer test:phpstan`, or `./vendor/bin/phpunit -c phpunit.phpstan.xml.dist --no-progress path/to/TestClass.php` for a single class.

## Change Workflow

### Classify the change
Expand Down Expand Up @@ -117,7 +119,7 @@ Anything found follows When to Stop and Report — "the task didn't ask me to fi

**Run verification commands sequentially** — Never overlap formatting, static analysis or tests. Wait for each command to finish before starting another. A tool’s built-in parallelism, such as ParaTest workers, is fine.

**During implementation**, run each new or changed test file immediately with `./vendor/bin/phpunit --no-progress path/to/TestClass.php`.
**During implementation**, run each new or changed test file immediately with `./vendor/bin/phpunit --no-progress path/to/TestClass.php` (add `-c phpunit.phpstan.xml.dist` for `tests/PHPStan`).

Do not routinely run formatting or PHPStan during edits. Run targeted PHPStan earlier only when investigating a typing issue or when its feedback is needed to guide implementation.

Expand All @@ -138,8 +140,7 @@ Apply approved adaptations when porting or modifying code. Do not expand a chang
### Working rules

- **Never use subagents without explicit user consent** — Do not spawn or delegate work to subagents unless the user explicitly requests or approves their use.
- **Avoid bulk modification tools** — tools like `sed` and `replace_all` often have unwanted side effects. Never use bulk modification tools without explicit user approval; prefer manual edits. When approved, run them in multiple passes that each target long, exact, case-sensitive strings to avoid accidental changes.
- **One file at a time** — never work on multiple files simultaneously. This governs manual editing; package-manager and formatter runs may touch multiple files.
- **One change at a time** — Work on one coherent change at a time. Sequence dependent edits, and review the complete affected behavior across files before considering the change finished.
- **Never use Write to overwrite files** — always use Edit for targeted updates.
- **Always use `cp` to copy files and `mv` to move/rename** — never read → write new version → delete old version.
- **Copy before splitting** — When a new file or class is primarily extracted from existing code, use `cp` to copy the primary source first and then update the copy rather than rebuilding it from individual pieces. Copy any additional blocks, including comments and docblocks, into the destination before removing them from their source.
Expand Down Expand Up @@ -456,6 +457,9 @@ Package-specific tests that require one database driver go in `tests/Integration
|-------|----------|
| `Hypervel\Tests\TestCase` | Unit tests, mocks only, no container needed. Tests that only need an isolated scratch directory stay here — use `ParallelTesting::tempDir()` (see Temp directories below). |
| `Hypervel\Testbench\TestCase` | Integration tests (needs container for facades, config, DB, etc.) **or any test that needs a full app skeleton / writes through `BASE_PATH`** — testbench clones a disposable runtime skeleton per run and exposes its path via `BASE_PATH` (and `TESTBENCH_BASE_PATH` for subprocesses), deleted on shutdown. Committed source is never mutated. |
| `PHPStan\Testing\RuleTestCase` | PHPStan rule tests in `tests/PHPStan`. |
| `PHPStan\Testing\TypeInferenceTestCase` | PHPStan type-inference tests in `tests/PHPStan`. |
| `PHPStan\Testing\PHPStanTestCase` | PHPStan tests in `tests/PHPStan` that need PHPStan's service container. |

Always call `parent::setUp()` in your setUp method.

Expand Down Expand Up @@ -509,7 +513,7 @@ The Testbench skeleton clone is shared for the whole worker, so tests that write

### Coroutine support

All tests run inside coroutines by default. The `RunTestsInCoroutine` trait is on both base test cases (`Hypervel\Tests\TestCase` and `Hypervel\Foundation\Testing\TestCase` / Testbench), so each test method automatically runs in a fresh coroutine. Context is destroyed when the coroutine ends — no manual cleanup needed.
Tests using Hypervel's base classes run inside coroutines by default. The `RunTestsInCoroutine` trait is on both base test cases (`Hypervel\Tests\TestCase` and `Hypervel\Foundation\Testing\TestCase` / Testbench), so each test method automatically runs in a fresh coroutine. Context is destroyed when the coroutine ends — no manual cleanup needed.

**Never add `use RunTestsInCoroutine;` to individual test classes.** It's inherited from the base class. If you encounter a test extending raw `PHPUnit\Framework\TestCase`, change it to extend `Hypervel\Tests\TestCase` instead.

Expand Down Expand Up @@ -762,6 +766,8 @@ See the existing entries for database, Redis, Meilisearch, and Typesense as exam

## Static Analysis

Components is analyzed with its own `hypervel/phpstan` extension. [Static Analysis](src/docs/static-analysis.md#fixing-and-ignoring-diagnostics) is the source of truth for each diagnostic's intended fix and legitimate exceptions; the rules below add Components-specific requirements.

The `tests/` directory is excluded from phpstan. Do not run phpstan on tests.

Run full PHPStan checks with `composer analyse`. During implementation, use targeted PHPStan only when investigating or validating a specific type issue.
Expand All @@ -771,15 +777,14 @@ Run full PHPStan checks with `composer analyse`. During implementation, use targ
**When fixing phpstan errors:**

1. **Investigate before coding.** For each error: read the code, check the Laravel equivalent's types (native and docblock), trace through callers and dependents. Report findings with the single, most correct fix.
2. **Don't make the code worse or more convoluted just to satisfy PHPStan.** Fix real issues in the code, but don't add awkward wrappers, fake branches, casts, or wider types just to silence PHPStan. A phpstan fix is a typing change: it must not change runtime behavior, add overhead, or introduce new edge cases. If you cannot satisfy PHPStan within those constraints, reach consensus on a compliant solution through a second-opinion loop with your peer agent. If the code is correct and PHPStan cannot understand it, follow the narrowing / suppression order below.
3. **Native types vs docblocks determine what's dead code.** If a native return type makes a guard unreachable, the guard is dead code — remove it. If only a docblock suggests always-true, the guard is legitimate runtime defense — leave it.
2. **Don't make the code worse or more convoluted just to satisfy PHPStan.** Fix real issues in the code, but don't add awkward wrappers, fake branches, casts, or wider types just to silence PHPStan. A type-only fix must not change runtime behavior, add overhead, or introduce new edge cases. A genuine runtime bug that PHPStan exposes is fixed through the normal bug-fix workflow. If you cannot satisfy PHPStan within those constraints, reach consensus on a compliant solution through a second-opinion loop with your peer agent. If the code is correct and PHPStan cannot understand it, follow the source-first rule below.
3. **Check the supported runtime contract before removing guards.** Preserve necessary validation of caller input, consumer configuration and external data. Remove checks that only repeat guarantees the code already enforces; PHPDoc types and facts inferred from the booted application are not such guarantees.
4. **Don't change contract/concrete boundaries to fix phpstan.** Swapping a contract for a concrete (or vice versa) to satisfy a type check diverges from Laravel's API. Only do this when Laravel's typing is genuinely incorrect.
5. **Methods can be added to contracts only if they represent behavior any conforming implementation must provide.** Implementation-specific methods, internal helpers, or driver-specific features don't belong on contracts — find another fix even if adding them would satisfy phpstan.
6. **Wrong docblock types should be fixed**, not suppressed. Check the actual runtime behavior (extension docs, reflection, tests) to determine the correct type.
7. **Type decisions must be evidence-based.** See Development Conventions — check Laravel/Hyperf signatures and docblocks, then trace real control flow. Don't guess.
8. **Narrowing / suppression order.** When the code is correct but PHPStan can't follow it, in order: (1) fix the type signature or docblock; (2) `@var` to narrow to the correct runtime type; (3) a line- or identifier-scoped `@phpstan-ignore` (e.g. magic `__call`/`__get` forwarding). Never use `assert()` to narrow types, and never add a neon-wide rule on your own (see #9).
When a container string key is also a PHP class name, keep the canonical service key and use `@var` for its actual runtime type; do not change service resolution solely for PHPStan.
9. **Don't add patterns to `phpstan.neon.dist` on your own.** The neon file's global ignores cover fundamental framework patterns (Eloquent magic, generics, `new static`). Fix new phpstan errors at the source, not by masking them with new neon rules. Global suppression is a rare exception. First, reach consensus through a second-opinion loop with your peer agent that the error cannot be fixed at the source or narrowed locally, and that the pattern is frequent enough to justify global suppression. Then STOP, explain the reason and recommended suppression to the owner, and wait for approval before adding it.
6. **Type decisions must be evidence-based.** See Development Conventions — check Laravel/Hyperf signatures and docblocks, then trace real control flow. Don't guess.
7. **Fix types at their source.** Correct signatures, PHPDoc, generics, stubs or extensions. Use `assert()` only for genuine invariants; assertions may be disabled and cannot replace required validation. A truthful inline `@var` is a last resort. For verified analysis limitations, use `@phpstan-ignore identifier (reason)`, always including a meaningful reason; never use identifier-less ignores. For a confirmed PHPStan bug, start the reason with `@TODO: Remove once PHPStan` and describe the needed fix; do not add a `docs/todo.md` entry. NEON ignores require approval under the global-ignore rule.
8. **Don't add patterns to `phpstan.neon.dist` on your own.** The neon file's global ignores cover fundamental framework patterns (Eloquent magic, generics, `new static`). Fix new phpstan errors at the source, not by masking them with new neon rules. Global suppression is a rare exception. First, reach consensus through a second-opinion loop with your peer agent that the error cannot be fixed at the source or narrowed locally, and that the pattern is frequent enough to justify global suppression. Then STOP, explain the reason and recommended suppression to the owner, and wait for approval before adding it.
9. **Environment reads outside config files.** Framework source reads the environment outside config files only for a deliberate infrastructure need, such as reads before configuration loads, process transport like `__HYPERVEL_CONTEXT`, or test infrastructure like worker tokens. Use `Env::get()` with an inline `@phpstan-ignore hypervel.noEnvCallsOutsideOfConfig (reason)` stating that need. `Env::get()` is the convention for these intentional reads; switching from `env()` does not fix a read in the wrong place. Do not add directory, path or class-wide exemptions.

## Porting Packages

Expand Down Expand Up @@ -959,7 +964,7 @@ Tests for these features should be **removed** (not commented out) without askin
1. Update namespace to `Hypervel\Tests\{Package}`
2. Add `declare(strict_types=1);`
3. Change `Illuminate\` imports to `Hypervel\`
4. Extend correct base TestCase (`Hypervel\Tests\TestCase` or `Hypervel\Testbench\TestCase`)
4. Extend the appropriate test base listed under [Base classes](#base-classes)
5. Ensure `parent::setUp()` is called
6. Add type declarations to model properties
7. Fix mock types (PDO, QueryBuilder, Grammar, etc.)
Expand Down
2 changes: 1 addition & 1 deletion bin/sync-skeleton-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The replacement above illustrates the syntax; it is not a required React setting

`omit` lists existing keys to remove. `replace` maps existing keys to PHP source expressions, represented as strings. Dotted keys address nested literal arrays. Rules cannot traverse a function call or other computed value. Missing keys, missing source files, unknown operations, and unregistered directory names in rules fail rather than silently doing nothing. Register a new skeleton by creating its directory and adding its name under `skeletons`; its `config/` directory is created by sync.

The tool parses PHP without executing it, preserving environment expressions, comments, and formatting. Omitting an entry removes its attached comments and any imports no longer used by the remaining config. The exact framework-only `// @phpstan-ignore class.notFound` comment is stripped from generated files; other comments and string contents are retained.
The tool parses PHP without executing it, preserving environment expressions, comments, and formatting. Omitting an entry removes its attached comments and any imports no longer used by the remaining config. The framework-only `// @phpstan-ignore class.notFound (...)` comment is stripped from generated files; other comments and string contents are retained.

Both sync and check reject unexpected skeleton config files before writing anything. When removing or renaming a framework config, remove its old skeleton copies too; the error lists any that remain.

Expand Down
2 changes: 1 addition & 1 deletion bin/sync-skeleton-config/sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ protected function transform(string $source, array $operations, string $context)
// App classes do exist in skeletons; this suppression is needed only when
// PHPStan analyzes the framework's defaults outside an application.
foreach (array_reverse(PhpToken::tokenize($source)) as $token) {
if ($token->id === T_COMMENT && trim($token->text) === '// @phpstan-ignore class.notFound') {
if ($token->id === T_COMMENT && str_starts_with($token->text, '// @phpstan-ignore class.notFound (')) {
$start = $token->pos;

while ($start > 0 && $source[$start - 1] === ' ') {
Expand Down
35 changes: 28 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,17 @@
"symfony/error-handler": "^8.1",
"symfony/event-dispatcher": "^8.1",
"symfony/finder": "^8.1",
"symfony/http-foundation": "^8.1",
"symfony/http-kernel": "^8.1",
"symfony/http-foundation": "^8.1.11",
"symfony/http-kernel": "^8.1.11",
"symfony/mailer": "^8.1",
"symfony/mime": "^8.1",
"symfony/polyfill-php85": "^1.36",
"symfony/polyfill-php86": "^1.36",
"symfony/process": "^8.1",
"symfony/property-access": "^8.1",
"symfony/psr-http-message-bridge": "^8.1",
"symfony/routing": "^8.1",
"symfony/serializer": "^8.1",
"symfony/routing": "^8.1.11",
"symfony/serializer": "^8.1.11",
"symfony/uid": "^8.1",
"symfony/var-dumper": "^8.1",
"symfony/yaml": "^8.1.11",
Expand All @@ -133,14 +133,15 @@
"mockery/mockery": "^1.6.15",
"opis/json-schema": "^2.6.0",
"pda/pheanstalk": "^8.0.2",
"phpstan/phpstan": "2.3.1",
"phpstan/phpstan": "^2.3.5",
"phpstan/phpstan-deprecation-rules": "^2.0.5",
"phpunit/phpunit": "~13.4.3",
"pusher/pusher-php-server": "^7.2",
"resend/resend-php": "^1.0",
"spomky-labs/cbor-php": "^3.4.1",
"swoole/ide-helper": "^6.0.2",
"symfony/filesystem": "^8.1",
"symfony/http-client": "^8.1",
"symfony/filesystem": "^8.1.11",
"symfony/http-client": "^8.1.11",
"symfony/mailgun-mailer": "^8.1",
"symfony/mercure": "^0.8",
"symfony/postmark-mailer": "^8.1",
Expand Down Expand Up @@ -205,6 +206,7 @@
"hypervel/passport": "self.version",
"hypervel/pennant": "self.version",
"hypervel/permission": "self.version",
"hypervel/phpstan": "self.version",
"hypervel/pipeline": "self.version",
"hypervel/process": "self.version",
"hypervel/prompts": "self.version",
Expand Down Expand Up @@ -302,6 +304,7 @@
"Hypervel\\Passport\\Database\\Factories\\": "src/passport/database/factories/",
"Hypervel\\Pennant\\": "src/pennant/src/",
"Hypervel\\Permission\\": "src/permission/src/",
"Hypervel\\PHPStan\\": "src/phpstan/src/",
"Hypervel\\Pipeline\\": "src/pipeline/src/",
"Hypervel\\Process\\": "src/process/src/",
"Hypervel\\Prompts\\": "src/prompts/src/",
Expand Down Expand Up @@ -370,6 +373,18 @@
"Workbench\\Database\\Factories\\": "src/testbench/workbench/database/factories/",
"Workbench\\Database\\Seeders\\": "src/testbench/workbench/database/seeders/"
},
"classmap": [
"tests/PHPStan/Integration/data",
"tests/PHPStan/Rules/Coroutine/data",
"tests/PHPStan/Rules/data",
"tests/PHPStan/Rules/Queue/data",
"tests/PHPStan/Rules/Validation/data",
"tests/PHPStan/Type/data",
"tests/PHPStan/Unit/data"
],
"exclude-from-classmap": [
"tests/PHPStan/**/*-fixed.php"
],
"files": [
"tests/Database/Fixtures/MigrationCreatorFakeMigration.php"
]
Expand Down Expand Up @@ -478,6 +493,7 @@
"check": [
"@check:skeleton-config",
"@test",
"@test:phpstan",
"@test:testbench",
"@test:dogfood",
"@analyse",
Expand All @@ -490,6 +506,7 @@
"@sync:skeleton-config",
"@analyse",
"@test:parallel",
"@test:phpstan",
"@test:testbench",
"@test:dogfood"
],
Expand Down Expand Up @@ -521,6 +538,10 @@
"Composer\\Config::disableProcessTimeout",
"paratest"
],
"test:phpstan": [
"Composer\\Config::disableProcessTimeout",
"paratest -c phpunit.phpstan.xml.dist"
],
"test:profile": [
"Composer\\Config::disableProcessTimeout",
"@php src/testing/bin/hypervel-test-profile"
Expand Down
Loading
Loading