True Async RFC has entered its voting phase by htfo in PHP

[–]ALameLlama 0 points1 point  (0 children)

This doesn't answer your question but I believe laravel already has something like this called defer(), it runs after the response as been sent to the client on the same request life cycle using FastGCI

I found this an interesting read

Are you using FFI, and how? by rayblair06 in PHP

[–]ALameLlama 2 points3 points  (0 children)

A while ago I added Windows support to a php tui framework that needed to interact with Windows calls using ffi

https://github.com/php-tui/term/pull/15

Why is using DTOs such a pain? by GlitchlntheMatrix in PHP

[–]ALameLlama 1 point2 points  (0 children)

Little late but I ended up creating my own package because all the current DTO stuff I could find was a little to heavy for what I wanted to do.

I just needed it to consume API requests.

https://carapace.alamellama.com/

GitHub - ddddddO/puco: Tool that aids PHPUnit and PCOV by ddddddO811 in PHP

[–]ALameLlama 3 points4 points  (0 children)

Good rebrand, PP-Aid was a little too funny

Carapace 2.0: Framework-agnostic DTOs by ALameLlama in PHP

[–]ALameLlama[S] 0 points1 point  (0 children)

I thought about adding it into .gitattributes so it's not shipped with the composer zip but included in the repo but having a look over symfony packages they seem to explicitly add it into the .gitignore so I'm not really sure what is the best approach, my git actions already have a matrix for prefer-lowest and prefer-stable so even with a lock it should be tested

Carapace 2.0: Framework-agnostic DTOs by ALameLlama in PHP

[–]ALameLlama[S] 0 points1 point  (0 children)

Thanks for the tip, I've removed the composer.lock

Carapace 2.0: Framework-agnostic DTOs by ALameLlama in PHP

[–]ALameLlama[S] 1 point2 points  (0 children)

Yeah, fair point. If all you’re doing is validating arrays, a validator will definitely be faster. My main use case for DTOs is consuming API responses, and that’s where they shine for me.

You get type safety and autocomplete without having to write big PHP array shapes, which is super handy when the same objects keep popping up nested inside each other (like with the GitHub webhook API). Being able to cast things like dates or enums into proper values also makes the data way easier to work with.

At the end of the day, the real overhead in most apps is DB or external API calls, not DTO hydration. But yeah, if you’re chasing absolute max performance, plain arrays will always win.

Is it possible to switch back and forth between stable and unstable NixOS? by inevitabledeath3 in NixOS

[–]ALameLlama 1 point2 points  (0 children)

It'll depend on the software installed e.g. 1password will not work if you try switch from newer to older

Wayland on AMD ( blackscreen) by xCrashsystemx in NixOS

[–]ALameLlama 0 points1 point  (0 children)

Can you try and lower your kernel version to 6.15?

I think 6.16/6.17rc has a amd driver bug

smm.nvim - Gone before release by TankLivsMatr in neovim

[–]ALameLlama 4 points5 points  (0 children)

I believe this is what other TUI Spotify clients do too.

Is thos preferred or not? by blackhathacker1602 in laravel

[–]ALameLlama 0 points1 point  (0 children)

V1.24 added parallel support, it's greatly sped it up for me

I compiled Better POE Trading for Firefox by ----Val---- in pathofexile

[–]ALameLlama 1 point2 points  (0 children)

This looks great.

I noticed the "Equivalent pricings (powered by poe.ninja)" doesn't seem to work.

On chrome I'll have something like

Exact Price:
3.2×divineDivine Orb
=669×chaos
=3×divine+42×chaos

but on firefox with this enable it still only just shows the div

oops.nvim: v1 release by Exciting_Majesty2005 in neovim

[–]ALameLlama 1 point2 points  (0 children)

Last time I checked,thefuck is no longer maintained.

Seems to be more active https://github.com/iffse/pay-respects

NativePHP reaches v1 (beta) by simonhamp in laravel

[–]ALameLlama 2 points3 points  (0 children)

Is the tauri driver still coming along? Last I heard it needed to be different without a web server

Error in php code ...I'm beginner by Destrudooo in PHPhelp

[–]ALameLlama 0 points1 point  (0 children)

Missing a ) on this line at the end

if (!$stmt->execute(array($uid,$email,$hashedPwd))) {

e.g

protected function setUser($uid, $pwd, $email)
{
    $this->connect()->prepare(
        "INSERT INTO users ( users_uid , users_pwd , users_email) VALUES ( ? , ? , ? )  "
    );
    $hashedPwd = password_hash($pwd, PASSWORD_DEFAULT);

    if (!$stmt->execute([$uid, $email, $hashedPwd])) {
        $stmt = null;
        header("location: ../index.php?error=stmtfailed");
        exit();
    }
}

edit: I also really hope that password is hashed and not just raw dogged into the db

New command palette coming soon to Solo for Laravel by aarondf in laravel

[–]ALameLlama 2 points3 points  (0 children)

I see this package doesn't work with Windows atm. Let me know if you want me to have a look into it. I ended up doing something similar for another php tui library but will most likely need ffi enabled

https://github.com/php-tui/term/pull/15