Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
e817592
adapters and refactor request and response
lohanidamodar Jul 6, 2023
ee75d8a
Merge remote-tracking branch 'origin/feat-routing-v2' into feat-v2
lohanidamodar Jul 11, 2023
02006b2
update test and fix
lohanidamodar Jul 11, 2023
151434c
fix lint
lohanidamodar Jul 11, 2023
af83713
fix tests
lohanidamodar Jul 11, 2023
4260458
fixes
lohanidamodar Jul 11, 2023
4355dfa
fix param reference
lohanidamodar Jul 11, 2023
29909da
downgrade symfony console
lohanidamodar Jul 11, 2023
63121c8
downgrade phpbench
lohanidamodar Jul 11, 2023
b6d83d5
remove leftover code
lohanidamodar Jul 11, 2023
9fbb075
move namespace
lohanidamodar Jul 11, 2023
f23bbe8
fix formatting
lohanidamodar Jul 11, 2023
45beee6
update constructor
lohanidamodar Jul 11, 2023
d8350d1
Update src/Adapter/Swoole/Server.php
lohanidamodar Jul 11, 2023
415a236
Merge branch 'feat-v2' of https://github.com/utopia-php/framework int…
lohanidamodar Jul 11, 2023
146ae35
fix test
lohanidamodar Jul 11, 2023
4eeddf7
update readme
lohanidamodar Jul 11, 2023
803dddc
file loading support in servers
lohanidamodar Jul 11, 2023
1876af8
fix and update test for both server adapters
lohanidamodar Jul 11, 2023
cbe0901
fix test flow
lohanidamodar Jul 12, 2023
c2e70ab
fix parameter name
lohanidamodar Jul 12, 2023
136c318
Update src/Adapter.php
lohanidamodar Jul 12, 2023
a3bdb49
Update src/Adapter.php
lohanidamodar Jul 12, 2023
ab04d15
update dockerfile name
lohanidamodar Jul 12, 2023
8b448f6
update readme
lohanidamodar Jul 12, 2023
eaf63bd
abstract away app start
lohanidamodar Jul 12, 2023
bd9ff87
rename dockerfile
lohanidamodar Jul 12, 2023
c8de4cc
rename App -> Http
lohanidamodar Jul 12, 2023
644687b
fix formatting
lohanidamodar Jul 12, 2023
4bcf458
update namespace
lohanidamodar Jul 12, 2023
31bd350
static file handling
lohanidamodar Jul 12, 2023
97f9320
fix formatting
lohanidamodar Jul 12, 2023
dc96765
upate php version for test - dev dependencies now require 8.1
lohanidamodar Jul 13, 2023
73d8f0b
more server related callbacks
lohanidamodar Jul 13, 2023
a912fab
start hook
lohanidamodar Jul 13, 2023
ab4544a
worker start hooks
lohanidamodar Jul 13, 2023
db4ae13
fix setting resource
lohanidamodar Jul 13, 2023
4eb0583
fix reset
lohanidamodar Jul 16, 2023
5a6d171
swoole beforeShutdown callback
lohanidamodar Jul 18, 2023
22bd6d6
support request hooks
lohanidamodar Jul 18, 2023
f5a483a
add getter for swoole internal request
lohanidamodar Jul 18, 2023
0e67327
getter for swoole response
lohanidamodar Jul 18, 2023
c2cc0f2
Merge remote-tracking branch 'origin/feat-routing-v2' into feat-v2
lohanidamodar Jul 20, 2023
552bccd
get fresh resource each time by default
lohanidamodar Jul 20, 2023
50d4cd5
enable context
lohanidamodar Aug 6, 2023
c0b5d73
fresh is now false by default
lohanidamodar Aug 6, 2023
33698fc
fix resource for context null
lohanidamodar Aug 6, 2023
cd3c30a
unused code
lohanidamodar Aug 6, 2023
0e4281d
add swoole test
lohanidamodar Aug 6, 2023
0f69480
update tests
lohanidamodar Aug 6, 2023
6dcef9a
fix test with resource reset
lohanidamodar Aug 6, 2023
242a20f
fix lint
lohanidamodar Aug 6, 2023
be16910
Merge remote-tracking branch 'origin' into feat-v2
lohanidamodar Aug 6, 2023
54074b9
set a default context and make context string
lohanidamodar Aug 6, 2023
11488b1
make utopia default context
lohanidamodar Aug 8, 2023
d2909e7
upgrade callback
lohanidamodar Aug 8, 2023
52c1a06
fix callback reset type
lohanidamodar Aug 8, 2023
7466616
Merge branch 'master' of https://github.com/utopia-php/framework into…
lohanidamodar Aug 9, 2023
b7ff4de
fix check and lint
lohanidamodar Aug 9, 2023
1105527
fixes after merge
lohanidamodar Aug 9, 2023
f3cb041
update missing resource
lohanidamodar Aug 10, 2023
daba6a7
Merge remote-tracking branch 'origin/master' into feat-v2
lohanidamodar Sep 7, 2023
d714fcb
remove view from framework
lohanidamodar Sep 10, 2023
6c8ffb0
Fix Swoole coroutine http server
Meldiron Oct 2, 2023
a4916b4
Disable forced type on onRequest
Meldiron Oct 2, 2023
69b83a3
Add route resource
Meldiron Oct 2, 2023
2213a3c
Fix tests
Meldiron Oct 3, 2023
96e1f58
Tests fix
Meldiron Oct 3, 2023
c9ea90e
Add swoole resources
Meldiron Oct 3, 2023
e34ed9c
Add default context to getResources
Meldiron Oct 4, 2023
c68f74e
Fix memory leak
Meldiron Oct 11, 2023
a73f0a0
Linter fix
Meldiron Oct 16, 2023
7405c1f
Improve Assoc validator with length param
Meldiron Oct 17, 2023
55792e0
Add multiple validator
vermakhushboo Dec 27, 2023
d81dd2a
Merge pull request #109 from utopia-php/fix-v2-swoole-coroutines
Meldiron Jan 3, 2024
399c89e
Merge remote-tracking branch 'origin/master' into feat-v2
Meldiron Jan 3, 2024
dff85bd
CI/CD fixes
Meldiron Jan 3, 2024
e44076b
Update README
Meldiron Jan 3, 2024
8dfe731
Auto-add context to swoole
Meldiron Jan 3, 2024
6cd3232
Update swoole README
Meldiron Jan 3, 2024
ceae30f
Improve readme, add example
Meldiron Jan 3, 2024
3ba0cd1
Grammar fixes
Meldiron Jan 3, 2024
ecf9791
Update README.md
Meldiron Jan 3, 2024
569428c
Update README.md
Meldiron Jan 3, 2024
f5e2ac0
Add fpm resources
Meldiron Jan 3, 2024
8ef5482
Fix formatting
Meldiron Jan 3, 2024
23dedb9
Merge pull request #113 from utopia-php/feat-add-multiple-validator-t…
eldadfux Jan 3, 2024
d8ef76a
PR review changes
Meldiron Jan 4, 2024
d5e2929
Improve swoole constructor
Meldiron Jan 4, 2024
ee4fc6d
Remove worker concept
Meldiron Jan 4, 2024
9cfeb16
Wildcard host validator
Meldiron Jan 4, 2024
dc539ee
Merge pull request #102 from utopia-php/feat-v2
eldadfux Jan 4, 2024
f5254a9
Improve readme
Meldiron Jan 5, 2024
6b6ae76
Fix docs version
Meldiron Jan 5, 2024
19e0eb1
chore: rename library to utopia-php/http
TorstenDittmann Jan 5, 2024
43f8847
fix: example version to latest
TorstenDittmann Jan 5, 2024
4a3ffd2
Merge branch 'docs-improve-readme' of https://github.com/utopia-php/h…
TorstenDittmann Jan 5, 2024
4724535
Merge pull request #116 from utopia-php/chore-rename-to-http
TorstenDittmann Jan 5, 2024
0ef2070
Update .github/ISSUE_TEMPLATE/bug.yaml
Meldiron Jan 5, 2024
f22cfa3
Update CONTRIBUTING.md
Meldiron Jan 5, 2024
5a996f6
Apply suggestions from code review
Meldiron Jan 5, 2024
9c641f2
Update docs/Getting-Starting-Guide.md
Meldiron Jan 5, 2024
ea29fe6
PR review changes
Meldiron Jan 5, 2024
7613c13
Merge pull request #115 from utopia-php/docs-improve-readme
eldadfux Jan 8, 2024
8d3d828
Merge remote-tracking branch 'origin/0.32.x' into feat-sync-master
Meldiron Jan 24, 2024
f1f0df1
Merge pull request #119 from utopia-php/feat-sync-master
abnegate Jan 24, 2024
933ebc6
Add 451 status code
vermakhushboo Jan 31, 2024
f21fd86
Merge pull request #120 from utopia-php/allow-451-error-code
abnegate Jan 31, 2024
0bba768
Mark methods public to allow chunk response
Meldiron Feb 20, 2024
fd126c0
Merge pull request #123 from utopia-php/fix-missing-interface
eldadfux Feb 20, 2024
a92c735
chore: test default param with function
christyjacob4 Mar 7, 2024
7d7ca4a
chore: update test
christyjacob4 Mar 7, 2024
8baa1c7
chore: linter
christyjacob4 Mar 7, 2024
96cec11
chore: fix tests
christyjacob4 Mar 7, 2024
6e20469
Merge pull request #125 from utopia-php/make-default-param-callable
eldadfux Mar 9, 2024
07cdf70
Merge branch 'master' into feat-wildcart-host-validator
stnguyen90 Mar 11, 2024
c96d011
refactor(validator): simplify return
stnguyen90 Mar 11, 2024
ae3bdee
Merge pull request #114 from utopia-php/feat-wildcart-host-validator
TorstenDittmann Mar 11, 2024
65d4fb8
Implement rules for multiple validator
Meldiron Jul 2, 2024
102c44b
Separate validators
Meldiron Jul 2, 2024
f60479f
PR review changes
Meldiron Jul 2, 2024
6ae1f18
Fix tests
Meldiron Jul 2, 2024
ed89b19
Fix CI/CD
Meldiron Jul 2, 2024
726540d
Typo
Meldiron Jul 2, 2024
e3bbca0
Merge pull request #136 from utopia-php/feat-multiple-validator-adapter
eldadfux Jul 2, 2024
d3e1230
fix: add missing status codes
loks0n May 22, 2025
3e8733e
ci: fix docker-compose
loks0n May 22, 2025
35839e9
fix: duplicate
loks0n May 22, 2025
2cad921
fix: prevent callable strings
loks0n Jun 30, 2025
349d403
Merge pull request #172 from utopia-php/fix-prevent-callable-strings
loks0n Jul 2, 2025
569d423
trigger ci/cd checks
Meldiron Aug 21, 2025
f23a6e7
Make CI/CD checks pass
Meldiron Aug 21, 2025
9d62aad
Add cookies header support for swoole
Meldiron Aug 21, 2025
9e8cd49
Merge pull request #178 from utopia-php/fix-cookie-headers
Meldiron Aug 21, 2025
4700d38
Improve cookie handling
Meldiron Sep 2, 2025
abe3304
Logical fixes & new tests
Meldiron Sep 2, 2025
be935b1
Merge pull request #180 from utopia-php/feat-improve-cookie-handling
Meldiron Sep 2, 2025
d19da13
Allow array for headers
Meldiron Sep 3, 2025
334b99d
Merge pull request #182 from utopia-php/feat-array-headers
Meldiron Sep 3, 2025
2b500d0
Fix array to string conversion warning in Request::getSize()
ChiragAgg5k Dec 11, 2025
2c652b6
Merge pull request #195 from utopia-php/fix-array-header-size-calcula…
ChiragAgg5k Dec 11, 2025
b73e9e8
feat: remove validators and use utopia validators lib
ChiragAgg5k Dec 18, 2025
3571c49
Merge pull request #199 from utopia-php/feat-remove-validator
abnegate Dec 18, 2025
396a8e3
Convert hostname to lowercase (#214)
hmacr Feb 19, 2026
d60c9ce
chore: bump validators lib (#218)
ChiragAgg5k Feb 25, 2026
15d1195
Move resource ownership into utopia-php/di (#220)
ChiragAgg5k Mar 13, 2026
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ body:
- type: dropdown
id: utopia-version
attributes:
label: "🎲 Utopia Framework version"
label: "🎲 Utopia HTTP version"
description: "What version of Utopia are you running?"
options:
- Version 0.18.x
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.2'

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

- name: Setup Docker
run: docker-compose up -d --build
run: docker compose up -d --build

- name: Wait for Server to be ready
run: sleep 10

- name: Run Tests
run: docker compose exec web vendor/bin/phpunit --configuration phpunit.xml
- name: Run FPM Tests
run: docker compose exec fpm vendor/bin/phpunit --configuration phpunit.xml

- name: Run Swoole Tests
run: docker compose exec swoole vendor/bin/phpunit --configuration phpunit.xml
30 changes: 18 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Contributing

We would ❤️ for you to contribute to Framework and help make it better! We want contributing to Framework 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.
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.

## How to Start?

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!

You can get an in-depth understanding of the Utopia-PHP framework in our [Getting Started](docs/Getting-Starting-Guide.md) guide.
You can get an in-depth understanding of Utopia HTTP in our [Getting Started](docs/Getting-Starting-Guide.md) guide.

## Code of Conduct

Help us keep framework open and inclusive. Please read and follow our [Code of Conduct](/CODE_OF_CONDUCT.md).
Help us keep Utopia HTTP open and inclusive. Please read and follow our [Code of Conduct](/CODE_OF_CONDUCT.md).

## Submit a Pull Request 🚀

Expand Down Expand Up @@ -64,40 +64,46 @@ $ git push origin [name_of_your_new_branch]
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

We would 💖 you to contribute to Framework, but we would also like to make sure Framework is as great as possible and loyal to its vision and mission statement 🙏.
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 🙏.

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

This will allow the Framework community to have sufficient discussion about the new feature value and how it fits in the product roadmap and vision.
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 Framework lead developers 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).
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).

## Other Ways to Help

Pull requests are great, but there are many other areas where you can help Framework
Pull requests are great, but there are many other areas where you can help:

### Blogging & Speaking

Blogging, speaking about, or creating tutorials about one of Framework's many features is great way to contribute and help our project grow.
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.

### Presenting at Meetups

Presenting at meetups and conferences about your Framework projects. Your unique challenges and successes in building things with Framework can provide great speaking material. We’d love to review your talk abstract/CFP, so get in touch with us if you’d like some help!
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!

### Sending Feedbacks & Reporting Bugs

Sending feedback is a great way for us to understand your different use cases of Framework 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).
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).

