Skip to content

Conversation

@jsegal205
Copy link
Contributor

@jsegal205 jsegal205 commented Oct 25, 2024

Running mix test threw the following warnings:

$ mix test
Generated bamboo_phoenix app
warning: Phoenix now requires you to explicitly list which engine to use
for Phoenix JSON encoding. We recommend everyone to upgrade to
Jason by setting in your config/config.exs:

    config :phoenix, :json_library, Jason

And then adding {:jason, "~> 1.0"} as a dependency.

If instead you would rather continue using Poison, then add to
your config/config.exs:

    config :phoenix, :json_library, Poison

  (phoenix 1.5.7) lib/phoenix.ex:38: Phoenix.start/2
  (kernel 9.0) application_master.erl:293: :application_master.start_it_old/4

....warning: Rendering the child template from layouts is deprecated. Instead of:

    <%= render(@view_module, @view_template, assigns) %>

You should do:

    <%= @inner_content %>

  (phoenix 1.5.7) lib/phoenix/view.ex:283: Phoenix.View.render/3
  test/support/templates/phoenix_layout/app.html.eex:2: Bamboo.PhoenixTest.PhoenixLayoutView."app.html"/1
  (phoenix 1.5.7) lib/phoenix/view.ex:472: Phoenix.View.render_to_iodata/3
  (phoenix 1.5.7) lib/phoenix/view.ex:479: Phoenix.View.render_to_string/3
  (bamboo_phoenix 1.0.0) lib/bamboo_phoenix.ex:282: Bamboo.Phoenix.render_html_and_text_emails/1
  test/bamboo_phoenix_test.exs:63: Bamboo.PhoenixTest."test render/2 allows setting a custom layout"/1
  (ex_unit 1.16.3) lib/ex_unit/runner.ex:472: ExUnit.Runner.exec_test/2
  (stdlib 5.0) timer.erl:270: :timer.tc/2
  (ex_unit 1.16.3) lib/ex_unit/runner.ex:394: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4

warning: Rendering the child template from layouts is deprecated. Instead of:

    <%= render(@view_module, @view_template, assigns) %>

You should do:

    <%= @inner_content %>

  (phoenix 1.5.7) lib/phoenix/view.ex:283: Phoenix.View.render/3
  test/support/templates/phoenix_layout/app.text.eex:2: Bamboo.PhoenixTest.PhoenixLayoutView."app.text"/1
  (phoenix 1.5.7) lib/phoenix/view.ex:472: Phoenix.View.render_to_iodata/3
  (phoenix 1.5.7) lib/phoenix/view.ex:479: Phoenix.View.render_to_string/3
  (bamboo_phoenix 1.0.0) lib/bamboo_phoenix.ex:283: Bamboo.Phoenix.render_html_and_text_emails/1
  test/bamboo_phoenix_test.exs:63: Bamboo.PhoenixTest."test render/2 allows setting a custom layout"/1
  (ex_unit 1.16.3) lib/ex_unit/runner.ex:472: ExUnit.Runner.exec_test/2
  (stdlib 5.0) timer.erl:270: :timer.tc/2
  (ex_unit 1.16.3) lib/ex_unit/runner.ex:394: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4

....
Finished in 0.1 seconds (0.00s async, 0.1s sync)
8 tests, 0 failures

reference the phoenix 1.5 changes for the layout updates - https://gist.github.com/chrismccord/e53e79ef8b34adf5d8122a47db44d22f#update-your-layouts

This addresses those warnings -

  • updates test files
  • updates docs
  • explicitly adds Jason dep and list in the config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant