Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/.github/workflows/linter.yml

This file was deleted.

100 changes: 100 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: "CI"

on:
pull_request:

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup PHP 8.3
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
coverage: none

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run Analyze
run: composer analyze

refactor:
name: Refactor
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup PHP 8.3
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
coverage: none

- name: Validate tools/rector/composer.json
run: composer validate --strict --working-dir=tools/rector

- name: Install Rector dependencies
run: composer install --prefer-dist --no-progress --working-dir=tools/rector

- name: Run Refactor Check
run: composer refactor:check

format:
name: Format
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup PHP 8.3
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
coverage: none

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run Format
run: composer format:check

tests:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ["8.2", "8.3", "8.4"]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup PHP ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run Tests
run: composer test
17 changes: 0 additions & 17 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/lint.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/test.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/vendor/
/.idea/
*.cache
*.cache
/tools/rector/vendor/
136 changes: 63 additions & 73 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,109 +1,99 @@
# Contributing

We would ❤️ for you to contribute to Utopia HTTP and help make it better! We want contributing to this library to be fun, enjoyable, and educational for anyone and everyone. All contributions are welcome, including issues, new docs as well as updates and tweaks, blog posts, workshops, and more.
Thanks for contributing to Utopia DI.

## How to Start?
This repository contains a small PSR-11 compatible dependency injection container used across the Utopia libraries. Contributions should keep that scope intact: small surface area, predictable behavior, and strong test coverage.

If you are worried or don’t know where to start, check out our next section explaining what kind of help we could use and where can you get involved. You can reach out with questions to [Eldad Fux (@eldadfux)](https://twitter.com/eldadfux) or [@appwrite_io](https://twitter.com/appwrite_io) on Twitter, and anyone from the [Appwrite team on Discord](https://discord.gg/GSeTUeA). You can also submit an issue, and a maintainer can guide you!
## Code Of Conduct

You can get an in-depth understanding of Utopia HTTP in our [Getting Started](docs/Getting-Starting-Guide.md) guide.
Please read and follow the [Code of Conduct](CODE_OF_CONDUCT.md).

## Code of Conduct
## Before You Start

Help us keep Utopia HTTP open and inclusive. Please read and follow our [Code of Conduct](/CODE_OF_CONDUCT.md).
- For bug fixes, documentation updates, and small improvements, open a pull request directly.
- For larger API changes or new features, open an issue first so maintainers can confirm the direction before implementation.
- For security issues, do not open a public issue. Email `security@appwrite.io` instead.

## Submit a Pull Request 🚀
## Development Setup

Branch naming convention is as following
Utopia DI requires PHP 8.2 or later.

`TYPE-ISSUE_ID-DESCRIPTION`
1. Fork the repository and clone your fork.
2. Create a branch from `main`.
3. Install root dependencies:

example:

```
doc-548-submit-a-pull-request-section-to-contribution-guide
```bash
composer install
```

When `TYPE` can be:

- **feat** - is a new feature
- **doc** - documentation only changes
- **cicd** - changes related to CI/CD system
- **fix** - a bug fix
- **refactor** - code change that neither fixes a bug nor adds a feature

**All PRs must include a commit message with the changes description!**

For the initial start, fork the project and use git clone command to download the repository to your computer. A standard procedure for working on an issue would be to:
4. Install Rector dependencies if you plan to run refactoring checks:

1. `git pull`, before creating a new branch, pull the changes from upstream. Your master needs to be up to date.

```
$ git pull
```bash
composer install -d tools/rector
```

2. Create new branch from `master` like: `doc-548-submit-a-pull-request-section-to-contribution-guide`<br/>
## Branches And Commits

```
$ git checkout -b [name_of_your_new_branch]
```
Use a short, descriptive branch name. Examples:

3. Work - commit - repeat ( be sure to be in your branch )
- `fix/scope-cache-behavior`
- `docs/readme-scope-example`
- `chore/update-tooling`

4. Push changes to GitHub
Write commit messages that clearly describe the change. Keep each pull request focused on a single concern.

```
$ git push origin [name_of_your_new_branch]
```

5. Submit your changes for review
If you go to your repository on GitHub, you'll see a `Compare & pull request` button. Click on that button.
6. Start a Pull Request
Now submit the pull request and click on `Create pull request`.
7. Get a code review approval/reject
8. After approval, merge your PR
9. GitHub will automatically delete the branch after the merge is done. (they can still be restored).

### Testing

- `docker-compose up -d`
- `docker-compose exec web vendor/bin/phpunit --configuration phpunit.xml`
- `docker-compose exec web vendor/bin/psalm --show-info=true`

## Introducing New Features
## Local Checks

We would 💖 you to contribute to Utopia HTTP, but we would also like to make sure this library is as great as possible and loyal to its vision and mission statement 🙏.
Run the relevant checks before opening a pull request:

For us to find the right balance, please open an issue explaining your ideas before introducing a new pull request.

This will allow the community to have sufficient discussion about the new feature value and how it fits in the product roadmap and vision.

This is also important for the repository owners to be able to give technical input and different emphasis regarding the feature design and architecture. Some bigger features might need to go through our [RFC process](https://github.com/appwrite/rfc).
```bash
composer test
composer analyze
composer format:check
composer refactor:check
```

## Other Ways to Help
If you want to apply the automated fixes first:

Pull requests are great, but there are many other areas where you can help:
```bash
composer fix
```

### Blogging & Speaking
Notes:

Creating blog posts, giving talks, or developing tutorials about one of this library's many features are excellent ways to contribute and help our project grow.
- `composer test` runs PHPUnit using [phpunit.xml](phpunit.xml).
- `composer analyze` runs PHPStan using [phpstan.neon](phpstan.neon).
- `composer format:check` runs Pint in check mode.
- `composer refactor:check` requires `tools/rector` dependencies to be installed first.

### Presenting at Meetups
## Pull Requests

Presenting at meetups and conferences about your Utopia projects. Your unique challenges and successes in building things with this library can provide great speaking material. We’d love to review your conference talk abstract, so get in touch with us if you’d like some help!
When opening a pull request:

### Sending Feedbacks & Reporting Bugs
- Base it on `main`.
- Explain the problem and the approach you took to solve it.
- Link the related issue when there is one.
- Add or update tests for behavior changes.
- Update documentation when public behavior or examples change.
- Avoid mixing unrelated refactors with functional changes.

Sending feedback is a great way for us to understand your different use cases of this library better. If you had any issues, bugs, or want to share about your experience, feel free to do so on our GitHub issues page or at our [Discord channel](https://discord.gg/GSeTUeA).
All changes should go through pull request review before merging.

### Submitting New Ideas
## What Maintainers Look For

If you think this library could use a new feature, please open an issue on our GitHub repository, stating as much information as you can think about your new idea and it's implications. We would also use this issue to gather more information, get more feedback from the community, and have a proper discussion about the new feature.
The strongest contributions usually have these properties:

### Improving Documentation
- The change matches the library's narrow scope.
- The public API stays simple and consistent.
- Edge cases are covered with tests.
- Error messages stay clear and actionable.
- Documentation reflects the final behavior.

Submitting documentation updates, enhancements, designs, or bug fixes. Spelling or grammar fixes will be very much appreciated.
## Other Ways To Help

### Helping Someone
You can also contribute by:

Searching for Utopia HTTP on Discord, GitHub, or StackOverflow and helping someone else who needs help. You can also help by teaching others how to contribute to this repo!
- reporting bugs and inconsistencies
- improving examples and documentation
- reviewing pull requests
- helping other users in issues and community channels
Loading
Loading