SymfonyLive Paris 2025 : Postgres pour vos besoins NoSQL
https://symfony.com/blog/symfonylive-paris-2025-postgres-pour-vos-besoins-nosql?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1itu8s5
@r_php
https://symfony.com/blog/symfonylive-paris-2025-postgres-pour-vos-besoins-nosql?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1itu8s5
@r_php
Symfony
SymfonyLive Paris 2025 : Postgres pour vos besoins NoSQL (Symfony Blog)
Unlock the power of JSON in Postgres with David Buchmann! Learn how to handle unstructured data with advanced JSON functions and integrate them seamlessly with Doctrine
Symfony Security: Access Token Authentication without Users
Is it possible to use Symfony's access token authentication feature without the concept of users somehow?
My app is an API. The API should be available only for my clients. So in order to use that API you have to use a Bearer authentication token. You can get this token from my other app.
When making requests to my API, I just want to check if the token exists by making a HTTP request to my other app. I don't care about an identity of the user.
Here’s the `getUserBadgeFrom` method in my `AccessTokenExtractor` class:
public function getUserBadgeFrom(string $accessToken): UserBadge
{
try {
$response = $this->httpClient->request('GET', $this->authServerUrl . '/customer', [
'headers' => [
'Authorization' => 'Bearer ' . $accessToken,
],
]);
if ($response->getStatusCode() !== 200) {
throw new BadCredentialsException('Invalid credentials.');
}
/** @var array{id: int, email_address: string, full_name: string} $data */
$data = $response->toArray();
return new UserBadge($data['email_address']);
} catch (Throwable $e) {
throw new AuthenticationException('Authentication failed: .' . $e->getMessage(), 0, $e);
}
}
However, this approach doesn’t work because Symfony expects me to register a user provider.
Is there a way to bypass this requirement, or at least define a dummy user provider that doesn't require user entities? Any advice would be greatly appreciated!
https://redd.it/1itvsc8
@r_php
Is it possible to use Symfony's access token authentication feature without the concept of users somehow?
My app is an API. The API should be available only for my clients. So in order to use that API you have to use a Bearer authentication token. You can get this token from my other app.
When making requests to my API, I just want to check if the token exists by making a HTTP request to my other app. I don't care about an identity of the user.
Here’s the `getUserBadgeFrom` method in my `AccessTokenExtractor` class:
public function getUserBadgeFrom(string $accessToken): UserBadge
{
try {
$response = $this->httpClient->request('GET', $this->authServerUrl . '/customer', [
'headers' => [
'Authorization' => 'Bearer ' . $accessToken,
],
]);
if ($response->getStatusCode() !== 200) {
throw new BadCredentialsException('Invalid credentials.');
}
/** @var array{id: int, email_address: string, full_name: string} $data */
$data = $response->toArray();
return new UserBadge($data['email_address']);
} catch (Throwable $e) {
throw new AuthenticationException('Authentication failed: .' . $e->getMessage(), 0, $e);
}
}
However, this approach doesn’t work because Symfony expects me to register a user provider.
Is there a way to bypass this requirement, or at least define a dummy user provider that doesn't require user entities? Any advice would be greatly appreciated!
https://redd.it/1itvsc8
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Use LiveCollectionType in existing form
I have a form for a job seeker. There's a field for job experiences(an array):
I have no idea on how to make my form display as i want. I want something like this, but i can't make all my form live. I just want the
Any advices or resources please ?
https://redd.it/1itxi9n
@r_php
I have a form for a job seeker. There's a field for job experiences(an array):
$builder
->add('experiences', LiveCollectionType::class, [
'label' => 'job_experiences',
'entry_type' => JobExperienceType::class,
'allow_add' => true,
'allow_delete' => true,
'by_reference' => false,
])
->add('profile_picture', ResourceType::class, [
'label' => 'profile_picture',
])
I have no idea on how to make my form display as i want. I want something like this, but i can't make all my form live. I just want the
experiences field to be live. I read the documentation but it talks about the entire form again, not just a field.Any advices or resources please ?
https://redd.it/1itxi9n
@r_php
Symfony UX
Embedded CollectionType Form - Symfony UX
Unlock the potential of Symfony's CollectionType while writing zero JavaScript.
This demo shows off adding and removing...
This demo shows off adding and removing...
Symfony Twig Variables Not Available After {% include %}
Hello everyone,
I'm currently working on a Symfony project and I'm struggling to understand a behavior in Twig. I'm trying to centralize my variable definitions.
At first, I thought about defining them in twig.yaml as globals, but since some of my variables are service function calls, that's not possible. 😕
So I tried creating a separate Twig file to store my variables and including it in all the files that need them, but unfortunately, my template doesn't recognize them. 😞
Example that doesn't work (Error: "Variable name does not exist.")
Workaround that works, but I don't like it
Since it's a big project, I'd have to change a lot of variable references, which is not ideal.
Question:
Is there a better way to include a file in Twig and make the variables inside it globally accessible without having to use vars.something everywhere?
Thanks in advance for your help! 😊
https://redd.it/1itymik
@r_php
Hello everyone,
I'm currently working on a Symfony project and I'm struggling to understand a behavior in Twig. I'm trying to centralize my variable definitions.
At first, I thought about defining them in twig.yaml as globals, but since some of my variables are service function calls, that's not possible. 😕
So I tried creating a separate Twig file to store my variables and including it in all the files that need them, but unfortunately, my template doesn't recognize them. 😞
Example that doesn't work (Error: "Variable name does not exist.")
{# base/base.html.twig #}{% include "base/elements/variables.html.twig" %}{{ name }} {# Throws an error #}{# base/elements/variables.html.twig #}{% set name = 'zerez' %}Workaround that works, but I don't like it
Since it's a big project, I'd have to change a lot of variable references, which is not ideal.
{# base/base.html.twig #}{% include "base/elements/variables.html.twig" with vars %}{{ vars.name }} {# Works, but not convenient #}Question:
Is there a better way to include a file in Twig and make the variables inside it globally accessible without having to use vars.something everywhere?
Thanks in advance for your help! 😊
https://redd.it/1itymik
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
What s the best way to use bootstrap css and js inside twig?
I read the documentation that use webpack encore and import it inside app.js etc.
But is it for turbo use?
How do we access bootstrap css n js from twig?
https://redd.it/1iu0m0l
@r_php
I read the documentation that use webpack encore and import it inside app.js etc.
But is it for turbo use?
How do we access bootstrap css n js from twig?
https://redd.it/1iu0m0l
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Is Laravel still the best choice for development of web applications? Is there some alternative?
I am not blaming Laravel. I know everybody (from the PHP world) knows it. And they have large community, good support, etc... It is surely a good choice.
So, it looks like "why should I look over for something else"? But I've learned that long-lasting projects/frameworks/libraries (name it as you wish) will get overwhelmed at some time.
Isn't this the case of Laravel? Is it still the top choice?
https://redd.it/1itxemo
@r_php
I am not blaming Laravel. I know everybody (from the PHP world) knows it. And they have large community, good support, etc... It is surely a good choice.
So, it looks like "why should I look over for something else"? But I've learned that long-lasting projects/frameworks/libraries (name it as you wish) will get overwhelmed at some time.
Isn't this the case of Laravel? Is it still the top choice?
https://redd.it/1itxemo
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Horrors of being a PHP dev in an old company
I just got a junior position at a small company who is in the market for over 15 years.
I had high hopes for this, the interview went great, they liked my github and my experience with other languages and data analysis. They said the system is made using a RAD software and deployed in "the cloud". I thought "ok, cool. some new things to learn at least".
That's when my dreams were crushed, the RAD system has enabled non php dev to write spaghetti code for years unchecked.
Nobody knows basic things like OOP or scalar types. Company is stuck at PHP 5.6 because of said spaghetti.
There's no svn or git to see what was modified, the only control is a database table saying "user X saved file Y" and hundreds of lines on top of each file saying what was modified.
Security is a fucking joke, not even an after thought.
They asked me to create an API to interact with the system, I was so fearful to have to build an API with php 5.6 but at least I only have to create a sdk in php, the api can be in whatever. >!but they dropped the database and nobody knows how to get up. its been 4 days and I'm still waiting!<
https://redd.it/1iu2ghz
@r_php
I just got a junior position at a small company who is in the market for over 15 years.
I had high hopes for this, the interview went great, they liked my github and my experience with other languages and data analysis. They said the system is made using a RAD software and deployed in "the cloud". I thought "ok, cool. some new things to learn at least".
That's when my dreams were crushed, the RAD system has enabled non php dev to write spaghetti code for years unchecked.
Nobody knows basic things like OOP or scalar types. Company is stuck at PHP 5.6 because of said spaghetti.
There's no svn or git to see what was modified, the only control is a database table saying "user X saved file Y" and hundreds of lines on top of each file saying what was modified.
Security is a fucking joke, not even an after thought.
They asked me to create an API to interact with the system, I was so fearful to have to build an API with php 5.6 but at least I only have to create a sdk in php, the api can be in whatever. >!but they dropped the database and nobody knows how to get up. its been 4 days and I'm still waiting!<
https://redd.it/1iu2ghz
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
My latest open-source package
I recently released my latest open-source package, Laravel Flows, as a way to encapsulate complex business logic by leveraging Laravel s pipelines.
Feedback or ideas welcome!
https://github.com/JustSteveKing/laravel-flows
https://redd.it/1iu3a4m
@r_php
I recently released my latest open-source package, Laravel Flows, as a way to encapsulate complex business logic by leveraging Laravel s pipelines.
Feedback or ideas welcome!
https://github.com/JustSteveKing/laravel-flows
https://redd.it/1iu3a4m
@r_php
GitHub
GitHub - JustSteveKing/laravel-flows: A fluent, modular workflow builder for Laravel that leverages the Pipeline pattern to simplify…
A fluent, modular workflow builder for Laravel that leverages the Pipeline pattern to simplify and organise business logic. - JustSteveKing/laravel-flows
WIP A mini Symfony app that leverages some great features in the perspective of building APIs. Good for beginners.
Hello devs, this is a simple blogging platform https://github.com/abdellahrk/microblog that might be helpful to some beginners. Features are being added and some ideas as well.
While there are tons of resources and guides out there amongst which the Symfony Demo App, this could also complement and be of help.
https://redd.it/1iu5ydj
@r_php
Hello devs, this is a simple blogging platform https://github.com/abdellahrk/microblog that might be helpful to some beginners. Features are being added and some ideas as well.
While there are tons of resources and guides out there amongst which the Symfony Demo App, this could also complement and be of help.
https://redd.it/1iu5ydj
@r_php
GitHub
GitHub - abdellahrk/microblog
Contribute to abdellahrk/microblog development by creating an account on GitHub.
Doubts about validation & doctrine collections
Hey
I am new to Symfony and recently noticed a few issues which are kind of bugging me.
While working on restful apis, I used #MapRequestPayload and #MapQueryString a lot, it seems like a nice feature, however there are unexpected behaviors. For example when you map to dto with required fields, and submit a request without body, you get HttpException from inside PayloadResolver, instead of validation related exception. Is this the most recommended way of handling data validation? I realize I can use ValidatorInterface and populate dtos manually, but this seems ugly and tedious.
Another thing, while working with lists of entities in query results, I noticed that doctrine collection offers very little functionality, and most operations end up being done on plain arrays using built in functions. Is it supposed to be like that in actual projects, or do you tend to install something to enhance collections?
https://redd.it/1iu7ezv
@r_php
Hey
I am new to Symfony and recently noticed a few issues which are kind of bugging me.
While working on restful apis, I used #MapRequestPayload and #MapQueryString a lot, it seems like a nice feature, however there are unexpected behaviors. For example when you map to dto with required fields, and submit a request without body, you get HttpException from inside PayloadResolver, instead of validation related exception. Is this the most recommended way of handling data validation? I realize I can use ValidatorInterface and populate dtos manually, but this seems ugly and tedious.
Another thing, while working with lists of entities in query results, I noticed that doctrine collection offers very little functionality, and most operations end up being done on plain arrays using built in functions. Is it supposed to be like that in actual projects, or do you tend to install something to enhance collections?
https://redd.it/1iu7ezv
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
I'm Joe Dixon, Engineering Team Lead of Laravel Cloud, Ask Me Anything!
Hey r/Laravel,
Next Monday, February 24, my team is launching Laravel Cloud to the world. Laravel Cloud is a fully managed infrastructure platform optimized specifically for Laravel and PHP.
I'll be hosting an AMA next Thursday, February 27 to answer your questions about Laravel Cloud. Add your questions below and I'll see you then!
https://redd.it/1iu8l8g
@r_php
Hey r/Laravel,
Next Monday, February 24, my team is launching Laravel Cloud to the world. Laravel Cloud is a fully managed infrastructure platform optimized specifically for Laravel and PHP.
I'll be hosting an AMA next Thursday, February 27 to answer your questions about Laravel Cloud. Add your questions below and I'll see you then!
https://redd.it/1iu8l8g
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Finally Integrated PayPal with Laravel—I will make rent this month
Hi everyone,
I’ve been using Paystack for payment processing on Maasai Market Online, but recently, one of my customers couldn’t complete a payment. That was a turning point—I needed a better solution for international payments.
I tried multiple PayPal packages for Laravel, and let’s just say... it wasn’t smooth sailing. Some had outdated docs, others threw weird errors. But after a lot of trial and error, I finally found the right package that works perfectly with Laravel—no issues at all!
Since Stripe isn’t available in my country and Lemon Squeezy doesn’t support physical goods, PayPal was the best option. I’m still a newbie and my project is still at its MVP stage, but every challenge makes me learn and appreciate Laravel even more.
If anyone is struggling with PayPal integration, I put together a GitHub Gist with a step-by-step guide:
PayPal Integration for Laravel 11
Hope it helps! Let me know what payment processors you’re using in your Laravel projects.
https://redd.it/1iu96hj
@r_php
Hi everyone,
I’ve been using Paystack for payment processing on Maasai Market Online, but recently, one of my customers couldn’t complete a payment. That was a turning point—I needed a better solution for international payments.
I tried multiple PayPal packages for Laravel, and let’s just say... it wasn’t smooth sailing. Some had outdated docs, others threw weird errors. But after a lot of trial and error, I finally found the right package that works perfectly with Laravel—no issues at all!
Since Stripe isn’t available in my country and Lemon Squeezy doesn’t support physical goods, PayPal was the best option. I’m still a newbie and my project is still at its MVP stage, but every challenge makes me learn and appreciate Laravel even more.
If anyone is struggling with PayPal integration, I put together a GitHub Gist with a step-by-step guide:
PayPal Integration for Laravel 11
Hope it helps! Let me know what payment processors you’re using in your Laravel projects.
https://redd.it/1iu96hj
@r_php
SymfonyLive Berlin 2025: Agentic Applications with Symfony
https://symfony.com/blog/symfonylive-berlin-2025-agentic-applications-with-symfony?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1iumln9
@r_php
https://symfony.com/blog/symfonylive-berlin-2025-agentic-applications-with-symfony?utm_source=Symfony%20Blog%20Feed&utm_medium=feed
https://redd.it/1iumln9
@r_php
Symfony
SymfonyLive Berlin 2025: Agentic Applications with Symfony (Symfony Blog)
Go beyond chat with Symfony and AI with Christopher Hertel! Explore agentic applications, learn key concepts, and see how AI can automate and enhance your business processes
Twig sandbox evaluate expression and filter the values
I have this in my twig:
$twig->render(
'{{ x + y }}',
'x' => 10, 'y' => 2
);
How to change Twig sandbox to evaluate
I tried to add a filter, like this:
$twig->addFilter(new TwigFilter('checkNull', function (string $value) {
}));
but I dont understand how to check the single values also if I pass them to the callback.
How can I check the two values before the expression is executed?
x + y|checkNull
I cannot find a good example onlline. Thanks for any help.
https://redd.it/1iumh5k
@r_php
I have this in my twig:
$twig->render(
'{{ x + y }}',
'x' => 10, 'y' => 2
);
How to change Twig sandbox to evaluate
x + y as an empty string if either x or y are empty (null)?I tried to add a filter, like this:
$twig->addFilter(new TwigFilter('checkNull', function (string $value) {
}));
but I dont understand how to check the single values also if I pass them to the callback.
How can I check the two values before the expression is executed?
x + y|checkNull
I cannot find a good example onlline. Thanks for any help.
https://redd.it/1iumh5k
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Form login with user+password giving 302code upon success
Is this correct behavior?
I tried form login. While successfully routing to intended page, the profiler shows 302 status code. And bootstrap css and js didnt work. I have to manually refresh the page for bootstrap css and js to work.
Same case happens with logout. It redirect to login page as intended but with 302status code and bootstrap js/css didnt work. The usernamefield also empty. It s supposed to be filled with last username. Upon refreshing the page, the bootstrap css/js work and last username appears.
https://redd.it/1iumgae
@r_php
Is this correct behavior?
I tried form login. While successfully routing to intended page, the profiler shows 302 status code. And bootstrap css and js didnt work. I have to manually refresh the page for bootstrap css and js to work.
Same case happens with logout. It redirect to login page as intended but with 302status code and bootstrap js/css didnt work. The usernamefield also empty. It s supposed to be filled with last username. Upon refreshing the page, the bootstrap css/js work and last username appears.
https://redd.it/1iumgae
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
Documenting multitenant API in Laravel with Scramble
https://scramble.dedoc.co/blog/multitenant-apis
https://redd.it/1iunrcd
@r_php
https://scramble.dedoc.co/blog/multitenant-apis
https://redd.it/1iunrcd
@r_php
scramble.dedoc.co
Documenting multitenant API in Laravel with Scramble - Scramble
OpenAPI (Swagger) documentation generator for Laravel. Without manual PHPDoc annotations.
Mastering Laravel: Where to Put Your Custom Code (And Why)
https://backpackforlaravel.com/articles/tutorials/mastering-laravel-where-to-put-your-custom-code-and-why
https://redd.it/1iuudts
@r_php
https://backpackforlaravel.com/articles/tutorials/mastering-laravel-where-to-put-your-custom-code-and-why
https://redd.it/1iuudts
@r_php
Backpack for Laravel
Mastering Laravel: Where to Put Your Custom Code (And Why)
Laravel has plenty of built-in features and conventions to keep your code clean. But let’s be real: sooner or later, you’ll need to wri...
Best PHP Framework for developing middleware/microservice/API layer
Looking for recommendations! (Please don't recommend Go/Nodejs, only PHP based) 🚀
We're planning to develop a microservice in PHP and are considering async frameworks for better performance. In your experience, which PHP async framework is the fastest and most efficient for handling high-load scenarios?
Some of the short-listed candidates:
Laravel Octane (w/ Swoole)
Symfony w/ Swool runtime
Would love to hear your thoughts—any suggestions or real-world insights would be super helpful! 🙌
https://redd.it/1iux03n
@r_php
Looking for recommendations! (Please don't recommend Go/Nodejs, only PHP based) 🚀
We're planning to develop a microservice in PHP and are considering async frameworks for better performance. In your experience, which PHP async framework is the fastest and most efficient for handling high-load scenarios?
Some of the short-listed candidates:
Laravel Octane (w/ Swoole)
Symfony w/ Swool runtime
Would love to hear your thoughts—any suggestions or real-world insights would be super helpful! 🙌
https://redd.it/1iux03n
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
PHP is the best
I have come to the conclusion that PHP is better when you use a framework or (better yet) when you write your own OOP framework.
The best WebDev programming language of all times
https://redd.it/1iuymbn
@r_php
I have come to the conclusion that PHP is better when you use a framework or (better yet) when you write your own OOP framework.
The best WebDev programming language of all times
https://redd.it/1iuymbn
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Playlist of Laracon EU 25 recordings is available on youtube
https://www.youtube.com/playlist?list=PLMdXHJK-lGoBWLQkMSyUORJkGk3ou27YI
https://redd.it/1iv3l1o
@r_php
https://www.youtube.com/playlist?list=PLMdXHJK-lGoBWLQkMSyUORJkGk3ou27YI
https://redd.it/1iv3l1o
@r_php
YouTube
LARACON EU 2025
Amsterdam, Netherlands Muziekgebouw Feb 3-4, 2025 Laracon is an annual gathering of passionate web developers that love building software using Laravel. Whet...
Audio analysis
Hello,
I'm not a developer myself, so I don't have a lot of knowledge, but I manage some projects in my company and I'm the contact person for the developers of our site (which runs on a Symfony framework), so I often need to understand more precisely the prerequisites and feasibility of a project before submitting it to them.
Here's my specific question. I'm working on a component that allows the user to upload audio (a meeting recording) and that indicates a quality score for this audio (voice intelligibility). I want to mix two techniques. I've already mastered the first, which consists of sending an audio extract to the Assembly API to obtain a trannoscription, and measuring an intelligibility result based on the confidence score of the transcribed words.
On the other hand, I want to weight this score by means of an analysis of the audio signal itself: the first score will therefore be lowered, for example, if the audio is saturated, or if there is significant reverberation.
Is there a specific library or function that would enable me to obtain an audio signal quality score for an extract analyzed after upload by the user?
Thank you !
https://redd.it/1iv5ujq
@r_php
Hello,
I'm not a developer myself, so I don't have a lot of knowledge, but I manage some projects in my company and I'm the contact person for the developers of our site (which runs on a Symfony framework), so I often need to understand more precisely the prerequisites and feasibility of a project before submitting it to them.
Here's my specific question. I'm working on a component that allows the user to upload audio (a meeting recording) and that indicates a quality score for this audio (voice intelligibility). I want to mix two techniques. I've already mastered the first, which consists of sending an audio extract to the Assembly API to obtain a trannoscription, and measuring an intelligibility result based on the confidence score of the transcribed words.
On the other hand, I want to weight this score by means of an analysis of the audio signal itself: the first score will therefore be lowered, for example, if the audio is saturated, or if there is significant reverberation.
Is there a specific library or function that would enable me to obtain an audio signal quality score for an extract analyzed after upload by the user?
Thank you !
https://redd.it/1iv5ujq
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community