Skip to content

Commit 559e223

Browse files
authored
docs(release): 1.0.0 (#42)
1 parent f8fba97 commit 559e223

File tree

4 files changed

+53
-8
lines changed

4 files changed

+53
-8
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88
99
Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx&utm_medium=paddle-php-sdk) for information about changes to the Paddle Billing platform, the Paddle API, and other developer tools.
1010

11+
## [1.0.0] - 2024-02-20
12+
13+
### Changed
14+
15+
- Migrated away from native enums to reduce the risk of breaking changes
16+
- Made entities consistent with `array<Entity>` usage where Collections were used instead
17+
- Notification classes are split from main API classes to allow for long term backwards compatability
18+
- Subscription item `price` re-uses the `Price` entity
19+
- Dropped `@internal` on most entities to prevent IDE warnings, utilising private constructors instead
20+
- Events now utilise their type specific classes
21+
22+
### Added
23+
24+
- Update resume subscription `effective_from` field to accept RFC 3339 datetime or `immediately`
25+
- Subscription notifications support newly added price object fields
26+
1127
## [0.3.0] - 2024-02-13
1228

1329
### Added

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/01-ba
3131
require_once 'vendor/autoload.php';
3232
```
3333

34-
## Before you begin
35-
36-
If you've used this SDK, we'd love to hear how you found it! Email us at [[email protected]](mailto:[email protected]) with any thoughts.
37-
38-
While in early access, we may introduce breaking changes. Where we can, we'll tag breaking changes and communicate ahead of time.
39-
4034
## Usage
4135

4236
To authenticate, you'll need an API key. You can create and manage API keys in **Paddle > Developer tools > Authentication**.

UPGRADING.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,41 @@
22

33
All breaking changes prior to v1 will be documented in this file to assist with upgrading.
44

5+
## v1.0.0
6+
7+
Upgrading to this version introduces 4 changes that may require action
8+
9+
1. Migrated away from native enums to reduce the risk of breaking changes
10+
11+
If your implementation utilises any of the Enums defined in the Paddle SDK you will have to update their usage.
12+
13+
For example:
14+
`Status::Active` => `Status::Active()`
15+
`$status === Status::Active` => `$status->equals(Status::Active())`
16+
17+
2. Made entities consistent with `array<Entity>` usage where Collections were used instead
18+
19+
There was some inconsistent typing for Entities that had properties consisting of a collection of another Entity. These fields
20+
shouldn't impact usage of those properties but if you relied on any of the following types you will face breakages.
21+
22+
- `\Paddle\SDK\Entities\NotificationSetting` field `subscribedEvents` was `EventTypeCollection` and is now `array<EventType>`
23+
- `\Paddle\SDK\Entities\Product` field `prices` was `PriceCollection` and is now `array<Price>`
24+
25+
3. Subscription item `price` re-uses the `Price` entity
26+
27+
The `\Paddle\SDK\Entities\Subscription\SubscriptionItem` `price` field type has changed to the main entity `\Paddle\SDK\Entities\Price`.
28+
29+
Any previous type hints for `\Paddle\SDK\Entities\Subscription\SubscriptionPrice` should be updated accordingly.
30+
31+
4. Dropped `@internal` on most entities to prevent IDE warnings, utilising private constructors instead
32+
33+
In the last major update we made change we introduced `@internal` doc blocks for entities which were hydrated from API responses.
34+
35+
We noticed these started to highlight properties using constructor property promotion being highlighted as internal which wasn't the intention.
36+
37+
We've dropped the `@internal` doc block and been stricter with private constructors. If you had relied on instantiating these entities directly
38+
you may face breakages. This was not intentionally part of the public API for the package and thus has been restricted moving forward.
39+
540
## v0.3.0
641

742
This version introduces several breaking changes.
@@ -55,7 +90,7 @@ Any typing of the following classes should be updated accordingly:
5590

5691
The type has changed when creating an Adjustment using the `CreateAdjustment` operation. To create an Adjustment you must now use the `\Paddle\SDK\Resources\Adjustments\Operations\Create\AdjustmentItem` instance for `items`.
5792

58-
- Core entities (classes implementing `Entity`) are marked @internal and constructors are `protected`
93+
- Core entities (classes implementing `Entity`) are marked `@internal` and constructors are `protected`
5994

6095
Any direct usage of these classes is not supported functionality by the SDK and has been removed to reduce the surface area for breaking changes.
6196

src/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
class Client
5353
{
54-
private const SDK_VERSION = '0.3.0';
54+
private const SDK_VERSION = '1.0.0';
5555

5656
public readonly LoggerInterface $logger;
5757
public readonly Options $options;

0 commit comments

Comments
 (0)