Skip to content

Commit

Permalink
Merge pull request #299 from hmrc/DLS-10849
Browse files Browse the repository at this point in the history
DLS-10849: Update Dependency (play-frontend-hmrc v9.0.0)
  • Loading branch information
ZaraFarzan authored Sep 2, 2024
2 parents aad9a7f + ac0f498 commit d1142ae
Show file tree
Hide file tree
Showing 32 changed files with 52 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .g8/checkboxPage/app/views/$className$View.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
govukButton: GovukButton
)

@(form: Form[_], mode: Mode)(implicit request: Request[_], messages: Messages)
@(form: Form[_], mode: Mode)(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = title(form, messages("$className;format="decap"$.title"))) {

Expand Down
2 changes: 1 addition & 1 deletion .g8/contentPage/app/views/$className$View.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
govukButton: GovukButton
)

@()(implicit request: Request[_], messages: Messages)
@()(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = titleNoForm(messages("$className;format="decap"$.title"))) {

Expand Down
2 changes: 1 addition & 1 deletion .g8/datePage/app/views/$className$View.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
govukButton: GovukButton
)

@(form: Form[_], mode: Mode)(implicit request: Request[_], messages: Messages)
@(form: Form[_], mode: Mode)(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = title(form, messages("$className;format="decap"$.title"))) {

Expand Down
2 changes: 1 addition & 1 deletion .g8/intPage/app/views/$className$View.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
govukButton: GovukButton
)

@(form: Form[_], mode: Mode)(implicit request: Request[_], messages: Messages)
@(form: Form[_], mode: Mode)(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = title(form, messages("$className;format="decap"$.title"))) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
govukButton: GovukButton
)

@(form: Form[_], mode: Mode)(implicit request: Request[_], messages: Messages)
@(form: Form[_], mode: Mode)(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = title(form, messages("$className;format="decap"$.title"))) {

Expand Down
2 changes: 1 addition & 1 deletion .g8/radioButtonPage/app/views/$className$View.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
govukButton: GovukButton
)

@(form: Form[_], mode: Mode)(implicit request: Request[_], messages: Messages)
@(form: Form[_], mode: Mode)(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = title(form, messages("$className;format="decap"$.title"))) {

Expand Down
2 changes: 1 addition & 1 deletion .g8/stringPage/app/views/$className$View.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
govukButton: GovukButton
)

@(form: Form[_], mode: Mode)(implicit request: Request[_], messages: Messages)
@(form: Form[_], mode: Mode)(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = title(form, messages("$className;format="decap"$.title"))) {

Expand Down
2 changes: 1 addition & 1 deletion .g8/yesNoPage/app/views/$className$View.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
govukButton: GovukButton
)

@(form: Form[_], mode: Mode)(implicit request: Request[_], messages: Messages)
@(form: Form[_], mode: Mode)(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = title(form, messages("$className;format="decap"$.title"))) {

Expand Down
17 changes: 10 additions & 7 deletions app/handlers/ErrorHandler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,27 @@ 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 views.html.InternalServerErrorTemplate

import scala.concurrent.{ ExecutionContext, Future }

@Singleton
class ErrorHandler @Inject() (
val messagesApi: MessagesApi,
view: ErrorTemplate,
errorInternal: InternalServerErrorTemplate
) extends FrontendErrorHandler with I18nSupport {
)(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)
rh: RequestHeader
): Future[Html] =
Future.successful(view(pageTitle, heading, message))

override def internalServerErrorTemplate(implicit request: Request[_]): Html =
errorInternal()
override def internalServerErrorTemplate(implicit request: RequestHeader): Future[Html] =
Future.successful(errorInternal())
}
2 changes: 1 addition & 1 deletion app/views/AccountingPeriodView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
govukDetails : GovukDetails
)

@(form: Form[_], mode: Mode)(implicit request: Request[_], messages: Messages)
@(form: Form[_], mode: Mode)(implicit request: RequestHeader, messages: Messages)

