---
title: "Discussion on \"PHPStan in GitLab\" | Hashnode"
description: "Discussion on \"PHPStan in GitLab\". Let's get PHPStan working with Gitlab and code quality.\nIn your .gitlab-ci.yml add a new section:\nphpstan:\n  stage: testing\n  needs:\n  - composer\n  script:\n  - php -d memory_limit=-1 vendor/bin/phpstan analyse -c phpstan.neon --error-format gitlab > ..."
url: "https://hashnode.com/posts/phpstan-in-gitlab/61e5fdee8a425719c17372ff"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [PHPStan in GitLab](https://www.guywarner.dev/phpstan-in-gitlab?utm_source=hashnode&utm_medium=feed)

Let's get PHPStan working with Gitlab and code quality. In your .gitlab-ci.yml add a new section: phpstan: stage: testing needs: - composer script: - php -d memory\_limit=-1 vendor/bin/phpstan analyse -c phpstan.neon --error-format gitlab > ...

Dec 17, 2020 · 1 min read · guywarner.dev  
Updated Jan 26, 2022  
Read the article

-   [#laravel](https://hashnode.com/tag/laravel)
-   [#php](https://hashnode.com/tag/php)

## Written by

[Guy Warner](https://hashnode.com/@GuyWarner)

@GuyWarner · Salt Lake City, Utah

  
[View profile](https://hashnode.com/@GuyWarner)

20+ years building PHP/MySQL/AWS SaaS and Laravel in production. Former CTO at Monitorbase. Founder of Eco Moving Utah and Bin X.

Guy Warner is a Salt Lake City software engineer with 20+ years building PHP/MySQL/AWS SaaS products, with 10+ years of Laravel in production. He was Chief Technology Officer (CTO) and VP of Development at Monitorbase in credit monitoring, handling 7M+ monthly queries, where he led 12+ developers and migrated to SingleStore. He founded Eco Moving Utah, a moving tote rental business, and builds Bin X, rental business software. He has a B.S. in Political Science, University of Utah.

## Responses 1

Markdown supported · ⌘↵ to post

[Lars Moelleken](https://hashnode.com/@voku)

[Jan 18, 2022](https://hashnode.com/posts/phpstan-in-gitlab/61e5fdee8a425719c17372ff/comment/61e6571cf6d40b3391ad6bbb)

Does it show the results per file in the gitlab UI? Is this working for regular commits or only for pull requests?

[Guy Warner](https://hashnode.com/@GuyWarner)

[Jan 18, 2022](https://hashnode.com/posts/phpstan-in-gitlab/61e5fdee8a425719c17372ff/comment/61e6571cf6d40b3391ad6bbb#reply-61e7107abe5d7633af87e23f)

It does show the per file on requests:

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1642532526399/nk_hF5piN7.png)

It also runs for each commit but has no UI outside of a request which is why we added the manual run
