Skip to content

Commit 968b8fe

Browse files
committed
Consider the existence of "phpstan.neon.dist"
1 parent 526f0b7 commit 968b8fe

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

phpstan.el

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,14 @@
7070
(eq 'root (car phpstan-configure-file)))
7171
(expand-file-name (cdr phpstan-configure-file) (php-project-get-root-dir))
7272
phpstan-configure-file)
73-
(let ((dir (locate-dominating-file "phpstan.neon" default-directory)))
73+
(let ((dir (or (locate-dominating-file "phpstan.neon" default-directory)
74+
(locate-dominating-file "phpstan.neon.dist" default-directory)))
75+
file)
7476
(when dir
75-
(expand-file-name "phpstan.neon" dir)))))
77+
(setq file (expand-file-name "phpstan.neon.dist" dir))
78+
(if (file-exists-p file)
79+
file
80+
(expand-file-name "phpstan.neon" dir))))))
7681

7782
(defun phpstan-get-level ()
7883
"Return path to phpstan configure file or `NIL'."

0 commit comments

Comments
 (0)