PHP

acambronero, Spanish
@acambronero@federate.blogpocket.com avatar

He rediseñado blogpocket.app, aplicación PWA donde se recopilan todos los contenidos de Blogpocket, usando el editor del sitio de , con el bloque de pila, y posición sticky. ¿Qué te parece?

https://blogpocket.app

aburka,
@aburka@hachyderm.io avatar

Not exactly a hot take but wow what a cursed language is

From the comments:
It seems intval is interpreting valid numeric strings differently between PHP 5.6 and 7.0 on one hand, and PHP 7.1 on the other hand.
<?php
echo intval('1e5');
?>
will return 1 on PHP 5.6 and PHP 7.0,
but it will return 100000 on PHP 7.1.

https://www.php.net/manual/en/function.intval.php#120543

syntaxseed,
@syntaxseed@phpc.social avatar

@aburka So they fixed it ~9 years ago.

aburka,
@aburka@hachyderm.io avatar

@syntaxseed Fixed or broke? That's up to interpretation, but the documentation suggests the old behavior was intended :revblobfoxupsidedown:

fabrixxm,

Hei @php @thephpf , what's up here?

How firefox is doing "unusual traffic from [my] computer network" (requiring a captcha to continue) , while GNOME Web isn't ?

ramsey,
@ramsey@phpc.social avatar
derickr,
@derickr@phpc.social avatar

@ramsey @kboyd @fabrixxm @php @thephpf @pollita I've emailed them already

cspray,
@cspray@phpc.social avatar

I released v2 of Annotated Container! It is a pretty big milestone for a project I've spent a lot of time working on. Getting this release out allows me to start thinking about how to continue improving the library.

To commemorate the occasion I wrote a deep-dive article on how Annotated Container handles autowiring.

https://www.cspray.io/blog/autowiring-and-annotated-container/

asgrim,
@asgrim@phpc.social avatar

@cspray nice one! 🎉

Pol,
@Pol@mathstodon.xyz avatar

@cspray as a proof of concept and since it's a bit related to your post, I did this bundle to register all the aliases it can : https://github.com/loophp/service-alias-autoregister-bundle

heisec, German

Millionen Webseiten betroffen: Kritische Lücke in populärem Wordpress-Plug-in

Auf mehr als einer Million Wordpress-Instanzen läuft Essential Addons for Elementor. Angreifer können durch eine kritische Lücke die Kontrolle übernehmen.

https://www.heise.de/news/Millionen-Webseiten-betroffen-Kritische-Luecke-in-populaerem-Wordpress-Plug-in-9032312.html?wt_mc=sm.red.ho.mastodon.mastodon.md_beitraege.md_beitraege

SenseException, German
@SenseException@phpc.social avatar

That's the "trick" behind the magic of Attributes. That's it. And it's finally not a PHP DocBlock like "Annotations" anymore.
https://php.budgegeria.de/cucnggevohgrf

wouterj,
@wouterj@phpc.social avatar

@SenseException please do not loop over all attributes and instantiate them.
This API is designed to work with attributes that aren't available, which is key to treat attributes like metadata (which they are) instead of coupled code.

E.g. a standalone package can perfectly ship a model class using Doctrine attributes, but still be used in applications without Doctrine. Blindly instantiating attributes breaks this.

wouterj,
@wouterj@phpc.social avatar

@SenseException I forgot to mention the alternative: Use array_merge($reflectionClass-&gt;getAttributes(StrAttribute::class), $reflectionClass-&gt;getAttributes(IntAttribute::class)).

This makes sure you only instantiate attributes that you defined.

Crell,
@Crell@phpc.social avatar

If your method's return type has 4 different possible types, some of which are list-ish and some not, your API is beyond saving and you should just start over from scratch.

You can guess which framework I'm working with...

kboyd,
@kboyd@phpc.social avatar

@Crell I can't, actually. And that might be a good thing.

