Handling large array without going over memory limit
Greetings. I have a large file with formatted multidimensional json i need to process. Currently I am using file_get_contents(), which sometimes ends in error "Allowed memory size exhausted".
I tried using fopen()/fgets(), but working with it seems a bit tricky:
1. It's a multidimensional array and fgets() returns a string that can't be parsed via json_decode(), like so:
2. Do I need to check every line for closing
Sorry if it's a stupid question, not really that familiar with PHP.
https://redd.it/1jovotx
@r_php
Greetings. I have a large file with formatted multidimensional json i need to process. Currently I am using file_get_contents(), which sometimes ends in error "Allowed memory size exhausted".
I tried using fopen()/fgets(), but working with it seems a bit tricky:
1. It's a multidimensional array and fgets() returns a string that can't be parsed via json_decode(), like so:
' "Lorem": "Ipsum",'. Am I supposed to trim trailing commas and spaces and add brackets myself?2. Do I need to check every line for closing
}] to parse nested array myself?Sorry if it's a stupid question, not really that familiar with PHP.
https://redd.it/1jovotx
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
AI Agents Memory And Context Window In PHP
https://inspector.dev/ai-agents-memory-and-context-window-in-php/
https://redd.it/1jou93h
@r_php
https://inspector.dev/ai-agents-memory-and-context-window-in-php/
https://redd.it/1jou93h
@r_php
Inspector
AI Agents Memory And Context Window In PHP
AI Agents in PHP with memory management and context window handling. Enable persistent, intelligent conversations.
Let's discuss API Design with Symfony: Share your thoughts :)
Hello r/symfony
I have been thinking a lot about how you manage API development in Symfony, especially outside of API Platform (or with it, if you use it)
I would love to hear your feedback on the following topics:
# 1. How you manage API
* How do you handle your API if you don't use API Platform?
* What prevents you from using API Platform? (legacy code, difficulty getting started, other reasons?)
* How do you define your API ?
# 2. Data Modeling Approach
* Do you use the Entity/Document directly, or do you prefer a DTO approach? (e.g., `ArticlePayload` as input -> `ArticleEntity`)
* What do you return in your API ? A direct entity or a response DTO like `ArticleResponse` (with or wihtout using serialization groups) ?
* Do you use mappers to convert DTO to entities and vice versa (e.g., `ArticlePayload` \-> `ArticleEntity`, `ArticleEntity` \-> `ArticleResponse`)? If so, how do you implement them? (Automapper bundle, manually ?)
# 3. API Structure and Relationships
* How do you handle relationships when creating resources (one-to-one, one-to-many, many-to-many)?
* Do you allow nested resource creation? For example, can you create an article along with its category in a single `POST /api/articles` request?
* Or do you prefer separate requests, first creating the category and then linking it to the article ?
* Do you structure your controllers by resource (e.g., `ArticleResourceController`) or prefer action-based controllers (e.g., `GetOneArticleResourceController`)? Or do you use another approach?
# 4. API Platform
* What do you think about API Platform approach, where resources are defined with #\[ApiResource\] as single entry, and as default Input/Output and custom Input/Output can be specified for special cases if neccesary ?
* Do know or use `StateOptions` in API Platform to separate entity from resource ?
# 5. Format and Pagination
* What API format do you use? JSON:API, JSON-LD, simple JSON with a custom structure?
* How do you handle pagination and resource filtering? (Using DTO or query params in array format directly in the repository ?)
# 6. Versioning and Permissions
* How do you manage API versioning? (Header, URL \`/v1, other ?)
* How do you handle field visibility based on permissions/roles if you have need to do that ?
# 7. Documentation
* How do you document your API? NelmioApiDocBundle ? Other bundle/tools ?
# 8. Data Validation
* How do you handle data validation on input?
* Do you use normalizers/serializers to transform incoming and outgoing data for better performance (or automapper like jolicode) ?
I really love to get feedback from the community on these topics, especially to understand the different choices and constraints that lead to using or not using API Platform, or use one approach or any others and have the pro/cons of each one.
Thanks in advance for your insights !
Here a current approach that I use (for side project for the moment)
[https://www.sharecode.in/jOaWFI](https://www.sharecode.in/jOaWFI)
Let me know what do you think about this approach. Would you improve or change something? Is there anything you wouldn't use in this structure ? What is the pros/cons ?
Sorry for the long text, but defining and API architecture for our different use cases is quite challenging 😃
Thanks for your time spent replying and exchanging on this !
https://redd.it/1jp23sq
@r_php
Hello r/symfony
I have been thinking a lot about how you manage API development in Symfony, especially outside of API Platform (or with it, if you use it)
I would love to hear your feedback on the following topics:
# 1. How you manage API
* How do you handle your API if you don't use API Platform?
* What prevents you from using API Platform? (legacy code, difficulty getting started, other reasons?)
* How do you define your API ?
# 2. Data Modeling Approach
* Do you use the Entity/Document directly, or do you prefer a DTO approach? (e.g., `ArticlePayload` as input -> `ArticleEntity`)
* What do you return in your API ? A direct entity or a response DTO like `ArticleResponse` (with or wihtout using serialization groups) ?
* Do you use mappers to convert DTO to entities and vice versa (e.g., `ArticlePayload` \-> `ArticleEntity`, `ArticleEntity` \-> `ArticleResponse`)? If so, how do you implement them? (Automapper bundle, manually ?)
# 3. API Structure and Relationships
* How do you handle relationships when creating resources (one-to-one, one-to-many, many-to-many)?
* Do you allow nested resource creation? For example, can you create an article along with its category in a single `POST /api/articles` request?
* Or do you prefer separate requests, first creating the category and then linking it to the article ?
* Do you structure your controllers by resource (e.g., `ArticleResourceController`) or prefer action-based controllers (e.g., `GetOneArticleResourceController`)? Or do you use another approach?
# 4. API Platform
* What do you think about API Platform approach, where resources are defined with #\[ApiResource\] as single entry, and as default Input/Output and custom Input/Output can be specified for special cases if neccesary ?
* Do know or use `StateOptions` in API Platform to separate entity from resource ?
# 5. Format and Pagination
* What API format do you use? JSON:API, JSON-LD, simple JSON with a custom structure?
* How do you handle pagination and resource filtering? (Using DTO or query params in array format directly in the repository ?)
# 6. Versioning and Permissions
* How do you manage API versioning? (Header, URL \`/v1, other ?)
* How do you handle field visibility based on permissions/roles if you have need to do that ?
# 7. Documentation
* How do you document your API? NelmioApiDocBundle ? Other bundle/tools ?
# 8. Data Validation
* How do you handle data validation on input?
* Do you use normalizers/serializers to transform incoming and outgoing data for better performance (or automapper like jolicode) ?
I really love to get feedback from the community on these topics, especially to understand the different choices and constraints that lead to using or not using API Platform, or use one approach or any others and have the pro/cons of each one.
Thanks in advance for your insights !
Here a current approach that I use (for side project for the moment)
[https://www.sharecode.in/jOaWFI](https://www.sharecode.in/jOaWFI)
Let me know what do you think about this approach. Would you improve or change something? Is there anything you wouldn't use in this structure ? What is the pros/cons ?
Sorry for the long text, but defining and API architecture for our different use cases is quite challenging 😃
Thanks for your time spent replying and exchanging on this !
https://redd.it/1jp23sq
@r_php
Sharecode
ShareCode - AI-based Real Time Code Sharing Plateform
Realtime Code sharing plateform for developers.
Symfony validator codes
I was looking at the validator and saw that when you get a constraint violation, it is associated with a "code" in the format of a UUID. When I look at the constraint classes, I can see these hard coded UUIDs. I cannot find anything in the Symfony documentation referencing these, so my question is, what do these UUIDs reference?
For example, from Symfony\Component\Validator\Constraints\Length:
public const TOO_SHORT_ERROR = '9ff3fdc4-b214-49db-8718-39c315e33d45';
public const TOO_LONG_ERROR = 'd94b19cc-114f-4f44-9cc4-4138e80a87b9';
public const NOT_EQUAL_LENGTH_ERROR = '4b6f5c76-22b4-409d-af16-fbe823ba9332';
public const INVALID_CHARACTERS_ERROR = '35e6a710-aa2e-4719-b58e-24b35749b767';
In the constraint violation interface, the "code" field is described as "a machine-digestible error code for the violation". How would these codes be used?
https://redd.it/1jp2d8u
@r_php
I was looking at the validator and saw that when you get a constraint violation, it is associated with a "code" in the format of a UUID. When I look at the constraint classes, I can see these hard coded UUIDs. I cannot find anything in the Symfony documentation referencing these, so my question is, what do these UUIDs reference?
For example, from Symfony\Component\Validator\Constraints\Length:
public const TOO_SHORT_ERROR = '9ff3fdc4-b214-49db-8718-39c315e33d45';
public const TOO_LONG_ERROR = 'd94b19cc-114f-4f44-9cc4-4138e80a87b9';
public const NOT_EQUAL_LENGTH_ERROR = '4b6f5c76-22b4-409d-af16-fbe823ba9332';
public const INVALID_CHARACTERS_ERROR = '35e6a710-aa2e-4719-b58e-24b35749b767';
In the constraint violation interface, the "code" field is described as "a machine-digestible error code for the violation". How would these codes be used?
https://redd.it/1jp2d8u
@r_php
Reddit
From the symfony community on Reddit
Explore this post and more from the symfony community
The PHP Foundation: Impact and Transparency Report 2024
https://thephp.foundation/blog/2025/03/31/transparency-and-impact-report-2024/
https://redd.it/1jp6itg
@r_php
https://thephp.foundation/blog/2025/03/31/transparency-and-impact-report-2024/
https://redd.it/1jp6itg
@r_php
thephp.foundation
The PHP Foundation: Impact and Transparency Report 2024
The PHP Foundation — Supporting, Advancing, and Developing the PHP Language
This is an interactive video of the TALL stack web app i've created for small businesses
https://app.arcade.software/share/h1IWCpnFk0tsYB0N8bIz
I created this interactive video for the app i've created for managing small businnesses. i hope you all like it.
https://redd.it/1jp6lc6
@r_php
https://app.arcade.software/share/h1IWCpnFk0tsYB0N8bIz
I created this interactive video for the app i've created for managing small businnesses. i hope you all like it.
https://redd.it/1jp6lc6
@r_php
Arcade
Discover Our Dynamic Dashboard Experience
This is an interactive overview of Witty workflow and what it has to offer
Let’s Talk API Design – Share Your Thoughts
Hey everyone,
I recently wrote an article about API design, and I wanted to hear your thoughts on the topic. While I'm using Symfony as my framework, the discussion is more about API design principles. Whether you use Symfony, Laravel or any other PHP framework, I think we all face similar challenges when building API.
I’d love to hear your experiences and how you approach these challenges in your own projects !
Check out the original thread Let's discuss API Design with Symfony: Share your thoughts :)
https://redd.it/1jp6zrj
@r_php
Hey everyone,
I recently wrote an article about API design, and I wanted to hear your thoughts on the topic. While I'm using Symfony as my framework, the discussion is more about API design principles. Whether you use Symfony, Laravel or any other PHP framework, I think we all face similar challenges when building API.
I’d love to hear your experiences and how you approach these challenges in your own projects !
Check out the original thread Let's discuss API Design with Symfony: Share your thoughts :)
https://redd.it/1jp6zrj
@r_php
Reddit
From the symfony community on Reddit: Let's discuss API Design with Symfony: Share your thoughts :)
Explore this post and more from the symfony community
Rebuilding my 15-year-old PHP project with Symfony — looking for people who might want to help!
Hey everyone 👋
About 15 years ago, I built a complete RPG text-based engine in raw PHP — no framework, just pure old-school code. It took me around 3 years to get it to a stable and feature-rich state, and it was fully customizable so people could host their own games.
I’ve recently decided to bring the project back to life, this time using Symfony to make it clean, modular, and future-proof.
I’ve been coding on it in my free time, but honestly… I’m moving way too slowly. Between work, life, and learning the Symfony way of doing things properly, I feel like at this rate, it’ll take me another 10 years to get anywhere 😅
My plan:
Rewrite the whole engine with a clean MVC architecture
Make it easy to install, host, and extend
Use SQLite first (PostgreSQL later possible)
Turn it into a real open-source project that others can use, fork, or build their own games on
I’m still working actively on the codebase, but I’d love to find others who might be interested in this kind of project and want to contribute — whether with ideas, code, testing, or just hanging around to share feedback.
Here’s the GitHub repo if you're curious:
https://github.com/brindiwanko/Caranille
Thanks for reading! If this sounds like your kind of side project, feel free to drop a comment or join the repo. Let’s make it awesome together 🚀
Cheers,
Jérémy
https://redd.it/1jpjshl
@r_php
Hey everyone 👋
About 15 years ago, I built a complete RPG text-based engine in raw PHP — no framework, just pure old-school code. It took me around 3 years to get it to a stable and feature-rich state, and it was fully customizable so people could host their own games.
I’ve recently decided to bring the project back to life, this time using Symfony to make it clean, modular, and future-proof.
I’ve been coding on it in my free time, but honestly… I’m moving way too slowly. Between work, life, and learning the Symfony way of doing things properly, I feel like at this rate, it’ll take me another 10 years to get anywhere 😅
My plan:
Rewrite the whole engine with a clean MVC architecture
Make it easy to install, host, and extend
Use SQLite first (PostgreSQL later possible)
Turn it into a real open-source project that others can use, fork, or build their own games on
I’m still working actively on the codebase, but I’d love to find others who might be interested in this kind of project and want to contribute — whether with ideas, code, testing, or just hanging around to share feedback.
Here’s the GitHub repo if you're curious:
https://github.com/brindiwanko/Caranille
Thanks for reading! If this sounds like your kind of side project, feel free to drop a comment or join the repo. Let’s make it awesome together 🚀
Cheers,
Jérémy
https://redd.it/1jpjshl
@r_php
GitHub
GitHub - brindiwanko/Caranille: RPG Maker on PHP
RPG Maker on PHP. Contribute to brindiwanko/Caranille development by creating an account on GitHub.
Headless CMS vs. Custom-Built CMS with PHP: Which One Enhances Skills and Career Growth?
Should I use a headless CMS or build my own CMS with PHP? Which option helps improve my skills the most and benefits my future career?
https://redd.it/1jpk1jv
@r_php
Should I use a headless CMS or build my own CMS with PHP? Which option helps improve my skills the most and benefits my future career?
https://redd.it/1jpk1jv
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Powerful timeseries metrics using TimescaleDB and Laravel
https://youtu.be/YFujIFWrkZQ
https://redd.it/1jpmbb7
@r_php
https://youtu.be/YFujIFWrkZQ
https://redd.it/1jpmbb7
@r_php
YouTube
Powerful timeseries metrics using Timescale and Laravel
#laravel #development #postgres #timescale
In this video I talk about how we use Timescale and Postgres to power our analytics platform.
---
👉 Book a consulting call: https://cal.com/sabatino/developer-consulting
---
Demo repository: https://github.co…
In this video I talk about how we use Timescale and Postgres to power our analytics platform.
---
👉 Book a consulting call: https://cal.com/sabatino/developer-consulting
---
Demo repository: https://github.co…
Need Better Filtering, Searching & Sorting in Laravel? Check Out Query Builder Criteria! 🚀
https://github.com/omaressaouaf/query-builder-criteria
https://redd.it/1jpsh21
@r_php
https://github.com/omaressaouaf/query-builder-criteria
https://redd.it/1jpsh21
@r_php
GitHub
GitHub - omaressaouaf/query-builder-criteria: Define reusable query criteria for filtering, sorting, search, field selection, and…
Define reusable query criteria for filtering, sorting, search, field selection, and includes in Laravel Eloquent models - omaressaouaf/query-builder-criteria
Need Better Filtering, Searching & Sorting in Laravel? Check Out Query Builder Criteria! 🚀
https://github.com/omaressaouaf/query-builder-criteria
https://redd.it/1jpsn3x
@r_php
https://github.com/omaressaouaf/query-builder-criteria
https://redd.it/1jpsn3x
@r_php
GitHub
GitHub - omaressaouaf/query-builder-criteria: Define reusable query criteria for filtering, sorting, search, field selection, and…
Define reusable query criteria for filtering, sorting, search, field selection, and includes in Laravel Eloquent models - omaressaouaf/query-builder-criteria
Laravel Wayfinder Released in Beta
Laravel Wayfinder bridges your Laravel backend and TypeScript frontend with zero friction. It automatically generates fully-typed, importable TypeScript functions for your controllers and routes — so you can call your Laravel endpoints directly in your client code just like any other function. No more hardcoding URLs, guessing route parameters, or syncing backend changes manually.
https://github.com/laravel/wayfinder
https://x.com/taylorotwell/status/1907511484961468698
https://redd.it/1jpyur7
@r_php
Laravel Wayfinder bridges your Laravel backend and TypeScript frontend with zero friction. It automatically generates fully-typed, importable TypeScript functions for your controllers and routes — so you can call your Laravel endpoints directly in your client code just like any other function. No more hardcoding URLs, guessing route parameters, or syncing backend changes manually.
https://github.com/laravel/wayfinder
https://x.com/taylorotwell/status/1907511484961468698
https://redd.it/1jpyur7
@r_php
GitHub
GitHub - laravel/wayfinder
Contribute to laravel/wayfinder development by creating an account on GitHub.
Will the 20% tariff be added for EU people on LC?
Will the price rise? Can anybody from the team comment?
https://redd.it/1jpzedu
@r_php
Will the price rise? Can anybody from the team comment?
https://redd.it/1jpzedu
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Laravel inside Wordpress?
Has the thought ever occurred to your mind If Laravel can be used as headless framework as a package inside the WordPress? If someone trys to do that, what issues could he come across?
https://redd.it/1jq7en8
@r_php
Has the thought ever occurred to your mind If Laravel can be used as headless framework as a package inside the WordPress? If someone trys to do that, what issues could he come across?
https://redd.it/1jq7en8
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Will the EUs two-stage reciprocal tariff on US services effect the price of LC?
Sophie Primas told they will target US services in Europe in two stages. How will that effect the price of LC for European customers and world customers? Will the prices rise? Can anybody from the LC team respond, please?
Mainly this is concerning:
"But we are also going to attack services. For example, online services, which are not taxed today but could be," Primas said.
https://redd.it/1jqbv6v
@r_php
Sophie Primas told they will target US services in Europe in two stages. How will that effect the price of LC for European customers and world customers? Will the prices rise? Can anybody from the LC team respond, please?
Mainly this is concerning:
"But we are also going to attack services. For example, online services, which are not taxed today but could be," Primas said.
https://redd.it/1jqbv6v
@r_php
Reddit
From the laravel community on Reddit
Explore this post and more from the laravel community
Mastering Laravel Streamed Responses: Boost Performance with Fast Data
https://codingtricks.co/posts/mastering-laravel-streamed-responses-boost-performance-with-fast-data-delivery
https://redd.it/1jqd805
@r_php
https://codingtricks.co/posts/mastering-laravel-streamed-responses-boost-performance-with-fast-data-delivery
https://redd.it/1jqd805
@r_php
codingtricks.co
Mastering Laravel Streamed Responses: Boost Performance with Fast Data Delivery - CodingTricks
Learn Laravel’s streamed responses—stream(), streamJson(), and eventStream()—to send data faster, save memory, and build real-time features like live dashboards
SMTP authentication problem with Symfony Mailer and Mailtrap
0
I am working on a Dockerized Symfony 7.2 project based on [this GitHub repository](https://github.com/dunglas/symfony-docker/tree/main) and I would like to install Mailtrap to send and test emails.
# What I did
1. I followed the documentation provided for installing `symfony/mailer`.
2. I created an account on Mailtrap and included the `MAILER_DSN` line provided by the platform in my `.env` and `.env.dev` files:
MAILER_DSN="smtp://19b3103b9f82b0:****4d7f@sandbox.smtp.mailtrap.io:2525"
1. I then added a very basic email sending code to test if it was working:
$email = (new Email())
->from('hello@example.com')
->to('you@example.com')
->subject('Test mailer')
->text('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');
$mailer->send($email);
When I try to send the email, I receive the following error:
Failed to authenticate on SMTP server with username "19b3103b9f82b0" using the following authenticators: "CRAM-MD5", "LOGIN", "PLAIN". Authenticator "CRAM-MD5" returned "Expected response code "235" but got code "535", with message "535 5.7.0 Invalid credentials".". Authenticator "LOGIN" returned "Expected response code "334" but got empty code.". Authenticator "PLAIN" returned "Expected response code "235" but got empty code."
But in the Symfony toolbar, i can see that the email seems to have been send :
https://preview.redd.it/bv5950m5rmse1.png?width=1228&format=png&auto=webp&s=d85d33c754ac2cda939f4d7fc25373259ca806bb
# What I have tried
1. I verified the Mailtrap credentials.
2. I tried with and without quotes around the `MAILER_DSN` value.
3. I tested with this simple PHP noscript using `symfony/mailer` outside of Symfony, but it gives me the same error.
<?php
use Symfony\Component\Mailer\Transport;
use Symfony\Component\Mailer\Mailer;
use Symfony\Component\Mime\Email;
require 'vendor/autoload.php';
$transport = Transport::fromDsn('smtp://19b3103b9f82b0:****4d7f@sandbox.smtp.mailtrap.io:2525');
$mailer = new Mailer($transport);
$email = (new Email())
->from('hello@example.com')
->to('you@example.com')
->subject('Test mailer')
->text('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');
$mailer->send($email);
echo "Email sent successfully!";
?>
1. I checked my configuration in `config/packages/mailer.yaml`:
framework:
mailer:
dsn: '%env(MAILER_DSN)%'
1. I tried changing the port to 587, but it didn't solve the issue.
2. I tried using STARTTLS, but still got the same error.
3. I tested the SMTP connection with `telnet`:
telnet sandbox.smtp.mailtrap.io 2525
It returns:
Trying 18.215.44.90...
Connected to sandbox.smtp.mailtrap.io.
Escape character is '^]'.
220 smtp.mailtrap.io ESMTP ready
Connection closed by foreign host. (This line appears after about 1 minute)
# Question
How can I resolve this SMTP authentication problem with Mailtrap and Symfony Mailer? Is there something I missed or another configuration I should check?
https://redd.it/1jqjw2s
@r_php
0
I am working on a Dockerized Symfony 7.2 project based on [this GitHub repository](https://github.com/dunglas/symfony-docker/tree/main) and I would like to install Mailtrap to send and test emails.
# What I did
1. I followed the documentation provided for installing `symfony/mailer`.
2. I created an account on Mailtrap and included the `MAILER_DSN` line provided by the platform in my `.env` and `.env.dev` files:
MAILER_DSN="smtp://19b3103b9f82b0:****4d7f@sandbox.smtp.mailtrap.io:2525"
1. I then added a very basic email sending code to test if it was working:
$email = (new Email())
->from('hello@example.com')
->to('you@example.com')
->subject('Test mailer')
->text('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');
$mailer->send($email);
When I try to send the email, I receive the following error:
Failed to authenticate on SMTP server with username "19b3103b9f82b0" using the following authenticators: "CRAM-MD5", "LOGIN", "PLAIN". Authenticator "CRAM-MD5" returned "Expected response code "235" but got code "535", with message "535 5.7.0 Invalid credentials".". Authenticator "LOGIN" returned "Expected response code "334" but got empty code.". Authenticator "PLAIN" returned "Expected response code "235" but got empty code."
But in the Symfony toolbar, i can see that the email seems to have been send :
https://preview.redd.it/bv5950m5rmse1.png?width=1228&format=png&auto=webp&s=d85d33c754ac2cda939f4d7fc25373259ca806bb
# What I have tried
1. I verified the Mailtrap credentials.
2. I tried with and without quotes around the `MAILER_DSN` value.
3. I tested with this simple PHP noscript using `symfony/mailer` outside of Symfony, but it gives me the same error.
<?php
use Symfony\Component\Mailer\Transport;
use Symfony\Component\Mailer\Mailer;
use Symfony\Component\Mime\Email;
require 'vendor/autoload.php';
$transport = Transport::fromDsn('smtp://19b3103b9f82b0:****4d7f@sandbox.smtp.mailtrap.io:2525');
$mailer = new Mailer($transport);
$email = (new Email())
->from('hello@example.com')
->to('you@example.com')
->subject('Test mailer')
->text('Lorem ipsum dolor sit amet, consectetur adipiscing elit.');
$mailer->send($email);
echo "Email sent successfully!";
?>
1. I checked my configuration in `config/packages/mailer.yaml`:
framework:
mailer:
dsn: '%env(MAILER_DSN)%'
1. I tried changing the port to 587, but it didn't solve the issue.
2. I tried using STARTTLS, but still got the same error.
3. I tested the SMTP connection with `telnet`:
telnet sandbox.smtp.mailtrap.io 2525
It returns:
Trying 18.215.44.90...
Connected to sandbox.smtp.mailtrap.io.
Escape character is '^]'.
220 smtp.mailtrap.io ESMTP ready
Connection closed by foreign host. (This line appears after about 1 minute)
# Question
How can I resolve this SMTP authentication problem with Mailtrap and Symfony Mailer? Is there something I missed or another configuration I should check?
https://redd.it/1jqjw2s
@r_php
GitHub
GitHub - dunglas/symfony-docker: A Docker-based installer and runtime for Symfony. Install: download and `docker compose up`.
A Docker-based installer and runtime for Symfony. Install: download and `docker compose up`. - dunglas/symfony-docker
Making my project more recent php conventional
Hey,
Had started this project few years back. It is a Laravel based project trying to make a simple invoicing, finance tracking and other featrures.
Wrote code to make it work at least, and after sharing the code in github and sharing got feedbacks, one of which was to make the php code more recent with type hinting, return types, and more. Still working on updating the code and there is still lots of part to update the code. However the php code I have updated quite a few bits.
Wanted to share it here again, as i said many parts still need updates, and many bugs to fix yet though keeping it a work in progress.
https://github.com/oitcode/samarium
Thanks.
https://redd.it/1jqlw9m
@r_php
Hey,
Had started this project few years back. It is a Laravel based project trying to make a simple invoicing, finance tracking and other featrures.
Wrote code to make it work at least, and after sharing the code in github and sharing got feedbacks, one of which was to make the php code more recent with type hinting, return types, and more. Still working on updating the code and there is still lots of part to update the code. However the php code I have updated quite a few bits.
Wanted to share it here again, as i said many parts still need updates, and many bugs to fix yet though keeping it a work in progress.
https://github.com/oitcode/samarium
Thanks.
https://redd.it/1jqlw9m
@r_php
GitHub
GitHub - shyamsitaula/samarium: Open-source business management system with ERP, POS, invoicing, and CMS features. Laravel-based…
Open-source business management system with ERP, POS, invoicing, and CMS features. Laravel-based, Docker-ready. Still in active development. - shyamsitaula/samarium
A cookieless, cache-friendly image proxy in Laravel (inspired by Cloudflare)
https://aaronfrancis.com/2025/a-cookieless-cache-friendly-image-proxy-in-laravel-inspired-by-cloudflare-9e95f7e0
https://redd.it/1jqwm4i
@r_php
https://aaronfrancis.com/2025/a-cookieless-cache-friendly-image-proxy-in-laravel-inspired-by-cloudflare-9e95f7e0
https://redd.it/1jqwm4i
@r_php
Aaronfrancis
A cookieless, cache-friendly image proxy in Laravel (inspired by Cloudflare) - Aaron Francis
Transforming and serving images from Laravel in a cache-friendly way.