Sync upstream updates: Larastan 4.x, passkey handles and icons, Socialite redirects and Reverb pruning

Merged
BI
1d ago
+1769-876

Upstream Updates

  • larastan/larastan@b16f111b9b, larastan/larastan@019c982191 — Port the migration cache tests for a cache directory that can't be used and for a disabled cache. Hypervel never removed the enableMigrationCache flag, so the source is unchanged.
  • larastan/larastan@352271a10c — Check dispatch() arguments by giving PHPStan a virtual new of the job class through NodeCallbackInvoker, instead of calling PHPStan's internal parameter check. The arguments now get the same checks and messages as a written new, including deprecated classes and classes without a constructor.
  • larastan/larastan@1f708145e0, larastan/larastan@c34391e87a, larastan/larastan@43d8c86032, larastan/larastan@541d1bf8aa, larastan/larastan@872c94c107 — Merge the version-specific type fixtures into their base files, as Larastan did when it dropped older Laravel versions, and port the Arrayable and translator cases. Hypervel supports one framework version and its trans() already declares the concrete translator, so the source already matched.
  • laravel/passkeys-server#42 — Return passkey user handles as 64 hex characters instead of binary. Some platforms, including iOS Safari, read binary handles as UTF-8 text and send back a corrupted handle, so sign-in failed. Handles stored earlier still verify, and a handle that no longer matches its credential asks the user to register the passkey again instead of causing a server error.
  • laravel/passkeys-server#17 — Add light and dark authenticator icons through Aaguids::iconFor() and two Passkey accessors. The icons ship in a generated resource file that loads the first time an icon is requested. The sync script also rejects icons that aren't SVG data URIs.
  • laravel/passkeys-server#27 — Pass every passkey validation message through __() so it can be translated.
  • laravel/socialite#799 — Resolve relative OAuth redirect URLs against app.url instead of the request's host, so a forged Host header can't change the redirect_uri sent to the provider. Network-path redirects such as //evil.test are resolved the same way, and app.url must be an absolute HTTP or HTTPS URL.
  • laravel/reverb#421 — Port the Redis message handler failure test. Hypervel already rejected payloads it couldn't encode before publishing, and kept reading after a handler failed.
  • laravel/reverb#422, laravel/reverb#419 — Dispatch ConnectionPruned with the pruned connection's subscription, preferring one with presence data, so listeners can see which user was pruned. The connection registry isn't needed: Hypervel's ping and prune jobs already check every open connection, including ones without subscriptions. The integration test server now runs the real ping and prune jobs, and the tests for unsubscribed connections, the connection quota and closing rejected connections are ported.

Additional Hypervel changes

  • Check dispatchAfterResponse() arguments as the dispatch() call it makes from inside the class. A job class that defines its own dispatch() now decides those arguments, and a job that only changes the trait's dispatch() visibility is still checked against its constructor. The rule used to report valid calls on such classes and miss invalid ones.
  • Infer the same type for trans() and __() whether the key is passed directly, in a non-empty unpacked list, or by name in an unpacked array that always has it. Unpacked keys used to get a stricter type than a direct key, and an always-empty unpack before the key made it look missing.
  • Ignore a user_id in the subscription data a client sends for a public Reverb channel. That data isn't signed, and pruning and user termination identify connections by user_id, so a client could name another user in ConnectionPruned events or keep its own user's connections from being terminated. Private and presence channels are unchanged, and other metadata is kept.
  • Translate the two passkey verification messages that were left untranslated.
  • Make every member of Passport's cache configuration optional, as Sanctum's already are. A partial record such as ['enabled' => true] used to fail at startup. Omitting enabled now disables caching, and an omitted store, TTL or prefix uses the default cache store, 300 seconds or passport. Invalid values still fail. Passport::cacheEnabled() and Sanctum::cacheEnabled() now own each package's enabled check.

[!NOTE]

Sync upstream: passkey icons and ASCII handles, Socialite redirect validation, Reverb pruning

  • Adds AAGUID authenticator icon lookups for light and dark themes in Aaguids.php, exposed via Passkey accessors but omitted from default serialization. The sync script now publishes a separate icon resource file.
  • Changes passkey user handles to 64-character hexadecimal HMACs instead of raw binary, and translates all passkey error messages at the call site rather than in InvalidPasskeyException::make.
  • SocialiteManager::formatRedirectUrl now builds relative redirects from app.url only when it is a valid absolute HTTP(S) URL, and throws InvalidArgumentException otherwise.
  • PruneStaleConnections now requires a ChannelManager and includes existing subscription user data in ConnectionPruned events.
  • Reworks the dispatch PHPStan rule to delegate to PHPStan's own call checks and consolidates version-specific type test fixtures; __() and trans() helpers now infer unpacked and named arguments.
  • Risk: PruneStaleConnections::handle signature changed (new required ChannelManager argument) and passkey handles derived from PasskeyAuthenticatable::getPasskeyUserHandle are no longer binary — stored raw-binary handles are still accepted at verification, but out-of-tree callers of either should be checked. InvalidPasskeyException::make no longer translates supplied messages.

Macroscope summarized 4b31281.

Summary by CodeRabbit

  • New Features
    • Passkeys now provide light- and dark-theme authenticator icons, which can be explicitly included in serialized passkey data.
  • Bug Fixes
    • Passkey user handles now use hexadecimal encoding, helping prevent corruption on systems that mishandle binary data.
    • Relative Socialite redirects now use the configured application URL and reject invalid or missing origins.
    • Reverb pruning now preserves user details when reporting stale connections.
  • Documentation
    • Clarified passkey handle requirements, authenticator icons, cache defaults, and redirect URL configuration.