knpuniversity / symfony2-ep2 Goto Github PK
View Code? Open in Web Editor NEWScreencast code, script and ice cream for "Starting in Symfony2: Episode 2"
Home Page: https://knpuniversity.com/screencast/symfony2-ep2
Screencast code, script and ice cream for "Starting in Symfony2: Episode 2"
Home Page: https://knpuniversity.com/screencast/symfony2-ep2
On your document entity-security.rst, your link for DependencyInjectionContainerAwareInterface` is not correct.
It's a redirection on this : http://api.symfony.com/2.3/Symfony/Component/DependencyInjectionContainerAwareInterface%60.html
Correct (and new) URL is : http://api.symfony.com/2.4/Symfony/Component/DependencyInjection/ContainerAwareInterface.html
In the video screencast, when the registration form is created, it immediately looks great! But in reality, there is no CSS in the project that styles this form. It doesn't hurt anything of course, but it is unexpected. When we update for Symfony 2.4, we need to fix this.
Thanks to @keefekwan in the tutorial comments
If we can fit it in here, we should show the parameters_defaults.yml
setup. This is where you always include parameters_defaults.yml
, which contains all of the parameters, with sensible values, and then include parameters.yml
, which now only needs to have in it whatever it needs to override from the defaults file.
I don't think this will fit in episode 1, but when add the user fixtures, we should use Alice and Faker.
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:
start
directory from the episode 2 download as your new starting code.OR
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
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
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 }}
Hi,
I've juste buy the lesson 2.
I check my php.ini and if I go to the page app_dev.php, i've got "No route found for "GET /" ".
It does not work just on the pages that are supposed to work.
I don't know why but I've a blank page with this messages :
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelRequest". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\SessionListener::onKernelRequest". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\FragmentListener::onKernelRequest". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest". [] []
[2013-12-19 13:43:07] request.INFO: Matched route "event" (parameters: "_controller": "Yoda\EventBundle\Controller\EventController::indexAction", "_route": "event") [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\Security\Http\Firewall::onKernelRequest". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Bundle\AsseticBundle\EventListener\RequestListener::onKernelRequest". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\Fragment\FragmentHandler::onKernelRequest". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\DeprecationLoggerListener::injectLogger". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.controller" to listener "Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector::onKernelController". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener::onKernelController". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ParamConverterListener::onKernelController". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelController". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.controller" to listener "Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::onKernelController". [] []
[2013-12-19 13:43:07] doctrine.DEBUG: SELECT t0.id AS id1, t0.name AS name2, t0.imageName AS imageName3, t0.date AS date4, t0.location AS location5, t0.details AS details6 FROM yoda_event t0 [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bridge\Monolog\Handler\FirePHPHandler::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bridge\Monolog\Handler\ChromePhpHandler::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\CacheListener::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\ResponseListener::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\Fragment\FragmentHandler::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\Security\Http\RememberMe\ResponseListener::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\StreamedResponseListener::onKernelResponse". [] []
[2013-12-19 13:43:07] event.DEBUG: Notified event "kernel.terminate" to listener "Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener::onKernelTerminate". [] []
I've just beginning the first modification (firewalls) in security.yml, this to work, so I went to the second part (access_control) and then I got a blank page.
I returned with the original file and I still do not display, I do not understand.
Can you help me on what exactly happens?
I think later in the tutorial, we use access_control
in security.yml
, but we don't properly allow /register
to be reached by anonymous users.
See comment here: http://knpuniversity.com/screencast/symfony2-ep3#comment-1422308902
When we add access_control
for whitelisting, we forget to include the /register
URL.
We still have some old form code, including:
bind()
-> handleRequest()
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.