Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BSS-63] Implementation of PSR-7 #16

Closed
wants to merge 4 commits into from
Closed
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
5 changes: 2 additions & 3 deletions .github/workflows/discord.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ jobs:
uses: Ilshidur/action-discord@0.3.2
with:
args: |
🚀 **New Release**: `${{ github.event.release.tag_name }}`
${{ github.event.release.prerelease && '`pre-release`' || '`stable`' }}
🚀 **New Release**: `${{ github.event.release.tag_name }}` ${{ github.event.release.prerelease && '`pre-release`' || '`stable`' }}

${{ github.event.release.body }}

🔗 [View Full Changelog](${{ github.event.release.html_url }})

👤 Released by @${{ github.event.release.author.login }}
👤 Released by @[${{ github.event.release.author.login }}](${{ github.event.release.author.html_url }})
46 changes: 33 additions & 13 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,27 @@ name: PHP Workflow

on:
push:
branches: [ "main", "development" ]
branches: [ "main" ]
pull_request:
branches: [ "main", "development" ]
branches: [ "main" ]

permissions:
contents: read

jobs:
build:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.4', '8.0', '8.1']
name: PHP ${{ matrix.php-version }} Test

env:
BLUESKY_IDENTIFIER: ${{ secrets.BLUESKY_IDENTIFIER }}
BLUESKY_PASSWORD: ${{ secrets.BLUESKY_PASSWORD }}
name: PHP ${{ matrix.php-version }} Unit Tests

steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl
extensions: mbstring, intl, json, curl, fileinfo
coverage: none

- name: Cache dependencies
uses: actions/cache@v3
Expand All @@ -46,8 +43,31 @@ jobs:
- name: Run Unit Tests
run: composer run-script test-unit

- name: Run Feature Tests
run: composer run-script test-feature

- name: Static Analyse
run: composer run-script analyse
run: composer run-script analyse

feature-tests:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
strategy:
matrix:
php-version: ['7.4', '8.0', '8.1']
name: PHP ${{ matrix.php-version }} Feature Tests
env:
BLUESKY_IDENTIFIER: ${{ secrets.BLUESKY_IDENTIFIER }}
BLUESKY_PASSWORD: ${{ secrets.BLUESKY_PASSWORD }}

steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl, json, curl, fileinfo
coverage: none

- uses: actions/checkout@v4

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

- name: Run Feature Tests
run: composer run-script test-feature
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@
"ext-posix": "*"
},
"require": {
"php": ">=7.4",
"ext-json": "*",
"ext-curl": "*",
"ext-fileinfo": "*",
"php": ">=7.4",
"nesbot/carbon": "2.x",
"shahmal1yev/gcollection": "^1.0"
"shahmal1yev/gcollection": "^1.0",
"psr/http-message": "^2.0"
},
"scripts": {
"test": "vendor/bin/phpunit tests",
Expand Down
105 changes: 79 additions & 26 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/Contracts/Lexicons/RequestContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

namespace Atproto\Contracts\Lexicons;

use Psr\Http\Message\MessageInterface;

/**
* Interface RequestContract
*
* This interface defines the contract for an HTTP request.
*/
interface RequestContract
interface RequestContract extends MessageInterface
{
/**
* Get the URL of the request.
Expand Down
Loading
Loading