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

Ability to access Canvas view without composer.lock file #1267

Merged
merged 2 commits into from
May 22, 2023
Merged

Ability to access Canvas view without composer.lock file #1267

merged 2 commits into from
May 22, 2023

Conversation

mho22
Copy link
Contributor

@mho22 mho22 commented May 17, 2023

The Canvas::installedVersion method uses actually file_get_contents searching for a composer.lock file in project.
If no composer.lock file, it returns an error making it difficult to access the canvas view.

Replacing the actual method lines with the builtin \Composer\InstalledVersions::getPrettyVersion(...) will find the package version in composer.lock if any, and if not, in the composer.json file.

Hope this helps.

Allow option to work without composer.lock file and use base Composer InstalledVersions method.
@austintoddj
Copy link
Owner

Didn't know this utility existed. Thanks for the submission @itemshopp!

Changed the branch to develop.

@austintoddj austintoddj changed the base branch from master to develop May 22, 2023 20:35
@austintoddj austintoddj merged commit 23a8481 into austintoddj:develop May 22, 2023
austintoddj added a commit that referenced this pull request May 24, 2023
@austintoddj
Copy link
Owner

Added this to the latest release 6.0.46 since I'm not sure when I'm not sure when 7.0 will launch.

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