Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

Commit 7aaa915

Browse files
author
Mischa Braam
committed
Merge branch 'release/2.4' into 2.x
# Conflicts: # cli/drivers/BedrockValetDriver.php
2 parents eb338f1 + 46fcaba commit 7aaa915

File tree

16 files changed

+848
-994
lines changed

16 files changed

+848
-994
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ assignees: ''
99

1010
- [ ] I've checked the issue queue and could not find anything similar to my bug.
1111
- [ ] I'm on the latest version of valet-plus (`valet --version`): `<Valet-Plus-Version>`
12-
- [ ] I've run `valet fix` and `valet install` after updating and before submitting my issue/feature.
12+
- [ ] I've run `valet install` after updating and before submitting my issue/feature.
1313

1414
**What is the problem?**
1515
A description of what you think the problem is.

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,23 @@ All notable changes to valet-plus will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased](https://github.com/weprovide/valet-plus/compare/2.3.1...2.x)
7+
## [2.4.0](https://github.com/weprovide/valet-plus/compare/2.3.1...2.4.0)
8+
### Fixed
9+
- [#612] Fixed Bedrock driver
10+
- [#522] Use SHA256 for self signed certificates
11+
- [#608] Update xdebug to support PHP 8.1
12+
13+
### Added
14+
- Support for PHP 8.1
15+
- Support for PHP 8.2
16+
17+
### Changed
18+
- Replaced valet-php tap by shivammathur php tap
19+
- Replaced pecl extensions by shivammathur php extensions
20+
21+
### Removed
22+
- Support for PHP <7.1
23+
824

925
## [2.3.1](https://github.com/weprovide/valet-plus/compare/2.3.0...2.3.1)
1026
### Fixed

INSTALL.MD

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Installing Valet+
2+
3+
1. Install [Homebrew](https://brew.sh/) or update to the latest version using `brew update`.
4+
5+
> If you're upgrading van Valet+ 2.3 or lower use the extra following steps.
6+
> - Remove all `valet-php@` versions with `brew remove valet-php@...`.
7+
> - You might end up with some broken links, you can use `brew doctor` to find and remove/resolve them.
8+
> - Untap henkrehorst/php with `brew untap henkrehorst/php`.
9+
10+
2. Add the Homebrew PHP tap with `brew tap shivammathur/php`.
11+
3. Install PHP 7.4 using homebrew with `brew install shivammathur/php/php@7.4`.
12+
4. Link the installed PHP version using `brew link php@7.4 --force --overwrite`.
13+
14+
> Sometimes you need to restart your terminal for the link to have effect.
15+
16+
5. Install Composer using anyway you like, suggested is using `brew install composer`.
17+
6. Install Valet+ with Composer using `composer global require weprovide/valet-plus --update-with-dependencies`.
18+
7. Add `export PATH="$PATH:$HOME/.composer/vendor/bin"` to `.bash_profile` (for bash) or `.zshrc` (for zsh) depending on
19+
your shell (`echo $SHELL`).
20+
8. Run the `valet install` command. Optionally add `--with-mariadb` to use MariaDB instead of MySQL This will configure and install Valet+ and DnsMasq, and register Valet's daemon to launch when your system starts.
21+
22+
> Sometimes `php` (latest version) gets installed too, which throws an "Unable to determine linked PHP" error. In this case just re-link PHP 7.4.
23+
24+
> After install you can validate that it's working by pinging any `.test` domain you like, for example `ping -c1 foobar.test`.
25+
26+
> Sometimes you to need restart your Mac in order for all installed services to work properly.
27+
28+
9. Create any directory on your disk to your liking where you run your sites from and park valet there with `valet park`.
29+
10. Restart Valet+ if necessary with `valet restart`.

cli/Valet/Binaries.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@ class Binaries
3232
*/
3333
const SUPPORTED_CUSTOM_BINARIES = [
3434
self::N98_MAGERUN => [
35-
'url' => 'https://files.magerun.net/n98-magerun-1.103.1.phar',
36-
'shasum' => 'f4de50f5e7f9db70ee82148339ca865f14b7cdf7713d1f7c9357b84067235ce6',
35+
'url' => 'https://files.magerun.net/n98-magerun-2.3.0.phar',
36+
'shasum' => 'b3e09dafccd4dd505a073c4e8789d78ea3def893cfc475a214e1154bff3aa8e4',
3737
'bin_location' => '/bin/'
3838
],
3939
self::N98_MAGERUN_2 => [
40-
'url' => 'https://files.magerun.net/n98-magerun2-3.2.0.phar',
41-
'shasum' => '5b5b4f7a857f7716950b6ef090c005c455d5e607f800a50b7b7aefa86d1c4e36',
40+
'url' => 'https://files.magerun.net/n98-magerun2-7.0.3.phar',
41+
'shasum' => '4aa39aa33d9cd5f2d5e22850df76543791cf4f31c7dbdb7f9de698500f74307b',
4242
'bin_location' => '/bin/'
4343
],
4444
self::DRUSH_LAUNCHER => [
45-
'url' => 'https://github.com/drush-ops/drush-launcher/releases/download/0.6.0/drush.phar',
46-
'shasum' => 'c3f32a800a2f18470b0010cd71c49e49ef5c087f8131eecfe9b686dc1f3f3d4e',
45+
'url' => 'https://github.com/drush-ops/drush-launcher/releases/download/0.10.2/drush.phar',
46+
'shasum' => '0ae18cd3f8745fdd58ab852481b89428b57be6523edf4d841ebef198c40271be',
4747
'bin_location' => '/bin/'
4848
]
4949
];

cli/Valet/Brew.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ public function __construct(CommandLine $cli, Filesystem $files)
3131
public function installed($formula)
3232
{
3333
$formulae = $this->cli->runAsUser('brew list --formula | grep ' . $formula);
34-
return in_array($formula, explode(PHP_EOL, $formulae));
34+
if (in_array($formula, explode(PHP_EOL, $formulae))) {
35+
$installed = trim($this->cli->runAsUser('brew info ' . $formula . ' | grep "Not installed"'));
36+
if ($installed === "") {
37+
return true;
38+
}
39+
}
40+
41+
return false;
3542
}
3643

3744
/**

cli/Valet/Elasticsearch.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ public function install($version = null)
9999
}
100100

101101
// Install dependencies
102-
$this->cli->quietlyAsUser('brew cask install java');
103-
$this->cli->quietlyAsUser('brew cask install homebrew/cask-versions/adoptopenjdk8');
102+
$this->cli->quietlyAsUser('brew install openjdk@17');
104103
$this->brew->installOrFail('libyaml');
105104
// Install elasticsearch
106105
$this->brew->installOrFail($versions[$version]['formula']);
@@ -246,7 +245,7 @@ public function switchTo($version)
246245
} else {
247246
// Install PHP dependencies through installation of PHP.
248247
$this->phpFpm->install();
249-
warning("Switching Elasticsearch requires PECL extension yaml. Try switching again.");
248+
warning("Switching Elasticsearch requires YAML extension. Try switching again.");
250249

251250
return;
252251
}

cli/Valet/Memcache.php

Lines changed: 32 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,63 +4,55 @@
44

55
class Memcache
66
{
7-
public $brew;
8-
public $cli;
9-
public $pecl;
7+
/** @var PhpExtension */
8+
protected $phpExtension;
109

1110
/**
12-
* Memcached.
13-
*
14-
* @param Brew $brew
15-
* @param CommandLine $cli
16-
* @param Pecl $pecl
11+
* @param PhpExtension $phpExtension
1712
*/
18-
public function __construct(Brew $brew, CommandLine $cli, Pecl $pecl)
19-
{
20-
$this->cli = $cli;
21-
$this->brew = $brew;
22-
$this->pecl = $pecl;
13+
public function __construct(
14+
PhpExtension $phpExtension
15+
) {
16+
$this->phpExtension = $phpExtension;
2317
}
2418

2519
/**
26-
* Install service.
27-
*
20+
* Install memcache.
21+
* @param $phpVersion
2822
* @return bool
2923
*/
30-
public function install()
24+
public function install($phpVersion)
3125
{
32-
$restart = false;
33-
if ($this->brew->installed('libmemcached')) {
34-
info('[libmemcached] (brew) already installed');
35-
} else {
36-
$restart = true;
37-
$this->brew->ensureInstalled('libmemcached');
38-
info('[libmemcached] Successfully installed');
39-
}
40-
info('[memcached] Installing');
41-
$peclInstalled = $this->pecl->installExtension('memcached');
42-
if ($restart || $peclInstalled) {
43-
return true;
26+
if (!$this->phpExtension->isInstalled(PhpExtension::MEMCACHE_EXTENSION, $phpVersion)) {
27+
return $this->phpExtension->installExtension(
28+
PhpExtension::MEMCACHE_EXTENSION,
29+
$phpVersion
30+
);
4431
}
32+
33+
info("[EXTENSION] Memcache extension is already installed!");
34+
4535
return false;
4636
}
4737

4838
/**
49-
* Uninstall memcached.
50-
*
39+
* Uninstall memcache.
40+
* @param $phpVersion
41+
* @param $phpIniConfigPath
5142
* @return bool
5243
*/
53-
public function uninstall()
44+
public function uninstall($phpVersion, $phpIniConfigPath)
5445
{
55-
info('[memcached] Uninstalling');
56-
$removed = $this->pecl->disableExtension('memcached');
57-
if ($removed) {
58-
info('[memcached] Successfully uninstalled');
59-
} else {
60-
info('[memcached] was already uninstalled');
46+
if ($this->phpExtension->isInstalled(PhpExtension::MEMCACHE_EXTENSION, $phpVersion)) {
47+
return $this->phpExtension->uninstallExtension(
48+
PhpExtension::MEMCACHE_EXTENSION,
49+
$phpVersion,
50+
$phpIniConfigPath
51+
);
6152
}
62-
$this->brew->ensureUninstalled('libmemcached');
63-
info('[libmemcached] Successfully uninstalled');
64-
return true;
53+
54+
info("[EXTENSION] Memcache extension is already uninstalled!");
55+
56+
return false;
6557
}
6658
}

cli/Valet/Pecl.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use Exception;
66
use DomainException;
77

8+
/**
9+
* @deprecated
10+
*/
811
class Pecl extends AbstractPecl
912
{
1013

@@ -43,10 +46,12 @@ class Pecl extends AbstractPecl
4346
*/
4447
const EXTENSIONS = [
4548
self::XDEBUG_EXTENSION => [
46-
'8.0' => '3.0.4',
47-
'7.4' => '3.0.4',
48-
'7.3' => '3.0.4',
49-
'7.2' => '3.0.4',
49+
'8.2' => '3.1.5',
50+
'8.1' => '3.1.5',
51+
'8.0' => '3.1.5',
52+
'7.4' => '3.1.5',
53+
'7.3' => '3.1.5',
54+
'7.2' => '2.9.8',
5055
'7.1' => '2.9.8',
5156
'7.0' => '2.9.8',
5257
'5.6' => '2.2.7',
@@ -62,6 +67,8 @@ class Pecl extends AbstractPecl
6267
'extension_type' => self::NORMAL_EXTENSION_TYPE
6368
],
6469
self::GEOIP_EXTENSION => [
70+
'8.2' => false, //todo; will probably be 1.1.2
71+
'8.1' => false, //todo; will probably be 1.1.2
6572
'8.0' => false, //todo; will probably be 1.1.2
6673
'7.4' => '1.1.1',
6774
'7.3' => '1.1.1',

0 commit comments

Comments
 (0)