Skip to content

Rely on installed package paths for internal dependencies - #21

Merged
meszarosrob merged 16 commits into
mainfrom
feature/installed-package-paths
Oct 20, 2026
Merged

meszarosrob merged 16 commits into
mainfrom
feature/installed-package-paths

Conversation

@meszarosrob

@meszarosrob meszarosrob commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

There were multiple complaints related to the "auto discovery" feature, for example #18 and #7.

After a deeper look, prompted by the suggestion in #18, this PR removes the redundant "auto discovery" and instead relies on the installed package paths. This also reduces some of the complexity in the code.

Currently, we require both wpackagist-plugin/sqlite-database-integration and johnpbloch/wp-cli-phar as "internal" dependencies, so they are guaranteed to be installed.

"johnpbloch/wp-cli-phar": "^2.12",
"psr/container": "^2.0",
"symfony/filesystem": ">=7.4",
"symfony/finder": ">=7.4",
"symfony/process": ">=7.4",
"wecodemore/wordpress-early-hook": "^1.4",
"wpackagist-plugin/sqlite-database-integration": "2.2.23"

In general, we also suggest installing WordPress via Composer using roots/wordpress, and all Syde projects follow this approach.

"suggest": {
"roots/wordpress": "Recommended package for installing WordPress core via Composer"
},

For WordPress, the "auto discovery" (finder) is kept only as a fallback in case roots/wordpress is not found.

Some of the possible caching optimisations for "auto discovery" were also removed to keep things simpler. If performance becomes a problem, we can later allow an explicit definition of the WordPress path once #17 is done. But this should not affect any Syde projects.

@meszarosrob meszarosrob linked an issue Oct 12, 2026 that may be closed by this pull request
@meszarosrob
meszarosrob marked this pull request as ready for review October 12, 2026 16:41
@meszarosrob
meszarosrob requested a review from a team as a code owner October 12, 2026 16:42

@strangerkir strangerkir left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for implementing this!

I guess there is one issue that would be good to fix, otherwise all is fine.

Comment thread src/Path/WordPressPath.php
@meszarosrob
meszarosrob merged commit 3273092 into main Oct 20, 2026
13 checks passed
@meszarosrob
meszarosrob deleted the feature/installed-package-paths branch October 20, 2026 06:42
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.

Searching for wp executable is unreliable

3 participants