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

Fix link command's --isolate argument with custom name #1428

Merged
merged 6 commits into from
Sep 25, 2023

Commits on Sep 8, 2023

  1. Improve link command's secure and isolate sub-commands

    Passing a custom hostname to the `link` command with the `--isolate` argument will result in either a mismatched site being isolated or the site not being found ("The [example] site could not be found in Valet's site list.").
    
    The reason for this is because the `isolate` command defaults to using the current directory's _name_ which won't match the custom hostname.
    
    This issue does not affect the `secure` command because it resolves the hostname from the current directory's _full path_.
    
    This commit passes the hostname (either custom or the current directory's name) to both sub-commands to ensure consistency of operations.
    
    Note: A bug introduced in mnapoli/silly v1.8.1 breaks all arguments in `runCommand()` method. See mnapoli/silly#69 for details and mnapoli/silly#70 for pull request.
    mcaskill committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    f378dc7 View commit details
    Browse the repository at this point in the history
  2. Ensure link command checks current directory for PHP version

    This matches the isolate command's usage of `Site::phpRcVersion()`.
    mcaskill committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    a268179 View commit details
    Browse the repository at this point in the history
  3. Add test of link command's isolate flag

    Based on `PhpFpmTest::test_isolate_will_isolate_a_site()` and `CliTest::test_link_command_with_secure_flag_secures()`.
    mcaskill committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    24e7ed8 View commit details
    Browse the repository at this point in the history
  4. Bump requirement for mnapoli/silly to 1.5+

    Silly v1.5.0 introduced improvements on command arguments and options that are used by Valet.
    mcaskill committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    35539fe View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c02361b View commit details
    Browse the repository at this point in the history
  6. Update tests/CliTest.php

    driesvints authored and mcaskill committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    f9ee253 View commit details
    Browse the repository at this point in the history