-
-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Made patches.lock.json configurable #533 #584
base: main
Are you sure you want to change the base?
Conversation
src/Plugin/Patches.php
Outdated
if (!is_string($lock_file)) { | ||
$lock_file = 'patches-lock-file'; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block isn't necessary anymore -- composer configurable plugin handles setting a default for you, so if it's not specified, it's whatever is hardcoded in the config above.
if ($base === 'composer') { | ||
return "$dir/$lock_file"; | ||
} | ||
|
||
return "$dir/$base-$lock_file"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now, if you set COMPOSER=composer-foo.json
and run any of the composer patches commands, you'll get composer-foo-patches.lock.json
. If we set patches-lock-file
to asdf.lock.json
and also set COMPOSER=composer-foo.json
, I think we'll get composer-foo-asdf.lock.json
.
This isn't incorrect, but it is something that docs and tests will need to account for. Just flagging for visibility.
/** | ||
* Get the path to the current patches lock file. | ||
*/ | ||
public static function getPatchesLockFilePath(): string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't remember why this was a static function. Might be worth checking if this breaks any of the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By not calling the method while registering, its fixed.
Parsing extra's just for the description is not worth it?
Description
Relates to/closes #533
Related tasks
Other notes
I'm new to the composer-plugin world, so have no clue that this is even the correct path.
Before writing docs and tests can someone confirm this is the correct path?