[Feature Request] - Ability to have custom config per project. #453
Replies: 3 comments
-
Valet, which Herd has somewhat of a basis on, has the .valetrc file, which allows for PHP version detection when running valet isolate. Having a herd specific file like this that you could define what PHP version should be used, as well as any services required would be great as it means that simply checking the site out into the Herd directory would be all that is needed to get going. I'd probably err on the side of not doing anything with extensions as they should be required inside the composer file, and how they are implemented would likely be different based on the OS. On top of that, there is the ongoing discussion on the PECL replacement that would eventually supercede this. |
Beta Was this translation helpful? Give feedback.
-
One addition thing that would be nice is to be able to pre-define a list of aliases for the site. |
Beta Was this translation helpful? Give feedback.
-
Best idea ever! |
Beta Was this translation helpful? Give feedback.
-
This configuration file would specify various details crucial for the project's setup, such as:
Required Services: It would define which services are needed for the project to run effectively. This could include databases, caches, queues, web servers, etc. By specifying these requirements in the configuration file, developers can ensure that all necessary services are set up properly without relying on external tools like Docker.
PHP Version: The configuration file would specify which version of PHP is required for the project. This ensures consistency across different environments and avoids compatibility issues that may arise when using different PHP versions.
Required PHP Extensions: It would also specify which PHP extensions need to be enabled for the project to function correctly. This ensures that all dependencies are met and the project can run smoothly without encountering missing extension errors.
By having this configuration file per project folder, developers can easily manage the project's environment and dependencies without relying on tools like Laravel Sail (which provides a Docker-based development environment). This gives developers more flexibility in how they set up and manage their projects, potentially simplifying the development workflow and reducing overhead associated with Docker usage.
Some options on how this could be implented.
Simple Configuration File: In this approach, the configuration file would be a simple text file, akin to a dependency declaration in Composer. Herd would read this file and ensure that all specified services, PHP versions, and extensions are correctly set up in the environment.
Full Setup File: Alternatively, the configuration file could be a more comprehensive setup file. Herd would scan this file and automatically configure the environment based on the settings provided. This file could contain detailed instructions on how to set up each required service, PHP version, and extension. Herd would then execute these instructions to ensure that the environment is properly configured for the project.
Beta Was this translation helpful? Give feedback.
All reactions