Skip to content

Autoloader: Implementing composer autoloader with classmap #4386

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

Conversation

wjrosa
Copy link
Contributor

@wjrosa wjrosa commented Jun 2, 2025

Fixes STRIPE-507
See peNR48-1sM-p2#comment-879

Changes proposed in this Pull Request:

As part of the autoloader implementation, this PR changes the existing version to use Composer's classmap version instead. This should provide Composer with useful features such as the auto-generation of the classmap file and cache.

Testing instructions

Install

  • Checkout to this branch on your local environment (dev/implementing-psr-4-autoloader-without-namespaces)
  • Run npm run build:deps
  • Confirm you get no fatal errors related to missing files upon accessing the admin interface or the checkout page as a shopper

Build

  • Run npm run build
  • Confirm the extension .zip file is correctly generated, and it now includes the vendor folder

  • Covered with tests (or have a good reason not to test in description ☝️)
  • Tested on mobile (or does not apply)

Changelog entry

  • This Pull Request does not require a changelog entry. (Comment required below)
Changelog Entry Comment

Comment

Post merge

@wjrosa wjrosa self-assigned this Jun 2, 2025
@wjrosa wjrosa changed the title Implementing PSR-4 autoloader without namespaces Autoloader: Implementing PSR-4 autoloader without namespaces Jun 3, 2025
@wjrosa wjrosa changed the title Autoloader: Implementing PSR-4 autoloader without namespaces Autoloader: Implementing composer autoloader with classmap Jun 5, 2025
@wjrosa wjrosa marked this pull request as ready for review June 5, 2025 16:14
@wjrosa wjrosa requested review from a team, Mayisha and daledupreez and removed request for a team June 5, 2025 16:14
Copy link

github-actions bot commented Jun 5, 2025

📈 PHP Unit Code Coverage Report

Package Line Rate Health
includes/WC_Stripe_Customer.php 40%
Summary 44% (7252 / 16355)

Copy link
Contributor

@daledupreez daledupreez left a comment

Choose a reason for hiding this comment

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

@wjrosa, can you change the target of this PR to the try/add-basic-classmap-autoloader branch? The current target branch is dev/renaming-the-main-extension-files, which includes PSR-4 class renames, which aren't necessary for the classmap to function.

@wjrosa wjrosa changed the base branch from dev/renaming-the-main-extension-files to try/add-basic-classmap-autoloader June 11, 2025 18:57
@wjrosa wjrosa force-pushed the dev/implementing-psr-4-autoloader-without-namespaces branch from 91e95eb to f740537 Compare June 11, 2025 19:09
@wjrosa
Copy link
Contributor Author

wjrosa commented Jun 11, 2025

@daledupreez I messed it up with the rebase, so I created another one: #4406

@wjrosa wjrosa closed this Jun 11, 2025
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