#phpstan-drupal
A playground to test Drupal code with phpstan-drupal is coming soon! mglaman.dev/blog/playgro...
A playground to test Drupal code with phpstan-drupal is coming soon!
I'm excited to announce a new feature coming to phpstan-drupal that already exists for PHPStan. PHPStan has an online playground to run and test analysis results. Soon, we will have one for phpstan-dr...
mglaman.dev
November 15, 2023 at 12:23 PM
New #drupal change record: Return types are required in all new methods and functions.

www.drupal.org/node/3461320

No brainer (IMHO).
Return types are required in all new methods and functions
All new methods and function must have return types. This is enforced by PHPStan.
www.drupal.org
November 19, 2024 at 6:57 PM
You had me at “stricter defaults”.

If you are a #drupal backend developer (or work with an AI coding agent that is) then you should be using PhpStan.

@mglaman.bsky.social shares some highlights of the new release:

mglaman.dev/blog/phpstan...
phpstan-drupal 2.1.0: stricter defaults
phpstan-drupal 2.1.0 is out. The theme of this release: rules and behaviors that proved themselves as opt-ins are now the defaults. If you run `composer update` and see new errors, that is the release...
mglaman.dev
August 10, 2026 at 3:47 PM
Metadrop introduces Aljibe, a DDEV-based toolkit for Drupal devs—streamlining QA, testing, accessibility, and automation. Built for teams, with PHPStan lvl 8, Behat, BackstopJS, Pa11y, and more. Opinionated, repo-first, and ready to scale.##Drupal #DDEV
https://bit.ly/48eNmHp
Metadrop Releases Aljibe: QA and Testing Toolkit for Drupal Development with DDEV
Metadrop has released Aljibe, a DDEV add-on that simplifies Drupal development by integrating automated testing, code analysis, documentation, and deployment tools. Designed to support high-quality Drupal projects, Aljibe includes PHPStan, Behat, Bac...
bit.ly
September 23, 2025 at 6:50 AM
I really like the idea of PHP Attributes (over Annotations) for #drupal development, but if you miss a “use” statement for a class the PHP attribute is using, there is no PHP fatal error - it just silently fails. This is less-than-ideal.

Unless, of course, you're using PhpStan. 👍
November 10, 2024 at 5:35 PM
📦 mglaman/phpstan-drupal 2.2.1

Drupal extension and rules for PHPStan

🔗 https://github.com/mglaman/phpstan-drupal
September 18, 2026 at 3:20 PM
Matt Glaman @mglaman.bsky.social introduces a phpstan-drupal rule that flags @todo comments tied to the active Drupal.org issue in CI. Prevents unresolved todos from merging.

https://bit.ly/4sDaw1d
##Drupal #PHPStan #CI #OpenSource
PHPStan Drupal Rule Detects Issue-Specific @todo Comments in CI Pipelines
A new rule in phpstan-drupal identifies unresolved @todo comments tied to active Drupal.org issues during merge requests. Introduced by Matt Glaman, it integrates with GitLab CI pipelines to prevent issue-specific placeholders from being merged into ...
bit.ly
March 30, 2026 at 2:26 PM
March 24, 2026 at 1:18 PM
Calling all #Drupal devs ready to go deeper! 👩‍💻👨‍💻

The Professional Module Development course delivers:

🧩 Services, Plugins, Caching
🧪 PhpStan, PhpUnit, Xdebug
✅ Runs 2x/week over 15 weeks

🎓 Learn more: www.drupaleasy.com/academy/pmd/...
💬 Free Q&A webinar: www.drupaleasy.com/academy/pmd/...
Professional Module Development
www.drupaleasy.com
July 11, 2025 at 1:36 PM
I’ll be teaching a full-day “Professional Drupal Module Development Tools” workshop at the Pacific Northwest Drupal Summit in Seattle on October 11!

pnwdrupalsummit.org/sessions/pro...

