jclermont, to php
@jclermont@phpc.social avatar

Ever run into a timeout from a Composer script in CI? Test coverage reports are a super common example for me.

Here's how to prevent that, along with a gotcha if you're calling scripts within scripts. https://masteringlaravel.io/daily/2024-05-21-disabling-composer-timeout-with-nested-scripts

symfonystation, to Symfony
@symfonystation@newsletter.mobileatom.net avatar
shochdoerfer, to php German
@shochdoerfer@phpc.social avatar

I am seeking speakers for my @phpugffm & @phpugmrn meetups. We prefer in-person presentations in Frankfurt or the Mannheim area, but remote talks are also an option. If you have anything interesting to share with us, let us know. We'd be more than happy to have you! Thx!

heiglandreas,
@heiglandreas@phpc.social avatar

@vanamerongen There might be... Options ... as @shochdoerfer already mentioned. But in general we (as in The Usergroups) are (sadly) also missing the budged. 😉

/cc @phpugffm @phpugmrn

shochdoerfer,
@shochdoerfer@phpc.social avatar

@tobiaskoengeter I'll set up a reminder to ping you in August to see if October will work. Thx for considering! very much appreciated. /cc @phpugmrn

thomastospace, to php
@thomastospace@phpc.social avatar

Hey

Client of ours wants to do a pentest on the application. Of course, fine and I'm excited about the results.

However, do you do anything to prepare for this?

First time a client wants to do this, so unsure about the process.

radmen,
@radmen@101010.pl avatar

@thomastospace usually you hire someone who is going to perform the pentests. In that case, you just wait for a report and address the issues they will point out.

If you're the author of the pentested application, it makes no sense to be also the one who will do the pentesting. The best results are when someone else makes those.

thomastospace,
@thomastospace@phpc.social avatar

@radmen Of course, won't be pentesting myself. The client is hiring someone to do this.

Good to know advice is 'just wait and implement results'. 🙂

dseguy, to php French
@dseguy@phpc.social avatar

question of the day : when you know that
2*2 = 4
2^2 = 4 (too)
2.5^2.5 = 9.8821176880262..

Where is this 6 coming from ?

dseguy,
@dseguy@phpc.social avatar

@derickr The first print shows 4, the second one says 6.

dseguy,
@dseguy@phpc.social avatar

@JerryWham The first print shows 4, the second one shows 6.

mobileatom, to php
@mobileatom@flipboard.com avatar
doefom, to php
@doefom@mastodon.social avatar

After the last few things I've learned about 8.4 by accident I thought why not look into it and see what else there is. So, here's an example of the four new rounding modes PHP 8.4 will introduce to the 'round' function:

  • PHP_ROUND_CEILING
  • PHP_ROUND_FLOOR
  • PHP_ROUND_TOWARD_ZERO
  • PHP_ROUND_AWAY_FROM_ZERO

I rarely use anything else than 'ceil' and 'floor' in my daily work but this is still good to know.

What do you think?

zimzat,
@zimzat@mastodon.social avatar

@doefom Sounds useful at first glance but is more likely to encourage using floats inaccurately for decimal / monetary calculations. bcmath is also getting a new bcround and related methods which should be used instead, or one of the libraries specifically for decimal or money calculations.

doefom,
@doefom@mastodon.social avatar

@zimzat Didn't know there are better/worse solutions for rounding, I thought there's one right way to do it under the hood and that's it. Well, as you say there is more to rounding than I thought :D Thanks for your feedback!

vm666, to php French

Charles Fol a présenté la faille (CVE-2024-2961) à le 10/05/2024. On n'a toujours pas de détails. On dirait bien qu'il n'y a pas d'attaques généralisées non plus.
Quelqu'un aurait vu des sites compromis via ce genre de chose récemment ? Ou pire ?

Girgias,
@Girgias@phpc.social avatar

@vm666 C'est surtout pas une faille dans PHP, et faut faire des choses vachement sous optimal pour que ça soit exploitable IMHO.

jclermont, to php
@jclermont@phpc.social avatar

How do you discover interesting new packages for your Laravel apps? https://masteringlaravel.io/daily/2024-05-20-how-do-you-discover-interesting-new-packages

grmpyprogrammer,
@grmpyprogrammer@phpc.social avatar

@jclermont Three step process:

  1. ask a question about how to do something
  2. from an alt account give a wrong answer
  3. watch angry techbros and replyguys give you the correct answer
jclermont,
@jclermont@phpc.social avatar

@grmpyprogrammer this is some 4-d chess right here 😂

wyri, to php
@wyri@haxim.us avatar

Had fun this weekend working on a performance focussed proof of concept using Bunny in the interop contracts. The first metrics are in using the cluster on my home cluster. (Which isn't meant for high performance. Still pleased by these numbers.)

wyri,
@wyri@haxim.us avatar

Whoops kept it running for over an hour while running errands 😅 . Liking the ease of use of what I'm building to far

wyri, to php
@wyri@haxim.us avatar

Thanks to @jay Bunny will support client properties in the upcoming 0.5.6 and 0.6 releases. Client properties can be used to set a human readable name to your connection with :

With connection name
Set of my own connections with descriptive connection names

dseguy, to php French
@dseguy@phpc.social avatar

More about the Override attribute :

where else can use this attribute?
when will it raise a Fatal error?
It is not always at compile time (it never is).

https://www.exakat.io/en/more-about-the-override-attribute/

ff3, to opensource
@ff3@fosstodon.org avatar

📢 Woohoo! Version v6.1.16 of Firefly III has just been released 🎉. Check it out over at GitHub, Docker, or download it using your favorite package manager.

#opensource #oss #newrelease #php #software #personalfinance #selfhosted

https://github.com/firefly-iii/firefly-iii/releases/v6.1.16

mobileatom, to php
@mobileatom@flipboard.com avatar
matdevdug, to ai
@matdevdug@c.im avatar

One thing that’s funny about and is I keep hearing the same thing. “Oh I use it for generic snippets, just common tasks and functions”.

The amusing thing about that is when I first started working with a app years ago there was already a solution to that problem. It was called “the PHP Cookbook” published by O’Reilly. I was told “oh we buy you a PDF copy and you just search for whatever you are trying to do and use that code. It saves a ton of time for junior programmers.”

Not only was it true, it did save me a ton of time and headaches, but we didn’t need to steal anything. The authors got paid, it worked offline, it didn’t require scraping the entirety of human knowledge to write or nuclear power plants worth of energy to distribute.

It also helped me learn. Since I would have a solid foundation to the solution, I felt more confident experimenting. I always had a known-functioning standard library solution as my base. So when something broke I knew where to start debugging.

Just an incredible thought that instead of paying $20 for a pdf once we decided this was the way to go.

chrastecky,
@chrastecky@phpc.social avatar

@matdevdug I mean, pretending that CTRL+F and an AI are somewhat equivalent is not the argument you wanna be making.

Sure, reading a book and learning stuff is good and everyone should do it. But some problems are really specific and no book will have an example that you can find within few minutes.

matdevdug,
@matdevdug@c.im avatar

@chrastecky Well as someone whose tried virtually every paid and free AI product on the market and can’t even get the paid Google Gemini one to return accurate results about their own Google Cloud libraries I’m gonna have to give it to CTRL-F.

They’re such unbelievable dogshit that Google cannot even make it as accurate as reading their own tests in their own client library. Imagine that. Reading the tests is easier and more reliable than asking an LLM. I didn’t even need to burn down a rainforest or make 12 more datacenters to do it.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • rosin
  • thenastyranch
  • GTA5RPClips
  • tester
  • InstantRegret
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • everett
  • Youngstown
  • mdbf
  • slotface
  • kavyap
  • JUstTest
  • cisconetworking
  • khanakhh
  • normalnudes
  • osvaldo12
  • cubers
  • tacticalgear
  • Durango
  • ethstaker
  • modclub
  • anitta
  • provamag3
  • Leos
  • lostlight
  • All magazines