From e9b4492621909d19f83a8ff4226e221e61188307 Mon Sep 17 00:00:00 2001 From: Reece-Carruthers <99188015+Reece-Carruthers@users.noreply.github.com> Date: Fri, 1 Nov 2024 10:24:23 +0000 Subject: [PATCH 1/2] TGP-2851: Update dependencies to latest versions --- app/handlers/ErrorHandler.scala | 16 ++++++++++------ app/views/ErrorTemplate.scala.html | 6 ++++-- app/views/FileManagementView.scala.html | 2 +- app/views/templates/Layout.scala.html | 2 +- project/AppDependencies.scala | 10 +++++----- project/plugins.sbt | 2 +- 6 files changed, 22 insertions(+), 16 deletions(-) diff --git a/app/handlers/ErrorHandler.scala b/app/handlers/ErrorHandler.scala index 6b7c766cf..a311aadb9 100644 --- a/app/handlers/ErrorHandler.scala +++ b/app/handlers/ErrorHandler.scala @@ -16,22 +16,26 @@ package handlers -import javax.inject.{Inject, Singleton} import play.api.i18n.{I18nSupport, MessagesApi} -import play.api.mvc.Request +import play.api.mvc.RequestHeader import play.twirl.api.Html import uk.gov.hmrc.play.bootstrap.frontend.http.FrontendErrorHandler import views.html.ErrorTemplate +import javax.inject.{Inject, Singleton} +import scala.concurrent.{ExecutionContext, Future} + @Singleton class ErrorHandler @Inject() ( val messagesApi: MessagesApi, view: ErrorTemplate -) extends FrontendErrorHandler +)(implicit val ec: ExecutionContext) + extends FrontendErrorHandler with I18nSupport { override def standardErrorTemplate(pageTitle: String, heading: String, message: String)(implicit - rh: Request[_] - ): Html = - view(pageTitle, heading, message) + request: RequestHeader + ): Future[Html] = + Future.successful(view(pageTitle, heading, message)) + } diff --git a/app/views/ErrorTemplate.scala.html b/app/views/ErrorTemplate.scala.html index 1459d7437..d11e55221 100644 --- a/app/views/ErrorTemplate.scala.html +++ b/app/views/ErrorTemplate.scala.html @@ -14,11 +14,13 @@ * limitations under the License. *@ +@import views.ViewUtils.titleNoForm + @this( - layout: templates.Layout +layout: templates.Layout ) -@(pageTitle: String, heading: String, message: String)(implicit request: Request[_], messages: Messages) +@(pageTitle: String, heading: String, message: String)(implicit request: RequestHeader, messages: Messages) @layout(pageTitle = titleNoForm(pageTitle)) {

@messages(heading)

diff --git a/app/views/FileManagementView.scala.html b/app/views/FileManagementView.scala.html index 1b101db36..dee630647 100644 --- a/app/views/FileManagementView.scala.html +++ b/app/views/FileManagementView.scala.html @@ -57,7 +57,7 @@

@table.caption

} } -

@viewModel.tgpRecordsLink

+

@viewModel.tgpRecordsLink

@viewModel.goBackHomeLink

} diff --git a/app/views/templates/Layout.scala.html b/app/views/templates/Layout.scala.html index c7d2b026e..10ed15b60 100644 --- a/app/views/templates/Layout.scala.html +++ b/app/views/templates/Layout.scala.html @@ -47,7 +47,7 @@ isFullWidth: Boolean = false, extraHead: Html = HtmlFormat.empty, headerShouldHaveServiceLink: Boolean = true - )(contentBlock: Html)(implicit request: Request[_], messages: Messages) + )(contentBlock: Html)(implicit request: RequestHeader, messages: Messages) @head = { diff --git a/project/AppDependencies.scala b/project/AppDependencies.scala index 172ea4289..b1802c2a2 100644 --- a/project/AppDependencies.scala +++ b/project/AppDependencies.scala @@ -2,21 +2,21 @@ import sbt._ object AppDependencies { - private val bootstrapVersion = "8.5.0" - private val hmrcMongoVersion = "1.8.0" + private val bootstrapVersion = "9.5.0" + private val hmrcMongoVersion = "2.3.0" val compile: Seq[ModuleID] = Seq( play.sbt.PlayImport.ws, - "uk.gov.hmrc" %% "play-frontend-hmrc-play-30" % "9.5.0", + "uk.gov.hmrc" %% "play-frontend-hmrc-play-30" % "11.2.0", "uk.gov.hmrc" %% "bootstrap-frontend-play-30" % bootstrapVersion, "uk.gov.hmrc.mongo" %% "hmrc-mongo-play-30" % hmrcMongoVersion, - "org.typelevel" %% "cats-core" % "2.3.0" + "org.typelevel" %% "cats-core" % "2.12.0" ) private val test = Seq( "uk.gov.hmrc" %% "bootstrap-test-play-30" % bootstrapVersion, "uk.gov.hmrc.mongo" %% "hmrc-mongo-test-play-30" % hmrcMongoVersion, - "org.scalatestplus" %% "scalacheck-1-17" % "3.2.17.0" + "org.scalatestplus" %% "scalacheck-1-17" % "3.2.18.0" ).map(_ % Test) def apply(): Seq[ModuleID] = compile ++ test diff --git a/project/plugins.sbt b/project/plugins.sbt index 075fc2e99..558b24de4 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -10,7 +10,7 @@ addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.22.0") addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.5.0") -addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.2") +addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.5") addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0" exclude ("org.scala-lang.modules", "scala-xml_2.12")) From ec8a109f867a502378d07ca5e91b8e4ffef400c8 Mon Sep 17 00:00:00 2001 From: Reece-Carruthers <99188015+Reece-Carruthers@users.noreply.github.com> Date: Fri, 1 Nov 2024 11:38:38 +0000 Subject: [PATCH 2/2] TGP-2851: Platops bot comment --- conf/application-json-logger.xml | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 conf/application-json-logger.xml diff --git a/conf/application-json-logger.xml b/conf/application-json-logger.xml deleted file mode 100644 index 6628cd691..000000000 --- a/conf/application-json-logger.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - -