From 050e7eed6cdf335e01724ae80be0520f3ea67885 Mon Sep 17 00:00:00 2001 From: Tavo Nieves J Date: Sat, 12 Dec 2020 22:20:55 -0500 Subject: [PATCH 1/7] Adding CONTRIBUTING.md --- CONTRIBUTING.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..e39ad1d7 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,49 @@ +# How to Contribute + +If you want to add or modify the documentation of the functions of this module, +the editor of Github.com may be enough for that task. + +If instead you plan to edit or add some new function to this module, hey, you rock! + +To do it, make sure you have the test project for this module installed [Codeception/symfony-module-test](https://github.com/Codeception/symfony-module-tests): + +After having installed it and confirming that all tests pass, you can start editing the source code in: +``` +vendor/codeception/module-symfony/src/Codeception/Module/Symfony.php +``` +If you are going to add a new function or modify in some way the parameters of an existing function, make sure to execute: + +```bash +vendor/bin/codecept clean +vendor/bin/codecept build +``` + +This way your new function will be available in your functional tests and your IDE should be able to autocomplete it. + +Keep in mind that any new function needs a corresponding test. + +If that's your case, create a test with the same name as your new function inside: + +``` +tests/Functional/SymfonyModuleCest.php +``` + +following alphabetical order, and verify that it works correctly with various test data. All good? Great! + +You can now send your contribution to the project, for that you will only have to fork the project on GitHub, +clone it and create a branch: +```bash +git clone https://github.com/YourUserName/module-symfony.git +git branch +``` + +And paste your changes. Then, just do: + +```bash +git commit +git push --set-upstream origin +``` +Finally go back to GitHub and create a Pull Request from `the branch of your fork` to the `master` of this project. + + + From 1108a50911c04021a4a9edc02ee68e6218794590 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Wed, 16 Dec 2020 19:53:47 +0100 Subject: [PATCH 2/7] Update CONTRIBUTING.md (#1) --- CONTRIBUTING.md | 84 ++++++++++++++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 32 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e39ad1d7..b4e0d4c5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,49 +1,69 @@ # How to Contribute -If you want to add or modify the documentation of the functions of this module, -the editor of Github.com may be enough for that task. +First of all: Contributions are very welcome! -If instead you plan to edit or add some new function to this module, hey, you rock! +Does your change require a test? -To do it, make sure you have the test project for this module installed [Codeception/symfony-module-test](https://github.com/Codeception/symfony-module-tests): +## Yes, My Change Requires a Test -After having installed it and confirming that all tests pass, you can start editing the source code in: -``` -vendor/codeception/module-symfony/src/Codeception/Module/Symfony.php -``` -If you are going to add a new function or modify in some way the parameters of an existing function, make sure to execute: +So you're going to add or modify functionality? Hey, you rock! -```bash -vendor/bin/codecept clean -vendor/bin/codecept build -``` +You can use our prepared [Codeception/symfony-module-test](https://github.com/Codeception/symfony-module-tests). It is a minimal (but complete) Symfony project, ready to run tests. -This way your new function will be available in your functional tests and your IDE should be able to autocomplete it. +1. On https://github.com/Codeception/symfony-module-tests, click on the "Fork" button. Then, in your terminal, do: + ```bash + git clone https://github.com/YourUserName/symfony-module-tests.git + cd symfony-module-tests + git checkout -b new_feature + ``` -Keep in mind that any new function needs a corresponding test. +2. Edit the module's source code in `vendor/codeception/module-symfony/src/Codeception/Module/Symfony.php` of this project. If you want, you can already write the tests (see step 7). -If that's your case, create a test with the same name as your new function inside: +3. On https://github.com/Codeception/module-symfony, click on the "Fork" button. Then, in your terminal, go to another directory, then: + ```bash + git clone https://github.com/YourUserName/module-symfony.git + cd module-symfony + git checkout -b new_feature + ``` -``` -tests/Functional/SymfonyModuleCest.php -``` +4. Copy your changed code parts from the test project's `Symfony.php` to this fork's `src/Codeception/Module/Symfony.php` -following alphabetical order, and verify that it works correctly with various test data. All good? Great! +5. Commit: + ```bash + git add --all + git commit --message="Briefly explain what your change is about" + git push --set-upstream origin new_feature + ``` -You can now send your contribution to the project, for that you will only have to fork the project on GitHub, -clone it and create a branch: -```bash -git clone https://github.com/YourUserName/module-symfony.git -git branch -``` +6. In the CLI output, click on the link to https://github.com/YourUserName/module-symfony/pull/new/new_feature to create a Pull Request through GitHub.com. -And paste your changes. Then, just do: +Now wait for feedback on your Pull Request. +If all is fine, then ... -```bash -git commit -git push --set-upstream origin -``` -Finally go back to GitHub and create a Pull Request from `the branch of your fork` to the `master` of this project. +### ... Write the Test +7. In the test project (`symfony-module-tests`), create a test with the same name as your new function in `tests/Functional/SymfonyModuleCest.php`, following alphabetical order. + Hint: Run this to rebuild Codeception's "Actor" classes (see [Console Commands](https://codeception.com/docs/reference/Commands#Build)) to get auto-completion in your IDE: + ```bash + vendor/bin/codecept clean + vendor/bin/codecept build + ``` +8. Run the tests with `vendor/bin/codecept run Functional` +9. Commit: + ```bash + git add --all + git commit --message="Add a link to the module's Pull Request you created above" + git push --set-upstream origin new_feature + ``` + +10. In the CLI output, click on the link to https://github.com/YourUserName/symfony-module-test/pull/new/new_feature to create a Pull Request through GitHub.com. + + +## No, My Change Does Not Require a Test + +So you're going to improve documentation, or just do a really minor code change? Hey, you rock too! + +* Either just edit https://github.com/Codeception/module-symfony/blob/master/src/Codeception/Module/Symfony.php on GitHub's website. +* Or follow steps 3 through 6 from above to do it on your local machine. From 996df89f5bae9868bc3e58145f4cc06dbed093bd Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Thu, 17 Dec 2020 00:19:31 +0100 Subject: [PATCH 3/7] Update CONTRIBUTING.md --- CONTRIBUTING.md | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b4e0d4c5..f5794f4e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,51 +14,56 @@ You can use our prepared [Codeception/symfony-module-test](https://github.com/Co ```bash git clone https://github.com/YourUserName/symfony-module-tests.git cd symfony-module-tests + git remote add upstream https://github.com/Codeception/symfony-module-tests.git + git pull upstream master + git rebase upstream/master git checkout -b new_feature ``` -2. Edit the module's source code in `vendor/codeception/module-symfony/src/Codeception/Module/Symfony.php` of this project. If you want, you can already write the tests (see step 7). +2. Continue with step 2+3 at https://github.com/Codeception/symfony-module-tests/blob/main/README.md (i.e. composer + Doctrine fixtures) -3. On https://github.com/Codeception/module-symfony, click on the "Fork" button. Then, in your terminal, go to another directory, then: +3. Edit the module's source code in `vendor/codeception/module-symfony/src/Codeception/Module/Symfony.php` of this project. If you want, you can already write the tests (see step 8). + +4. On https://github.com/Codeception/module-symfony, click on the "Fork" button. Then, in your terminal, go to another directory, then: ```bash git clone https://github.com/YourUserName/module-symfony.git cd module-symfony git checkout -b new_feature ``` -4. Copy your changed code parts from the test project's `Symfony.php` to this fork's `src/Codeception/Module/Symfony.php` +5. Copy your changed code parts from the test project's `Symfony.php` to this fork's `src/Codeception/Module/Symfony.php` -5. Commit: +6. Commit: ```bash git add --all git commit --message="Briefly explain what your change is about" git push --set-upstream origin new_feature ``` -6. In the CLI output, click on the link to https://github.com/YourUserName/module-symfony/pull/new/new_feature to create a Pull Request through GitHub.com. +7. In the CLI output, click on the link to https://github.com/YourUserName/module-symfony/pull/new/new_feature to create a Pull Request through GitHub.com. Now wait for feedback on your Pull Request. If all is fine, then ... ### ... Write the Test -7. In the test project (`symfony-module-tests`), create a test with the same name as your new function in `tests/Functional/SymfonyModuleCest.php`, following alphabetical order. +8. In the test project (`symfony-module-tests`), create a test with the same name as your new function in `tests/Functional/SymfonyModuleCest.php`, following alphabetical order. Hint: Run this to rebuild Codeception's "Actor" classes (see [Console Commands](https://codeception.com/docs/reference/Commands#Build)) to get auto-completion in your IDE: ```bash vendor/bin/codecept clean vendor/bin/codecept build ``` -8. Run the tests with `vendor/bin/codecept run Functional` +9. Run the tests with `vendor/bin/codecept run Functional` -9. Commit: +10. Commit: ```bash git add --all git commit --message="Add a link to the module's Pull Request you created above" git push --set-upstream origin new_feature ``` -10. In the CLI output, click on the link to https://github.com/YourUserName/symfony-module-test/pull/new/new_feature to create a Pull Request through GitHub.com. +11. In the CLI output, click on the link to https://github.com/YourUserName/symfony-module-test/pull/new/new_feature to create a Pull Request through GitHub.com. ## No, My Change Does Not Require a Test From 287be511f11b26ddee7401c0c8bf1b69bb65af62 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Thu, 17 Dec 2020 00:24:00 +0100 Subject: [PATCH 4/7] Update CONTRIBUTING.md --- CONTRIBUTING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f5794f4e..20fcab9b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,6 +28,9 @@ You can use our prepared [Codeception/symfony-module-test](https://github.com/Co ```bash git clone https://github.com/YourUserName/module-symfony.git cd module-symfony + git remote add upstream https://github.com/Codeception/module-symfony.git + git pull upstream master + git rebase upstream/master git checkout -b new_feature ``` From 106a84f77099b1c131c9261237a4f52f512572c7 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Thu, 17 Dec 2020 00:39:38 +0100 Subject: [PATCH 5/7] Update CONTRIBUTING.md --- CONTRIBUTING.md | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 20fcab9b..35f3d151 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,14 +11,14 @@ So you're going to add or modify functionality? Hey, you rock! You can use our prepared [Codeception/symfony-module-test](https://github.com/Codeception/symfony-module-tests). It is a minimal (but complete) Symfony project, ready to run tests. 1. On https://github.com/Codeception/symfony-module-tests, click on the "Fork" button. Then, in your terminal, do: - ```bash - git clone https://github.com/YourUserName/symfony-module-tests.git - cd symfony-module-tests - git remote add upstream https://github.com/Codeception/symfony-module-tests.git - git pull upstream master - git rebase upstream/master - git checkout -b new_feature - ``` + ```bash + git clone https://github.com/YourUserName/symfony-module-tests.git + cd symfony-module-tests + git remote add upstream https://github.com/Codeception/symfony-module-tests.git + git pull upstream master + git rebase upstream/master + git checkout -b new_feature + ``` 2. Continue with step 2+3 at https://github.com/Codeception/symfony-module-tests/blob/main/README.md (i.e. composer + Doctrine fixtures) @@ -37,11 +37,11 @@ You can use our prepared [Codeception/symfony-module-test](https://github.com/Co 5. Copy your changed code parts from the test project's `Symfony.php` to this fork's `src/Codeception/Module/Symfony.php` 6. Commit: - ```bash - git add --all - git commit --message="Briefly explain what your change is about" - git push --set-upstream origin new_feature - ``` + ```bash + git add --all + git commit --message="Briefly explain what your change is about" + git push --set-upstream origin new_feature + ``` 7. In the CLI output, click on the link to https://github.com/YourUserName/module-symfony/pull/new/new_feature to create a Pull Request through GitHub.com. @@ -51,20 +51,20 @@ If all is fine, then ... ### ... Write the Test 8. In the test project (`symfony-module-tests`), create a test with the same name as your new function in `tests/Functional/SymfonyModuleCest.php`, following alphabetical order. - Hint: Run this to rebuild Codeception's "Actor" classes (see [Console Commands](https://codeception.com/docs/reference/Commands#Build)) to get auto-completion in your IDE: - ```bash - vendor/bin/codecept clean - vendor/bin/codecept build - ``` + Hint: Run this to rebuild Codeception's "Actor" classes (see [Console Commands](https://codeception.com/docs/reference/Commands#Build)) to get auto-completion in your IDE: + ```bash + vendor/bin/codecept clean + vendor/bin/codecept build + ``` 9. Run the tests with `vendor/bin/codecept run Functional` 10. Commit: - ```bash - git add --all - git commit --message="Add a link to the module's Pull Request you created above" - git push --set-upstream origin new_feature - ``` + ```bash + git add --all + git commit --message="Add a link to the module's Pull Request you created above" + git push --set-upstream origin new_feature + ``` 11. In the CLI output, click on the link to https://github.com/YourUserName/symfony-module-test/pull/new/new_feature to create a Pull Request through GitHub.com. From 6cec8ed6109f9911a392086e82f932a35356cc42 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Thu, 17 Dec 2020 00:42:09 +0100 Subject: [PATCH 6/7] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 35f3d151..ed138d50 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -74,4 +74,4 @@ If all is fine, then ... So you're going to improve documentation, or just do a really minor code change? Hey, you rock too! * Either just edit https://github.com/Codeception/module-symfony/blob/master/src/Codeception/Module/Symfony.php on GitHub's website. -* Or follow steps 3 through 6 from above to do it on your local machine. +* Or follow steps 4 through 7 from above to do it on your local machine. From 9dd3326b6981fa83137effcb106954f230c488b1 Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Thu, 17 Dec 2020 00:44:23 +0100 Subject: [PATCH 7/7] Update CONTRIBUTING.md --- CONTRIBUTING.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ed138d50..4ef78669 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,7 +50,7 @@ If all is fine, then ... ### ... Write the Test -8. In the test project (`symfony-module-tests`), create a test with the same name as your new function in `tests/Functional/SymfonyModuleCest.php`, following alphabetical order. +8. In the test project (`symfony-module-tests`), create a test with the same name as your new function in `tests/Functional/SymfonyModuleCest.php`, following alphabetical order. Hint: Run this to rebuild Codeception's "Actor" classes (see [Console Commands](https://codeception.com/docs/reference/Commands#Build)) to get auto-completion in your IDE: ```bash vendor/bin/codecept clean @@ -60,11 +60,11 @@ If all is fine, then ... 9. Run the tests with `vendor/bin/codecept run Functional` 10. Commit: - ```bash - git add --all - git commit --message="Add a link to the module's Pull Request you created above" - git push --set-upstream origin new_feature - ``` + ```bash + git add --all + git commit --message="Add a link to the module's Pull Request you created above" + git push --set-upstream origin new_feature + ``` 11. In the CLI output, click on the link to https://github.com/YourUserName/symfony-module-test/pull/new/new_feature to create a Pull Request through GitHub.com.