forked from laravel/valet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
* upstream/master: (68 commits) Uses `actions/checkout@v4` Update CHANGELOG version Update CHANGELOG version Fix code styling Fix magento2 driver (laravel#1420) Update CHANGELOG version Fix code styling Fix code styling PHP 8.3 (laravel#1448) Update tests/CliTest.php Add conflict about mnapoli/silly 1.8.1–1.8.2 Bump requirement for mnapoli/silly to 1.5+ Add test of link command's isolate flag Ensure link command checks current directory for PHP version Improve link command's secure and isolate sub-commands Update CHANGELOG Fix code styling ...
- Loading branch information
Showing
47 changed files
with
939 additions
and
379 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Bug Report | ||
description: "Report a general library issue." | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Before submitting your report, [please ensure your Laravel version is still supported](https://laravel.com/docs/releases#support-policy). | ||
**Did you know? Most problems can be resolved by running 3 commands:** | ||
- `composer self-update` | ||
- `composer global update` | ||
- `brew upgrade` | ||
... in fact, it's good to run these commands at least once a month! | ||
Alternatively, try to reboot your machine first to see if it solves your current issue. | ||
- type: textarea | ||
attributes: | ||
label: Description | ||
description: Provide a detailed description of the issue you are facing. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Steps To Reproduce | ||
description: Provide detailed steps to reproduce your issue. | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Diagnosis | ||
description: Run `valet diagnose` and then paste the output here. | ||
validations: | ||
required: true | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Release Instructions | ||
|
||
1. Update the `$version` variable in [`app.php`](./cli/app.php) and commit it | ||
2. Create a new GitHub release for this version with the release notes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,10 @@ | |
|
||
class Brew | ||
{ | ||
// This is the array of PHP versions that Valet will attempt to install/configure when requested | ||
const SUPPORTED_PHP_VERSIONS = [ | ||
'php', | ||
'[email protected]', | ||
'[email protected]', | ||
'[email protected]', | ||
'[email protected]', | ||
|
@@ -19,9 +21,22 @@ class Brew | |
'[email protected]', | ||
]; | ||
|
||
const BREW_DISABLE_AUTO_CLEANUP = 'HOMEBREW_NO_INSTALL_CLEANUP=1'; | ||
// Update this LATEST and the following LIMITED array when PHP versions are released or retired | ||
// We specify a numbered version here even though Homebrew links its generic 'php' alias to it | ||
const LATEST_PHP_VERSION = '[email protected]'; | ||
|
||
const LATEST_PHP_VERSION = '[email protected]'; | ||
// These are the PHP versions that should be installed via the shivammathur/php tap because | ||
// Homebrew officially no longer bottles them or they're marked disabled in their formula | ||
// Cue: Homebrew reports "[email protected] has been disabled because it is a versioned formula" | ||
const LIMITED_PHP_VERSIONS = [ | ||
'[email protected]', | ||
'[email protected]', | ||
'[email protected]', | ||
'[email protected]', | ||
'[email protected]', | ||
]; | ||
|
||
const BREW_DISABLE_AUTO_CLEANUP = 'HOMEBREW_NO_INSTALL_CLEANUP=1'; | ||
|
||
public function __construct(public CommandLine $cli, public Filesystem $files) | ||
{ | ||
|
@@ -72,6 +87,14 @@ public function supportedPhpVersions(): Collection | |
return collect(static::SUPPORTED_PHP_VERSIONS); | ||
} | ||
|
||
/** | ||
* Get a list of disabled/limited PHP versions. | ||
*/ | ||
public function limitedPhpVersions(): Collection | ||
{ | ||
return collect(static::LIMITED_PHP_VERSIONS); | ||
} | ||
|
||
/** | ||
* Get a list of installed PHP formulae. | ||
*/ | ||
|
@@ -135,7 +158,9 @@ public function installOrFail(string $formula, array $options = [], array $taps | |
} | ||
|
||
output('<info>['.$formula.'] is not installed, installing it now via Brew...</info> 🍻'); | ||
if ($formula !== 'php' && starts_with($formula, 'php') && preg_replace('/[^\d]/', '', $formula) < '73') { | ||
|
||
if ($this->limitedPhpVersions()->contains($formula)) { | ||
$formula = 'shivammathur/php/'.$formula; | ||
warning('Note: older PHP versions may take 10+ minutes to compile from source. Please wait ...'); | ||
} | ||
|
||
|
@@ -267,7 +292,7 @@ function ($version) use ($resolvedPhpVersion) { | |
* | ||
* @param string|null $phpVersion For example, "[email protected]" | ||
*/ | ||
public function getPhpExecutablePath(?string $phpVersion = null): string | ||
public function getPhpExecutablePath(string $phpVersion = null): string | ||
{ | ||
if (! $phpVersion) { | ||
return BREW_PREFIX.'/bin/php'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.