Mark deprecated features for v2.0 removal with deprecation warnings#75
Open
peterfox wants to merge 3 commits into
Open
Mark deprecated features for v2.0 removal with deprecation warnings#75peterfox wants to merge 3 commits into
peterfox wants to merge 3 commits into
Conversation
Mark the five APIs removed in v2.0 with @deprecated docblocks and E_USER_DEPRECATED trigger_error() calls so users upgrading from 1.x receive runtime and static-analysis notice of what needs to change: - SubscribableApplicationServiceProvider — replaced by a published plain stub - Subscriber::userModel() — replaced by polymorphic URL-based model resolution - SubscriberMailChannel — replaced by SubscribableMailMessage::via() explicit opt-in - CheckSubscriptionStatusBeforeSendingNotifications — tied to SubscriberMailChannel - CheckNotifiableSubscriptionStatus — tied to SubscriberMailChannel Each deprecation message links to the relevant section of UPGRADE.md.
…ecation SubscribableServiceProvider references SubscriberMailChannel::class to bind it in the container. The class is intentionally deprecated for v2.0, so the resulting phpstan-deprecation-rules error is expected and should be silenced via the baseline rather than removed.
- Add @deprecated inline tag to the Subscriber facade's userModel() @method docblock so IDEs surface the deprecation when called via the facade - Add deprecation comment to the SubscribableServiceProvider stub so users who publish it get an immediate hint to migrate to the v2 plain-stub approach
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds deprecation notices to several features that will be removed in v2.0, guiding users toward the recommended upgrade path. Each deprecated component now includes both PHPDoc annotations and runtime deprecation warnings via
trigger_error().Key Changes
boot()methodSubscribableMailMessage::via()instead of automatic unsubscribe-link injectionSubscribableMailMessage::via()SubscribableMailMessage::via()Implementation Details
E_USER_DEPRECATEDto allow users to control handling via error reporting configurationUPGRADE.mdfor detailed migration guidancehttps://claude.ai/code/session_01MsY3G5SB16WXTcZGkMb7FX