PHP

sirber,
@sirber@fosstodon.org avatar

I started a prototype of a framework-less architecture, using , on my playground. Separated public and private files, enabled autoloading using composer and PSR-4. It's fun! 😀

https://gitlab.com/sirber/playground/-/tree/main/php/pure?ref_type=heads

Crell,
@Crell@phpc.social avatar

@sirber Isn't that the same as a custom framework? :-)

nosherwan,
@nosherwan@fosstodon.org avatar

@sirber You need a frame.work laptop for a custom framework.

koehnlein,
@koehnlein@mastodon.social avatar

Developers are copying full template files to just change one single class and say "That's the correct tailwind way" 😭

Xitnelat,
@Xitnelat@wue.social avatar

Multilined html-tag is worth a change either. @koehnlein

koehnlein,
@koehnlein@mastodon.social avatar

@Xitnelat Ignore whitespaces 😉

ramsey,
@ramsey@phpc.social avatar

The latest issue of @phparch magazine is out!

I love how they were able to get articles about experiences at and photographs from (last week!) included in this issue.

Check it out!

https://www.phparch.com/magazine/2024/04/2024-04-deep-diving-php-security/

jclermont,
@jclermont@phpc.social avatar

Yes, I'm a bit of a PHPStorm fan boy. Here's another handy use for the Local History feature. https://masteringlaravel.io/daily/2024-05-02-another-helpful-use-for-local-history

Crell,
@Crell@phpc.social avatar

from 2014 to 2024:

This language is pretty sweet, NGL.

https://www.youtube.com/watch?v=p_6ewdiwnRo

typo3, German
@typo3@typo3.social avatar

🌟 Exciting News! We are thrilled to announce that tickets are now available for T3CON24 and the Awards 2024, happening in Düsseldorf, Germany from 26-28 November. This year, experience three full days packed with insightful talks and networking opportunities. 🎤🤝

🏆 Submissions are open! Showcase your innovative projects on the night of 28 November. Submit now and celebrate your achievements with us!

🌐typo3.com/blog/t3con24-tickets-award-submissions

localization,
@localization@typo3.social avatar

Next Wednesday, May 8 at 11:00 CEST we have our next regular meeting of the Localization Team. We meet in TYPO3 Slack: https://app.slack.com/huddle/T024TUMLZ/CR75200FL
Our agenda: https://notes.typo3.org/8c9v5B-lTs6CzmrCphJifg
Guests are always welcome!

sarah,
@sarah@phpc.social avatar

Starting my first community time block. My goal is to refresh the theme of my personal site so I can document the work I’m doing and rethink league/booboo to determine the feasibility of that package.

sarah,
@sarah@phpc.social avatar

Wel, I'm not entirely sure league/booboo makes sense as a stand-alone package, but we'll see. I was able to get my blog up and going at https://sarah-savage.com though!

3f, German
@3f@chaos.social avatar

Is there a way to "update composer" during a test run using cli in the testbench composer.json?

heiglandreas,
@heiglandreas@phpc.social avatar

@3f You mean apart from composer self-update?

tvbeek,
@tvbeek@phpc.social avatar

@3f can you explain your use case? (I'm very interested)

If possible it will be very tricky because you update the code that you are testing and possible the running code.

alexanderschnitzler,
@alexanderschnitzler@mstdn.social avatar

Today a 8.7 will die and rise again as 11.5. Next project will be the upgrade of a 6.2 to one of the current versions. 🎉

I have very little time but if you need help with TYPO3 upgrades, even the tricky ones: Ping me. If there's time on my and budget on your end, there's no need for a relaunch. 😉

danielsiepmann,

@alexanderschnitzler talk.typo3.org/t/error-when-mi… might be something for you? Not sure regarding time and budget …

cabbey,
@cabbey@phpc.social avatar

ok folks, you were right Rector is pretty cool. The learning curve is steep AF, and the docs are, well, let's just say they're written by engineers for engineers. But given the target audience for this tool, that's OK. I've not yet done the changes I was originally asking about with it, because the config for it is going to be a PITA to build. I've been starting small. But what I've done so far has been pretty cool! I've done some wild things with RenameClassConstFetchRector for example. 🧵

alessandrolai,
@alessandrolai@phpc.social avatar

@cabbey @shudder yeah sorry, that's how it works.. That config option has some arguments though, you may try to see if there's one to help you there.

cabbey,
@cabbey@phpc.social avatar

@alessandrolai @shudder yeah, played with them to not much improvement. Currently thinking I’ll do a two pass approach. First use the renaming rectors I’ve configured against the whole codebase, then got diff to get the list of changes files and run a separate rector on just those files with this option. Will experiment with that in the morning.

opdavies,
@opdavies@mastodon.social avatar

This week, I've set up Xdebug on a new project to help with some complicated debugging.

https://www.oliverdavies.uk/archive/2024/04/30/stepping-back-into-debugging

Crell,
@Crell@phpc.social avatar

Only use inheritance when you want both hierarchical code reuse and subtype polymorphism.

https://youtu.be/C3B5IIlt4-0

On a similar vein, my article from a decade ago:

https://www.garfieldtech.com/blog/beyond-abstract

jclermont,
@jclermont@phpc.social avatar

Fresh off php tek last week, I'm reminded that conferences are so much more than just the talks. https://masteringlaravel.io/daily/2024-05-01-conferences-are-more-than-just-talks

cspray,
@cspray@phpc.social avatar

I have found myself, for the first time, having to write what I consider worse code to satisfy Psalm static analysis. Here's a watered-down example showing what I consider odd behavior.

https://psalm.dev/r/5862a290e2

I'm not certain why the 2nd call to doSomething() is valid but the 1st call is not.

sidawson,
@sidawson@mastodon.nz avatar

@cspray Oh, and to your specific example, if phpstan is anything to go by, it seems php stores non associative arrays internally AS associative, it’s just that the keys are indexes (0, 1, 2…) so that’s the “expects array <int, string >, was provided array<string >” malarkey.

In phpstan you can go either array<int, string> (or array<array-key, string>), or, more simply string[] - but the latter form avoids those sorts of complaints. Might be worth having a looksee if psalm is similar.

alessandrolai,
@alessandrolai@phpc.social avatar

@sidawson @cspray that's not the issue here. The same snippet should trigger PHPStan errors too, because it was the starting definition too strict, since it requires "list".

List is an array with only consecutive integer keys. If you don't re-index (and the spread operator does) you don't have a (guaranteed) list anymore.

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