Skip to content

Commit

Permalink
composer install with --classmap-authoritative during deploy (#1132)
Browse files Browse the repository at this point in the history
`composer install` with `--classmap-authoritative` during deploy
  • Loading branch information
tangrufus authored Jan 19, 2020
2 parents 9cd9a4a + 11c51ee commit 6df8f63
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### Head
* Update `wp_cli_version` to 2.4.0 ([#1131](https://github.com/roots/trellis/pull/1131))
* Allow `composer install` without `--no-scripts` during deploy ([#1133](https://github.com/roots/trellis/pull/1133))
* `composer install` without `--no-scripts` during deploy ([#1133](https://github.com/roots/trellis/pull/1133))
* 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
2 changes: 2 additions & 0 deletions roles/deploy/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ update_db_on_deploy: true

# Most scripts are used in development instead of remote servers. Use with caution.
composer_no_scripts: true
# Whether to autoload classes from classmap only.
composer_classmap_authoritative: true

# Helpers
project: "{{ wordpress_sites[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 @@ -28,4 +28,5 @@
- name: Install Composer dependencies
composer:
no_scripts: "{{ composer_no_scripts }}"
classmap_authoritative: "{{ composer_classmap_authoritative }}"
working_dir: "{{ deploy_helper.new_release_path }}"

0 comments on commit 6df8f63

Please sign in to comment.