Symfony Planet (RSS aggregator)
An aggregator of community posts written in English about the Symfony project and its ecosystem.
Add your own blogLogin with SensioLabsConnect to submit a RSS feed
On one of our projects that I am working on I had the following problem: I needed to create an aggregate temporary table in the database from a few different queries while still using Doctrine2. I needed to aggregate the results in the database rather than memory as the result set could be very large […]
When a web application reaches a sufficiently large size, it can become infeasible to perform all actions required within a single web request/response life-cycle. You may find yourself wishing to for example - batch up and send queued emails at particular intervals, or process payments asynchronous to the point in-time the user made the initial request. In this post I would like to discuss our changing use of background processes (both time-dependent and continuous) due to increasing [...]
In this episode we discuss what makes a good Symfony bundle, and how you as a bundle author can build a better bundle. Photo credit: bundle by foam (CC-BY-SA)
Preview not available
You already know you can get Request object in your controller action. Cool, but there is more. In Symfony 3.1 is new Action Argument Resolving feature, so you can get any service you need. With a bit of work. Today I will show you how. Disclaimer: What happened to controller constructor injection? I still prefer constructor injection in controllers. Are you asking why and how to achieve that in Symfony? In 3 minutes you will find out in my other article. I will wait here... ...ok. Now you are [...]
In another of our conference specials, Tobias, Magnus and Ryan is live from Symfony Catalunya 2016 in Barcelona. We talk about the conference, and, trying make the most of being around some of the experts in the community, we talk to Marc Morera and Michael Cullum about building local PHP communities. Photo credit: Jeremy Mikola
In my previous blog post I've explained the basics of authentication, authorization and how this is dealt with in Symfony. Due to the size of the post, I've left out several important topics such as roles and voters; Both an equally important part of authentication and authorization. A common misconception is that roles should be used to check permissions. In fact, they should definitely not be used to check permissions!
Preview not available
An example on how we added extra rules to the switch user functionality of the Symfony security component.
One of the more complex parts of Symfony is probably the Security and everything that comes with it. It's not only rather big, it's also quite flexible with lots of different concepts which often confuse developers. Often enough when developers implement a security system for their website, they call it Authentication or Authorization yet often don't exactly know what they are exactly supposed to call it. One quote I always refer to is "if you can't explain it simply you don't understand it [...]
From time to time I see people struggling with trying to port their existing site or web-app to Symfony. Their old framework architecture might not match that of Symfony, making porting their controllers not that easy. Other times, their data structure contained so much logic that it was impossible to simply replace with a new ORM. Thus porting the project can seem like a daunting task. So, what are your options of migrating to Symfony? Well you could try the 'big bang' approach and just power [...]
A lot of developers come to #symfony and ask how to implement a login or authentication system. It's quite common to have a bunch of features which require authentication and authorization. While authentication is identifying your user, authorization is granting permissions to this user. One of the steps of implementing the security features of your application, involves creating an object to contain your user information such as your username, email, password and user id. If you have followed [...]
The band is back together and this time it's a blast from the past. We revisit the old news segment and do a whole show featuring nothing but news. We're talking Symfony 3.1, PHP 7.1 and the fall conference season.
A set of snippets showing you how to integrate Symfony Components (Routing, Forms, Validation, DependencyInjection, VarDumper, ..) in a Legacy PHP application
Being active on IRC, almost every day I see questions coming by regarding forms and entities inside. This does not only give you a headache but it's also risky. You wouldn't want to flush an entity in an invalid state! But Using Entities in my Forms is Easy! Yes, it's certainly easy. You don't have to write any additional code to connect your validation rules and data mapping, not to mention that when it's valid, you only have to flush your entity and you're done. Using this method is [...]
Being active on IRC, almost every day I see questions coming by regarding forms and entities inside. This does not only give you a headache but it's also risky. You wouldn't want to flush an entity in an invalid state!
In my last post I talked about setting up Symfony2 entities for translation and integrating it with Sonata Admin. One of the trickier parts of moving from a non-translatable entity to a translatable one is the migration of your data. To understand some of the complexities with the migration you must understand the changes to […]
TLDR; I won't update A Year With Symfony anymore. The e-book is now freely available. My first book, A Year With Symfony, was well received when I first published it on September 4th. At the time it seemed to be a welcome addition to the official Symfony documentation. A lot of water has passed under the bridge since then. Several new Symfony components were released and we have now arrived at the next major version, 3.0. In the meantime I published one update of the book: a new chapter about [...]
Doctrine filters are powerful tool. Yet their registration and management are bit overcomplicated. Today I will show you how to decouple them to standalone services that can take care of everything you need. Standard Process to Enable Filter If you don't know Doctrine Filters, KnpUniversity has very nice, short and funny tutorial about them. Go check it, I'll wait here... Are you busy and smart? Just check slides 13 to 31 from @RossTuck's presentation about cool features of Doctrine. So now you [...]
Building a custom authentication system for Symfony can get atrocious. You can get a glimpse of that here. You have to deal with multiple classes, connect them to each other, and hope for the best. It is hard to customize and never fun to work with. Since Symfony 2.8, to simplify the customization of the... Continue reading →
- « Previous Page
- Next Page »