Skip to content

Commit

Permalink
Allow composer install with --classmap-authoritative during deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
tangrufus committed Jan 8, 2020
1 parent 4425669 commit c97af88
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### Head
* Update `wp_cli_version` to 2.4.0 ([#1131](https://github.com/roots/trellis/pull/1131))
* Allow `composer install` with `--classmap-authoritative` during deploy ([#1132](https://github.com/roots/trellis/pull/1132))

### 1.3.0: December 7th, 2019
* Add `git_sha` and `release_version` to `.env` on deploy ([#1124](https://github.com/roots/trellis/pull/1124))
Expand Down
2 changes: 1 addition & 1 deletion deploy-hooks/build-before.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# chdir: "{{ project_local_path }}/web/app/themes/sage"
#
# - name: Install Composer dependencies
# command: composer install --no-ansi --no-dev --no-interaction --no-progress --optimize-autoloader --no-scripts
# command: composer install --no-ansi --no-dev --no-interaction --no-progress --optimize-autoloader --no-scripts --classmap-authoritative
# args:
# chdir: "{{ deploy_helper.new_release_path }}/web/app/themes/sage"
#
Expand Down
3 changes: 3 additions & 0 deletions roles/deploy/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ project_current_path: "{{ project.current_path | default('current') }}"
# Whether to run `wp core update-db` at end of each deploy
update_db_on_deploy: true

# Whether to autoload classes from classmap only.
composer_classmap_authoritative: false

# Helpers
project: "{{ wordpress_sites[site] }}"
project_root: "{{ www_root }}/{{ site }}"
Expand Down
1 change: 1 addition & 0 deletions roles/deploy/hooks/build-after.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@

- name: Install Composer dependencies
composer:
classmap_authoritative: "{{ composer_classmap_authoritative }}"
no_scripts: yes
working_dir: "{{ deploy_helper.new_release_path }}"

0 comments on commit c97af88

Please sign in to comment.