@*Need to change this if accountingPeriod.error.day welsh translation changed*@
@errorMap = @{
Expand Down
2 changes: 1 addition & 1 deletion app/views/AssociatedCompaniesView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
govukDetails : GovukDetails
)

@(form: Form[_], associatedCompaniesParameter: AssociatedCompaniesParameter,mode: Mode)(implicit request: Request[_], messages: Messages)
@(form: Form[_], associatedCompaniesParameter: AssociatedCompaniesParameter,mode: Mode)(implicit request: RequestHeader, messages: Messages)

@heading= @{AssociatedCompaniesViewHelper.heading(associatedCompaniesParameter)}

Expand Down
2 changes: 1 addition & 1 deletion app/views/CheckYourAnswersView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
govukButton: GovukButton
)

@(list: SummaryList, continueUrl: String)(implicit request: Request[_], messages: Messages)
@(list: SummaryList, continueUrl: String)(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = titleNoForm(messages("checkYourAnswers.title")), backLink = BackLinkHelper.backLinkOrDefault(routes.AssociatedCompaniesController.onPageLoad(NormalMode).path(), NormalMode)) {

Expand Down
2 changes: 1 addition & 1 deletion app/views/DistributionView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
govukButton: GovukButton
)

@(form: Form[_], mode: Mode)(implicit request: Request[_], messages: Messages)
@(form: Form[_], mode: Mode)(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = title(form, messages("distribution.title")), backLink = BackLinkHelper.backLinkOrDefault(routes.TaxableProfitController.onPageLoad(NormalMode).path(), mode)) {

Expand Down
2 changes: 1 addition & 1 deletion app/views/DistributionsIncludedView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
govukDetails : GovukDetails
)

@(form: Form[_], mode: Mode)(implicit request: Request[_], messages: Messages)
@(form: Form[_], mode: Mode)(implicit request: RequestHeader, messages: Messages)

