Support versioned extension stub maps - #1887
Conversation
ceee94b to
dbb2d83
Compare
|
Ivan Fedorov (@isfedorov) what can I do to move this forward |
|
Simon Podlipsky (@simPod) there are a couple of things:
|
|
So long as I do wonder however what is the expected behaviour there if a symbol is found for either versions, especially in the case where its definition changes from a version to another. |
dbb2d83 to
cc81422
Compare
|
For example, This lets consumers use the installed extension version to select the correct definition. The existing |
There was a problem hiding this comment.
Pull request overview
Adds version-aware extension stub maps while preserving existing flat-map behavior.
Changes:
- Detects version-suffixed extension directories.
- Generates versioned and default symbol maps.
- Regenerates the map and checks for the new constant.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/Framework/Tools/generate-stubs-map.php |
Generates version-aware maps. |
PhpStormStubsMap.php |
Adds Couchbase and DS version mappings. |
tests/StubsStructureValidatorTest.php |
Checks that the new constant is generated. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| self::assertStringContainsString('const CLASSES', $generated); | ||
| self::assertStringContainsString('const FUNCTIONS', $generated); | ||
| self::assertStringContainsString('const CONSTANTS', $generated); | ||
| self::assertStringContainsString('const EXTENSION_VERSIONS', $generated); |
1eb8ae2
into
JetBrains:master
Summary
PhpStormStubsMap::EXTENSION_VERSIONSmap for extension directories with suffixes likeds_v2andcouchbase_v2.CLASSES,FUNCTIONS, andCONSTANTSmaps backward-compatible by continuing to point them at default extension stubs.PhpStormStubsMap.phpso consumers can select versioned extension symbols, such asDs\\Seqfromds_v2, without losing the existing defaultdsmap.