Skip to content

[Windows] Add support for php.new (herd-lite) #26

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Kocal
Copy link

@Kocal Kocal commented Jul 2, 2025

I suppose it works, but I haven't been able to test it.

With Go, how can I use my PR with the Symfony CLI, so I can try to see if local:php:list gives me PHP from herd-lite directory?

Close #25

@tucksaun
Copy link
Member

tucksaun commented Jul 2, 2025

With Go, how can I use my PR with the Symfony CLI, so I can try to see if local:php:list gives me PHP from herd-lite directory?

I wrote some directions in the main repo to do so: https://github.com/symfony-cli/symfony-cli/blob/main/CONTRIBUTING.md#additional-repositories

Copy link
Member

@tucksaun tucksaun left a comment

Choose a reason for hiding this comment

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

shouldn't we add support for php.new on Linux and macOS as well?

@@ -51,6 +51,11 @@ func (s *PHPStore) doDiscover() {
if userHomeDir != "" {
s.discoverFromDir(filepath.Join(userHomeDir, ".config", "herd", "bin"), nil, regexp.MustCompile("^php\\d{2}$"), "Herd")
}

// Herd-lite
if userHomeDir != "" {
Copy link
Member

Choose a reason for hiding this comment

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

what about merging it with the previous if userHomeDir != "" ?


// Herd-lite
if userHomeDir != "" {
s.addFromDir(filepath.Join(userHomeDir, ".config", "herd-lite", "bin"), nil, "Herd-lite")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
s.addFromDir(filepath.Join(userHomeDir, ".config", "herd-lite", "bin"), nil, "Herd-lite")
s.addFromDir(filepath.Join(userHomeDir, ".config", "herd-lite", "bin"), nil, "php.new (Herd-lite)")

?

@Kocal
Copy link
Author

Kocal commented Jul 2, 2025

shouldn't we add support for php.new on Linux and macOS as well?

Totally, given the installation files, PHP should be available at $HOME/.config/herd-lite/bin/php on Linux and Mac.

@tucksaun
Copy link
Member

tucksaun commented Jul 3, 2025

shouldn't we add support for php.new on Linux and macOS as well?

Totally, given the installation files, PHP should be available at $HOME/.config/herd-lite/bin/php on Linux and Mac.

Great 👍
This means we could move the logic to discovery.go and benefit from it on every system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[Windows] Add support for php.new and scoop
2 participants