PHP Hot

cspray, to php
@cspray@phpc.social avatar

I found myself needing to write tests for code that throw an exception with domain-specific information. I actually need access to the exception thrown in my test. So, I created a testing utility that will do just that.

https://github.com/cspray/assert-throws

cspray,
@cspray@phpc.social avatar

@ramsey Yea, that's what I was typically doing too. Then I did some Java work and liked the way JUnit 5 handles this type of thing so I decided to implement a similar pattern in PHP.

bobmagicii,
@bobmagicii@phpc.social avatar

@cspray neat. yeah this construct here is one i copy paste a lot, as sometimes there is inspection of some exception properties after the instance of check.

if your system could be packaged up into a good rfc might be something that could be pitched to sebastian for core inclusion.

im always personally leery of adding things to the testing suite, its hard for me to build the trust in addons for something i need to ultra trust.

jaapio, to php Dutch
@jaapio@phpc.social avatar

discovered livetechhelper.com, while the initiative could be positive explained, the execution is horrible! I found https://livetechhelper.com/repos/jaapio/phpunit
I can help with but obviously any income should go to the original maintainers not to me because I created a fork!

Same applies to other projects, should we stop this?! ?

danielsiepmann,

@jaapio Not sure if those services need adjustment or Services like GitHub.

I shares my thoughts on GitHubs fork issues here: daniel-siepmann.de/issues-with…

The issue is thst GitHub doesn't allow to contribute withiut forking. But a fork has strong meanings under certain circumstances.

I guess the same issue applies to other Services like @Codeberg

mmoya, to php

A filter to prepend Hello world! to /etc/passwd, source https://www.ambionics.io/blog/iconv-cve-2024-2961-p1

mobileatom, to Symfony
@mobileatom@flipboard.com avatar

Multiple SSO with Symfony and OneLogin SAML Bundle.

https://medium.com/

Posted into THE FEDIVERSE VS. CORPORATE SOCIAL MEDIA @the

jclermont, to php
@jclermont@phpc.social avatar

It's best practice to always use the config helper in our application code, except for one place: Don't use the config helper in config files.

Here's an explanation as to why. https://masteringlaravel.io/daily/2024-05-27-dont-use-the-config-helper-in-a-config-file

sarah,
@sarah@phpc.social avatar

@jclermont isn’t it better practice to inject the config you need into the places you need it, rather than globally calling a function?

koehnlein, to php German
@koehnlein@mastodon.social avatar

Leider kann ich dieses Jahr nicht bei den DevDays dabei sein. 🙁

Zur Trauerbewältigung habe ich mir jetzt ein Ticket für das Camp München gekauft. 😄 https://www.typo3camp-muenchen.de

Xitnelat,
@Xitnelat@wue.social avatar

Das Camp ist im Sperrbezirk? 🤔
@koehnlein @IchHabRecht

koehnlein,
@koehnlein@mastodon.social avatar

@Xitnelat @IchHabRecht Keine Ahnung. Ruf doch mal bei 32 16 8 an und frag nach.

typo3, to php German
@typo3@typo3.social avatar

Revolutionizing user experience at OTH Regensburg! 🚀 in2code transformed the OTH Regensburg website into a dynamic recruitment portal, boosting engagement and efficiency. Awarded the Award in 2023 for higher education, this recognition underscores in2code's specialization, elevating the project as a standout in the category.

Discover OTH Regensburg's design refresh in this new case study: https://typo3.com/customers/case-studies/oth-regensburg

image/jpeg
image/jpeg

sanjay_nitsan, to php
oliklee,
@oliklee@chaos.social avatar

@sanjay_nitsan I find bashing other open source projects neither funny nor helpful. Instead, I think projects supporting each other helps us all.

symfony, to Symfony
@symfony@mastodon.social avatar

🖥️ A Week of Symfony (20-26 May 2024)
➡️ https://symfony.com/blog/a-week-of-symfony-908-20-26-may-2024

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

foreach() works on arrays and objects. On objects, it skips uninitialized properties, which may be very convenient with readonly properties : otherwise, it is a fatal error!

https://php-tips.readthedocs.io/en/latest/tips/foreach_skips_uninitialized.html

nyamsprod, (edited ) to php
@nyamsprod@phpc.social avatar

I know that ship has already sailed but it would have been nice if the spread operator on iterable did follow the semantic of iterator_to_array with the preserve keys argument being true

For context: https://3v4l.org/AKEbB

zimzat,
@zimzat@mastodon.social avatar

@nyamsprod It has the same behavior as array_merge, which makes it very consistent 1-to-1 behavior.

I've seen the default iterator to array key behavior bite people more often, especially when doing iterator to array on multiple yield/from generators.

nyamsprod,
@nyamsprod@phpc.social avatar

@zimzat I get the reasoning behind but would have been "cool" nice to have the iterator_to_array behaviour when working with iterator it seems more appropriate

doefom, to Laravel
@doefom@mastodon.social avatar

Macros are one thing I enjoy using the most in . It's a way to extend the functionality of many built-in by providing custom callbacks for a specific key.

One production example I use macros for fairly often is what I call the "admin alert". Especially in smaller applications I want to get notified whenever an error or an event occurs the admin (mostly that's me) should know about.

Here's what this might look like.

emd,
@emd@cosocial.ca avatar

@doefom welcome, let me know if I can help you get going with them

doefom,
@doefom@mastodon.social avatar

@emd thanks for the offer! Do you know a GitHub repo where this is used and I can take a look at?

carbontwelve, to php
@carbontwelve@notacult.social avatar

Ooh look is getting some more JavaScript array functions https://laravel-news.com/php-8-4-array-find-functions

Crell,
@Crell@phpc.social avatar

@carbontwelve More like functional tools. :-) The functionality exists in most languages standard libraries at this point.

mobileatom, to Symfony
@mobileatom@flipboard.com avatar

DbToolsBundle, enfin un outil pour utiliser légalement nos données de prod en local.

https://jolicode.com/blog/dbtoolsbundle-enfin-un-outil-pour-utiliser-legalement-nos-donnees-de-prod-en-local?utm_source=flipboard&utm_medium=activitypub

Posted into SYMFONY FOR THE DEVIL @symfony

mobileatom, to Symfony
@mobileatom@flipboard.com avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • kavyap
  • thenastyranch
  • ethstaker
  • osvaldo12
  • mdbf
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • Youngstown
  • ngwrru68w68
  • slotface
  • GTA5RPClips
  • rosin
  • megavids
  • cubers
  • everett
  • cisconetworking
  • tacticalgear
  • anitta
  • khanakhh
  • normalnudes
  • Durango
  • modclub
  • tester
  • provamag3
  • Leos
  • lostlight
  • All magazines