Drupal Modules Benefit from PHPStan on GitLab CI Transition

coding
Freepik

Drupal's journey through a monumental migration from its proprietary DrupalCI continuous integration to the streamlined GitLab CI system has reached a notable milestone. Matt Glaman, in his recent post, highlighted the implementation of PHPStan within GitLab CI for all Drupal modules.

Adding PHPStan jobs in the default GitLab CI templates brings promising advancements to Drupal's development infrastructure under the leadership of Fran Garcia-Linares, an engineer at the Drupal Association overseeing the transition to the new GitLab CI templates.

The innovative feature allows modules to commit a phpstan.neon file to configure PHPStan settings individually, thereby tailoring PHPStan's behavior. Additionally, PHPStan generates multiple reports, including JUnit and GitLab quality reports, aiding developers in manual error review. Notably, it produces a baseline file that permits the acceptance of existing errors to be addressed later, providing a means to commence using PHPStan immediately.

Matt Glaman commented on the efficiency of this approach, particularly the use of result cache by PHPStan to expedite subsequent scans and the creation of varied reports from these scans.

While Matt Glaman's focus has been on projects like phpstan-drupal and Retrofit, he expressed anticipation of trying out GitLab CI on Drupal.org, underscoring its potential for the broader Drupal module development community. Encouraging developers to explore GitLab CI's extensive documentation on Drupal.org, this shift demonstrates a substantial step forward in empowering efficient and comprehensive module development in the Drupal ecosystem.

Learn more here.

Disclaimer: The opinions expressed in this story do not necessarily represent that of TheDropTimes. We regularly share third-party blog posts that feature Drupal in good faith. TDT recommends Reader's discretion while consuming such content, as the veracity/authenticity of the story depends on the blogger and their motives. 

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please let us know in the comments below and we will try to address the issue as best we can.

Related Organizations

Related Drupal Initiatives

Advertisement Here

Upcoming Events

Latest Opportunities

Advertisement Here