1545 search results for symfony bundle

hey picks Sometimes it happens, probably you don't have `symfony/flex` package, or it's outdated in that case you should use full package name `symfony/webpack-encore-bundle`. But stop do you use our course code? Cheers! ...
Hey Lavin, Sure, you can use this bundle with Symfony 2.8. From the latest release, I see it still supports Symfony 2.8, see: https://github.com/FriendsOfSymfony/FOSUserBundle/blob/v2.1.2/composer.json Cheers! ...
Hello, When I try a fake page, a Symfony exception page was showed instead of the boring exception browser error. The Debug Toolbar didn't appear (it means I was in prod env) ###> symfony/framework-bundle ### APP_ENV=prod ...
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class WeatherController extends AbstractController
{
/**
* @Route("/weather", name="app_weather")
*/
public function weather()
{
return $this->render('weather/index.html.twig');
}
}
See Code Block in Script
20 lines | src/Controller/AccountController.php
// ... lines 1 - 2
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class AccountController extends AbstractController
{
/**
* @Route("/account", name="account")
*/
public function index()
{
return $this->render('account/index.html.twig', [
'controller_name' => 'AccountController',
]);
}
}
See Code Block in Script
20 lines | src/Controller/SecurityController.php
// ... lines 1 - 2
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class SecurityController extends AbstractController
{
/**
* @Route("/security", name="security")
*/
public function index()
{
return $this->render('security/index.html.twig', [
'controller_name' => 'SecurityController',
]);
}
}
See Code Block in Script
20 lines | src/Controller/CommentAdminController.php
// ... lines 1 - 2
namespace App\Controller;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class CommentAdminController extends Controller
{
/**
* @Route("/comment/admin", name="comment_admin")
*/
public function index()
{
return $this->render('comment_admin/index.html.twig', [
'controller_name' => 'CommentAdminController',
]);
}
}
See Code Block in Script
If you have trouble getting jsrouting-bundle to install with 'composer require', try this: 1) in composer.json change the require line for jsrouting-bundle to: `"friendsofsymfony/jsrouting-bundle": "~1.6.0 ...
... actually exactly this solution we show in this course, see https://symfonycasts.com/screencast/symfony-bundle/extracting-bundle#using-a-path-repository . Have you seen that chapter? :) I hope this helps! Cheers!
Hey Jeremy! This is a tough question :) First of all, it depends on the code... if no BC breaks between Symfony ^3.0||^4.0||^5.0 and your bundle may work in any version of it - you don't need different tags, you can do ...
Is there any course which covers how to build reusable "bundle" in the new symfony 4 style? ...
Very good tutorial until the end! Is there any bundle for a shopping cart for Symfony 3? Thanks ...
Hey @Ahmed-M, Can you check please what version of `symfony/webpack-encore-bundle` do you have installed? Cheers! ...
... Thank you. I've downgraded in composer.json to "symfony/monolog-bundle": "3.4.*", and then run composer recipes:update solved the issue.
yuriy-yakubskiy
yuriy-yakubskiy
Read Full Comment
Hey Md, Thanks for confirming this helped you! https://symfonycasts.com/screencast/symfony-fundamentals/bundle-config#comment-4952431195 Cheers! ...
Hi! How can I add a symfony console command via a bundle? Is there a good tutorial somewhere? ...
M_Holstein
M_Holstein
Read Full Comment
58 lines | app/AppKernel.php
<?php
// ... lines 2 - 5
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ... lines 11 - 14
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
// ... lines 16 - 21
new FOS\UserBundle\FOSUserBundle(),
// ... lines 23 - 24
);
// ... lines 26 - 35
}
// ... lines 37 - 56
}
See Code Block in Script
48 lines | AppKernel.php
// ... lines 1 - 6
class AppKernel extends Kernel
{
public function registerBundles()
{
// ... lines 11 - 17
if ($this->getEnvironment() == 'dev') {
$bundles[] = new \Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
}
// ... lines 21 - 22
}
// ... lines 24 - 46
}
See Code Block in Script
8 lines | assets/bootstrap.js
import { startStimulusApp } from '@symfony/stimulus-bundle';
// Registers Stimulus controllers from controllers.json and in the controllers/ directory
export const app = startStimulusApp();
// ... lines 5 - 8
See Code Block in Script
// ... lines 1 - 7
use Symfony\Bundle\SecurityBundle\Security;
// ... lines 9 - 11
class DragonTreasureSetOwnerProcessor implements ProcessorInterface
{
public function __construct(private ProcessorInterface $innerProcessor, private Security $security)
{
}
// ... lines 17 - 25
}
See Code Block in Script