Incompatibilities with VIP's dev-env

Open Beginner friendly
#211 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
php
Domain
devops

Research direction

Start by checking .gitignore and mu-plugins/001-composer.php, then reproduce the setup with WordPress VIP's dev-env and the repository as the wp-content folder. Done means .wpvip/vip-dev-env.yml is ignored and 001-composer.php no longer attempts to read an inaccessible composer.json; rerun the site load to confirm the error is gone.

Written by the indexing model from the issue text.

Description

devops good first issue php
Description of the bug

There are a few things about how this repo is set up that makes it not work properly with VIP's dev-env out of the box:

  1. .wpvip/vip-dev-env.yml isn't gitignored, and this file will end up being unique to each user (due to user-specific paths)
  2. mu-plugins/001-composer.php attempts to read composer.json, which isn't readable on VIP's dev-env

We should add .wpvip/vip-dev-env.yml to the .gitignore and we should add a guard in 001-composer.php so that it doesn't attempt to read a file that it can't access.

Steps To Reproduce
  1. Create a repo using this template repo as a basis.
  2. Run the setup steps and choose WordPress VIP as the target.
  3. Create a local dev environment using VIP's dev-env.
  4. Use the repo you created as the wp-content folder.
  5. Run composer install to install dependencies.
  6. Attempt to load the site in a browser and notice that there is an error message about not being able to access composer.json.
Additional Information

No response

Dominant language
PHP
Stars
9
Forks
3
Avg merge
2d 20h
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from alleyinteractive/create-wordpress-project

All issues in alleyinteractive/create-wordpress-project

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.