You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2f4e95f
Browse filesBrowse the repository at this point in the historyBrowse files
fix(adapter): stop hasFeature() claiming the adapter implements the feature
hasFeature() carried @phpstan-assert-if-true T $this, telling every caller
that a true answer means the adapter is an instance of the Feature
interface. Pool answers for the adapter it borrows without implementing any
Feature interface, so code trusting that narrowing reached for instanceof,
which is false on a pool and refused spatial indexes when migrating into
Appwrite. The assertion is gone from the public method and the Capability
docblock now says to ask hasFeature(), not instanceof.
Database still calls Feature methods after asking, so it narrows its own
adapter through a private adapterHasFeature(); that holds because Pool
declares every Feature method. A PHPStan type-inference test pins that
hasFeature() no longer narrows an Adapter or a Pool.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments