File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 9090
9191(defun flymake-phpstan (report-fn &rest _ignored-args )
9292 " Flymake backend for PHPStan report using REPORT-FN."
93- (let ((command-args (phpstan-get-command-args t )))
93+ (let ((command-args (phpstan-get-command-args :include-executable t )))
9494 (unless (car command-args)
9595 (user-error " Cannot find a phpstan executable command" ))
9696 (when (process-live-p flymake-phpstan--proc)
9797 (kill-process flymake-phpstan--proc))
98- (let ((source (current-buffer )))
98+ (let ((source (current-buffer ))
99+ (target-path (if (or (buffer-modified-p ) (not buffer-file-name))
100+ (phpstan-normalize-path
101+ (flycheck-save-buffer-to-temp #'flycheck-temp-file-inplace ))
102+ buffer-file-name)))
99103 (save-restriction
100104 (widen )
101- (setq flymake-phpstan--proc (flymake-phpstan-make-process (php-project-get-root-dir) command-args report-fn source ))
105+ (setq flymake-phpstan--proc (flymake-phpstan-make-process (php-project-get-root-dir) ( append command-args ( list " -- " target-path)) report-fn source ))
102106 (process-send-region flymake-phpstan--proc (point-min ) (point-max ))
103107 (process-send-eof flymake-phpstan--proc)))))
104108
You can’t perform that action at this time.
0 commit comments