PHP Reddit – Telegram
PHP Reddit
34 subscribers
289 photos
37 videos
24.8K links
Channel to sync with /r/PHP /r/Laravel /r/Symfony. Powered by awesome @r_channels and @reddit2telegram
Download Telegram
Symfony UI Framwork for Javanoscript noob?

I have some intermediate know how with PHP and Synfony. I have no javanoscript experience. Handling the Symfony stuff (Controllers, Config, Docker, API Plattform, Doctrine ORM etc.) i get the hang of. But once Javanoscript is involved, it get's confusing. :-) I support in a project that uses VUE, and every time i know i have to touch or debug this, it's not my thing.

I am starting now with a small business app that needs a UI. Nothing fancy, only 5 guys from the customer itself use it, so it doesn't need to win a design award.

What would you recommand to learn in this case? VUE? UX Turbo? Something else? Do i have to bite the bullet and dive into javanoscript, or is there something else i should look at? It must not be reactive, it must not be super performance. I just need some UI elements which must work, but design and performance ist not an issue.

Any ideas?

https://redd.it/1oashhy
@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/1oauufu
@r_php
Ephemeral User Package

Of course while working on something else, I got sidetracked with a "why doesn't this exist already?" moment. Bottom line, I find myself sometimes reaching for a `new User()` to pass around a model without needing to persist it right away (or ever!). This felt a little more like the Laravel way of doing things, and was a relatively small lift considering.

https://github.com/kylearch/ephemeral-users

https://redd.it/1ob9nk8
@r_php
Why is using DTOs such a pain?

I’ve been trying to add proper DTOs into a Laravel project, but it feels unnecessarily complicated. Looked at Spatie’s Data package, great idea, but way too heavy for simple use cases. Lots of boilerplate and magic that I don’t really need.

There's nested DTOs, some libraries handle
validation, and its like they try to do more stuff than necessary. Associative arrays seem like I'm gonna break something at some point.

Anyone here using a lightweight approach for DTOs in Laravel? Do you just roll your own PHP classes, use value objects, or rely on something simpler than Spatie’s package?

https://redd.it/1oe6gda
@r_php
My production architecture for Laravel build with Docker compose, Traefik and FrankenPhp

Hi, everyone, for my little product, coz.jp I completed an architecture that I'm proud of. Using the tech mentioned in the noscript I managed to prepare a stable, fast and easy to maintain infrastructure.
Here the full article with the files templates too. if you have any questions or more importantly suggesitons feel free to ask me here or on the linked article: https://coz.jp/TGzzQa

https://redd.it/1oe2q1b
@r_php
What is the difference between a bus and a transport

In my project I have these settings:

framework:
messenger:
transports:
async: '%env(MESSENGER_TRANSPORT_DSN)%'
failed: 'doctrine://default?table_name=failed_messages'
sql_channel_manager_dlq:
dsn: '%env(SQS_CHANNEL_MANAGER_TRANSPORT_DLQ_DSN)%'
options:
access_key: '%env(AWS_ACCESS_KEY_ID)%'
secret_key: '%env(AWS_SECRET_ACCESS_KEY)%'
region: '%env(AWS_REGION)%'
queue_name: '%env(CHANNEL_MANAGER_QUEUE_NAME_DLQ)%'
sqs_channel_manager:
failure_transport: sql_channel_manager_dlq
dsn: '%env(SQS_CHANNEL_MANAGER_TRANSPORT_DSN)%'
serializer: App\Infrastructure\Messenger\ChannelManagerSerializer
options:
access_key: '%env(AWS_ACCESS_KEY_ID)%'
secret_key: '%env(AWS_SECRET_ACCESS_KEY)%'
region: '%env(AWS_REGION)%'
queue_name: '%env(CHANNEL_MANAGER_QUEUE_NAME)%'
failure_transport: failed
default_bus: command.bus
buses:
event.bus: ~
command.bus:
middleware:
- 'App\Infrastructure\Middleware\RequestIdMiddleware'
routing:
App\Message\TestQueue: async
App\Domain\Event\ChannelManager\ChannelManagerEventHasReceived: sqs_channel_manager


As you can see I have the follwoing transports:

async
failed
sql_channel_manager_dlq
sqschannelmanager

And the following buses:

event.bus
command.bus

But I have trouble inderstanding the difference between buses and transports.

My google-fu leads me only to generic info regarding on how to setup the queue listener: https://symfony.com/doc/current/messenger.html

But I fail to comperhend the difference between bus and transport. What is the difference between these 2?

So far I understood that a bus is some sort of road that transport uses it to handle a message, if it is true in my example how I can define that all messages passed through sqs_channel_manager would be handled upon event.bus?

https://redd.it/1oe3ocx
@r_php
Introducing Nimbus: An integrated, in-browser API client for Laravel with a touch of magic
https://redd.it/1odpprx
@r_php
NativePHP Mobile: What's your dev workflow? Do you rebuild every time?

I'm working with NativePHP for mobile and I'm struggling to figure out an efficient development workflow.

I did my first build and deployed it to my phone, but rebuilding the entire app every time I want to see changes is painfully slow. I've searched online but couldn't find any documentation or discussions about mobile development workflows with NativePHP.

Do you rebuild the full app for every change, or is there a way to get live/hot reload working?

https://redd.it/1oejwmv
@r_php
I need PHP courses, but the most advanced...

I want to improve as a PHP developer, and I'd like more courses. However, I'd appreciate recommendations for classes, instructors, courses, and platforms.

Thank you in advance.

https://redd.it/1oewa9x
@r_php
Are there Forge provisioning logs somewhere

Provisioning a server is continually failing at the “making final touches” stage. Everything is installed and running on the server, so I don’t know what the issue is.

I also can’t seem to find any forge error logs in my server. I looked in root and in var/log. Not in either place.

Any tips on where I can find out why provisioning fails?

In case this matters, I am bringing a fresh ec2 instance to Forge to provision. I haven’t been able to launch an ec2 directly from forge dashboard in a while, so this is not my first time doing this but it’s my first since the redesign.

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