Skip to content
Draft
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
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ phpstan.neon.dist export-ignore
phpunit.xml.dist export-ignore
pint.json export-ignore
rector.php export-ignore
renovate.json export-ignore
12 changes: 12 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Autofix

on: [pull_request]

permissions:
contents: write

jobs:
autofix:
uses: hosmelq/.github/.github/workflows/php-autofix.yml@main
with:
php-version: '8.3'
158 changes: 50 additions & 108 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,154 +1,96 @@
name: Continuous integration
name: Continuous Integration

on:
pull_request:
push:
branches:
- main
branches: [ main ]
pull_request:

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

jobs:
check-static-code:
name: Check static code (PHP ${{ matrix.php-version }})
check-unused-composer-dependencies:
name: Check unused composer dependencies

runs-on: ubuntu-latest

strategy:
matrix:
php-version: [ 8.1, 8.2, 8.3 ]

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
- name: Check unused composer dependencies
uses: hosmelq/.github/.github/actions/composer-unused-dependencies-check@main
with:
coverage: none
php-version: ${{ matrix.php-version }}
tools: cs2pr
php-version: '8.3'

- name: Get composer cache directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Restore composer cache
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
check-composer:
name: Check composer

- name: Install composer dependencies
run: composer install --no-progress
runs-on: ubuntu-latest

- name: Run PHPStan
run: vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr
steps:
- name: Check composer normalize
uses: hosmelq/.github/.github/actions/composer-normalize-check@main
with:
php-version: '8.3'

check-code-quality:
name: Check code quality (PHP ${{ matrix.php-version }})
check-static-code:
name: Check static code

runs-on: ubuntu-latest

strategy:
matrix:
php-version: [ 8.1, 8.2, 8.3 ]

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
- name: Check static code
uses: hosmelq/.github/.github/actions/phpstan-check@main
with:
coverage: none
php-version: ${{ matrix.php-version }}
php-version: '8.3'

- name: Get composer cache directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Restore composer cache
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
check-code-quality:
name: Check code quality

- name: Install composer dependencies
run: composer install --no-progress
runs-on: ubuntu-latest

- name: Run Rector
run: vendor/bin/rector --ansi --dry-run
steps:
- name: Check code quality
uses: hosmelq/.github/.github/actions/php-rector-check@main
with:
php-version: '8.3'

check-code-style:
name: Check code style (PHP ${{ matrix.php-version }})
name: Check code style

runs-on: ubuntu-latest

strategy:
matrix:
php-version: [ 8.1, 8.2, 8.3 ]

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
- name: Check code style
uses: hosmelq/.github/.github/actions/php-pint-check@main
with:
coverage: none
php-version: ${{ matrix.php-version }}
tools: cs2pr

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

- name: Run Pint
id: pint-test
run: vendor/bin/pint --test

- name: Run Pint with annotations
if: failure() && steps.pint-test.outcome != 'success'
run: vendor/bin/pint --format=checkstyle --test | cs2pr
php-version: '8.3'

tests:
name: PHP tests (PHP ${{ matrix.php-version }})
name: PHP ${{ matrix.php }}

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-version: [ 8.1, 8.2, 8.3 ]
php: ['8.3', '8.4', '8.5']

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
- name: Install composer dependencies
uses: hosmelq/.github/.github/actions/composer-install@main
with:
coverage: none
php-version: ${{ matrix.php-version }}
php-version: ${{ matrix.php }}

- name: Get composer cache directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Restore composer cache
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Installed dependencies
run: composer show -D

- name: Install composer dependencies
run: composer install --no-progress
- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Run tests
run: composer test
7 changes: 7 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Labeler

on: [pull_request]

jobs:
label:
uses: hosmelq/.github/.github/workflows/labeler.yml@main
15 changes: 8 additions & 7 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ name: Update Changelog

on:
release:
types: [ released ]
types: [released]

jobs:
update-changelog:
name: Update Changelog

runs-on: ubuntu-latest

permissions:
contents: write

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.release.target_commitish }}
Expand All @@ -28,13 +28,14 @@ jobs:
- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
with:
release-date: ${{ steps.release_date.outputs.date }}
release-notes: ${{ github.event.release.body }}
compare-url-target-revision: ${{ github.event.release.target_commitish }}
latest-version: ${{ github.event.release.tag_name }}
parse-github-usernames: true
release-date: ${{ steps.release_date.outputs.date }}
release-notes: ${{ github.event.release.body }}

- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v5
uses: stefanzweifel/git-auto-commit-action@v7
with:
branch: ${{ github.event.release.target_commitish }}
commit_message: Update CHANGELOG
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.DS_Store
.idea
.phpunit.cache
.vscode

vendor

Expand Down
12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com//plutolinks/loops-php/compare/v0.3.0...HEAD)
## [Unreleased](https://github.com/hosmelq/loops-php/compare/v0.3.0...HEAD)

## [v0.3.0](https://github.com//plutolinks/loops-php/compare/v0.2.0...v0.3.0) - 2025-07-28
## [v0.3.0](https://github.com/hosmelq/loops-php/compare/v0.2.0...v0.3.0) - 2025-07-28

### What's Changed

Expand All @@ -19,17 +19,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

**Full Changelog**: https://github.com/hosmelq/loops-php/compare/v0.2.0...v0.3.0

## [v0.2.0](https://github.com//plutolinks/loops-php/compare/v0.1.0...v0.2.0) - 2024-05-18
## [v0.2.0](https://github.com/hosmelq/loops-php/compare/v0.1.0...v0.2.0) - 2024-05-18

### What's Changed

* Fix: ErrorException in EventSendResponse due to Undefined array key "message" (add missing null coalesce operator) by [@HelgeSverre](https://github.com/HelgeSverre) in https://github.com/plutolinks/loops-php/pull/2
* Fix: ErrorException in EventSendResponse due to Undefined array key "message" (add missing null coalesce operator) by [@HelgeSverre](https://github.com/HelgeSverre) in https://github.com/hosmelq/loops-php/pull/2

### New Contributors

* [@HelgeSverre](https://github.com/HelgeSverre) made their first contribution in https://github.com/plutolinks/loops-php/pull/2
* [@HelgeSverre](https://github.com/HelgeSverre) made their first contribution in https://github.com/hosmelq/loops-php/pull/2

**Full Changelog**: https://github.com/plutolinks/loops-php/compare/v0.1.0...v0.2.0
**Full Changelog**: https://github.com/hosmelq/loops-php/compare/v0.1.0...v0.2.0

## v0.1.0 - 2024-03-11

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ The Loops PHP SDK provides an expressive interface for interacting with [Loops](

## Requirements

Requires PHP 8.1+
Requires PHP 8.3+

## Installation

You may install Loops into your project using the Composer package manager:

```sh
composer require plutolinks/loops
composer require hosmelq/loops
```

## Usage

You can create an instance of the SDK like so:

```php
use PlutoLinks\Loops\Loops;
use Hosmelq\Loops\Loops;

$loops = Loops::client('<api-key>');
```
Expand Down
10 changes: 10 additions & 0 deletions composer-dependency-analyser.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

declare(strict_types=1);

use ShipMonk\ComposerDependencyAnalyser\Config\Configuration;

return (new Configuration())
->ignoreErrorsOnPackages([
'thecodingmachine/safe',
], ['unused-dependency']);
Loading
Loading