Skip to content

Commit 9d3b3bf

Browse files
authored
Merge pull request #139 from LBHackney-IT/dotnet-8-update
.Net 8 upgrade
2 parents ffb6762 + 8b97825 commit 9d3b3bf

23 files changed

+39
-30
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ executors:
1414
- image: hashicorp/terraform:latest
1515
docker-dotnet:
1616
docker:
17-
- image: mcr.microsoft.com/dotnet/sdk:6.0
17+
- image: mcr.microsoft.com/dotnet/sdk:8.0
1818

1919
references:
2020
workspace_root: &workspace_root "~"

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
.PHONY: setup
22
setup:
3-
docker-compose build
3+
docker compose build
44

55
.PHONY: build
66
build:
7-
docker-compose build SingleViewApi
7+
docker compose build SingleViewApi
88

99
.PHONY: serve
1010
serve:
11-
docker-compose build SingleViewApi && docker-compose up SingleViewApi
11+
docker compose build SingleViewApi && docker compose up SingleViewApi
1212

1313
.PHONY: shell
1414
shell:
15-
docker-compose run SingleViewApi bash
15+
docker compose run SingleViewApi bash
1616

1717
.PHONY: test
1818
test:
19-
docker-compose up test-database & docker-compose build SingleViewApi-test && docker-compose up SingleViewApi-test
19+
docker compose up test-database & docker compose build SingleViewApi-test && docker compose up SingleViewApi-test
2020

2121
.PHONY: test-db
2222
test-db:
23-
docker-compose up test-database
23+
docker compose up test-database
2424

2525
.PHONY: lint
2626
lint:
@@ -33,4 +33,4 @@ restart-db:
3333
docker stop $$(docker ps -q --filter ancestor=test-database -a)
3434
-docker rm $$(docker ps -q --filter ancestor=test-database -a)
3535
docker rmi test-database
36-
docker-compose up -d test-database
36+
docker compose up -d test-database

SingleViewApi.Tests/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:6.0
1+
FROM mcr.microsoft.com/dotnet/sdk:8.0
22

33
# disable microsoft telematry
44
ENV DOTNET_CLI_TELEMETRY_OPTOUT='true'

SingleViewApi.Tests/SingleViewApi.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<PropertyGroup>
3-
<TargetFramework>net6.0</TargetFramework>
3+
<TargetFramework>net8.0</TargetFramework>
44

55
<IsPackable>false</IsPackable>
66
<IsTestProject>true</IsTestProject>
@@ -19,14 +19,14 @@
1919
<PrivateAssets>all</PrivateAssets>
2020
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2121
</PackageReference>
22-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="3.1.4" />
22+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.11" />
2323
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.3" />
2424
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.5">
2525
<PrivateAssets>all</PrivateAssets>
2626
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2727
</PackageReference>
2828
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
29-
<PackageReference Include="Newtonsoft.Json" Version="13.0.2-beta1" />
29+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
3030
<PackageReference Include="NUnit3TestAdapter" Version="3.12.0" />
3131
<PackageReference Include="Bogus" Version="25.0.4" />
3232
<PackageReference Include="Moq" Version="4.16.1" />

SingleViewApi.Tests/V1/Controllers/BaseControllerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void GetCorrelationShouldThrowExceptionIfCorrelationHeaderUnavailable()
4141
public void GetCorrelationShouldReturnCorrelationIdWhenExists()
4242
{
4343
// Arrange
44-
_stubHttpContext.Request.Headers.Add(HeaderConstants.CorrelationId, "123");
44+
_stubHttpContext.Request.Headers.Append(HeaderConstants.CorrelationId, "123");
4545

4646
// Act
4747
var result = _sut.GetCorrelationId();

SingleViewApi/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:6.0
1+
FROM mcr.microsoft.com/dotnet/sdk:8.0
22

33
ARG LBHPACKAGESTOKEN
44
ENV LBHPACKAGESTOKEN=$LBHPACKAGESTOKEN

SingleViewApi/SingleViewApi.csproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
</PropertyGroup>
66
<PropertyGroup>
77
<GenerateDocumentationFile>true</GenerateDocumentationFile>
@@ -12,8 +12,10 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Amazon.Lambda.AspNetCoreServer" Version="5.1.1" />
15+
<PackageReference Include="Amazon.Lambda.AspNetCoreServer" Version="8.1.1" />
1616
<PackageReference Include="AngleSharp" Version="1.0.0-alpha-844" />
17+
<PackageReference Include="Asp.Versioning.Mvc" Version="8.1.0" />
18+
<PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="8.1.0" />
1719
<PackageReference Include="AspectInjector" Version="2.5.0" />
1820
<PackageReference Include="AWSSDK.DynamoDBv2" Version="3.7.0.21" />
1921
<PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="3.7.0.1" />
@@ -30,10 +32,8 @@
3032
<PackageReference Include="Hackney.Shared.ContactDetail" Version="0.5.0" />
3133
<PackageReference Include="Hackney.Shared.Person" Version="0.12.0" />
3234
<PackageReference Include="Microsoft.AspNetCore.HealthChecks" Version="1.0.0" />
33-
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.5" />
34-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="4.1.1" />
35-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="4.1.1" />
36-
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.0-preview1.22310.1">
35+
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.11" />
36+
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
3737
<PrivateAssets>all</PrivateAssets>
3838
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3939
</PackageReference>
@@ -42,13 +42,13 @@
4242
<PrivateAssets>all</PrivateAssets>
4343
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4444
</PackageReference>
45-
<PackageReference Include="Newtonsoft.Json" Version="13.0.2-beta1" />
45+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
4646
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.4" />
4747
<PackageReference Include="ServiceStack.Redis" Version="6.0.2" />
4848
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.4.1" />
4949
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="5.4.1" />
5050
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="5.4.1" />
51-
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="5.4.1" />
51+
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.2.0" />
5252
</ItemGroup>
5353

5454
<ItemGroup>

SingleViewApi/Startup.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
using SingleViewApi.Versioning;
1212
using Microsoft.AspNetCore.Builder;
1313
using Microsoft.AspNetCore.Hosting;
14-
using Microsoft.AspNetCore.Mvc;
15-
using Microsoft.AspNetCore.Mvc.ApiExplorer;
16-
using Microsoft.AspNetCore.Mvc.Versioning;
14+
using Asp.Versioning;
15+
using Asp.Versioning.ApiExplorer;
1716
using Microsoft.EntityFrameworkCore;
1817
using Microsoft.Extensions.Configuration;
1918
using Microsoft.Extensions.DependencyInjection;

SingleViewApi/V1/Controllers/AcademyController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using Microsoft.AspNetCore.Http;
55
using Microsoft.AspNetCore.Mvc;
66
using Microsoft.Extensions.Logging;
7+
using Asp.Versioning;
78

89
namespace SingleViewApi.V1.Controllers
910
{

SingleViewApi/V1/Controllers/CombinedSearchController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using Microsoft.AspNetCore.Mvc;
55
using SingleViewApi.V1.Boundary.Response;
66
using SingleViewApi.V1.UseCase.Interfaces;
7+
using Asp.Versioning;
78

89
namespace SingleViewApi.V1.Controllers
910
{

0 commit comments

Comments
 (0)