Symfony Dotenv
wordpress-stubs
Our great sponsors
Symfony Dotenv | wordpress-stubs | |
---|---|---|
5 | 2 | |
3,693 | 131 | |
0.5% | 2.3% | |
5.3 | 8.0 | |
10 days ago | 9 days ago | |
PHP | PHP | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Symfony Dotenv
-
How do you handle Api keys and tokens?
Keys and tokens in .env.local per environment (in .gitignore obviously), with a placeholder in the .env. I use https://github.com/symfony/dotenv
-
SMTP credentials exposed within GitHub account
Do check dotenv files and gitignore for all your secrets and environment-specific variables (server addresses, etc.) https://github.com/symfony/dotenv
-
Creating a DotEnv Loader in PHP
symfony/dotenv
-
🍾 GraphQL API for WordPress is now scoped, thanks to PHP-Scoper!
I believe that Mozart couldn't handle some of the dependencies in my plugin. I'm making use of several of Symfony's components, including DependencyInjection, Cache and Dotenv, with everything managed through Composer.
- How to read .env file outside served directory in vanilla php?
wordpress-stubs
- wp-env IDE setup
-
🍾 GraphQL API for WordPress is now scoped, thanks to PHP-Scoper!
return [ 'patchers' => [ function ( $file_path, $prefix, $contents ) { /* * There is currently no easy way to simply whitelist all global WordPress functions. * * This list here is a manual attempt after scanning through the AMP plugin, which means * it needs to be maintained and kept in sync with any changes to the dependency. * * As long as there's no built-in solution in PHP-Scoper for this, an alternative could be * to generate a list based on php-stubs/wordpress-stubs. devowlio/wp-react-starter/ seems * to be doing just this successfully. * * @see https://github.com/humbug/php-scoper/issues/303 * @see https://github.com/php-stubs/wordpress-stubs * @see https://github.com/devowlio/wp-react-starter/ */ $contents = str_replace( "\\$prefix\\_doing_it_wrong", '\\_doing_it_wrong', $contents ); $contents = str_replace( "\\$prefix\\__", '\\__', $contents ); $contents = str_replace( "\\$prefix\\esc_html_e", '\\esc_html_e', $contents ); $contents = str_replace( "\\$prefix\\esc_html", '\\esc_html', $contents ); $contents = str_replace( "\\$prefix\\esc_attr", '\\esc_attr', $contents ); $contents = str_replace( "\\$prefix\\esc_url", '\\esc_url', $contents ); $contents = str_replace( "\\$prefix\\do_action", '\\do_action', $contents ); // ... } ] ]
What are some alternatives?
PHP Dotenv - Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.
phpstan-wordpress - WordPress extensions for PHPStan ⛏️
Yo! Symfony TOML - A PHP parser for TOML
mozart - Developers tool for WordPress plugins: Wraps all your projects dependencies in your own namespace, in order to prevent conflicts with other plugins loading the same dependencies in different versions.
monorepo-builder - Composer tools to maintain a monorepo
wordpress-seo - Yoast SEO for WordPress
wp-react-starter - 🚀WordPress Plugin Boilerplate using modern web techs like TypeScript, SASS, and so on... on top of a local development environment with Docker and predefined GitLab CI for continous integration and deployment!
Expose - A beautiful, fully open-source, tunneling service - written in pure PHP
Rector - Instant Upgrades and Automated Refactoring of any PHP 5.3+ code
web-stories-wp - Web Stories for WordPress