Ideas for .valetrc file #1389
Replies: 4 comments 3 replies
-
How about: XDEBUG_STRING="PHPSTORM" |
Beta Was this translation helpful? Give feedback.
-
For me another idea is to write the composer version. For any project with php 7.1 maybe you should use composer 1 and not 2 (an error will be show you in the terminal) |
Beta Was this translation helpful? Give feedback.
-
@mattstauffer I just wanted to let you know about this as you wrote the original PR to introduce valetrc 🙂 |
Beta Was this translation helpful? Give feedback.
-
hi, this sounds like a good feature.. is this already available? |
Beta Was this translation helpful? Give feedback.
-
I have some ideas on how to improve the
.valetrc
file. Currently there's no real reason to switch because it does the same as the existing.valetphprc
file, however I do believe in its potential.Allow shorter syntax for the PHP version:
php=8.1
instead of[email protected]
for berevityAdd option to define sitename:
sitename="application"
Add option to define isolation:
isolate=true
isolate=false
Add option to define secure:
secure=true
secure=false
Add option to define proxies:
proxy="http://127.0.0.1:9200"
Allow definition of site location:
This would allow the
.valetrc
file to be in a different location than the site root.Some example use cases:
I have a WordPress project where I'm working on the theme in the themes folder, but my valetrc must be in the WordPress root, meaning i must go up the directory tree to run commands. Instead, I could have the valetrc file with a property like so:
site_location="../../../"
I am building a site into a subdirectory of my project root, meaning I must cd into the public folder to execute valet commands.
Instead, I could have the valetrc file with a property like so:
site_location="./public"
Site envs:
referring to Site Specific Environment Variables
Set
$_SERVER['key']
tovalue
for this specific site like so:ENV.KEY="value"
If we implemented this, then we could possibly define everything in a git committed file, allowing new developers to join a project by just running
valet link
for exampleHere's a full example for a potential
.valetrc
file:Beta Was this translation helpful? Give feedback.
All reactions