PHP Reddit – Telegram
PHP Reddit
34 subscribers
291 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
olvlvl/composer-attribute-collector v2.1.0

composer-attribute-collector is a Composer plugin designed to effectively discover PHP 8 attribute targets, and later retrieve them at near zero cost, without runtime reflection. After the autoloader dump, it collects attributes and generates a static file for fast access. This provides a convenient way to discover attribute-backed classes, methods, or properties—ideal for codebase analysis. (For known targets, traditional reflection remains an option.)

v2.1.0 highlights:

- The attribute collection expands to parameters. Special thanks to Markus Staab and Ondřej Mirtes for the contribution.
- The attribute collection expands to interfaces.
- The collector runs as a system command to avoid clashes between package versions used by Composer and the codebase.
- Use cases for Symfony and Laravel.

https://github.com/olvlvl/composer-attribute-collector

https://redd.it/1leepe1
@r_php
Advantages of the match function

Hello all.

I'm a PHP teacher at college since 3 years, and a php developper for 7 years.

Recently, I've seen a lot of students using the match function that came with PHP8.0. Example :

<?php

function translateHand(string $hand): string {

return match($hand) {

'rock' => 'pierre',
'paper' => 'papier',
'scissors' => 'ciseaux'

};

}

?>


What's the point using it instead of simply using an associative array ? Like return $translations[$hand] ?

It seems to me match is an unnecessary wrapper in this case, hurting performances, readability and reusability.

The funny thing is also that I only started to see this function the last 3 months while PHP8.0 released 3 years ago. Maybe it's the default with GenAI ?

https://redd.it/1leeqnc
@r_php
Building an OLX-like platform – ReactJS or PHP?

I'm building a marketplace platform similar to OLX with thousands of listings. SEO performance is critical (want to rank on search and AI tools like ChatGPT), and we plan to scale long-term. Torn between using ReactJS (with a Node backend or SSR) or a traditional PHP stack like Laravel.

What would you recommend for performance, SEO, and scalability?

https://redd.it/1legsnj
@r_php
FluidGraph, a Memgraph OGM (Object Graph Manager)

