PHP Reddit – Telegram
PHP Reddit
33 subscribers
293 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
Any detailed and in-depth resource for Symfony?

Hello everyone. I decided to switch from Java to PHP and mess around with Symfony and try to understand what is it and how it works. I decided to clone this repo: https://github.com/Sylius/Sylius try to run it, maybe develop something and take a look at it, google what i dont understand and so on. But I noticed that theres no proper explanation for Symfony framework. For example what is "package", "bundle", "component", and other stuff? Why is there "Kernel.php" and what is it there? What Symfony has to do with Linux kernel? Why there are multiple ".gitignore" files? Whats the purpose of "bin" folder (in docs its said "The bin/ directory contains the main CLI entry point: console. You will use it all the time." but it leaves you with more questions than answers)? Why there is JS stuff in PHP project? And so on. Is there a proper tutorial/guide/resource that explains Symfony from the step 0?

Any help appreciated

https://redd.it/1ivrv1z
@r_php
Should php bolt driver be transfered from neo4j-php GH organization?

What is Bolt?
Neo4j has published the Bolt network protocol specification for graph database communication. Its use is unrestricted by any license, making it public and free. It is currently used by graph databases like Neo4j, Memgraph, Amazon Neptune, and others.

GitHub organization?
At some point, Neo4j recognized the growing interest from the PHP community and created the GitHub organization https://github.com/neo4j-php to gather community projects. However, Neo4j does not provide official support for these projects, nor does it offer financial support to members of this community.

What is all this about?
I wrote and maintain a PHP library for Bolt, which I transferred to this organization some years ago. My driver is low-level and works with any system that supports Bolt, regardless of version. However, keeping this project within the "official" Neo4j PHP organization has become restrictive.

Should I transfer my project back to me away from this organization?

View Poll

https://redd.it/1ivrqkl
@r_php
An Unnecessary PHP Project to Obfuscate Frontend Code in the Backend (Only to Decode It on the Client Side)"

The idea is to obfuscate frontend code (like HTML, CSS, JS) in the backend using PHP, and then simply decode it back on the client side. It's like hiding a secret message in plain sight, but with extra steps. 🤷‍♂️

Why?

For fun? Maybe.

To confuse bots that doesn't render javanoscript? Possibly.

To make your life unnecessarily complicated? Definitely!!


Here's the project: https://github.com/gokaybiz/Obfuscator-class

https://redd.it/1ivve62
@r_php
Could someone please recommend in-depth resources on PHP basics and internals?

Hello. Im trying to learn PHP and currently its hell on earth. All videos and reads are the same "This is a variable, this is a loop, this is how you connect to DB". But no one talks about what the hell is php.ini, the order in which the php code is read and executed, no one even mentions that you can run php from the command line. Im coming from Java, and when I was learning it, I was explained the internals, how the code is being executed, that there is a Java code, that there is a compiler, what happens when you click "Run" in your IDE. Why theres no one who knows/teaches about the same things in PHP?

Thanks for any help

https://redd.it/1ivwtaz
@r_php
PHP 8.4 brings CSS selectors :)

