Contribution guide
Contributions are always appreciated. Like most contribution guides there are links to how to fork a repository and information about Pull Requests. There are also some extra information you need to know about the async-aws/aws repository that might differ from other repositories.
- It is a mono repository
- Most code is generated
Read about them below.
There are many ways to contribute to a project then just writing code. All of them are equally important. Some super helpful things include (in no particular order):
- Write issues
- Comment on issues
- Verify bugs submitted by other people
- Review PRs
- Test PRs
- Write documentation
- Make the website more pretty and accessible
- Tweet or blog about AsyncAws
Read more about documentation and the website here.
Test the PR in a local project¶
Sometimes, it's helpful to test the PR in a real project. This can be achieved
by using the provided link
binary which detects AsyncAws dependencies used by
the project and replaces them by a symlink to the AsyncAws source code.
cd my-test-project
/path-to-async-aws/link
"async-aws/core" has been linked to "/path-to-async-aws/src/./Core".
"async-aws/sqs" has been linked to "/path-to-async-aws/src/Service/Sqs".
The filesystem tree should look like.
.
├── my-test-project
│ ├── composer.json
│ ├── src
│ └── vendor
│ ├── async-aws
│ │ ├── core -> path-to-async-aws/src/Core
│ │ └── sqs -> path-to-async-aws/src/Services/Sqs
│ ├── autoload.php
│ └── composer
└── aws
├── link
└── src
This repo is special¶
Mono repository¶
It means that all PRs and issues goes to async-aws/aws and not to individual client's repositories. When a commit is merged to master, the Subtree Split service will push the changes to other repositories.
Using a mono repository will simplify maintenance.
Generated code¶
Most classes and functions in this repository are generated by the code generator. API clients, input classes, result classes etc are generated from the JSON provided by the official AWS PHP SDK. This will assure correctness and it will be easy to keep up to with API changes.
As a rule of thumb all code in src/Service
is generated. That code cannot be manually
changed. Only the test code can be manually changed.
To create a class run the generate
command.
./generate
# Or
./generate S3 CreateBucket
The ./manifest.json
file contains information where the source is located
and some metadata about the generated files and methods.
You may also regenerate an existing operation and result classes:
./generate S3 CreateBucket
./generate S3 --all
Or regenerate everything:
./generate --all
Read more about generating new code here.