### Submitting New Ideas

If you think Framework 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.
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.

### Improving Documentation

Submitting documentation updates, enhancements, designs, or bug fixes. Spelling or grammar fixes will be very much appreciated.

### Helping Someone

Searching for Framework on Discord, GitHub, or StackOverflow and helping someone else who needs help. You can also help by teaching others how to contribute to Framework's repo!
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!
8 changes: 4 additions & 4 deletions Dockerfile → Dockerfile.fpm
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ RUN composer install --ignore-platform-reqs --optimize-autoloader \
--no-plugins --no-scripts --prefer-dist \
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`

FROM php:8.0-cli-alpine as final
FROM php:8.2-fpm-alpine AS final
LABEL maintainer="team@appwrite.io"

ENV DEBIAN_FRONTEND=noninteractive \
PHP_VERSION=8
PHP_FPM_POOL_CONF=/usr/local/etc/php-fpm.d/www.conf

RUN \
apk add --no-cache --virtual .deps \
supervisor php$PHP_VERSION php$PHP_VERSION-fpm php$PHP_VERSION-mbstring nginx bash
supervisor nginx bash


# Nginx Configuration (with self-signed ssl certificates)
COPY ./tests/docker/nginx.conf /etc/nginx/nginx.conf

# PHP Configuration
RUN mkdir -p /var/run/php
COPY ./tests/docker/www.conf /etc/php/$PHP_VERSION/fpm/pool.d/www.conf
COPY ./tests/docker/www.conf /usr/local/etc/php-fpm.d/www.conf

# Script
COPY ./tests/docker/start /usr/local/bin/start
Expand Down
29 changes: 29 additions & 0 deletions Dockerfile.swoole
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM composer:2.0 AS step0


ARG TESTING=true

ENV TESTING=$TESTING

WORKDIR /usr/local/src/

COPY composer.* /usr/local/src/

RUN composer install --ignore-platform-reqs --optimize-autoloader \
--no-plugins --no-scripts --prefer-dist \
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`

FROM appwrite/base:0.5.0 AS final
LABEL maintainer="team@appwrite.io"

WORKDIR /usr/src/code

COPY ./src /usr/src/code/src
COPY ./tests /usr/src/code/tests
COPY ./phpunit.xml /usr/src/code/phpunit.xml
COPY ./phpbench.json /usr/src/code/phpbench.json
COPY --from=step0 /usr/local/src/vendor /usr/src/code/vendor

EXPOSE 80

CMD ["php", "tests/e2e/server-swoole.php"]
Loading