Skip to content

Commit

Permalink
fix(null-check): Fix ComposerLibraryManger being nullable now
Browse files Browse the repository at this point in the history
  • Loading branch information
olivernybroe committed Feb 28, 2023
1 parent 45ecfd7 commit 6846c2a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
# PEST IntelliJ Changelog

## Unreleased

## 1.9.1-EAP.1 - 2023-02-09

### Fixed
- Fixed ComposerLibraryManager being nullable now.
- Fixed running tests with filenames containing `_`.

### Changed
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

pluginGroup = com.pestphp
pluginName = PEST PHP
pluginVersion = 1.9.1-EAP.2
pluginVersion = 1.9.1-EAP.3

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class PestRerunFailedTestsAction(
)

val rootPath =
ComposerLibraryManager.getInstance(project).findVendorDirForUpsource()?.parent?.path
ComposerLibraryManager.getInstance(project)?.findVendorDirForUpsource()?.parent?.path
?: command.workingDirectory

val testcases = failed.mapNotNull { it.toPestTestRegex(rootPath) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ExpectationFileService(val project: Project) {

// Get the composer directory
val composer =
ComposerLibraryManager.getInstance(project).findVendorDirForUpsource()
ComposerLibraryManager.getInstance(project)?.findVendorDirForUpsource()
?: return@suspendIndexingAndRun
val directory =
PsiManager.getInstance(project).findDirectory(composer) ?: return@suspendIndexingAndRun
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class PestConfigurationFileParser(private val settings: PestSettings) {
fun parse(project: Project): PestConfigurationFile {
// Use the location of the composer.json file or the project dir
val baseDir = ComposerLibraryManager.getInstance(project)
.findVendorDirForUpsource()
?.findVendorDirForUpsource()
?.parent
?: project.guessProjectDir()
?: return defaultConfig
Expand Down

0 comments on commit 6846c2a

Please sign in to comment.