Skip to content

Commit ec1aa7f

Browse files
committed
Add 'composer keyword to php-project-bootstrap-scripts
1 parent 2e502a5 commit ec1aa7f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

php-project.el

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
;;; Code:
5353
(require 'cl-lib)
5454

55+
;; Constants
56+
(defconst php-project-composer-autoloader "vendor/autoload.php")
57+
5558
;; Variables
5659
(defvar php-project-available-root-files
5760
'((projectile ".projectile")
@@ -106,6 +109,9 @@ Typically it is `pear', `drupal', `wordpress', `symfony2' and `psr2'.")
106109
"Return T when `VAL' is valid list of safe bootstrap php script."
107110
(cond
108111
((stringp val) (and (file-exists-p val) val))
112+
((eq 'composer val)
113+
(let ((path (expand-file-name php-project-composer-autoloader (php-project-get-root-dir))))
114+
(and (file-exists-p path) path)))
109115
((and (consp val) (eq 'root (car val)) (stringp (cdr val)))
110116
(let ((path (expand-file-name (cdr val) (php-project-get-root-dir))))
111117
(and (file-exists-p path) path)))

0 commit comments

Comments
 (0)