Merged
Conversation
added 4 commits
March 22, 2018 13:07
If a `wp-cli.yml` has a _require_ in which the ABSPATH is defined wp-cli command will throw a notice.
Example:
`wp-cli.yaml`
require:
- abspath.php
`abspath.php`
<?php
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', dirname( __FILE__ ) . '/custom_path/wp/' );
}
When would you want this? In short symlinks, if you include WordPress in a symlink.
WordPress tries to define the ABSPATH it uses wp-load.php and if it's in a symlink it will define the path baed on the actual location. Not the symlink path.
That will give a problem if the wp-config.php is one directory above wp-load.php.
danielbachhuber
approved these changes
Mar 30, 2018
Member
danielbachhuber
left a comment
There was a problem hiding this comment.
👍 Looks good to my eyes. Thanks for including tests. I'll flag @schlessera for a second review.
schlessera
approved these changes
Mar 30, 2018
Member
|
Thanks for the PR, @janw-oostendorp ! |
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.
see #4537
And wp-cli/ideas#69