-
Notifications
You must be signed in to change notification settings - Fork 700
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
Warning: require_once(./cli/includes/require-drivers.php): Failed to open stream with custom driver for Symfony project #1436
Comments
Your post shows that you're running Valet I suggest running |
Updated to |
You wrote:
While half of that is true, extending the Symfony driver solves the problem. The following works for me. -use Valet\Drivers\LaravelValetDriver;
+use Valet\Drivers\Specific\SymfonyValetDriver;
-class CustomValetDriver extends LaravelValetDriver
+class CustomValetDriver extends SymfonyValetDriver Edit: I would recommend renaming from |
FURTHER ... Since this driver is highly specific to a certain project (referring to your -namespace Valet\Drivers\Custom;
+//namespace Valet\Drivers\Custom;
use Valet\Drivers\Specific\SymfonyValetDriver;
-class CustomValetDriver extends SymfonyValetDriver
+class LocalValetDriver extends SymfonyValetDriver |
As for serving static assets, you might find some ideas from this post I made responding to someone else's desire for serving static files: #1430 (comment) |
Using The driver already has a specific name, I simply chose
Right now it's only one project using this custom driver, but in the future I'll need to re-use it for others, so I'm not using a local driver for that reason. I'll simply rewrite the |
Fair. You might be able to simply have the |
Description
I've created the following custom driver in
~/.config/valet/Drivers
, as I need to handle static files in a specific manner;I'm extending the
LaravelValetDriver
as thefrontControllerPath
method is the same for Symfony as it is for Laravel and can thus be omitted.The driver is picked up correctly, but gives me the following error;
Without the custom driver, or even when extending the base
ValetDriver
class, the site loads fine but assets don't work (which is why I need the custom driver in the first place).Steps To Reproduce
symfony new [project] --webapp
valet link
Diagnosis
sw_vers
valet --version
cat ~/.config/valet/config.json
cat ~/.composer/composer.json
composer global diagnose
composer global outdated
ls -al /etc/sudoers.d/
brew config
brew services list
brew list --formula --versions | grep -E "(php|nginx|dnsmasq|mariadb|mysql|mailhog|openssl)(@\d\..*)?\s"
brew outdated
brew tap
php -v
which -a php
php --ini
nginx -v
curl --version
php --ri curl
/opt/homebrew/bin/ngrok version
ls -al ~/.ngrok2
brew info nginx
brew info php
brew info openssl
openssl version -a
openssl ciphers
sudo nginx -t
which -a php-fpm
/opt/homebrew/opt/php/sbin/php-fpm -v
sudo /opt/homebrew/opt/php/sbin/php-fpm -y /opt/homebrew/etc/php/8.2/php-fpm.conf --test
ls -al ~/Library/LaunchAgents | grep homebrew
ls -al /Library/LaunchAgents | grep homebrew
ls -al /Library/LaunchDaemons | grep homebrew
ls -al /Library/LaunchDaemons | grep "com.laravel.valet."
ls -aln /etc/resolv.conf
cat /etc/resolv.conf
ifconfig lo0
sh -c 'echo "------\n/opt/homebrew/etc/nginx/valet/valet.conf\n---\n"; cat /opt/homebrew/etc/nginx/valet/valet.conf | grep -n "# valet loopback"; echo "\n------\n"'
sh -c 'for file in ~/.config/valet/dnsmasq.d/*; do echo "------\n~/.config/valet/dnsmasq.d/$(basename $file)\n---\n"; cat $file; echo "\n------\n"; done'
sh -c 'for file in ~/.config/valet/nginx/*; do echo "------\n~/.config/valet/nginx/$(basename $file)\n---\n"; cat $file | grep -n "# valet loopback"; echo "\n------\n"; done'
The text was updated successfully, but these errors were encountered: