Skip to content

Commit 5630d2b

Browse files
chore: Add README and Deprecation notice to DependencyInjection library (#530)
* Add README to DependencyInjection library * Add deprecation notice in README * Ensure release-please-config includes extra readme file Signed-off-by: Kyle Julian <[email protected]> * Update README to specify v2.9 in deprecated notice Signed-off-by: Kyle Julian <[email protected]> --------- Signed-off-by: Kyle Julian <[email protected]>
1 parent 5777d0e commit 5630d2b

File tree

3 files changed

+51
-1
lines changed

3 files changed

+51
-1
lines changed

release-please-config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"versioning": "default",
99
"extra-files": [
1010
"build/Common.prod.props",
11-
"README.md"
11+
"README.md",
12+
"src/OpenFeature.DependencyInjection/README.md"
1213
]
1314
}
1415
},

src/OpenFeature.DependencyInjection/OpenFeature.DependencyInjection.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<ItemGroup>
1818
<InternalsVisibleTo Include="$(AssemblyName).Tests" />
1919
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
20+
<None Include="../../README.md" Pack="true" PackagePath="/" />
2021
</ItemGroup>
2122

2223
</Project>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# OpenFeature.DependencyInjection
2+
3+
> **⚠️ DEPRECATED**: This library is now deprecated. The OpenTelemetry Dependency Injection library has been moved to the OpenFeature Hosting integration in version 2.9.0.
4+
5+
OpenFeature is an open standard for feature flag management, created to support a robust feature flag ecosystem using cloud native technologies. OpenFeature will provide a unified API and SDK, and a developer-first, cloud-native implementation, with extensibility for open source and commercial offerings.
6+
7+
## Migration Guide
8+
9+
If you are using `OpenFeature.DependencyInjection`, you should migrate to the `OpenFeature.Hosting` package. The hosting package provides the same functionality but in one package.
10+
11+
### 1. Update dependencies
12+
13+
Remove this package:
14+
15+
```xml
16+
<PackageReference Include="OpenFeature.DependencyInjection" Version="..." />
17+
```
18+
19+
Update or install the latest `OpenFeature.Hosting` package:
20+
21+
```xml
22+
<PackageReference Include="OpenFeature.Hosting" Version="2.9.0" />
23+
```
24+
25+
### 2. Update your `Program.cs`
26+
27+
Remove the `AddHostedFeatureLifecycle` method call.
28+
29+
#### Before
30+
31+
```csharp
32+
builder.Services.AddOpenFeature(featureBuilder =>
33+
{
34+
featureBuilder
35+
.AddHostedFeatureLifecycle();
36+
37+
// Omit for code brevity
38+
});
39+
```
40+
41+
#### After
42+
43+
```csharp
44+
builder.Services.AddOpenFeature(featureBuilder =>
45+
{
46+
// Omit for code brevity
47+
});
48+
```

0 commit comments

Comments
 (0)