Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: remove obsolete factory methods #1104

Merged

Conversation

vbreuss
Copy link
Member

@vbreuss vbreuss commented Mar 17, 2024

BREAKING CHANGE:
Removes the factory methods that were marked as obsolete in #906:

  • IDirectoryInfoFactory:
    • FromDirectoryName(string directoryName)
      Use IDirectoryInfoFactory.New(string) instead
  • IDriveInfoFactory
    • FromDriveName(string driveName)
      Use IDriveInfoFactory.New(string) instead
  • IFileInfoFactory
    • FromFileName(string fileName)
      Use IFileInfoFactory.New(string) instead
  • IFileStreamFactory
    • Create(string fileName, FileMode mode)
      Use IFileStreamFactory.New(string, FileMode) instead
    • Create(string path, FileMode mode, FileAccess access)
      Use IFileStreamFactory.New(string, FileMode, FileAccess) instead
    • Create(string path, FileMode mode, FileAccess access, FileShare share)
      Use IFileStreamFactory.New(string, FileMode, FileAccess, FileShare) instead
    • Create(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize)
      Use IFileStreamFactory.New(string, FileMode, FileAccess, FileShare, int) instead
    • Create(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options)
      Use IFileStreamFactory.New(string, FileMode, FileAccess, FileShare, int, FileOptions) instead
    • Create(string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, bool useAsync)
      Use IFileStreamFactory.New(string, FileMode, FileAccess, FileShare, int, bool) instead
    • Create(SafeFileHandle handle, FileAccess access)
      Use IFileStreamFactory.New(SafeFileHandle, FileAccess) instead
    • Create(SafeFileHandle handle, FileAccess access, int bufferSize)
      Use IFileStreamFactory.New(SafeFileHandle, FileAccess, int) instead
    • Create(SafeFileHandle handle, FileAccess access, int bufferSize, bool isAsync)
      Use IFileStreamFactory.New(SafeFileHandle, FileAccess, int, bool) instead
    • Create(IntPtr handle, FileAccess access)
      This method has been deprecated. Please use new Create(SafeFileHandle handle, FileAccess access) instead. http://go.microsoft.com/fwlink/?linkid=14202
    • Create(IntPtr handle, FileAccess access, bool ownsHandle)
      This method has been deprecated. Please use new Create(SafeFileHandle handle, FileAccess access) instead, and optionally make a new SafeFileHandle with ownsHandle=false if needed. http://go.microsoft.com/fwlink/?linkid=14202
    • Create(IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize)
      This method has been deprecated. Please use new Create(SafeFileHandle handle, FileAccess access, int bufferSize) instead, and optionally make a new SafeFileHandle with ownsHandle=false if needed. http://go.microsoft.com/fwlink/?linkid=14202
    • Create(IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize, bool isAsync)
      This method has been deprecated. Please use new Create(SafeFileHandle handle, FileAccess access, int bufferSize, bool isAsync) instead, and optionally make a new SafeFileHandle with ownsHandle=false if needed. http://go.microsoft.com/fwlink/?linkid=14202
  • IFileSystemWatcherFactory
    • CreateNew()
      Use IFileSystemWatcherFactory.New() instead
    • CreateNew(string path)
      Use IFileSystemWatcherFactory.New(string) instead
    • CreateNew(string path, string filter)
      Use IFileSystemWatcherFactory.New(string, string) instead

@vbreuss vbreuss changed the title feat!: remove obsoleted factory methods feat!: remove obsolete factory methods Mar 17, 2024
@vbreuss vbreuss merged commit 4733ab5 into TestableIO:main Mar 17, 2024
11 checks passed
Copy link

This is addressed in release v21.0.2.

@github-actions github-actions bot added the state: released Issues that are released label Mar 17, 2024
vbreuss added a commit to Testably/Testably.Abstractions that referenced this pull request Mar 17, 2024
Update `TestableIO.System.IO.Abstractions` to v21.0.2 and adapt
interface according to the breaking change in
TestableIO/System.IO.Abstractions#1104.
vbreuss added a commit to Testably/Testably.Abstractions.FluentAssertions that referenced this pull request Mar 29, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[Testably.Abstractions.Interface](https://github.com/Testably/Testably.Abstractions)
| `2.6.1` -> `3.0.0` |
[![age](https://developer.mend.io/api/mc/badges/age/nuget/Testably.Abstractions.Interface/3.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/nuget/Testably.Abstractions.Interface/3.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/nuget/Testably.Abstractions.Interface/2.6.1/3.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/nuget/Testably.Abstractions.Interface/2.6.1/3.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>Testably/Testably.Abstractions
(Testably.Abstractions.Interface)</summary>

###
[`v3.0.0`](https://github.com/Testably/Testably.Abstractions/releases/tag/v3.0.0)

#### Breaking Changes

- Rename namespace from
`Testably.Abstractions.Testing.FileSystemInitializer` to
`Testably.Abstractions.Testing.Initializer`
- Move static methods from `RandomProvider.Generator<T>` to
`RandomProvider.Generator`
-   Remove `PathSystemBase` from `Testably.Abstractions.Interface`
- Update `TestableIO.System.IO.Abstractions` to v21.0.2 and adapt
interface according to the breaking change in
[TestableIO/System.IO.Abstractions#1104
-   Make class `FileSystemWatcherMock` internal

#### What's Changed

- chore(deps): update testably.abstractions packages to v2.6.1 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#447
- chore(deps): update dependency xunit to v2.6.6 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#449
- chore(deps): update actions/cache action to v4 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#450
- chore(deps): update dependency testableio.system.io.abstractions to
v20.0.15 by [@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#451
- chore(deps): update nuget/setup-nuget action to v1.3.0 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#452
- chore(deps): update microsoft/setup-msbuild action to v2 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#453
- chore(deps): update nuget/setup-nuget action to v2 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#454
- chore(deps): update danielpalme/reportgenerator-github-action action
to v5.2.1 by [@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#455
- chore(deps): update dependency microsoft.net.test.sdk to v17.9.0 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#456
- chore(deps): update wandalen/wretry.action action to v1.4.4 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#457
- chore(deps): update dependency coverlet.collector to v6.0.1 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#459
- chore(deps): update xunit-dotnet monorepo by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#458
- chore(deps): update danielpalme/reportgenerator-github-action action
to v5.2.2 by [@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#461
- refactor: make `Execute` non-static by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#462
- refactor: fix sonar issues by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#463
- refactor: use non-static OS selector in tests by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#464
- chore(deps): update wandalen/wretry.action action to v1.4.5 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#465
- chore(deps): update dependency microsoft.codeanalysis.csharp to v4.9.2
by [@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#466
- refactor: cleanup inconsistent line endings by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#467
- chore(deps): update dependency minver to v5 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#469
- chore(deps): update wandalen/wretry.action action to v1.4.7 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#470
- chore(deps): update wandalen/wretry.action action to v1.4.8 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#472
- chore(deps): update dependency testableio.system.io.abstractions to
v20.0.28 by [@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#475
- chore(deps): update softprops/action-gh-release action to v2 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#473
- feat: add statistics by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#474
- fix: errors from static code analysis by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#477
- refactor: replace the dictionary in the statistics with an array by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#478
- docs: improve readme examples by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#480
- chore(deps): update wandalen/wretry.action action to v1.4.9 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#481
- chore(deps): update actions/checkout digest to
[`9bb5618`](https://github.com/Testably/Testably.Abstractions/commit/9bb5618)
by [@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#483
- chore(deps): update actions/checkout digest to
[`b4ffde6`](https://github.com/Testably/Testably.Abstractions/commit/b4ffde6)
by [@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#484
- chore(deps): update dependency coverlet.collector to v6.0.2 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#485
- chore(deps): update wandalen/wretry.action action to v1.4.10 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#486
- feat: add Api approval tests by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#482
- refactor: normalize line endings using `.gitattributes` by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#487
- chore(deps): update danielpalme/reportgenerator-github-action action
to v5.2.3 by [@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#488
- feat: add global.json to use latest SDK by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#479
- chore(deps): update dependency dotnet-sdk to v8.0.202 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#489
- chore(deps): update dependency dotnet-sdk to v8.0.203 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#490
- chore: Limit "renovate" to run only weekly by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#491
- feat: add statistics for property access by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#493
- fix: Install .NET on code upload step by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#494
- refactor: switch to sonar automatic analysis by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#496
- fix: sonar issues after activating automatic analysis by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#495
- refactor: adapt and execute cleanup by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#498
- fix: use latest stryker.net version by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#497
- refactor: adapt ReSharper File Layout to avoid Sonar issues during
cleanup by [@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#499
- fix: correctly match statistic paths by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#500
- refactor: extract extension methods from `Execute` by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#501
- feat: avoid arbitrary statistic calls by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#502
- coverage: add tests for `FileSystemWatcher` events by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#503
- fix: avoid statistic registrations on complex initializations by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#505
- refactor: exclude obsolete methods from code coverage by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#504
- chore!: update `TestableIO.System.IO.Abstractions` to v21.0.2 by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#506
- feat: remove obsolete class `PathSystemBase` by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#507
- refactor: simplify changing the test settings by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#508
- chore(deps): update dependency nunit.analyzers to v4.1.0 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#510
- chore(deps): update dependency newtonsoft.json to v13.0.3 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#509
- feat: include skip message for long running tests by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#511
- docs: add license scan report and status by
[@&#8203;fossabot](https://github.com/fossabot) in
[Testably/Testably.Abstractions#512
- feat: enable/disable brittle tests via test settings by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#514
- fix: add lock file to directory cleaner by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#515
- feat: add retry also to .NET Framework tests by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#517
- feat: add `Meziantou.Analyzer` by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#519
- fix: disable build warning CS0436 in
`Testably.Abstractions.Testing.Tests` by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#516
- refactor: remove `.ConfigureAwait` in tests by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#520
- refactor: dispose of `ManualResetEventSlim` by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#518
- coverage: avoid skipping brittle tests in `FileSystemWatcher` by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#521
- chore(deps): update danielpalme/reportgenerator-github-action action
to v5.2.4 by [@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#523
- chore(deps): update dependency meziantou.analyzer to v1.0.758 by
[@&#8203;renovate](https://github.com/renovate) in
[Testably/Testably.Abstractions#524
- fix: do not adjust LastAccessTime in `FileStream.EndRead` by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#522
- coverage: add missing tests by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#525
- feat: collect coverage information for .NET Framework by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#526
- fix: Report Generator does not support mixing .NET Framework and .NET
Core by [@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#527
- feat: Enable Stryker CI-Build by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#528
- fix: support search pattern with subdirectories when enumerating a
directory by [@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#529
- fix: support three-character file extension as search pattern in .NET
Framework by [@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#530
- fix: dependency error in release.yml by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#531
- fix: catch `ObjectDisposedException` in tests by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#532
- refactor: catch `ObjectDisposedException` in `TimerMockTests` by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#533
- fix: use latest Stryker version in release pipeline by
[@&#8203;vbreuss](https://github.com/vbreuss) in
[Testably/Testably.Abstractions#534

#### New Contributors

- [@&#8203;fossabot](https://github.com/fossabot) made their first
contribution in
[Testably/Testably.Abstractions#512

**Full Changelog**:
Testably/Testably.Abstractions@v2.6.1...v3.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/Testably/Testably.Abstractions.FluentAssertions).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Valentin Breuß <vbreuss@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: released Issues that are released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant