feat(env): add .wp-env.json configuration for local development envir…#500
Open
rsanchez-beapi wants to merge 4 commits into
Open
feat(env): add .wp-env.json configuration for local development envir…#500rsanchez-beapi wants to merge 4 commits into
rsanchez-beapi wants to merge 4 commits into
Conversation
This change introduces Composer-based dependency management for WordPress plugins within the `wp-env` development environment. - `composer.json` is updated to define the project as `wordpress-theme` and utilizes `installer-paths` to install plugins into `.wp-env/plugins`. - Advanced Custom Fields (ACF) is now declared as a `require-dev` dependency and will be installed via Composer. - The `.wp-env.json` `afterStart` script is simplified to activate the plugin, leveraging the Composer installation. - `composer.lock` is removed and added to `.gitignore` to ensure a fresh, consistent dependency set on setup. - The `README.md` is updated to reflect the new development environment setup. This enhances environment consistency and provides better version control for WordPress plugin dependencies.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f4643dc. Configure here.
Exclude the `.wp-env/` directory to prevent PHP Code Sniffer from analyzing generated or third-party WordPress core and plugin files. This avoids irrelevant warnings and errors, keeping the linting focused on project-specific code.
firestar300
approved these changes
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Ce commit introduit une configuration wp-env pour permettre aux ThemeDev de lancer rapidement un environnement WordPress local dédié au BFF, sans configuration manuelle.
Il complète cette configuration en chargeant l'autoloader Composer dans functions.php, afin que les classes PSR-4 du framework (BEA\Theme\Framework) soient disponibles dès le démarrage de l'environnement local.
Sans chargement explicite de l'autoloader et sans installation automatique des dépendances, le boot du framework échoue dans un environnement wp-env fraîchement créé.
Changements
.wp-env.json(nouveau fichier)functions.phpNote
Low Risk
Changes are limited to local dev configuration, optional autoload bootstrap, and Composer metadata; no production runtime or security-sensitive logic is altered.
Overview
Adds a wp-env workflow so developers can run the theme in Docker (PHP 8.3) with the repo mounted, Advanced Custom Fields wired from
.wp-env/plugins/advanced-custom-fields, and anafterStarthook that activates the BFF theme and ACF.Composer is reshaped for that setup: package type becomes
wordpress-theme,wp-plugin/advanced-custom-fieldsis a dev dependency installed viacomposer/installers, WPCS is pinned to3.3.0, and PHP8.3is set as the platform.composer.lockis removed from version control and ignored.functions.phpnow loadsvendor/autoload.phpwhenFrameworkis not already autoloaded, so theme-only / wp-env installs can boot PSR-4 services aftercomposer install.Documentation and tooling updates: README section for wp-env (URLs, credentials, common commands,
yarn startworkflow),.gitignoreentries for.wp-env/andcomposer.lock, and PHPCS excludes.wp-env/.Reviewed by Cursor Bugbot for commit cd1fe30. Bugbot is set up for automated code reviews on this repo. Configure here.