Join me to learn how to integrate phpcs, PhpStan, PhpUnit and more with VSCode or PhpStorm.
Professional Drupal Module Development Tools | PNW Drupal Summit
pnwdrupalsummit.org
October 7, 2024 at 2:34 PM
I did some not-so-nice fixes for #GraphQL module to be #Drupal 12 compatible! 🛠️

This was a bit painful to figure out for @phpunit 13 and @phpstan compatibility. Mostly making them shut up because we need to support Drupal 10, 11 and 12.

Drupal's custom phpunit concurrent… mastodon.social/@klaus…
September 20, 2026 at 4:40 PM
Björn Brala explored how Drupal Rector rules increasingly function as structured transformation infrastructure rather than isolated upgrade scripts. The article highlights reusable mappings, automated deprecation handling, and scalable upgrade workflows.

https://bit.ly/4dGeyzI
##PHP #Automation
Björn Brala Explores Configuration-Driven Drupal Rector Rules and Automated Upgrade Workflows
Björn Brala examines how Drupal Rector workflows increasingly rely on structured mappings, reusable rewrite engines, and automated scaffolding rather than deeply procedural transformation logic. The article discusses Rector internals, PHPStan integra...
bit.ly
May 25, 2026 at 2:00 PM
phpstan-drupal’s playground now supports agent-friendly bug reproduction through a documented API. Agents can submit code, receive share links, retrieve Markdown results, and compare saved errors with current analysis.

https://bit.ly/4rdb3Y0
##Drupal #PHPStan #AIAgents #DrupalDevelopment
September 10, 2026 at 4:43 PM
The phpstan-drupal playground now has an llms.txt, returns the full share URL from the API, and renders any saved result as Markdown.

Hand your agent a share link, and it reads the code and the error. Or have it push a reproduction and hand you the issue link.

mglaman.dev/blog/making-...
Making the phpstan-drupal playground work for agents
The phpstan-drupal playground exists to reproduce bugs. You paste PHP, run PHPStan with phpstan-drupal against a real Drupal core install, and share the result link in an issue.
mglaman.dev
September 3, 2026 at 7:46 PM
📦 mglaman/phpstan-drupal 2.1.2

Drupal extension and rules for PHPStan

🔗 https://github.com/mglaman/phpstan-drupal
August 13, 2026 at 4:13 PM
July 14, 2026 at 5:18 PM
📦 mglaman/phpstan-drupal 2.0.17

Drupal extension and rules for PHPStan

🔗 https://github.com/mglaman/phpstan-drupal
July 13, 2026 at 7:24 PM
Christian López Espínola explains a Drupal Canvas testing issue caused by JSON key-order differences across database engines.

The fix uses sorted input comparisons and a PHPStan rule to avoid fragile assertSame checks.

https://bit.ly/4w4x4tA
##Drupal #DrupalCanvas #Testing #PHPStan
Christian López Espínola Explains JSON Key-Order Issue in Drupal Canvas
A local test can look stable until another database engine changes the order of the same JSON keys.
bit.ly
July 13, 2026 at 4:52 PM
Stop failing CI builds after you push.

Run GitLab CI checks locally and catch issues before review. Learn ESLint, PHPCS, PHPStan, and more.

buff.ly/YnLRLzW

#FLDC26 #Drupal
February 13, 2026 at 5:59 PM
Drupal 11.2.3 released with key fixes:

Restored PHPStan 1.x & 2.x support
Fixed return type issue in BlockBase
PHPUnit 10/11 support for core-recommended installs
Production-ready, security coverage until June 2026.

Full story: https://bit.ly/4fvHU48
August 11, 2025 at 7:41 AM
📦 mglaman/phpstan-drupal 2.0.14

Drupal extension and rules for PHPStan

🔗 https://github.com/mglaman/phpstan-drupal
April 22, 2026 at 10:09 PM
📦 thronedigital/drupal-qa v1.3.1

Reusable CI/QA toolchain for Drupal projects. Provides PHPUnit, PHPCS, PHPStan, Behat, and GrumPHP with sensible defaults and generic smoke tests.

🔗 https://github.com/DanePete/drupal-qa
April 10, 2026 at 6:25 AM