Hi everyone. I've been working for the past month or so on FluidGraph (https://github.com/primd-cooperative/fluidgraph/) as part of a PWA I'm building for Primd (https://primd.app). With more tests completed and the API having stabilized, I'm throwing the "beta" label on it if anyone is interested in taking it for a spin.

### Why?

Graph databases are really interesting and really useful for the type of data we're looking to work with. While many people are familiar with Neo4J and some libraries exist in the PHP space for it, there are handful of issues that lead us to creating something new:

- There are subtle differences between Neo4J and Memgraph
- Many of the Neo4J projects are no longer maintained
- Many of the projects borrow too many concepts from traditional relational-databases

We needed something that allowed for a lot more power and flexibility as it relates to working with graph models.

### Key Features

- Work directly with the additional information Edges can carry by having common patterns for Edges and Nodes.
- Seemlessly represent nodes as multiple classes, taking full advantage of labeling and the type of horizontal polymorphism that Graphs are capable of. This is achieved by maintaining both Entity references as well as per-property references to their data.
- Relationship "forking" and "merging" provides ways to work with subsets of large relationships without requiring the whole relationship. This is in addition to Eager, Lazy, and Manual relationship loading modes being supported.


Happy to answer any additional questions about how it works or why it works the way it does. The README is a good starting point, but there's a lot of fairly complex concepts and inner workings (like the per-property references) being done here.

https://redd.it/1lejmb6
@r_php
Laminas is ending support for their MVC. How would you handle it?

With Laminas MVC taken out of active development, what is going to happen with existing projects? Do you think it's ok to pull support and promote another architecture or must MVC be supported forever?

https://getlaminas.org/blog/2025-06-06-laminas-mvc-is-retiring.html

https://redd.it/1leona4
@r_php
Complete Symfony + Metronic Tailwind Integration Guide

I've created a guide for integrating Keenthemes Metronic v9 Tailwind templates with Symfony.

What's covered:

\- Complete project setup and asset management

\- Converting HTML templates to Twig

\- Both sidebar and header layout demos

The guide includes working code examples. You can see the documentation at: https://keenthemes.com/metronic/tailwind/docs/getting-started/integration/symfony

Get the code: https://github.com/keenthemes/metronic-tailwind-html-integration

https://redd.it/1lf3xac
@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/1lf573n
@r_php
Feedback Wanted Building a Modular Laravel App for Small Biz Use Cases – What Would You Add or Improve?

Hey fellow artisans 👋

I’m working on a full-stack Laravel + Livewire + Filament (TALL) app aimed at small businesses, service providers, and niche marketplaces.

It’s designed to be a starter kit or SaaS foundation that can be easily customized or white-labeled—kind of a modern “business in a box” with an admin panel, role-based access, Stripe integration, and Livewire SPA-like UX.

Here’s a breakdown of what’s built so far:


---

🧱 Key Features

Filament Admin Panel with full CRUD, theme toggles, and section visibility controls.

🧑‍🤝‍🧑 Role-Based Dashboards using Filament Shield:
Admins, team members, and customers (e.g., producers/retailers) see different views.

🛒 Stripe-Powered Shop: Products, variants, order management, etc.—TALL stack e-commerce with Stripe Checkout.

📅 Appointment Management: Optional scheduler for service-based businesses with email notifications.

📧 Contact Form + Editable Footer: Simple public-facing communication.

🎨 Section + Theme Control: Admins can re-order or hide public page sections via a Filament UI.

SPA-Like Navigation with wire:navigate across panels and public pages—super smooth transitions.

🔐 Security Suite: Built-in 2FA and OTP support, toggleable per user or role.

📊 Health Dashboard via Spatie Laravel Health for performance/server checks.

⚙️ Central Business Settings for announcements, data toggles, and niche-specific customization.

🧰 Dev-Friendly Setup: Modular codebase, demo seeds, clean service layer—ready to extend or fork.



---

I’d Love Your Input On:

Extensibility: Any best practices or gotchas you’ve learned from building modular Laravel apps?

Livewire UX: Have you used wire:navigate in production? Any pitfalls or performance tips?

Package Suggestions: Anything you’d add or swap? (e.g., for subnoscriptions, media management, localization, etc.)

Bloat Check: Am I trying to do too much out of the gate?

Features You'd Want: If you’ve built projects for small clients—what’s the one thing that always comes up?


I’m treating this as both a dev tool and a commercial boilerplate for future client work or SaaS spinoffs, so I really appreciate any insight from people who’ve walked this road.

Thanks, and happy coding!

https://redd.it/1lf9vu5
@r_php
Looking for other Devs who are learning Wordpress indepth

Looking for other like minded people who are looking to learn wp in depth ie plugin development, hooks, wp api etc

We can meet and chat on discord or learn on Google meets etc

Dm if intrested

https://redd.it/1lf9lu2
@r_php
microfy.php - a lightweight collection of PHP helper functions (experimentation phase)

Interested in a lightweight collection of procedural PHP helper functions? microfy.php is designed to speed up development and simplify common patterns like superglobal access, debugging, logging, array handling, UI snippets, and database access. It gives you practical tools with no setup, no classes, no magic. https://github.com/myappz-com/microfy.php

E.g. two lines to create a html table from db
$all = db_all($pdo, "SELECT * FROM users");
html_table($all);

or "pretty-print"
pp($array);
...
See more Examples

MicrofyClass.php is the object-oriented version
https://github.com/myappz-com/MicrofyClass.php

The idea is, to use these little helpers with plain PHP projects, without having to use a full framework.

Note: this tiny project is still experimental.
I am always interested to see respectful opinions of real PHP devs ;)

https://redd.it/1lfoujr
@r_php
NewRelic vs Nightwatch

Hello guys,

is anyone out there using New Relic for log ingestion, APM, infrastructure monitoring (nginx, database, frontend js errors) and alerts and thinks New Relic is overkill and considers switching to Nightwatch?

Feel free to share any experience with New Relic and Laravel ecosystem :)

Thanks!

https://redd.it/1lg06yt
@r_php
Is Flux too slow or am I missing something?

Hi everyone I am a huge Livewire fan and I liked Flux so much however its incredibly slow. When I use normal Alpine dropdown page speed 80ms when I add flux dropdown page speed with sample data it increases page speed to 1.7 seconds. I checked this using Laravel debugbar and when I use simple alpine dropdown page render 7 views and when I use flux dropdown it render 230 views. What is going on?

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