PHP

symfonystation,
@symfonystation@phpc.social avatar

Daniel Sipos's announdes a new book: Drupal 10 module development - it’s out!
https://www.webomelette.com/drupal-10-module-development-its-out :drupal:

rbairwell,

Does anyone know of the equivalent (if it exists) of 's __call https://www.php.net/manual/en/language.oop5.overloading.php#object.call magic method. Roughly I want to call MyModule::Package->xyz and MyModule::Package->abc (etc) and both go to same subroutine without having to declare each as their own subroutine.

mjgardner,
@mjgardner@social.sdf.org avatar

@rbairwell @barubary Conway notes some problems with AUTOLOAD in “Perl Best Practices” (2005) and there is a severity 3 policy against it provided with : https://metacpan.org/pod/Perl::Critic::Policy::ClassHierarchies::ProhibitAutoloading

Basic problems are: first AUTOLOAD wins in a class hierarchy; your AUTOLOAD has to handle/reject everything cleanly and is therefore an infinitely complex interface; AUTOLOAD gets called on object destruction if the class is missing an explicit DESTROY method

mjgardner,
@mjgardner@social.sdf.org avatar

@rbairwell @barubary And many of the comments on ’s __call echo the same problems as ’s AUTOLOAD: https://www.php.net/manual/en/language.oop5.overloading.php#usernotes

Both are footguns shooting infinite-caliber bullets

wyri,
@wyri@haxim.us avatar

Couldn't resist and updated the generation process overview into a neat table with step status and progress icons for my () generator. Could use some styling but it looks pretty decent now. Limited FPS to one because it makes no sense to update it for every single generated class:

video/mp4

Crell,
@Crell@phpc.social avatar
joachim,
@joachim@drupal.community avatar

@Crell also, Drupal Code Builder isn't 'Drupal', it's mine :)

Crell,
@Crell@phpc.social avatar

@joachim I think ParseError is from PHP 7...

marcuskober,

New article series on modern and object-oriented PHP in WordPress plugin development:

https://marcuskober.com/modern-object-oriented-php-in-wordpress-plugin-development/

heropress,

This week's Hallway Chat is with Iolanda Sequino! Iolanda is Italian, but lives in the Netherlands and works for Yoast. We had the chance to have a real hallway chat at WordCamp Italy this last November. https://hallwaychats.com/episodes/episode-167-a-chat-with-iolanda-sequino/

eli_t,
@eli_t@drupal.community avatar

Awesome news - Danny Sipos has updated his book for 10. I had a previous version and it was hands down the best book I ever read.

Get you some.

https://www.webomelette.com/drupal-10-module-development-its-out

pcambra,
@pcambra@drupal.community avatar

@eli_t Is there a non Amazon link to purchase?

eli_t,
@eli_t@drupal.community avatar
t3cm, German
@t3cm@phpc.social avatar

Von "Save the day", dem TYPO3 V12 Release Slogan, zu "Save the date" vom 2023!

Es findet vom 01. - 03. September 2023 im Salesianum in München statt.

Wer mehr wissen möchte, schaut bei uns auf der Website vorbei!

https://www.typo3camp-muenchen.de/news/artikel/typo3camp-muenchen-2023-save-the-date-13

freekmurze,
@freekmurze@phpc.social avatar

💡 Here’s how you can automatically clear Ray when running a test

More info: https://myray.app/blog/3-automatically-clear-ray-when-running-tests-via-phpunit-or-pest

SecondeJ,
@SecondeJ@phpc.social avatar

As I head to @phpstoke / @phpstoke: yes I will be armed. You can win an Alex elephpant (I'll explain how when I'm there) and you get first dibs on the brand new Vonage stickers! See you soo

shochdoerfer,
@shochdoerfer@phpc.social avatar

@SecondeJ have fun!

Kovah,
@Kovah@mastodon.social avatar

⚙️ PHP tip: Use 'strpos()' instead of 'strstr()' when checking for the existence of a substring, as it's faster and more efficient.

Alister,
@Alister@mastodon.cloud avatar

@Kovah or str_contains($haystack, $needle);

mglaman,
@mglaman@phpc.social avatar
valorin,

The HtmlString class in Laravel is seriously underused and overlooked. We'd have far less XSS floating around if we wrapped our safe HTML inside HtmlString and then avoided using {!! ... !!} everywhere.
https://github.com/laravel/framework/blob/10.x/src/Illuminate/Support/HtmlString.php
https://larasec.substack.com/i/43547337/htmlstring-helper

dries,

Some exciting news! Drupal has been designated as a "Digital Public Good"! If you're interested in learning more about why this is great news for Drupal, check out my blog post: https://dri.es/drupal-recognized-as-a-digital-public-good

ultimike,
@ultimike@drupal.community avatar

I'll admit that I had forgotten about this easy-to-use Views feature. Glad Ivan Zugec reminded me about it!

https://www.webwash.net/search-page-using-views-in-drupal/

  • 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