What are the Slack Archives?
Itโs a history of our time together in the Slack Community! Thereโs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonโt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Where do I register the new HelloWorldControllerProvider ? From what I can barely make out in the v
Where do I register the new HelloWorldControllerProvider ? From what I can barely make out in the video it looks like it's being registered in ShopApplication/YvesBootstrap.php
Comments
-
Intuition would suggest this is incorrect, and when tried it results in an error
TypeError - Argument 1 passed to Silex\Application::register() must implement interface Silex\ServiceProviderInterface, instance of Pyz\Yves\HelloWorld\Plugin\Provider\HelloWorldControllerProvider given, called in /data/src/Pyz/Yves/ShopApplication/YvesBootstrap.php on line 24
0 -
Then where is the router stack? the actual written documentation contradicts what Hussam outlines on https://training.spryker.com/courses/take/developer-bootcamp/texts/4326883-hello-world-lesson-and-challenge suggest that you should add the controller to
Spryker\Yves\RouterExtension\Dependency\Plugin\RouteProviderPluginInterface[]
looks like that is in
Yves/Router/RouterDependencyProvider
but the code is very much different and includes a different naming scheme, which of these is correct the written docs or the video?0 -
okee the docs seemed to work better, but the original boilerplate had a registered route in it
<?php namespace Pyz\Yves\HelloWorld\Plugin\Provider; use SprykerShop\Yves\ShopApplication\Plugin\Provider\AbstractYvesControllerProvider; use Silex\Application; class HelloWorldControllerProvider extends AbstractYvesControllerProvider { const HELLOWORLD_INDEX = 'helloworld-index'; /** * @param \Silex\Application $app * * @return void */ protected function defineControllers(Application $app) { $this->createGetController('/hello-world', static::HELLOWORLD_INDEX, 'HelloWorld', 'Index', 'index'); } }
does it not need to be added to the registry?
0 -
The error was a type error so maybe I need to pass it the instance of the application?
0 -
ok so the challenge and and the video seem on some level mutually exclusive? I don't actually see the code that is being referenced in the video and since the challenge code sets up the route and references the controller, there isn't any need to register the controller directly.
0 -
Let me know If I'm off base on this.
0 -
Hi! I assume you are asleep. I will give an extensive answer in about an hour, so you will have it when you are up
0 -
so. there was an outdated part in the bootcamp
0 -
i am currently in the process of replacing it with recently tested versions. should be done soon
0 -
ye, this is true ๐
0 -
no worry, thanks for jumping into it
0 -
if you check it again you should see the new version of that particular bit
0 -
i am also updating the rest of the bootcamp, so please let me know if something might have slipped! happy coding! ๐
0 -
expected?
0 -
the change in design?
0 -
then yes
0 -
or did i miss anything?
0 -
Oh don't know yet i'll keep cruisin' though cheers
0 -
Hey @UJN2JRU4F ur probably sleeping now or out having a beer (if you are into that kinda thing), I found a few errors, nitpicky stuff, but i mentioned it in the discussion for #6 Architecture Walkthrough.
Also a few discrepancies between the generated code and the documented directions.
Hope it helps. โฎ Thanks for the docs update. Much appreciated ๐
0 -
beer? me? never! ๐ ๐ป
0 -
iโll look into the comments right away
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K ๐ Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random