Skip to content

Commit

Permalink
Add upgrading.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVanderbist committed Mar 4, 2022
1 parent d980012 commit 36ab964
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ All notable changes to `laravel-stats` will be documented in this file
### Breaking changes

- Changed visibility of `StatsQuery::for($model)->generatePeriods()` from `public` to `protected`
- Changed visibility of `StatsQuery::get()` from `public` to `protected`
- Changed visibility of `StatsQuery::getPeriodTimestampFormat()` from `public` to `protected`
- Replaced `StatsQuery::for($model)->getStatistic()` with `StatsQuery::for($model)->getAttributes()`
- Removed `BaseStats->createEvent()`

### Migrations

- Replace `StatsQuery::for(OrderStats::class)` with `OrderStats::query()`
- Replace `StatsEvent::TYPE_SET` use `DataPoint::TYPE_SET` instead
- Replace `StatsEvent::TYPE_CHANGE` use `DataPoint::TYPE_CHANGE` instead
- Replace `StatsEvent::TYPE_SET` with `DataPoint::TYPE_SET`
- Replace `StatsEvent::TYPE_CHANGE` with `DataPoint::TYPE_CHANGE`

## 1.0.1 - 2022-02-02

Expand Down
21 changes: 21 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Upgrading

If you come across any edge cases that this guide does not cover, please send in a PR!

## From v1 to v2

### Breaking changes

- Replaced `StatsQuery::for($model)->getStatistic()` with `StatsQuery::for($model)->getAttributes()`
- Removed `BaseStats->createEvent()`

- Changed visibility of `StatsQuery::for($model)->generatePeriods()` from `public` to `protected`
- Changed visibility of `StatsQuery::getPeriodTimestampFormat()` from `public` to `protected`

These methods are only used internally by the package. You can no longer use these methods in your own code.

### Migrations

- Replace `StatsQuery::for(OrderStats::class)` with `OrderStats::query()`
- Replace `StatsEvent::TYPE_SET` with `DataPoint::TYPE_SET`
- Replace `StatsEvent::TYPE_CHANGE` with `DataPoint::TYPE_CHANGE`

0 comments on commit 36ab964

Please sign in to comment.