File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 4848(require 'cl-lib )
4949(require 'f )
5050(require 'json )
51- (require 'php-project )
51+ (require 'php-project nil t )
5252(require 'php-runtime )
5353(require 'ring )
5454(require 'subr-x )
5757(require 'xref )
5858(require 'smart-jump nil t )
5959
60+ (declare-function php-project-get-root-dir " ext:php-project" )
6061(declare-function smart-jump-register " ext:smart-jump" )
6162
6263; ; Custom variables
@@ -202,7 +203,11 @@ have to ensure a compatible version of phpactor is used."
202203 " Return working directory of Phpactor."
203204 (directory-file-name
204205 (expand-file-name
205- (or (php-project-get-root-dir) default-directory))))
206+ (or (if (fboundp 'php-project-get-root-dir )
207+ (php-project-get-root-dir)
208+ (or (locate-dominating-file default-directory " .phpactor.yml" )
209+ (locate-dominating-file default-directory " composer.json" )))
210+ default-directory))))
206211
207212(defun phpactor--expand-local-file-name (name )
208213 " Expand file name by NAME."
You can’t perform that action at this time.
0 commit comments