Skip to content
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

Migrate dev-specific configuration to env vars via .env file #2224

Merged
merged 15 commits into from
Oct 24, 2024

Conversation

acelaya
Copy link
Member

@acelaya acelaya commented Oct 16, 2024

Closes #2221

This PR updates how dev/local configuration is handled by Shlink, to use env vars defined in env-specific files rather than local configuration files that overwrite global ones.

  • Try to define all local/dev config via env vars and get rid of .local config files
  • Stop using Valinor factories
  • Consider defining dev env vars as a PHP array and load them via loadEnvVarsFromConfig.
  • Update CONTRIBUTING documentation
  • Add ADR explaining why this approach is taking

@acelaya acelaya force-pushed the feature/dev-config-as-env branch 4 times, most recently from c2e1cf1 to ee81dc7 Compare October 21, 2024 10:03
@acelaya acelaya force-pushed the feature/dev-config-as-env branch from ee81dc7 to c8e5196 Compare October 22, 2024 13:16
@acelaya acelaya force-pushed the feature/dev-config-as-env branch from c12279e to 442eea0 Compare October 23, 2024 08:16
Copy link

codecov bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 30.83333% with 83 lines in your changes missing coverage. Please review.

Project coverage is 93.50%. Comparing base (5fb6c87) to head (8486053).
Report is 17 commits behind head on develop.

Files with missing lines Patch % Lines
...le/Core/src/Config/Options/UrlShortenerOptions.php 20.00% 16 Missing ⚠️
module/Core/src/Config/Options/QrCodeOptions.php 0.00% 12 Missing ⚠️
module/Core/src/Config/Options/TrackingOptions.php 35.29% 11 Missing ⚠️
module/Core/src/Config/Options/RobotsOptions.php 22.22% 7 Missing ⚠️
module/Core/src/Matomo/MatomoOptions.php 0.00% 7 Missing ⚠️
module/Core/src/Config/EnvVars.php 14.28% 6 Missing ⚠️
...Core/src/Config/Options/DeleteShortUrlsOptions.php 25.00% 6 Missing ⚠️
...ore/src/Config/Options/NotFoundRedirectOptions.php 0.00% 6 Missing ⚠️
module/Core/src/Config/Options/AppOptions.php 28.57% 5 Missing ⚠️
module/Core/src/Config/Options/RedirectOptions.php 0.00% 5 Missing ⚠️
... and 1 more
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #2224      +/-   ##
=============================================
- Coverage      94.84%   93.50%   -1.34%     
- Complexity      1592     1607      +15     
=============================================
  Files            270      270              
  Lines           5527     5608      +81     
=============================================
+ Hits            5242     5244       +2     
- Misses           285      364      +79     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@acelaya acelaya force-pushed the feature/dev-config-as-env branch from 6bb33fb to f969433 Compare October 24, 2024 09:44
@acelaya acelaya marked this pull request as ready for review October 24, 2024 09:44
@acelaya acelaya merged commit e7a9ad1 into shlinkio:develop Oct 24, 2024
30 of 32 checks passed
@acelaya acelaya deleted the feature/dev-config-as-env branch October 24, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to env-var-based development config definitions
1 participant