[https://www.php.net/releases/8.4/en.php](https://www.php.net/releases/8.4/en.php)

RFC: [https://wiki.php.net/rfc/dom\_additions\_84#css\_selectors](https://wiki.php.net/rfc/dom_additions_84#css_selectors)

**New way:**

$dom = Dom\HTMLDocument::createFromString(
<<<'HTML'
<main>
<article>PHP 8.4 is a feature-rich release!</article>
<article class="featured">PHP 8.4 adds new DOM classes that are spec-compliant, keeping the old ones for compatibility.</article>
</main>
HTML,
LIBXML_NOERROR,
);

$node = $dom->querySelector('main > article:last-child');
var_dump($node->classList->contains("featured")); // bool(true)

**Old way:**

$dom = new DOMDocument();
$dom->loadHTML(
<<<'HTML'
<main>
<article>PHP 8.4 is a feature-rich release!</article>
<article class="featured">PHP 8.4 adds new DOM classes that are spec-compliant, keeping the old ones for compatibility.</article>
</main>
HTML,
LIBXML_NOERROR,
);

$xpath = new DOMXPath($dom);
$node = $xpath->query(".//main/article[not(following-sibling::*)]")[0];
$classes = explode(" ", $node->className); // Simplified
var_dump(in_array("featured", $classes)); // bool(true)

https://redd.it/1iw1q94
@r_php
Feedback needed - new package (LarAgent)

Hey! I recently released a new package which aims to simplify AI Agent development in Laravel. Please check it out: https://github.com/MaestroError/LarAgent

The docs aren't fully finished yet, but there is pretty enough to get some insight, install and try it out.

Your ideas and suggestions are crucial. Any feedback will appreciated!

https://redd.it/1iw6b7a
@r_php
Is API platform the best choice for building a REST API?

Hey everyone,

I’m currently working with Symfony and wondering if API Platform is the go-to solution for building REST APIs these days. I see a lot of recommendations for it, but I’m curious whether it’s truly the best approach for modern API development.

For those who have used it:

How does it compare to a manually built Symfony API with controllers and services?

Does it add unnecessary complexity, or does it streamline API development significantly?

Is the learning curve steep, or is it worth investing time in mastering?


Would love to hear your thoughts and experiences!



https://redd.it/1iw9r13
@r_php
Hosting recommendations with supprt

Hi i am on Forge, and its worked so well, but right now I have the dreaded the site cant be reached error on Chrome,It got me thinking is there a good host that I can get live chat support with, so if an error happens like this I can get it fixed quickly?

Just wanted to see if you guys know of any hosts that has live chat support, like cloudways? Thanks

#

https://redd.it/1iwcbuh
@r_php
Is it a sin to use brackets when importing multiple classes?

Example:

<?php

namespace App\Filament\Resources;

use App\Enums\{CourseStatus, RegistrationStatus};
use App\Http\Controllers\CourseController;
use App\Models\Course;
use App\Filament\Resources\CourseResource\Pages\{ListCourses, ManageCourse};
use App\Filament\Resources\CourseResource\RelationManagers\RegistrationRelationManager;
use BezhanSalleh\FilamentShield\Contracts\HasShieldPermissions;
use Filament\Forms\Components\{DatePicker, DateTimePicker, Placeholder, TextInput};
use Filament\Forms\Form;
use Filament\Notifications\Notification;
use Filament\Resources\Resource;
use Filament\Tables\Actions\{Action, EditAction};
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Filters\{Filter, SelectFilter, TrashedFilter};
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Carbon;




https://redd.it/1iwd662
@r_php
Weekly /r/Laravel Help Thread

Ask your Laravel help questions here. To improve your chances of getting an answer from the community, here are some tips:

What steps have you taken so far?
What have you tried from the documentation?
Did you provide any error messages you are getting?
Are you able to provide instructions to replicate the issue?
Did you provide a code example?
Please don't post a screenshot of your code. Use the code block in the Reddit text editor and ensure it's formatted correctly.

For more immediate support, you can ask in the official Laravel Discord.

Thanks and welcome to the r/Laravel community!

https://redd.it/1iwg55g
@r_php
Ae you bullish on Laravel?

Howdy r/Laravel!

As the noscript states, I’m curious about the fine folks here opinion of the future of Laravel in terms of community and job security. TL;DR at the end, but to summarize the massive wall of text below, I’m a .NET/TS dev looking to make the jump to Laravel/PHP.

Some background:

I’m coming up on almost a decade of employment as a professional developer. The majority of my time has been spent in .NET, Java, and JS/TS. I’ve even had a brief stint working on embedded systems, and have worked up and down the stack, from the frontend down the depths of DevOps and databases.

The last four or five years of my career, I’ve been primarily working in the Microsoft™️ stack, and to cut a long story short, I’m growing fairly disdainful of it as the days go on. Everything these days just feels so… Microsoft-y. Don’t get me wrong, I love C# as a language, but I’m burning out on the typical way over engineered enterprise-y apps that I work on that have been hacked on by thousands of devs over the years to create an amalgamation of absolute code chaos.

I picked up PHP and Laravel about two years ago while on paternity leave to learn something new and keep myself sane. That quickly grew into an obsession and I’ve been spending damn near all of my spare/open source time writing PHP. Small utility packages, Laravel side projects and libraries, and even small business websites around my town with Statamic. I’ve been watching every Laracon talk and trying to be somewhat active in the Laravel communities on Discord/X/Bluesky.

I’ve been loving the solo builder/entrepreneurial spirit of Laravel and its ecosystem, identifying more with its community and general sentiment that that of .NET. In essence, I’m all in on Laravel.

I never took a “real” chance at Laravel jobs until recently, and after punching out a few applications, I have a pretty good response rate so far and have some interviews lined up. I’ve been pretty picky about the jobs I’ve been applying too as I can’t afford to take a pay cut at the moment being the sole breadwinner between my wife and I. I’ve noticed that PHP/Laravel salaries tend to be a good bit below the .NET/TS market for developers, and I’m nervous about taking a jump if the opportunity presents itself to side step (pay-wise) into a Laravel role.

I have an opportunity with a company that seems pretty cool and tapped into the Laravel community. My nervousness is kicking in though as I’ve only been at my current company for about 9 months, a gigantic F500 with a mega old legacy monolith that I was baited to working on. The promise was working on newer microservice-based stuff, but that hasn’t come to fruition and is not looking likely in the near future. Pile on a metric shitload of red tape and bureaucracy, and I’m basically a well paid code janitor at the moment. It’s done nothing but accelerate my growing annoyance of .NET and its surrounding ecosystem.

With all that said, I’d love to get the community’s opinion(s) on Laravel and PHP, from past, present and future. Do you feel like the growing momentum Laravel has had over the past few years will sustain? In your opinion, what’s the outlook of PHP and Laravel over the next few years?

Thanks everyone!

TL;DR - I’m a TS/.NET career sellout and want to transition into Laravel/PHP. I have an opportunity to do so, but I’m getting cold feet.

https://redd.it/1iwp0o4
@r_php
Weekly Ask Anything Thread

Feel free to ask any questions you think may not warrant a post. Asking for help here is also fine.

https://redd.it/1iwtfg5
@r_php
Weekly help thread

Hey there!

This subreddit isn't meant for help threads, though there's one exception to the rule: in this thread you can ask anything you want PHP related, someone will probably be able to help you out!

https://redd.it/1iww2wk
@r_php
Tempest alpha 5 is now released with PHP 8.4 support, improved console styling and components, Vite support, and much more
https://tempestphp.com/blog/alpha-5/

https://redd.it/1iwwytz
@r_php
Laravel Cloud - Hype train "woo woo!"

Anyone else super hyped for the Laravel Cloud release today? Can't wait to be a Guinea pig :-)

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