You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+86Lines changed: 86 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,6 +93,92 @@ Markdown Table
93
93
|------------------|--------|---------|---------|
94
94
| phpspec/php-diff | v1.0.2 | REMOVED ||
95
95
96
+
Development
97
+
===========
98
+
99
+
New features are always welcome! Follow these guidelines
100
+
101
+
- Try to match the style of the code that already exists, even if it isn't _your_ style (sorry!).
102
+
- Make sure there is a way to test the feature.
103
+
- Test with PHP 5.3 (I'm serious!), >=5.4<7, 7.current. Docker is helpful, particularly for the older versions. Just run the ubuntu:12.04 image and install php for 5.3 and 14.04 for 5.6. I can help if you're having trouble.
104
+
105
+
To run using the test data simply point the `--to` and `--from` args at the lock files,
Sometimes you want to test the git related functions. To do that first I make a temporary repo. Then I copy into it `test-data/composer.from.lock` as `composer.lock` to set the previous state and `test-data/composer.to.json` as `composer.json` for the future state. I commit those then run `composer-lock-diff` with the options I want to test and visually inspect the results.
- Copy `../test-data/composer.from.json` as `composer.json` and `../test-data/composer.from.lock` as `composer.lock`.
150
+
- Commit them.
151
+
- Run `composer install`
152
+
- The generated `composer.lock` should look similar to `../test-data/composer.from.lock` but there will be differences due to transient dependencies. No real way around that. Use `composer-lock-diff` to make sure none of the named packages change versions.
153
+
- Add your _pre_ case to `composer.json`. Use an exact version.
154
+
- Generate a new lock file. Commit it.
155
+
- Copy `composer.json` to `../test-data/composer.from.json` and `composer.lock` to `composer.from.lock`.
156
+
- Copy `../test-data/composer.to.json` as `composer.json`.
157
+
- Add your _post_ case to `composer.json`. Again, exact versions are best.
158
+
- Generate a new lock file.
159
+
- Use composer-lock-diff to test your feature.
160
+
- When you're happy with it, copy `composer.json` to `../test-data/composer.to.json` and `composer.lock` to `../test-data/composer.to.lock`.
0 commit comments