Skip to content
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

2.x WIP (don't merge yet) #447

Merged
merged 54 commits into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
b439305
Lots of work
cweagans Feb 3, 2023
0755ef0
Temporarily disabling acceptance testing in CI so I can see coverage
cweagans Feb 3, 2023
b0b2e58
Also disabling acceptance test in coverage task
cweagans Feb 3, 2023
f515db0
Test 'downloading' local files
cweagans Feb 3, 2023
13202a8
Add patch for test
cweagans Feb 3, 2023
b31ba98
Remove old fixtures dir
cweagans Feb 3, 2023
f88e6b9
Add runComposerInstall action
cweagans Feb 3, 2023
32c9100
Add package patch depth override list
cweagans Feb 3, 2023
39478cb
Misc changes to PatchDownloader
cweagans Feb 3, 2023
d4d513a
wip
cweagans Feb 3, 2023
2419da6
Just use the project root as the plugin - no need to symlink stuff in…
cweagans Feb 3, 2023
1c90157
Test the availability and function of patch tools
cweagans Feb 3, 2023
5f944b5
exclude tests/* from coverage reporting - changes to tests made phpst…
cweagans Feb 3, 2023
8ef28ee
Add an extra field to patch object for people extending the plugin
cweagans Feb 3, 2023
3d3cfe3
Instead of passing url and description to events, pass the Patch object
cweagans Feb 3, 2023
d52268e
Clean up output a bit
cweagans Feb 3, 2023
d802f8c
Add support for debugging individual acceptance tests
cweagans Feb 3, 2023
f6dea08
Load composer-patches as early as possible
cweagans Feb 3, 2023
97c6013
Move PatchEvent(s) and add PluginEvent(s)
cweagans Feb 3, 2023
5505a00
Rename PatchDownloader to Downloader
cweagans Feb 3, 2023
f95a58d
Rename PatchLoader to Resolver
cweagans Feb 3, 2023
9fe7bf4
Change PatcherInterface to return a bool from apply()
cweagans Feb 3, 2023
b2e5324
More event rename stuff
cweagans Feb 3, 2023
c549d57
Add Patcher
cweagans Feb 3, 2023
4c71425
Add PluginEventTest
cweagans Feb 3, 2023
8421317
After dispatching event, use the capabilities that are in the event (…
cweagans Feb 3, 2023
1ea3e5d
Rough implementation of various patchers
cweagans Feb 3, 2023
014f7ac
Draw the rest of the fucking owl.
cweagans Feb 3, 2023
0c6ba1d
Re-enable acceptance testing (and skip the broken test for now)
cweagans Feb 3, 2023
a9c0d46
Pull the patch back out of the event in case alterations were made
cweagans Feb 3, 2023
9c1ea57
Do not attempt to use the git patcher unless the target path is a git…
cweagans Feb 3, 2023
d8f48e4
Add GPatch patcher alias
cweagans Feb 6, 2023
b6ceb55
Use patchTool setting throughout
cweagans Feb 6, 2023
3479704
Use -i instead of piping input into patch
cafuego Feb 6, 2023
679106e
Use associative arrays under the hood for compat with JsonFile
cweagans Feb 6, 2023
816a6af
Install patches from a lock file when possible
cweagans Feb 6, 2023
04f2585
Run Composer in-process, rather than starting a subprocess
cweagans Feb 6, 2023
9df6165
Remove commented code
cweagans Feb 6, 2023
807df99
Clean up patches.lock files after tests
cweagans Feb 6, 2023
5bafa17
Test applying a patch using Git
cweagans Feb 6, 2023
23341c6
Move composer test code to a codeception helper
cweagans Feb 6, 2023
eac05c1
Test behavior when no patchers are available
cweagans Feb 6, 2023
ddf5d85
Exclude a bunch of stuff from dist packages
cweagans Feb 6, 2023
eb18fea
Make sure it's possible to see the full composer output
cweagans Feb 6, 2023
2dcfb3f
Test that the plugin can be enabled and unconfigured without issues
cweagans Feb 6, 2023
ab3ae5f
Add clearPatchesForPackage method to patchcollection
cweagans Feb 7, 2023
6dd9fcb
Remove outdated comment
cweagans Feb 7, 2023
cfc9515
Add getPatchedPackages method
cweagans Feb 7, 2023
643e86d
Cache downloaded patches
cweagans Feb 7, 2023
49fccdf
Fix indentation
cweagans Feb 7, 2023
c3f4e25
Remove package object from PatchEvent + add another event
cweagans Feb 7, 2023
b08efcc
Add repatch and relock commands
cweagans Feb 7, 2023
5ecb0d9
Args should be optional
cweagans Feb 7, 2023
eaa8ee7
Add basic tests for commands
cweagans Feb 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Exclude files that don't need to be present in packages (so they're not downloaded by Composer)
/.coveralls.yml export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/*.md export-ignore
/*.yml export-ignore
/tests export-ignore
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/codeception.yml
/tests/_data/fixtures/**/vendor/
/tests/_data/fixtures/**/composer.lock
/tests/_data/fixtures/**/patches.lock
/tests/_output/
/tests/_support/_generated/
/tests/*.suite.yml
Expand Down
30 changes: 16 additions & 14 deletions codeception.dist.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@

namespace: cweagans\Composer\Tests

actor: Tester
paths:
tests: tests
data: tests/_data
log: tests/_output
support: tests/_support
envs: tests/_envs
tests: tests
data: tests/_data
log: tests/_output
support: tests/_support
envs: tests/_envs
settings:
colors: true
memory_limit: 1024M
colors: true
memory_limit: 1024M
extensions:
enabled:
- Codeception\Extension\RunFailed
enabled:
- Codeception\Extension\RunFailed
coverage:
enabled: true
whitelist:
include:
- src/*
enabled: true
whitelist:
include:
- src/*
exclude:
- tests/*

9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"license": "BSD-3-Clause",
"type": "composer-plugin",
"extra": {
"class": "cweagans\\Composer\\Plugin\\Patches"
"class": "cweagans\\Composer\\Plugin\\Patches",
"_": "The following two lines ensure that composer-patches is loaded as early as possible.",
"plugin-modifies-downloads": true,
"plugin-modifies-install-path": true
},
"authors": [
{
Expand All @@ -31,7 +34,9 @@
"codeception/module-asserts": "^2.0"
},
"autoload": {
"psr-4": {"cweagans\\Composer\\": "src"}
"psr-4": {
"cweagans\\Composer\\": "src"
}
},
"autoload-dev": {
"psr-4": {
Expand Down
Loading