Repository navigation
Update/misc updates part 1 - #169
Conversation
…iate rewrite rules
There was a problem hiding this comment.
Pull request overview
This PR bundles a set of maintenance updates across test bootstrapping, local WordPress setup scripts, release packaging, static analysis bootstrapping, and CI configuration—primarily aimed at improving developer workflows and reducing brittle CI/test behavior.
Changes:
- Reworks the test bootstrap’s deprecated-hook detection to avoid reflection against WP_Mock internals.
- Updates local WordPress setup and release packaging scripts (dynamic Lando URL usage, hard rewrite flush with generated
.htaccess, and staging-based archives). - Migrates away from Travis by removing
.travis.ymland adding a GitHub Actions workflow intended to provide CI parity.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
test/bootstrap.php |
Adds lightweight hook registration tracking and removes reflection-based WP_Mock inspection. |
scripts/setup-wordpress.sh |
Uses Lando runtime info to set install URL and ensures permalinks work via .htaccess + hard flush. |
scripts/build-release.sh |
Builds release archives from a staged temp directory instead of symlinking in repo root. |
README.md |
Removes Travis CI badge. |
phpstan/bootstrap.php |
Defines WPMU_PLUGIN_DIR for PHPStan symbol discovery/analysis. |
phpstan.neon.dist |
Removes an unused TODO comment from ignoreErrors. |
lib/Conifer/Site.php |
Formatting/style adjustments; touches doc examples near context(). |
.travis.yml |
Removes legacy Travis CI configuration. |
.github/workflows/travis.yml |
Adds GitHub Actions workflow intended to replace Travis CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| APP_URL=$(php -r ' | ||
| $info = json_decode(getenv("LANDO_INFO"), true); | ||
| echo $info["appserver"]["urls"][0] ?? ""; | ||
| ') | ||
| # install WordPress | ||
| wp core install \ | ||
| --url='http://conifer.lndo.site' \ | ||
| --url="$APP_URL" \ | ||
| --title='Conifer' \ |
There was a problem hiding this comment.
@amerk-sitecrafting Adding a sanity check for APP_URL is probably a worthwhile addition.
Deploying conifer-plugin with
|
| Latest commit: |
96d0678
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7c16f566.conifer-plugin.pages.dev |
| Branch Preview URL: | https://update-misc-updates-part-1.conifer-plugin.pages.dev |
rhendrickson-sc
left a comment
There was a problem hiding this comment.
Overall the changes are looking good, but left some comments and questions for ya!
| - name: PHPStan | ||
| run: vendor/bin/phpstan analyse | ||
|
|
||
| docs: |
There was a problem hiding this comment.
Throwing it out there that you can remove this whole docs job. Cloudflare automatically looks at main and re-compiles the docs on its own. Cloudflare also handles building the docs for PRs that are made.
| ) | ||
|
|
||
| rm -rf "$staging_dir" | ||
| trap - EXIT |
There was a problem hiding this comment.
I'm personally not a fan of relying on trap here for this. It'd probably be better to remove line 70 and this line, and rely on the good ole rm -rf "$staging_dir" line that you have.
| APP_URL=$(php -r ' | ||
| $info = json_decode(getenv("LANDO_INFO"), true); | ||
| echo $info["appserver"]["urls"][0] ?? ""; | ||
| ') | ||
| # install WordPress | ||
| wp core install \ | ||
| --url='http://conifer.lndo.site' \ | ||
| --url="$APP_URL" \ | ||
| --title='Conifer' \ |
There was a problem hiding this comment.
@amerk-sitecrafting Adding a sanity check for APP_URL is probably a worthwhile addition.
| wp option set permalink_structure '/%postname%/' | ||
| wp rewrite flush | ||
|
|
||
| HTACCESS_PATH="$WP_DIR/.htaccess" |
There was a problem hiding this comment.
Why are we adding an .htaccess file here? Iirc all our Lando setups are designed to use Nginx, and we use Nginx in production.
rhendrickson-sc
left a comment
There was a problem hiding this comment.
Looks good, thank you!
Ticket: #
Issue
A number of tickets are fixed in this PR
Impact
There should not be any impactful changes to the source code.