PHP Reddit – Telegram
PHP Reddit
34 subscribers
292 photos
37 videos
24.9K links
Channel to sync with /r/PHP /r/Laravel /r/Symfony. Powered by awesome @r_channels and @reddit2telegram
Download Telegram
Launching TrueReviewer — A Robust & Complete Review and Rating System for Laravel

After successfully launching Commenter, I began my next big mission — TrueReviewer. I might be biased, but I believe TrueReviewer is one of the most complete and powerful review systems available for Laravel. Whether you're building a SaaS platform, e-commerce site, or any other web app, it’s designed to fit right in.

Unlike Commenter, TrueReviewer is API-agnostic — meaning the front-end (Vue.js) and back-end are completely decoupled. This gives you the freedom to integrate it into any Laravel project, whether it's a traditional server-side rendered app or a fully separated API-driven architecture using Vue as the front end. Since the Vue components are compiled into JavaScript, it works seamlessly across tech stacks.

TrueReviewer focuses on performance, customization, and design. It comes with five beautifully crafted components that are not just visually appealing but also accessible and user-friendly. Each component is built to make an impact without overwhelming the UI, offering a smooth and intuitive experience. Thanks to its modular design, you can use components independently based on your project’s needs.

Going beyond traditional review systems, TrueReviewer includes AI-powered features like sentiment detection and integrity checks, helping ensure the quality and trustworthiness of reviews.

TrueReviewer is currently offered as sponsorware — a paid product. I understand that the Laravel community often prefers open-source tools, and I genuinely planned to release this as open-source. However, given the effort, time, and resources involved, I needed to find a balance between sustainability and community contribution.

I hope you’ll see the value in this package — and if it helps your project, that alone makes it worth it.

Product Hunt

https://preview.redd.it/0k8sm3oc2cve1.jpg?width=1156&format=pjpg&auto=webp&s=d6c92a08acb17b7bc2bef9922d0a2fd91c97d1e3

https://preview.redd.it/64cxfoaj2cve1.jpg?width=1249&format=pjpg&auto=webp&s=3039f4bc293dfea5b3b44be08799f46201ca505f

https://preview.redd.it/6ftzjchv2cve1.jpg?width=1259&format=pjpg&auto=webp&s=9bd82b3d3f37fd8c86c485ba75c1d8710e9f9b70

https://preview.redd.it/qnfb56cw2cve1.jpg?width=1317&format=pjpg&auto=webp&s=9bd6c2a7d110af5cb47ef22886ae4fda7f980946



https://redd.it/1k15hxp
@r_php
I absolutely love this True Async RFC!!!

I have just been reading through the True Async Stage 3 and WOW! What a refreshing RFC! I love the implementation so so much!!! It’s so clean! It feels like PHP! Great job!

https://externals.io/message/127120

https://redd.it/1k16gp1
@r_php
I just realized backed enum cannot be printed directly

I was using some backed enums and realized that eums cannot be printed directly or passed to functions like fputcsv, even though there is a text rappresentation of them. Also, you cannot implement stringable.

I also found a few rfc talking about this:

[https://wiki.php.net/rfc/enumerations#auto-scalar\_conversion](https://wiki.php.net/rfc/enumerations#auto-scalar_conversion)
https://wiki.php.net/rfc/auto-implement\_stringable\_for\_string\_backed\_enums

In the first RFC, I guess it made sense at that time hold back on this behaviour. Instead, do you know what happend to the second RFC?

Maybe this discussion could be reopened now that enums are more battle tested?

https://redd.it/1k19onm
@r_php
Laravel: When you're the entire dev team and still ship faster
https://redd.it/1k1dh9h
@r_php
Facebook marketing api

Hello,

I am working in a legacy facebook marketing api. The legacy code does daily +4000 api query per day. To handle this the legacy code use proc_open and sleep for 5 sec for every chunk of apis. The code create some CSV and after finishing all the api calls it merge all CSV to one CSV to import later on db.

This solution works fine sometimes and sometimes freezes without any error. So I thought to refactor with laravel jobs/queues. Any one have been working with facebook apo or laravel queue to handle thousand of api calls?

https://redd.it/1k1gjjt
@r_php
Issue with doctrine flushing objects after exception

I'm running a Symfony command and the persists and flushes seem to work just fine until I throw an exception and the persists and flushes seem to stop working

here's the code:

try {
throw new \Exception("foo");
$successEvent = $this->dispatcher->dispatch($totalChargeEvent, 'billing.charge.card');
} catch (\Exception $e) {

$this->markSubnoscriptionsCanceled($subnoscriptionsToBePaid);

continue;
}



public function markSubnoscriptionsCanceled(array $subnoscriptions) : void
{
$now = new \DateTime();
foreach($subnoscriptions as $subnoscription) {

$subnoscription->fromArray(
'status' => Subnoscription::SUBSCRIPTION_STATUS_CANCELED,
, $this->em);
$subnoscription->setCanceledAt($now);
$this->em->persist($subnoscription);
}
$this->em->flush();
}

There are no exceptions or problems after the initial exception. Everything seems to work fine except that after the items are flushed... the changes aren't saved to the database. I'm having trouble understanding why this is happening. Another db row deletion returns with success after the exception as well, but in the Database, the row is still there (It works fine if the exception isn't thrown and caught). I checked and the objects are "contained" in the entity manager, and the connection is open. Any insight is helpful. thanks. Perhaps db connections function differently in commands? I dunno.

https://redd.it/1k1qoup
@r_php
Certifications

Unfortunately the financial and time commitment barrier required of post secondary education proved too great. I've worked as a Web Applications Developer for four years and in my current position do a mix of general IT and Wordpress Plugin Development. I want to better refine my craft (security and authentication are some weak points personally) and provide some sort of paper of proof to add on top of my Github for a future employer.


Any recommendations?

https://redd.it/1k1tjpd
@r_php
Help me convince company to allow me to add redis

I work for a small business which runs a PHP 8.3 /Symfony 7.2 API application (UI runs in React on a completely separate instance) in a major cloud provider. The instance is built in docker and runs apache.

We use the Lexik Authentication bundle so a running instance will provide a bearer token, currently stored in memory, with the refresh token stored in the database.

The cloud provider scales up and down the number of instances in response to load. However, because the bearer tokens are stored in memory in each instance, it becomes a lottery each time a request is made, as to if you will hit the same server that your system authenticated with initially, leading to lots and lots of requests to refresh the bearer token. Each request takes around 200 - 250ms to complete, so this adds a noticeable delay when using the UI.

I would like to add redis to our infrastructure so that, in the short term, store the bearer tokens in redis. I could use memcached as well, but I'm more familiar with redis.

My tech lead is not keen on this idea for some reason, even after I've explained all of this. I'm aware that Symfony supports redis out of the box as well, and this has also been explained.

How can I convince my organisation to at least let me set this up on a test environment (also running in the cloud provider)? I think this would be a massive improvement to the app.

Also, do you think it's worth moving the refresh tokens to redis as well? The app provides a facility to reset passwords using a token. Should that also move?

Also I mentioned Apache before. Would the app benefit from moving to nginx/PHP FPM?

Thanks for your help in advance.

https://redd.it/1k1u2m3
@r_php
Is React the new king of the front-end with Laravel?

We're considering moving away from Svelte in our large Inertia 1.0 application instead of migrating from Svelte 4 to 5.

Not because Svelte is bad - not all, it's fantastic, and I love Svelte 5 even more - but because we as a team feel like we're missing so much by being outside of the ecosystems of Vue and React.

Our first thought was to migrate to VueJS because we have experience with it, but also because almost everyone on the team has a personal opinion that it's much nicer to work with that React.

But one of our developers brought up the question - "even though we're not personal fans of React, should we be considering it purely for the ecosystem support?"

With Laravel Cloud being React, I can see many tools coming out in the future from the team that are React-first, and I haven't seen much 'buzz' in the Vue ecosystem in a long time.

I'd love to know how everyone is feeling around Vue recently - I believe that support for it will always remain in first-party tools (at least, for another {x} years), but how are you all feeling about it?


https://redd.it/1k20zh0
@r_php
Here are some funny definitions of (PHP), enjoy

1. PHP – Please Hold Pain

>

2. PHP – Probably Has Problems

>

3. PHP – People Hate Programming (in it)

>

4. PHP – Panic Here Please

>

5. PHP – Painful, Hilarious, Perpetual

>

6. PHP – Print Hello Please

>

7. PHP – Please Hire Python

>

8. PHP – Pizza Hut Programming

>

https://redd.it/1k21afg
@r_php
What happened with p++?

Hi all. I'm a programmer who mostly has a background in non web-dev programming (lots of data programming). Although I do have one personal project with Node and Express.

Several years ago I heard of the P++ project that was being debated within the php community. I read recently that PHP has a very good type system these days. Was that type system implemented from the p++ project or did it come from something else? I'm just curious.

Thanks!

https://redd.it/1k2eefr
@r_php
question about the programs you use to code?

Hi Everyone,
I just went through the tutorials; honestly, they were not very helpful. So i decided to start my project. For fun, I have decided to create an e-commerce website. My question is for Python people who use Visual Code. What about for PH,P and will this support HTML AND CSS?

https://redd.it/1k2ntma
@r_php
Symfony 7: Nullable password field vs Random password for OAuth users?

Hello,

I'm currently implementing multiple authentication methods (classic password login + Google OAuth via HWIOAuthBundle) in a Symfony 7 application.

I'm unsure about the best practice regarding the `password` field in my User entity. Two options come to mind:

**Option 1: Keep password non-nullable**
When a user logs in via OAuth, I'll generate and store a random hashed password:

$randomPwd = bin2hex(random_bytes(30));
$hashedPwd = $this->passwordHasher->hashPassword($user, $randomPwd);
$user->setPassword($hashedPwd);


**Option 2: Make password nullable**
Modify the default `User` entity to allow a nullable `password` field.
When using the default `FormLoginAuthenticator`, Symfony already handles empty passwords by throwing exceptions (e.g., `BadCredentialsException`).

What approach would you recommend, and why?

Thanks for your insights!

https://redd.it/1k2rbmq
@r_php
Secure Your Webhooks in Laravel: Preventing Data Spoofing

Hi all,

I hope you're having a lovely weekend! It's been a little while since I've posted on my blog so I thought I'd share this one. As I've mentioned before it's more for my reference but I write these articles in the hope that it helps and/or inspires others.

https://christalks.dev/post/secure-your-webhooks-in-laravel-preventing-data-spoofing-fe25a70e

I hope you enjoy the read and feedback is welcome!

https://redd.it/1k2rsqd
@r_php
Testing paying with Stripe with Behat

I have a Symfony app which is well covered with Behat tests. Now I need to add a functionality for paying with Stripe in it, which I also want to cover with tests. For the js scenarios I use Panther with gecko driver (firefox).

The implemented flow is:
1. The customer opens the checkout page and the Stripe card form is loaded
2. The customer enters the card details and presses Pay
3. A request is sent to the backend, which creates a Stripe PaymentIntent and responds with a client secret
4. The Stripe js library uses that client secret to confirm the payment intent
5. The customer is redirected to Stripe and then back to my app (a result page)
6. The payment is automatically captured

So far, when I open the page in Behat, i tried looking for the Stripe iframe with the card form to fill it, but i could not manage to get into it, even if i intentionally wait for more seconds for it to load.

My questions are:
1. Does it even make sense to test this?
2. If yes, do you have any suggestions how to test this properly?

https://redd.it/1k2rz5y
@r_php
Pitch Your Project 🐘

In this monthly thread you can share whatever code or projects you're working on, ask for reviews, get people's input and general thoughts, … anything goes as long as it's PHP related.

Let's make this a place where people are encouraged to share their work, and where we can learn from each other 😁

Link to the previous edition: /u/brendt_gd should provide a link

https://redd.it/1k2r9g2
@r_php