Skip to content

Commit 79162f3

Browse files
committed
Improved Github contributing documents
Signed-off-by: Jérémy DECOOL <[email protected]>
1 parent e36fbb4 commit 79162f3

File tree

5 files changed

+152
-91
lines changed

5 files changed

+152
-91
lines changed

.github/ISSUE_TEMPLATE.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
| Q | A
2+
| ---------------- | -----
3+
| Bug report? | yes/no
4+
| Feature request? | yes/no
5+
| Usage question? | yes/no
6+
| PHP version used | x.y
7+
8+
<!--
9+
- Please fill in this template according to your issue.
10+
- Otherwise, replace this comment by the description of your issue.
11+
-->

.github/PULL_REQUEST_TEMPLATE.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
| Q | A
2+
| ------------- | ---
3+
| Bug fix? | yes/no
4+
| New feature? | yes/no <!-- don't forget to update src/**/CHANGELOG.md files -->
5+
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
6+
| License | MIT
7+
8+
<!--
9+
- Please fill in this template according to the PR you're about to submit.
10+
- Replace this comment by a description of what your PR is solving.
11+
-->

CHANGELOG.md

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
CHANGELOG
2+
=========
3+
4+
This changelog references the relevant changes (bug and security fixes).
5+
6+
**Version 2.0.9 - 2015-07-05**
7+
8+
- Fix ImageWorkshop::initFromPath with remote URL
9+
10+
**Version 2.0.8 - 2015-06-01**
11+
12+
- Fix exception code when file not found
13+
14+
**Version 2.0.7 - 2015-03-22**
15+
16+
- Allow `ImageWorkshop::initFromPath` factory working with remote URL
17+
- Improve PHP >= 5.5 compatibility
18+
- Add `fixOrientation` method to layer to change image orientation based on EXIF orientation data
19+
- Fix background color when value is setting to "000000"
20+
21+
**Version 2.0.6 - 2014-08-01**
22+
23+
@jasny (https://github.com/jasny) contribution, new methods :
24+
25+
* `ImageWorkshopLayer::resizeToFit()` resizes an image to fit a bounding box.
26+
* `ImageWorkshopLayer::cropToAspectRatio()` crops either to width or height of the document to match the aspect ratio.
27+
28+
Documentation here : https://github.com/Sybio/ImageWorkshop/pull/37#issue-28704248
29+
30+
**Version 2.0.5 - 2013-11-12**
31+
32+
- Implementing interlace mode (http://php.net/manual/en/function.imageinterlace.php) on save() method to display progessive JPEG image
33+
34+
```php
35+
$interlace = true; // set true to enable interlace, false by default
36+
$layer->save($dirPath, $filename, $createFolders, $backgroundColor, $imageQuality, $interlace);
37+
```
38+
39+
Thanks @dripolles (https://github.com/dripolles) & @johnhunt (https://github.com/johnhunt)
40+
41+
**Version 2.0.4 - 2013-09-11**
42+
43+
- Fix a major bug when resizing both sides AND conserving proportion : layer stack problem (current layer has a new
44+
nested level in its stack, not expected), and translations with positionX and positionY are wrong.
45+
Fixed.
46+
(Initial problem : https://github.com/Sybio/ImageWorkshop/pull/14)
47+
- Add a parameter to clearStack() method
48+
49+
**Version 2.0.2 - 2013-06-14**
50+
51+
- Fix a new bug : when resizing or cropping, small images can have 0 pixel of width or height (because of round), which
52+
is impossible and script crashes. Now width and height are 1 pixel minimum.
53+
54+
Note:
55+
56+
```php
57+
$layer->resizeInPixel(null, 0 /* or negative number */, null);
58+
```
59+
60+
It will generate a 1 pixel height image, not 0.
61+
62+
**Version 2.0.1 - 2013-06-03**
63+
64+
- Fix an opacity bug : pure black color (#000000) always displayed fully transparent (from 0 to 99% opacity). Bug fixed ! (no known bug anymore)
65+
- Add some Exceptions to help debugging
66+
67+
**Version 2.0.0 - 2012-11-21**
68+
69+
New version of ImageWorkshop ! The library is now divided in 3 main classes for cleaned code:
70+
- ImageWorkshopLayer: the class which represents a layer, that you manipulate
71+
- ImageWorkshop: a factory that is used to generate layers
72+
- ImageWorkshopLib: a class containing some tools (for calculations, etc...), used by both classes
73+
74+
Technically, only the initialization change compared with the 1.3.x versions, check the documentation:
75+
http://phpimageworkshop.com/documentation.html#chapter-initialization-of-a-layer
76+
77+
Here an example, before and now:
78+
```php
79+
// before
80+
$layer = new ImageWorkshop(array(
81+
'imageFromPath' => '/path/to/images/picture.jpg',
82+
));
83+
```
84+
85+
```php
86+
// now
87+
$layer = ImageWorkshop::initFromPath('/path/to/images/picture.jpg');
88+
```
89+
90+
And also the installation of the class: http://phpimageworkshop.com/installation.html
91+
92+
The documentation has been updated, you can now check the documentation of each version since 1.3.3:
93+
(Ex: http://phpimageworkshop.com/doc/9/initialize-from-an-image-file.html?version=2.0.0, http://phpimageworkshop.com/doc/9/initialize-from-an-image-file.html?version=1.3.3)

CONTRIBUTING.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Contributing
2+
3+
We love pull requests from everyone.If you'd like to contribute, please
4+
read the following:
5+
6+
Fork, then clone the repo:
7+
8+
git clone [email protected]:your-username/ImageWorkshop.git
9+
10+
Set up your machine:
11+
12+
composer install
13+
14+
Make sure the tests pass:
15+
16+
vendor/bin/phpunit
17+
18+
Make your change. Add tests for your change. Make the tests pass:
19+
20+
vendor/bin/phpunit
21+
22+
Fix the code style using PHP-CS-Fixer:
23+
24+
vendor/bin/php-cs-fixer fix --config=.php_cs .
25+
26+
27+
Push to your fork and submit a pull request.
28+
29+
At this point you're waiting on us. We may suggest some changes or improvements
30+
or alternatives.
31+
32+
Some things that will increase the chance that your pull request is accepted:
33+
34+
* Write tests.
35+
* Follow our style guide.
36+
* Write a good commit message.

README.md

+1-91
Original file line numberDiff line numberDiff line change
@@ -9,97 +9,6 @@ Really flexible and easy-to-use PHP class to work with images using the GD Libra
99

1010
http://phpimageworkshop.com/
1111

12-
### Latest updates
13-
14-
**Version 2.0.9 - 2015-07-05**
15-
16-
- Fix ImageWorkshop::initFromPath with remote URL
17-
18-
**Version 2.0.8 - 2015-06-01**
19-
20-
- Fix exception code when file not found
21-
22-
**Version 2.0.7 - 2015-03-22**
23-
24-
- Allow `ImageWorkshop::initFromPath` factory working with remote URL
25-
- Improve PHP >= 5.5 compatibility
26-
- Add `fixOrientation` method to layer to change image orientation based on EXIF orientation data
27-
- Fix background color when value is setting to "000000"
28-
29-
**Version 2.0.6 - 2014-08-01**
30-
31-
@jasny (https://github.com/jasny) contribution, new methods :
32-
33-
* `ImageWorkshopLayer::resizeToFit()` resizes an image to fit a bounding box.
34-
* `ImageWorkshopLayer::cropToAspectRatio()` crops either to width or height of the document to match the aspect ratio.
35-
36-
Documentation here : https://github.com/Sybio/ImageWorkshop/pull/37#issue-28704248
37-
38-
**Version 2.0.5 - 2013-11-12**
39-
40-
- Implementing interlace mode (http://php.net/manual/en/function.imageinterlace.php) on save() method to display progessive JPEG image
41-
42-
```php
43-
$interlace = true; // set true to enable interlace, false by default
44-
$layer->save($dirPath, $filename, $createFolders, $backgroundColor, $imageQuality, $interlace);
45-
```
46-
47-
Thanks @dripolles (https://github.com/dripolles) & @johnhunt (https://github.com/johnhunt)
48-
49-
**Version 2.0.4 - 2013-09-11**
50-
51-
- Fix a major bug when resizing both sides AND conserving proportion : layer stack problem (current layer has a new
52-
nested level in its stack, not expected), and translations with positionX and positionY are wrong.
53-
Fixed.
54-
(Initial problem : https://github.com/Sybio/ImageWorkshop/pull/14)
55-
- Add a parameter to clearStack() method
56-
57-
**Version 2.0.2 - 2013-06-14**
58-
59-
- Fix a new bug : when resizing or cropping, small images can have 0 pixel of width or height (because of round), which
60-
is impossible and script crashes. Now width and height are 1 pixel minimum.
61-
62-
Note:
63-
64-
```php
65-
$layer->resizeInPixel(null, 0 /* or negative number */, null);
66-
```
67-
68-
It will generate a 1 pixel height image, not 0.
69-
70-
**Version 2.0.1 - 2013-06-03**
71-
72-
- Fix an opacity bug : pure black color (#000000) always displayed fully transparent (from 0 to 99% opacity). Bug fixed ! (no known bug anymore)
73-
- Add some Exceptions to help debugging
74-
75-
**Version 2.0.0 - 2012-11-21**
76-
77-
New version of ImageWorkshop ! The library is now divided in 3 main classes for cleaned code:
78-
- ImageWorkshopLayer: the class which represents a layer, that you manipulate
79-
- ImageWorkshop: a factory that is used to generate layers
80-
- ImageWorkshopLib: a class containing some tools (for calculations, etc...), used by both classes
81-
82-
Technically, only the initialization change compared with the 1.3.x versions, check the documentation:
83-
http://phpimageworkshop.com/documentation.html#chapter-initialization-of-a-layer
84-
85-
Here an example, before and now:
86-
```php
87-
// before
88-
$layer = new ImageWorkshop(array(
89-
'imageFromPath' => '/path/to/images/picture.jpg',
90-
));
91-
```
92-
93-
```php
94-
// now
95-
$layer = ImageWorkshop::initFromPath('/path/to/images/picture.jpg');
96-
```
97-
98-
And also the installation of the class: http://phpimageworkshop.com/installation.html
99-
100-
The documentation has been updated, you can now check the documentation of each version since 1.3.3:
101-
(Ex: http://phpimageworkshop.com/doc/9/initialize-from-an-image-file.html?version=2.0.0, http://phpimageworkshop.com/doc/9/initialize-from-an-image-file.html?version=1.3.3)
102-
10312
### Installation
10413

10514
The class is designed for PHP 5.3+, but it can work with older PHP versions... Check how to install the class here: http://phpimageworkshop.com/installation.html
@@ -109,6 +18,7 @@ The class is designed for PHP 5.3+, but it can work with older PHP versions... C
10918
- Learn how to use the class in 5 minutes: http://phpimageworkshop.com/quickstart.html
11019
- The complete documentation: http://phpimageworkshop.com/documentation.html
11120
- Usefull tutorials: http://phpimageworkshop.com/tutorials.html
21+
- Changelog: [CHANGELOG.md](CHANGELOG.md)
11222

11323
**What's new in the doc' ?**
11424

0 commit comments

Comments
 (0)