Skip to content

Code changes going from episode 1 to episode 2 #4

@weaverryan

Description

@weaverryan
Member

There were a few changes that we made between the end of episode 1 and the beginning of episode 2. They're minor, but they cause people issues.

If you're coding along with the screencast, you have 2 options:

  1. When starting episode 2, use the start directory from the episode 2 download as your new starting code.

OR

  1. Follow these instructions to download new files before starting episode2. The changes are very minor (minor routing changes and CSS changes), but affect several files:

CSS/JS Changes

A) Replace your base.html.twig with https://raw.github.com/knpuniversity/symfony2-ep2/master/start/app/Resources/views/base.html.twig

B) Replace your src/Yoda/EventBundle/Resources/views/layout.html.twig with https://github.com/knpuniversity/symfony2-ep2/blob/master/start/src/Yoda/EventBundle/Resources/views/layout.html.twig

C) Replace your src/Yoda/EventBundle/Resources/public/css/main.css with https://github.com/knpuniversity/symfony2-ep2/blob/master/start/src/Yoda/EventBundle/Resources/public/css/main.css

Routing Changes

A) Replace your src/Yoda/EventBundle/Resources/config/routing.yml with https://github.com/knpuniversity/symfony2-ep2/blob/master/start/src/Yoda/EventBundle/Resources/config/routing.yml

B) Replace your src/Yoda/EventBundle/Resources/config/routing/event.yml with https://github.com/knpuniversity/symfony2-ep2/blob/master/start/src/Yoda/EventBundle/Resources/config/routing/event.yml

C) Replace your src/Yoda/EventBundle/Controller/EventController.php with https://github.com/knpuniversity/symfony2-ep2/blob/master/start/src/Yoda/EventBundle/Controller/EventController.php

Other

A) Remove the following lines from src/Yoda/EventBundle/Resources/views/Event/index.html.twig - these were just put there for testing and playing with items, but we don't need them::

{{ app.session.get('some_session_key') }}
{{ app.request.host }}

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @weaverryan

        Issue actions

          Code changes going from episode 1 to episode 2 · Issue #4 · knpuniversity/symfony2-ep2