Skip to content

Commit

Permalink
Ensure Composer is properly loaded during unit tests when installing (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
srtfisher authored May 7, 2024
1 parent 159a902 commit 79f5e67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v0.12.13 - 2024-05-07

### Fixed

- Ensure that Composer is properly loaded during unit tests when installing
WordPress.

## v0.12.12 - 2024-01-08

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/mantle/testing/class-utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ public static function command( $command, &$exit_code = null ) {
* Ensure that Composer is loaded for the current environment.
*/
public static function ensure_composer_loaded() {
if ( class_exists( 'Composer\Autoload\ClassLoader' ) ) {
if ( class_exists( \Composer\Autoload\ClassLoader::class ) && class_exists( Str::class ) ) {
return;
}

Expand Down

0 comments on commit 79f5e67

Please sign in to comment.