Skip to content

Add new subscriptions list, connect and disconnect#153

Merged
wscourge merged 1 commit intomainfrom
wiktor/ome-417-add-support-for-subscription-connections-via
Jan 6, 2026
Merged

Add new subscriptions list, connect and disconnect#153
wscourge merged 1 commit intomainfrom
wiktor/ome-417-add-support-for-subscription-connections-via

Conversation

@wscourge
Copy link
Contributor

@wscourge wscourge commented Dec 26, 2025

Deprecated Methods:

  • Subscription::all() - triggers E_USER_DEPRECATED warning
  • Subscription::connect() - triggers E_USER_DEPRECATED warning
  • Subscription::disconnect() - triggers E_USER_DEPRECATED warning

New Methods in ChartMogul\Metrics\Customers\Subscription:

  • connect($dataSourceUUID, $customerUUID, array $subscriptions) - accepts only Metrics\Customers\Subscription instances
  • disconnect($dataSourceUUID, $customerUUID, array $subscriptions) - accepts only Metrics\Customers\Subscription instances

@wscourge wscourge requested a review from Copilot December 26, 2025 10:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR deprecates existing subscription methods and introduces new recommended static methods for connecting and disconnecting subscriptions, promoting better API design with static factory methods in the Metrics namespace.

Key Changes:

  • Deprecated Subscription::all(), connect(), and disconnect() instance methods
  • Added new static connect() and disconnect() methods to Metrics\Customers\Subscription
  • Updated documentation to reflect recommended usage patterns

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/Subscription.php Deprecated all(), connect(), and disconnect() methods with appropriate warnings
src/Metrics/Customers/Subscription.php Added new static connect() and disconnect() methods as replacements
README.md Updated documentation to show recommended vs deprecated usage patterns

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@wscourge wscourge force-pushed the wiktor/ome-417-add-support-for-subscription-connections-via branch from 525aea3 to d156e68 Compare December 29, 2025 10:51
@wscourge wscourge requested a review from swember December 31, 2025 11:52
@wscourge wscourge merged commit d825071 into main Jan 6, 2026
6 checks passed
@wscourge wscourge deleted the wiktor/ome-417-add-support-for-subscription-connections-via branch January 6, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants