Skip to content

Commit

Permalink
Update changelogs
Browse files Browse the repository at this point in the history
  • Loading branch information
Romfos committed Sep 14, 2024
1 parent d16e8db commit a76dcdc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
23 changes: 15 additions & 8 deletions BreakingChanges.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
6.0.0 Release
================

Update target frameworks: .NET 8, .NET Standard 2.0.
Obsolete api is removed
CompatArg is marked as obsolete

5.0.0 Release
================

Expand Down Expand Up @@ -91,7 +98,7 @@ Workaround: Use `NSubstitute.Received.InOrder`.

Signed v3.x package to fix libraries that work with a mix of NSubstitute verisons. See #324.

3.0.0 Release
3.0.0 Release
================

NOTE: unsigned. Fixed in 3.0.1.
Expand All @@ -108,15 +115,15 @@ Standard 1.3 compatible target such as .NET 4.6 or later. See compatibility matr
https://github.com/dotnet/standard/blob/master/docs/versions.md


1.10.0 Release
1.10.0 Release
================

Substitutes will now automatically return an empty `IQueryable<T>` for
members that return that type. Tests previously relying on a
substitute `IQueryable<T>` will no longer work properly.

Reason:
- Code that uses an `IQueryable<T>` can now run using the auto-subbed
- Code that uses an `IQueryable<T>` can now run using the auto-subbed
value without causing null pointer exceptions (see issue #67).

Fix:
Expand All @@ -128,10 +135,10 @@ to return a real `IQueryable<T>` instead. If a substitute is required, explicitl
```


1.9.1 Release
1.9.1 Release
================

Substitutes set up to throw exception for methods with return type Task<T>
Substitutes set up to throw exception for methods with return type Task<T>
cause compilation to fail due to the call being ambiguous (CS0121).
"The call is ambiguous between the following methods or properties:
`.Returns<Task<T>>` and `.Returns<T>`"
Expand All @@ -146,7 +153,7 @@ Fix:

New: `sub.Method().Returns<string>(x => { throw new Exception() });`

1.8.0 Release
1.8.0 Release
================

Incorrect use of argument matchers outside of a member call, particularly within a
Expand Down Expand Up @@ -214,7 +221,7 @@ Fix:

---------------

In rare cases the new `Returns()` and `ReturnsForAnyArgs()` overloads can cause compilation to fail due to the call being ambiguous (CS0121).
In rare cases the new `Returns()` and `ReturnsForAnyArgs()` overloads can cause compilation to fail due to the call being ambiguous (CS0121).

Reason:
- The new overloads allow a sequence of callbacks to be used for return values. A common example is return several values, then throwing an exception.
Expand All @@ -229,7 +236,7 @@ Fix:
Auto-substitute from substitutes of `Func` delegates (following the same rules as auto-subbing for methods and properties). So the delegate returned from `Substitute.For<Func<IFoo>>()` will return a substitute of `IFoo`. This means some substitutes for delegates that used to return null will now return a new substitute.

Reason:
- Reduced setup when substituting for `Func` delegates, and consistency with behaviour for properties and methods.
- Reduced setup when substituting for `Func` delegates, and consistency with behaviour for properties and methods.

Fix:
- Explicitly return null from substitute delegates when required for a test.
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
### 6.0.0

* [UPDATE] Update target frameworks: .NET8, .NET Standard 2.0
* [UPDATE] Drop EOL .NET 6/7 platforms from testing matrix
* [UPDATE] Update github actions steps versions
* [UPDATE] Remove legacy obsolete API
* [UPDATE] Mark as obsolete api CompatArg with pre c# 7.0 support

### 5.2.0 (Apr 2024)

* [UPDATE] Upgrade website build to jekyll 3.9.0 and add link to edit website pages (#767, #769; thanks to @brad)
Expand All @@ -22,7 +30,7 @@ Many thanks to @alexandrnikitin, @Romfos, @brad, and @304NotModified for their c

### 4.4.0 (Jul 2022)

* [FIX] Fix issue checking for constructor args on null object. Thanks to @phongphanq, and @appel1! Thanks also to
* [FIX] Fix issue checking for constructor args on null object. Thanks to @phongphanq, and @appel1! Thanks also to
@Mandroide for code review. (#683, #685)
* [UPDATE] Update to Castle Core v5. Thanks @Havunen! (#690, #673)
* [NEW] Add `.ThrowsAsync()` that will correctly mock exception on async methods. Thanks @Socolin! (#609, #663)
Expand Down

0 comments on commit a76dcdc

Please sign in to comment.