sebastian, to random
@sebastian@phpc.social avatar

Conference-Driven Development: I only wanted to start preparing my upcoming "Testing with Doubles: Why, When, and How?" conference presentation ... and ended up rewriting the tests for #PHPUnit's test double functionality from scratch.

This is far from being complete, but it's a good start. Writing the remaining tests will just be busywork that can be done here and there on the side.

And, of course!, while working on these tests I found plenty of code that could be deleted or cleaned.

ramsey, to php
@ramsey@phpc.social avatar

I’m trying to run “Debug” (for step-debugging with ) in while running a test. I do this all the time with standard tests, and I’ve never had this problem…

The test runner stops immediately, and PhpStorm reports in the debug console, “Test framework quit unexpectedly.”

Has anyone else seen this error? Do you know what causes it?

phpunit, to random
@phpunit@phpc.social avatar
sebastian, to random
@sebastian@phpc.social avatar

Thanks to @localheinz, the documentation for extending #PHPUnit is taking shape:

https://docs.phpunit.de/en/10.1/extending-phpunit.html

sebastian, to random
@sebastian@phpc.social avatar

At #IntPHPCon #IPC last week, @edorian proposed that #PHPUnit should control when PHP's garbage collector is triggered.

I have implemented this in https://github.com/sebastianbergmann/phpunit/pull/5368

Thoughts?

katalyst, to random

If you were gonna start learning php today, what resources would you reach for?

stahlbrandt,

@katalyst a good IDE can be very helpful, also if you are starting out. Jetbrains’ is very powerful and has lots of good tools, and already is IMO helpful fot beginners. For indepth php development, you will likely want to learn about frameworks such as and/or . , are two tools which are available within e.g. phpstorm which you very likely want to learn (about). Lots of resources on the net, though the official docs at php.net are often probably helpful as well.

einenlum, to random
@einenlum@fosstodon.org avatar

This Week I Learned: 2023W19
TWIL about #Vim, #Distrobox and #PHPUnit

https://www.einenlum.com/articles/twil-2023-19

robjmills, to php

I upgraded from PHPUnit 9 to 10 and my testsuite has gone from 9 seconds to 38 seconds. Something isn’t right #PHP

robjmills,

Looking more closely, it's now using 2 GB of Memory on PHPUnit 10 vs 530 MB on PHPUnit 9 🧐 #phpunit #php

ramsey,
@ramsey@phpc.social avatar

@robjmills I’d recommend posting some information about this in the issue tracker for #PHPUnit. :phpunit:

https://github.com/sebastianbergmann/phpunit

sebastian, to random

Here is the material I used for my presentation on 10 at @phpday today:

https://thephp.cc/presentations/phpunit-10

phpugmrn, to random German
@phpugmrn@phpc.social avatar

#ToolTip SpeedTrap reports slow-running #PHPUnit tests right in the console https://github.com/johnkary/phpunit-speedtrap

ramsey, to random
@ramsey@phpc.social avatar

needs to add little “play” buttons next to each of the TestWith attributes.

Along these same lines, when I have a base test case that uses a data provider defined in child test classes, PhpStorm should be able to figure out that the method in the child is a data provider and add “play” buttons there, as well.

symfonystation, to Symfony
@symfonystation@phpc.social avatar

Explore the February 24, 2023 @symfonystation Communiqué of Symfony, Drupal, PHP, Fediverse, and Cybersecurity news. https://www.symfonystation.com/Symfony-Station-Communique-24-February-2023 #Symfony #PHP #Drupal #Laravel #Cybersecurity #Mastodon #HTML #CSS #PHPStan #PHPUnit :symfony: :elephpant_purple: :drupalicon: :wordpress: :mastodon: :fediverse: :php: :phpunit: :mariadb: :laravel: :apiplatform: :phpstan: 🇺🇦 #ThrowbackThursday

sebastian, to random
@sebastian@phpc.social avatar

Somebody registered their fork of https://github.com/sebastianbergmann/phpunit-documentation-english on https://readthedocs.org/ and somehow people find this outdated version of PHPUnit's documentation in Google searches etc.

#PHPUnit's official documentation is hosted at https://docs.phpunit.de/ -- and nowhere else. It is linked from https://phpunit.de/documentation.html

markusstaab, to random German
@markusstaab@phpc.social avatar

My recent diff speed performance work lead to 2 improvements in sebastianbergmann/diff.

These makes a faster @rectorphp, #phpunit, @psalmphp, @codeception etc.

Blogged about it: https://staabm.github.io/2023/05/01/diff-speeding.html

markusstaab, to random German
@markusstaab@phpc.social avatar

a few hours of work - but well spent.

2 minutes faster @rectorphp when running SetList::CODE_QUALITY on a single file with 5000 lines.

please consider sponsoring my work, if rector performance is critical for your business

https://github.com/sponsors/staabm
https://github.com/rectorphp/rector-src/pull/3711

markusstaab,
@markusstaab@phpc.social avatar

I spent even more time and found some really nice stuff.

read more:

RT @markusstaab
My recent diff speed performance work lead to 2 improvements in sebastianbergmann/diff.

These makes a faster @rectorphp, #phpunit, @psalmphp, @codeception etc.

Blogged about it: https://staabm.github.io/2023/05/01/diff-speeding.html
https://twitter.com/markusstaab/status/1652982351431888896

symfonystation, to Symfony
@symfonystation@phpc.social avatar

Explore the February 17, 2023 @symfonystation Communiqué of Symfony, Drupal, PHP, and Cybersecurity news. https://www.symfonystation.com/Symfony-Station-Communique-17-February-2023 :symfony: :drupal: :laravel: :php: :phpunit: #Symfony #PHP #Drupal #Laravel #Cybersecurity #Mastodon #HTML #CSS #PHPSwoole #PHPUnit #Pest #ThrowbackThursday

freekmurze, to php
@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

beberlei, to random German
@beberlei@phpc.social avatar

When to use a data provider vs multiple tests in #PHPUnit? Imho there are two requirements that would let me to pick data providers to test variants:

  1. The input of the data provider is not used for if conditions that lead to different code being executed in the test.
  2. The data provider input and output variables should fit on a single line, or if an array/object is part of the test dataset, a handful of lines at max.*
symfonystation, to Symfony
@symfonystation@phpc.social avatar

Explore the February 10, 2023 @symfonystation Communiqué of Symfony, Drupal, PHP, and Cybersecurity news. https://www.symfonystation.com/Symfony-Station-Communique-10-February-2023 #Symfony #PHP #Drupal #Cybersecurity #Mastodon #HTML #CSS #Svelte #PHPUnit #Pest #ThrowbackThursday
:symfony: :elephpant_purple: :drupalicon: :javascript: :mastodon: :fediverse: :doctrine: :mysql: :phpunit: :apiplatform: :xdebug: "

phpunit, to random
@phpunit@phpc.social avatar
itsjoshbruce, to php
@itsjoshbruce@phpc.social avatar

This one is interesting to me.

Composer (and Terminal) cannot run #PHPUnit, #PHPStan, or #PHPCS:

"env: php: No such file or directory"

Trying to figure out what details matter.

#macOS removed #PHP from the base install. Instead of using Homebrew, "installed" by pointing to the #MAMP version.

which php - returns correctly (RC)
php -v - RC
which composer - RC
composer -v - RC

This is a new one for me, and the only environment difference I can think of is how PHP is "installed."

Thoughts?

  • 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