@yesHtml = {
@govukInput(
Expand Down
2 changes: 1 addition & 1 deletion app/views/ErrorTemplate.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
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-l">@messages(heading)</h1>
Expand Down
2 changes: 1 addition & 1 deletion app/views/FullResultsPageView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
govukButton: GovukButton
)

@(calculatorResult: CalculatorResult, accountingPeriodForm: AccountingPeriodForm, taxableProfit: Int, distributions: Int, associatedCompanies: Either[Int, (Int, Int)], config:Map[Int,FYConfig])(implicit request: Request[_], messages: Messages)
@(calculatorResult: CalculatorResult, accountingPeriodForm: AccountingPeriodForm, taxableProfit: Int, distributions: Int, associatedCompanies: Either[Int, (Int, Int)], config:Map[Int,FYConfig])(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = titleNoForm(messages("resultsPage.title")), backLink = BackLinkHelper.backLinkOrDefault(routes.ResultsPageController.onPageLoad().path(), NormalMode)) {

Expand Down
2 changes: 1 addition & 1 deletion app/views/IndexView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
govukBreadcrumbs : GovukBreadcrumbs
)

@()(implicit request: Request[_], messages: Messages)
@()(implicit request: RequestHeader, messages: Messages)

@breadCrumbs = {
@govukBreadcrumbs(Breadcrumbs(
Expand Down
2 changes: 1 addition & 1 deletion app/views/InternalServerErrorTemplate.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
layout: templates.Layout
)

@()(implicit request: Request[_], messages: Messages)
@()(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = titleNoForm(messages("errorInternal.title"))) {

Expand Down
2 changes: 1 addition & 1 deletion app/views/IrrelevantPeriodView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
govukButton: GovukButton
)

@(mode: Mode)(implicit request: Request[_], messages: Messages)
@(mode: Mode)(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = titleNoForm(messages("accountingPeriodIrrelevant.title")), backLink = routes.AccountingPeriodController.onPageLoad(mode).path()) {

Expand Down
2 changes: 1 addition & 1 deletion app/views/JourneyRecoveryContinueView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
govukButton: GovukButton
)

@(continueUrl: String)(implicit request: Request[_], messages: Messages)
@(continueUrl: String)(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = titleNoForm(messages("journeyRecovery.continue.title")), showBackLink = false) {

Expand Down
2 changes: 1 addition & 1 deletion app/views/JourneyRecoveryStartAgainView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
govukButton: GovukButton
)

@()(implicit request: Request[_], messages: Messages)
@()(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = titleNoForm(messages("journeyRecovery.startAgain.title")), showBackLink = false) {

Expand Down
2 changes: 1 addition & 1 deletion app/views/PDFAddCompanyDetailsView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
govukButton: GovukButton
)

@(form: Form[_], mode: Mode)(implicit request: Request[_], messages: Messages)
@(form: Form[_], mode: Mode)(implicit request: RequestHeader, messages: Messages)


@layout(pageTitle = title(form, messages("pdfAddCompanyDetails.title")), backLink = BackLinkHelper.backLinkOrDefault(routes.ResultsPageController.onPageLoad().path(), mode)) {
Expand Down
2 changes: 1 addition & 1 deletion app/views/PDFMetadataView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
govukButton: GovukButton
)

@(form: Form[_])(implicit request: Request[_], messages: Messages)
@(form: Form[_])(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = title(form, messages("pdfMetaData.title")), backLink = BackLinkHelper.backLinkOrDefault(routes.PDFAddCompanyDetailsController.onPageLoad().path(), NormalMode)) {

Expand Down
2 changes: 1 addition & 1 deletion app/views/PDFView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
layout: templates.Layout
)

@(pdfMetadata: Option[PDFMetadataForm], calculatorResult: CalculatorResult, accountingPeriodForm: AccountingPeriodForm, taxableProfit: Int, distributions: Int, associatedCompanies: Either[Int, (Int, Int)], config:Map[Int,FYConfig], currentInstant: Instant)(implicit request: Request[_], messages: Messages)
@(pdfMetadata: Option[PDFMetadataForm], calculatorResult: CalculatorResult, accountingPeriodForm: AccountingPeriodForm, taxableProfit: Int, distributions: Int, associatedCompanies: Either[Int, (Int, Int)], config:Map[Int,FYConfig], currentInstant: Instant)(implicit request: RequestHeader, messages: Messages)

@layout(
pageTitle = titleNoForm(messages("pdf.title")),
Expand Down
2 changes: 1 addition & 1 deletion app/views/ResultsPageView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
govukButton: GovukButton
)

@(calculatorResult: CalculatorResult, accountingPeriodForm: AccountingPeriodForm, taxableProfit: Int, distributions: Int, associatedCompanies: Either[Int, (Int, Int)])(implicit request: Request[_], messages: Messages)
@(calculatorResult: CalculatorResult, accountingPeriodForm: AccountingPeriodForm, taxableProfit: Int, distributions: Int, associatedCompanies: Either[Int, (Int, Int)])(implicit request: RequestHeader, messages: Messages)

@titleAndBanner = @{displayBanner(calculatorResult)}

Expand Down
2 changes: 1 addition & 1 deletion app/views/SessionExpiredView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
config:Configuration
)

@()(implicit request: Request[_], messages: Messages)
@()(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = titleNoForm("session.expired.title"), timeout = false, showBackLink = false) {
<h1 class="govuk-heading-l">@messages("session.expired.heading")</h1>
Expand Down
2 changes: 1 addition & 1 deletion app/views/SignOutView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
config:Configuration
)

@()(implicit request: Request[_], messages: Messages)
@()(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = titleNoForm("session.signOut.title"), timeout = false, showBackLink = false) {
<h1 class="govuk-heading-l">@messages("session.signOut.heading")</h1>
Expand Down
2 changes: 1 addition & 1 deletion app/views/TaxableProfitView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
govukDetails: GovukDetails
)

@(form: Form[_], mode: Mode)(implicit request: Request[_], messages: Messages)
@(form: Form[_], mode: Mode)(implicit request: RequestHeader, messages: Messages)

@layout(pageTitle = title(form, messages("taxableProfit.title")), backLink = BackLinkHelper.backLinkOrDefault(routes.AccountingPeriodController.onPageLoad(NormalMode).path(), mode)) {

Expand Down
2 changes: 1 addition & 1 deletion app/views/TwoAssociatedCompaniesView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
govukWarningText : GovukWarningText,
)

@(form: Form[_], accountingPeriodForm: AccountingPeriodForm, askBothParts: AskBothParts, mode: Mode)(implicit request: Request[_], messages: Messages)
@(form: Form[_], accountingPeriodForm: AccountingPeriodForm, askBothParts: AskBothParts, mode: Mode)(implicit request: RequestHeader, messages: Messages)

@layout(
pageTitle = title(form, messages("twoAssociatedCompanies.howManyAssociatedCompaniesDidYouHave")),
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 @@ -39,7 +39,7 @@
mainContentLayout: Option[Html => Html] = Some(defaultMainContentLayout(_)),
breadCrumbs: Option[Html] = None,
backLink: String = ""
)(contentBlock: Html)(implicit request: Request[_], messages: Messages)
)(contentBlock: Html)(implicit request: RequestHeader, messages: Messages)

@headBlock = {
@if(timeout) {
Expand Down
8 changes: 4 additions & 4 deletions project/AppDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import sbt._

object AppDependencies {
private val playVersion = "play-30"
private val bootstrapVersion = "8.6.0"
private val hmrcMongoVersion = "1.7.0"
private val bootstrapVersion = "9.4.0"
private val hmrcMongoVersion = "2.2.0"

val compile: Seq[ModuleID] = Seq(
play.sbt.PlayImport.ws,
Expand All @@ -21,9 +21,9 @@ object AppDependencies {
"uk.gov.hmrc.mongo" %% s"hmrc-mongo-test-$playVersion" % hmrcMongoVersion,
"org.scalacheck" %% "scalacheck" % "1.18.0",
"org.scalatestplus" %% "scalacheck-1-17" % "3.2.18.0",
"org.mockito" %% "mockito-scala" % "1.17.31",
"org.mockito" %% "mockito-scala" % "1.17.37",
"org.scalatestplus" %% "mockito-4-11" % "3.2.18.0",
"org.jsoup" % "jsoup" % "1.17.2",
"org.jsoup" % "jsoup" % "1.18.1",
"org.pegdown" % "pegdown" % "1.6.0",
"com.softwaremill.diffx" %% "diffx-scalatest-should" % "0.9.0"
).map(_ % "test, it")
Expand Down
18 changes: 9 additions & 9 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ resolvers += "HMRC-open-artefacts-maven" at (artefactsUrl + "/maven2")
resolvers += Resolver.url("HMRC-open-artefacts-ivy", url(artefactsUrl + "/ivy2"))(Resolver.ivyStylePatterns)
resolvers += "Typesafe Releases" at "https://repo.typesafe.com/typesafe/releases/"

addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.3")
addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.22.0")
addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.5.0")
addSbtPlugin("com.github.sbt" % "sbt-concat" % "1.0.0")
addSbtPlugin("com.github.sbt" % "sbt-digest" % "2.0.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("org.scalastyle" % "scalastyle-sbt-plugin" % "1.0.0" exclude ("org.scala-lang.modules", "scala-xml_2.12"))
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.12")
addSbtPlugin("io.github.irundaia" % "sbt-sassify" % "1.5.2")
addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.5")
addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.22.0")
addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.5.0")
addSbtPlugin("com.github.sbt" % "sbt-concat" % "1.0.0")
addSbtPlugin("com.github.sbt" % "sbt-digest" % "2.0.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("org.scalastyle" % "scalastyle-sbt-plugin" % "1.0.0" exclude ("org.scala-lang.modules", "scala-xml_2.12"))
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.1.0")
addSbtPlugin("io.github.irundaia" % "sbt-sassify" % "1.5.2")

0 comments on commit d1142ae

Please sign in to comment.