TGViewer
Official Psalm channel Official Psalm channel @psalmphp · 66 subscribers
Post #11 217

Forwarded from Daniil Gentili

Psalm is one of the biggest and most powerful PHP Static analysis tools, featuring exclusive features like security analysis, and in Psalm 6.9, an official, hyperoptimized Docker image was introduced.

Psalm’s docker image uses a custom build of PHP built from scratch with a custom deepbind patch and the jemalloc allocator, running Psalm +30% faster on average than normal PHP (+50% faster if comparing to PHP without opcache installed).

Recently, my deepbind patch was also merged into PHP and will be available to all users (even those not using the Docker image) in PHP 8.5!

To use it right now, on PHP 8.4, simply run:

docker run -v $PWD:/app --rm -it ghcr.io/danog/psalm:latest /composer/vendor/bin/psalm --no-cache


Issues due to missing extensions can be fixed by enabling them in psalm.xml and/or requiring them in composer.json, see here for more info.

Extensions not stubbed by Psalm itself (and thus not available as a psalm config option) may be stubbed using traditional PHP stubs.

Also posted on the blog: https://blog.daniil.it/2025/07/10/official-psalm-docker-image/
GitHub Do not use RTLD_DEEPBIND if dlmopen is available by danog · Pull Request #18612 · php/php-src This pull request disables usage of RTLD_DEEPBIND if dlmopen is available. Context: Php8.1 with alternative malloc allocators #10670 - The issue this PR fixes, using RTLD_DEEPBIND with custom allo...
  • 🔥 3
More from @psalmphp
  1. Jul 10, 2025Also announcing the public beta of Psalm v7! Psalm v7 brings huge performance improvements…
  2. May 18, 2025Small overview of the new psalm-review tool I added in Psalm 6.3: https://blog.daniil.it/2…
  3. May 11, 2025Psalm v6 Deep Dive: Copy-on-Write + dynamic task dispatching Psalm is one of the biggest a…
  4. May 11, 2025And then, a long overdue post about my Autonomous System (AS198747), and an over more over…
  5. May 11, 2025The first series of posts I'll be adding here will be some technical deep dives into the p…
  6. May 11, 2025Happy to announce I've launched a blog, where I'll be posting news about all my different…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →