Skip to content

Commit c31c1eb

Browse files
committed
Bump versions of Swagger UI, GraphiQL and GraphQL Playground and improve contrib instructions
1 parent 3a14131 commit c31c1eb

18 files changed

+1902
-1566
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
/swagger.json
1010
/swagger.yaml
1111
/tests/Fixtures/app/var/
12+
/tests/Fixtures/app/public/bundles/
1213
/vendor/

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* Subresources: Improve queries when there's only one level #3396
2222
* HTTP: Location header is only set on POST with a 201 or between 300 and 400 #3497
2323
* GraphQL: Do not allow empty cursor values on `before` or `after` #3360
24+
* Bump versions of Swagger UI, GraphiQL and GraphQL Playground #3510
2425

2526
## 2.5.4
2627

CONTRIBUTING.md

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,29 @@ publicly**. We will disclose details of the issue and credit you after having re
3030
First of all, you must decide on what branch your changes will be based depending of the nature of the change.
3131
See [the dedicated documentation entry](https://api-platform.com/docs/extra/releases/).
3232

33+
To prepare your patch directly in the `vendor/` of an existing project (convenient to fix a bug):
34+
35+
1. Remove the existing copy of the library: `rm -Rf vendor/api-platform/core`
36+
2. Reinstall the lib while keeping Git metadata: `composer install --prefer-source`
37+
3. You can now work directly in `vendor/api-platform/core`, create a new branch: `git checkout -b my_patch`
38+
4. When your patch is ready, fork the project and add your Git remote: `git remote add <your-name> [email protected]:<your-name>/core.git`
39+
5. You can now push your code and open your Pull Request: `git push <your-name> my_patch`
40+
41+
Alternatively, you can also work with the test application we provide:
42+
43+
cd tests/Fixtures/app
44+
./console assets:install --symlink
45+
symfony serve
46+
47+
# or if you prefer using the PHP built-in web server
48+
php -S localhost:8000 -t public/
49+
3350
### Matching Coding Standards
3451

3552
The API Platform project follows [Symfony coding standards](https://symfony.com/doc/current/contributing/code/standards.html).
3653
But don't worry, you can fix CS issues automatically using the [PHP CS Fixer](http://cs.sensiolabs.org/) tool:
3754

38-
```shell
39-
php-cs-fixer.phar fix
40-
```
55+
php-cs-fixer.phar fix
4156

4257
And then, add the fixed file to your commit before pushing.
4358
Be sure to add only **your modified files**. If any other file is fixed by cs tools, just revert it before committing.
@@ -66,45 +81,33 @@ Both `phpunit` and `behat` are development dependencies and should be available
6681

6782
To launch unit tests:
6883

69-
```shell
70-
vendor/bin/phpunit --stop-on-failure -vvv
71-
```
84+
vendor/bin/phpunit --stop-on-failure -vvv
7285

73-
If you want coverage, you will need the `phpdbg` package and run:
86+
If you want coverage, you will need the `pcov` PHP extension and run:
7487

75-
```shell
76-
phpdbg -qrr vendor/bin/phpunit --coverage-html coverage -vvv --stop-on-failure
77-
```
88+
vendor/bin/phpunit --coverage-html coverage -vvv --stop-on-failure
7889

7990
Sometimes there might be an error with too many open files when generating coverage. To fix this, you can increase the `ulimit`, for example:
8091

81-
```shell
82-
ulimit -n 4000
83-
```
92+
ulimit -n 4000
8493

8594
Coverage will be available in `coverage/index.html`.
8695

8796
#### Behat
8897

8998
The command to launch Behat tests is:
9099

91-
```shell
92-
./vendor/bin/behat --suite=default --stop-on-failure -vvv
93-
```
100+
./vendor/bin/behat --suite=default --stop-on-failure -vvv
94101

95102
If you want to launch Behat tests for MongoDB, the command is:
96103

97-
```shell
98-
APP_ENV=mongodb ./vendor/bin/behat --suite=mongodb --stop-on-failure -vvv
99-
```
104+
APP_ENV=mongodb ./vendor/bin/behat --suite=mongodb --stop-on-failure -vvv
100105

101106
## Squash your Commits
102107

103108
If you have 3 commits, start with:
104109

105-
```shell
106-
git rebase -i HEAD~3
107-
```
110+
git rebase -i HEAD~3
108111

109112
An editor will be opened with your 3 commits, all prefixed by `pick`.
110113

@@ -116,15 +119,11 @@ After that, all your commits will be squashed into the first one and the commit
116119

117120
If you would like to rename your commit message, type:
118121

119-
```shell
120-
git commit --amend
121-
```
122+
git commit --amend
122123

123124
Now force push to update your PR:
124125

125-
```shell
126-
git push --force-with-lease
127-
```
126+
git push --force-with-lease
128127

129128
# License and Copyright Attribution
130129

@@ -134,3 +133,13 @@ and to transfer the copyright on the submitted code to Kévin Dunglas.
134133
Be sure to you have the right to do that (if you are a professional, ask your company)!
135134

136135
If you include code from another project, please mention it in the Pull Request description and credit the original author.
136+
137+
# Releases
138+
139+
This section is dedicated to maintainers.
140+
141+
1. Update the JavaScript dependencies by running `./update-js.sh` (always check if it works in a browser)
142+
2. Update the `CHANGELOG.md` file (be sure to include Pull Request numbers when appropriate)
143+
3. Create a signed tag: `git tag -s vX.Y.Z -m "Version X.Y.Z"`
144+
4. Create a release using GitHub's UI and copy the changelog
145+
5. Create a new release of `api-platform/api-platform`

0 commit comments

Comments
 (0)