Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

composer install with --classmap-authoritative during deploy #1132

Merged
merged 1 commit into from
Jan 19, 2020

Conversation

@tangrufus tangrufus force-pushed the composer-classmap-authoritative branch from d275de4 to c97af88 Compare January 8, 2020 11:50
@tangrufus tangrufus changed the title Allow composer install with --classmap-authoritative during deploy [WIP] Allow composer install with --classmap-authoritative during deploy Jan 8, 2020
@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you thinking that true isn't safe enough as the default?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct.
I am running --classmap-authoritative to see any of my sites break.

Maybe default to true on next major relrease

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a second thought, it is very difficult to make a wp plugin that:

  • generates classes dynamically, and
  • relies on bedrock's composer autoloader

Defaults composer_classmap_authoritative to true

Ready for review

@tangrufus tangrufus force-pushed the composer-classmap-authoritative branch from c97af88 to ec4b295 Compare January 19, 2020 13:57
@tangrufus tangrufus changed the title [WIP] Allow composer install with --classmap-authoritative during deploy Allow composer install with --classmap-authoritative during deploy Jan 19, 2020
@tangrufus tangrufus requested a review from swalkinshaw January 19, 2020 16:31
@tangrufus tangrufus changed the title Allow composer install with --classmap-authoritative during deploy composer install with --classmap-authoritative during deploy Jan 19, 2020
@tangrufus tangrufus force-pushed the composer-classmap-authoritative branch from ec4b295 to 11c51ee Compare January 19, 2020 16:33
Copy link
Member

@swalkinshaw swalkinshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'm good with this as a default 👍

@tangrufus tangrufus merged commit 6df8f63 into roots:master Jan 19, 2020
@tangrufus tangrufus deleted the composer-classmap-authoritative branch January 19, 2020 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants