Skip to content

Commit

Permalink
Merge pull request #546 from hmrc/TGP-2851
Browse files Browse the repository at this point in the history
TGP-2851: Update dependencies to latest versions
  • Loading branch information
Reece-Carruthers authored Nov 1, 2024
2 parents d079c2a + ec8a109 commit b306921
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 28 deletions.
16 changes: 10 additions & 6 deletions app/handlers/ErrorHandler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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))

}
6 changes: 4 additions & 2 deletions app/views/ErrorTemplate.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
<h1 class="govuk-heading-xl">@messages(heading)</h1>
Expand Down
2 changes: 1 addition & 1 deletion app/views/templates/Layout.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {

Expand Down
13 changes: 0 additions & 13 deletions conf/application-json-logger.xml

This file was deleted.

10 changes: 5 additions & 5 deletions project/AppDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ 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",
"commons-validator" % "commons-validator" % "1.9.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
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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"))

Expand Down

0 comments on commit b306921

Please sign in to comment.