sarah,
@sarah@phpc.social avatar

@Crell Stop. Using. Laravel.

davidbisset,
@davidbisset@phpc.social avatar

plugin that "adds a tiny border around blocks in the WordPress block editor, so you no longer have to guess what you're gonna click on".

Built mostly with AI.

https://wordpress.org/plugins/hover-highlights-editor-highlighting/

https://twitter.com/SybreWaaijer/status/1657096600102002690

Ciantic,
@Ciantic@twit.social avatar

@davidbisset I had to look, the whole plugin is just this:

.wp-block:hover:not(:has(:focus),:focus) {
outline: 1px dashed ;
box-shadow: 0 0 2px
}

Throw it in editor-style.css and you are golden.

davidbisset,
@davidbisset@phpc.social avatar

@Ciantic Nice. Still a valid plugin especially for someone who wouldn't know that, but that's good to know too.

cspray,
@cspray@phpc.social avatar

Made a lot of improvements to my site. The most notable is it now has a functioning RSS feed!

You should be able to add https://cspray.io to your RSS reader. Or, you can check out the direct feed URL at https://cspray.io/feed.atom

derickr,
@derickr@phpc.social avatar

@cspray The world is so much better with more people embracing RSS (again)!

docpop,
@docpop@mastodon.social avatar

Another beautiful day in the back patio of Haus Coffee on 24th. I'm editing an interview with Brian Gardner about the new Frost theme for

It occurs to me that I rarely share the final results here. Here are some recent episodes:

-Devin Walker talks about the advantages of "rebranding in public" https://torquemag.io/2023/05/press-this-rebranding-in-public/

-A lively discussion about the AT Protocol vs ActivityPub https://www.youtube.com/watch?v=kfzWTKaammQ

-Olivia Bisset talks about getting the youth into WP https://torquemag.io/2023/04/torque-social-hour-how-to-engage-young-wordpress-users/

SirSid,

Hello, a Question about a Lovely looking From @landrok on https://github.com/landrok/activitypub/tree/master . My Question is , as am New to PHP could you give me any advise on how to Run this as an Instance on my server ? ie/eg which Files etc do I need to Install / Cron job etc ? Any help Please 😀

gannet,
@gannet@wandering.shop avatar

Accidentally discovered when writing a blog post in Wordpress that if I select the text I'm going to add a link to from the clipboard and do the paste key sequence*, it just adds the link and I don't have to do the little popup menu song-and-dance.

on Mac it's <command>-V; on Windows and I guess Linux*, it's <control>-V.

**tell me what it is on Linux, if it's not that, please.

alexanderschnitzler,
@alexanderschnitzler@mstdn.social avatar

Embrace change!
Currently upgrading an app from 8.7 up to 12 LTS, from PHP 7.3 up to 8.2. Non composer to composer. FTP to ssh+rsync via Gitlab CI job. First time unit and functional tests and frontend tests with codeception. Up to phpstan level 6 fixed. And much more.

A looot of work but things start to look really well now.

alexanderschnitzler,
@alexanderschnitzler@mstdn.social avatar

@mikestreety Sorry mate, I have a baby at home and all my spare time is family time. Even if I wanted, I wouldn’t have time left for blog posts.

mikestreety,
@mikestreety@hachyderm.io avatar

@alexanderschnitzler No problem at all pal, I appreciate you taking the time to reply to me. Hope all is well and congratulations 😀

mherchel,
@mherchel@mastodon.social avatar

New blog post: Disabling Twig Caching Just Got A Helluva Lotta Easier (in 10.1)! 🙌🙌🙌

https://herchel.com/articles/disabling-twig-caching-just-got-helluva-lotta-easier-101

mobileatom,
@mobileatom@me.dm avatar

WordCamp US 2023 Call for Volunteers Open via WordCamp US 2023. https://us.wordcamp.org/2023/wordcamp-us-2023-call-for-volunteers-open/

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