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

Add composer autoload #95

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

MaxwellGarceau
Copy link
Collaborator

@MaxwellGarceau MaxwellGarceau commented Dec 26, 2024

Description of the Change

Added autoloading to have an easy way to modularize new code and refactor existing code in the future.

❗I modified the Github action workflow files to install composer dependencies in order to ensure autoload was being generated on every build. I wanted to flag this in case I missed a required build process update.

Also, if there's a good place to add documentation for in progress pattern updates I'd be happy to add switching to autoload in new work and any refactors.

Closes #96

How to test the Change

Changelog Entry

Added - New feature
Changed - Existing functionality
Deprecated - Soon-to-be removed feature
Removed - Feature
Fixed - Bug fix
Security - Vulnerability

Credits

Props @username, @username2, ...

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

Copy link
Collaborator

@dkotter dkotter left a comment

Choose a reason for hiding this comment

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

Overall this looks good but we'll need to do a few more things:

  1. We have a GitHub Action that deploys plugin assets and readme changes. That will need to be updated to run composer install as well
  2. We don't currently deploy the vendor directory so we'll need to update that or things won't work in the final release. We have both a .distignore and .gitattributes files that will need updated

mailchimp.php Outdated Show resolved Hide resolved
@MaxwellGarceau
Copy link
Collaborator Author

MaxwellGarceau commented Jan 2, 2025

Overall this looks good but we'll need to do a few more things:

  1. We have a GitHub Action that deploys plugin assets and readme changes. That will need to be updated to run composer install as well
  2. We don't currently deploy the vendor directory so we'll need to update that or things won't work in the final release. We have both a .distignore and .gitattributes files that will need updated

@dkotter I've made the requested changes.

  1. Updated .github/workflows/wordpress-plugin-asset-update.yml with the composer install and autodump commands
  2. Removed the vendor folder from distignore and gitattributes

Note: I've updated the translators comment to match an example I found in WP Core.

@MaxwellGarceau MaxwellGarceau marked this pull request as ready for review January 6, 2025 15:23
@github-actions github-actions bot added the needs:code-review This requires code review. label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:code-review This requires code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add composer autoload
2 participants