@phpandcigars@chaos.social avatar

phpandcigars

@phpandcigars@chaos.social

PHP, Medien, Fahrrad, Politik, Shitposts | er/him/el

This profile is from a federated server and may be incomplete. Browse more on the original instance.

Kurorori, to random German
@Kurorori@chaos.social avatar

TIL: Ich dachte immer ein Mimosa wäre irgendwie fancy, aber es ist einfach nur Sekt-Osaft den es schon vor 30 Jahren bei Oma zum Osterfrühstück gab?

phpandcigars,
@phpandcigars@chaos.social avatar

@Kurorori Kannst du diesen Toot nochmal im Dtile von El Hotzo schreiben und schauen, wie sich die Reichweite verändert?

Crell, to python
@Crell@phpc.social avatar

Thought: and have very strong concepts of what is "idiomatically correct" for that language.

What is "idiomatic "? Is the PHP community even consistent enough for there to be such a thing?

(And no, using associative arrays for everything is not idiomatic. It's idiotic.)

phpandcigars,
@phpandcigars@chaos.social avatar

@Crell @damien I would say there are different schools: The Zend/Symfony way: Trying to code like in Java. And then there is the Laravel school: Try to solve problems as elegant as PHP allows to solve it.
Personally I like the Laravel way to solve problems.

phpandcigars,
@phpandcigars@chaos.social avatar

@Crell @phpandcigars I won’t go into the spaghetti comment…

But there is something else you could use as a standard: Setup phpStan and crank it up to level 9.

Kurorori, to random German
@Kurorori@chaos.social avatar

Liebe Bubble - wo bekomme ich denn mittlerweile einen guten veganen Döner?

Balli und Gemüsedöner haben dicht gemacht und bei Dene-Gör gibt es anscheinend nur noch Falafeldöner.
Ich suche aber Seitan/Fleischersatz-Döner und keine Salattasche. 🥙

Jemand Rat? 👀

phpandcigars,
@phpandcigars@chaos.social avatar

@Kurorori Bismarkstraße am Hauptbahnhof wie bereits erwähnt. Habe zuletzt Seitandürüm und eine vegane türkische Pizza dort gegessen. War ganz OK. Alternativ: Frisches Brot bei Izmir am Worringer holen und Pfannendönner selber machen.

phpandcigars,
@phpandcigars@chaos.social avatar
phpandcigars, to php German
@phpandcigars@chaos.social avatar

I think the introduction of attributes in was a big mistake. I worked on a project lately, where some people decided that we use in combination with .

This is not a rant against neither of these projects, but we ended up having attribute declarations in entity classes that are way longer than the entity itself.

It is strange, that all the principles just don’t apply any more if a statement starts with an # …

Is this the new normal now?

heiseonline, to space German

Osiris-Rex: NASA-Sonde bringt Asteroidenproben von Bennu am Sonntag zur Erde

Nach mehr als zwei Jahren Flug kommt die NASA-Sonde Osiris-Rex am Sonntag wieder bei der Erde vorbei und bringt Asteroidenproben mit. Es soll Livestreams geben.

https://www.heise.de/news/Osiris-Rex-NASA-Sonde-bringt-Asteroidenproben-von-Bennu-am-Sonntag-zur-Erde-9311397.html?wt_mc=sm.red.ho.mastodon.mastodon.md_beitraege.md_beitraege

phpandcigars,
@phpandcigars@chaos.social avatar

@heiseonline Das ist der Plot von Venom.

Kurorori, to random German
@Kurorori@chaos.social avatar

Kennt ihr das, wenn ihr einen interessanten Account im Fediverse findet und dann anfangt die Historie zu lesen und Posts zu faven?

Ich vergesse dabei regelmäßig den sozial angemessenen Abstand und die Accountperson wacht dann morgens zu 20 📣💥Kuro starred this post. ~2hrs ago"- Notifications auf. Zu Posts die vielleicht zwei Jahre alt sind.

Ich möchte nicht creepy sein, ich vergesse nur zu stoppen 🥲.

phpandcigars,
@phpandcigars@chaos.social avatar

@Kurorori Bring mich nicht auf dumme Ideen!

phpandcigars, to random German
@phpandcigars@chaos.social avatar

Die beste Sendung ever:

Die Knoff hoff Show!

Wer kennt sie noch?

janboehm, to random German
@janboehm@edi.social avatar

Nazis mit Substanz

phpandcigars,
@phpandcigars@chaos.social avatar
Kurorori, to random German
@Kurorori@chaos.social avatar

Wo möchte ich denn in für meinen Geburtstag Essen gehen?

Fancy und veggie-Optionen sind die Suchkritierien. 👀

phpandcigars,
@phpandcigars@chaos.social avatar

@Kurorori Setzkasten!

grmpyprogrammer, to php
@grmpyprogrammer@phpc.social avatar

To the #php folks lurking out here — hit me up with your questions and struggles with getting some kind of automated testing working

phpandcigars,
@phpandcigars@chaos.social avatar

@thgs @grmpyprogrammer If you have the right environment tests save time. Testing in a browser is time consuming af.

phpandcigars,
@phpandcigars@chaos.social avatar

@grmpyprogrammer How can I setup tools so use a test database to avoid getting stuck in mocking-hell?

phpandcigars,
@phpandcigars@chaos.social avatar

@thgs @grmpyprogrammer I mean in Laravel you have a lot of work done magically for you. Like resetting the database to the state it had before the test ran.
What if for non-technical reasons you can not use Laravel and what to setup something similar manually. How would you proceed?

phpandcigars,
@phpandcigars@chaos.social avatar

@grmpyprogrammer There is a lot wrong with mocks! The fact alone that you need to know about implementation details at the time of writing a test makes me bang my head against the table.

phpandcigars,
@phpandcigars@chaos.social avatar

@thgs @grmpyprogrammer I don‘t aspire to be a magician. I am happy with shipping business value and getting payed. 😉

phpandcigars,
@phpandcigars@chaos.social avatar

@grmpyprogrammer A simple example: I write a unit test for a handler that saves data and returns a JSON with possible validation errors.
At the time of writing the test I don’t want to know if an entity manager, or a pdo or whatever method is used to store the data. I just want to know if I get the expected result and if the data is stored as expected.
I don’t need and want to know about the implementation details.

phpandcigars,
@phpandcigars@chaos.social avatar

@grmpyprogrammer Not necessarily. You could either have a facade (like in Laravel) or an dependendy injection tool injecting the dependency.

At the time of writing the test, the only thing I want to pass to the handler is the request-data and get the response.

I don’t want to be forced to waste precious time on writing mocks for implementation details. The database is an internal part of my dev system.

The only time I want to use mocks is, if I interact with external systems.

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