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

Initial set up #1

Merged
merged 1 commit into from
May 8, 2024
Merged
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
Initial set up
WyriHaximus committed May 8, 2024
commit 350cf0ccfd8dc55b5e5846d2d86922f506168838
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.json]
indent_size = 2

[*.yml]
indent_size = 2

[*.yaml]
indent_size = 2

[Makefile]
indent_style = tab
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Ignoring files for distribution archieves
.github/ export-ignore
etc/ export-ignore
tests/ export-ignore
var/ export-ignore
.devcontainer.json export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
CONTRIBUTING.md export-ignore
infection.json.dist export-ignore
Makefile export-ignore
README.md export-ignore
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @WyriHaximus
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: WyriHaximus
60 changes: 60 additions & 0 deletions .github/boring-cyborg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
labelPRBasedOnFilePath:
"Documentation 📚":
- README.md
- CONTRIBUTING.md
"Dependencies 📦":
- Dockerfile*
- composer.*
- package.json
- package-lock.json
- yarn.lock
"Docker 🐳":
- Dockerfile*
- .docker/**/*
"Image 🖼":
- "**/*.gif"
- "**/*.jpg"
- "**/*.jpeg"
- "**/*.png"
- "**/*.webp"
"CSS 👩‍🎨":
- "**/*.css"
"HTML 👷‍♀️":
- "**/*.htm"
- "**/*.html"
"NEON 🦹‍♂️":
- "**/*.neon"
"MarkDown 📝":
- "**/*.md"
"YAML 🍄":
- "**/*.yml"
- "**/*.yaml"
"JSON 👨‍💼":
- "**/*.json"
"Go 🐹":
- "**/*.go"
"JavaScript 🦏":
- "**/*.js"
- package.json
- package-lock.json
- yarn.lock
"PHP 🐘":
- "**/*.php"
- composer.*
"Configuration ⚙":
- .github/*
"CI 🚧":
- .github/workflows/*
- .scrutinizer.yml
"Templates 🌲":
- "**/*.twig"
- "**/*.tpl"
"Helm ☸":
- .helm/**/*
"Tests 🧪":
- tests/**/*
"Source 🔮":
- src/**/*

labelerFlags:
labelOnPRUpdates: true
6 changes: 6 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>WyriHaximus/renovate-config:php-package"
]
}
115 changes: 115 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
repository:
private: false
has_issues: true
has_wiki: false
has_downloads: true
default_branch: master
allow_squash_merge: false
allow_merge_commit: true
allow_rebase_merge: false

# Labels: define labels for Issues and Pull Requests
labels:
- name: "Dependencies 📦"
color: 0025ff
description: "Pull requests that update a dependency file"
- name: "Image 🖼"
color: 00ffff
- name: "HTML 👷‍♀️"
color: ffffff
- name: "CSS 👩‍🎨"
color: b3b3b3
- name: "JavaScript 🦏"
color: ffff00
- name: "Go 🐹"
color: 00ADD8
- name: "JSON 👨‍💼"
color: 00ADD8
- name: "NEON 🦹‍♂️"
color: CE3262
- name: "MarkDown 📝"
color: 000000
- name: "YAML 🍄"
color: ff1aff
- name: "Templates 🌲"
color: 009933
- name: "Helm ☸"
color: 091C84
- name: "Tests 🧪"
color: ffe6e6
- name: "Source 🔮"
color: e6ffe6
- name: "Configuration ⚙"
color: b3b3cc
- name: "PHP 🐘"
color: 8892BF
description: "Hypertext Pre Processor"
- name: "Docker 🐳"
color: 0db7ed
description: "Pull requests that relate to Docker"
- name: "CI 🚧"
color: ffff00
- name: "Feature 🏗"
color: 66ff99
- name: "Documentation 📚"
color: 6666ff
- name: "Security 🕵️‍♀️"
color: ff0000
- name: "Hacktoberfest 🎃"
color: 152347
- name: "Bug 🐞"
color: d73a4a
description: "Something isn't working"
oldname: bug
- name: "Duplicate ♊"
color: cfd3d7
description: "This issue or pull request already exists"
oldname: duplicate
- name: "Enhancement ✨"
color: a2eeef
description: "New feature or request"
oldname: enhancement
- name: "Good First Issue"
color: 7057ff
description: "Good for newcomers"
oldname: "good first issue"
- name: "Help Wanted"
color: 008672
description: "Extra attention is needed"
oldname: "help wanted"
- name: Invalid
color: e4e669
description: "This doesn't seem right"
oldname: invalid
- name: "Question ❓"
color: d876e3
description: "Further information is requested"
oldname: question
- name: "Will not be fixed 🛑"
color: ffffff
description: "This will not be worked on"
oldname: wontfix
- name: "Sponsor Request ❤️"
color: fedbf0
description: "Issue/PR opened by sponsor"

branches:
- name: master
protection:
required_pull_request_reviews:
required_approving_review_count: 1
dismiss_stale_reviews: true
require_code_owner_reviews: true
# Required. Require status checks to pass before merging. Set to null to disable
required_status_checks:
# Required. Require branches to be up to date before merging.
strict: true
# Required. The list of status checks to require in order to merge into this branch
contexts: []
# Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable.
enforce_admins: true
# Required. Restrict who can push to this branch. Team and user restrictions are only available for organization-owned repositories. Set to null to disable.
restrictions:
apps: []
users: []
teams: []
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Continuous Integration
on:
push:
branches:
- 'main'
- 'master'
- 'refs/heads/v[0-9]+.[0-9]+.[0-9]+'
pull_request:
## This workflow needs the `pull-request` permissions to work for the package diffing
## Refs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions
permissions:
pull-requests: write
contents: read
jobs:
ci:
name: Continuous Integration
uses: WyriHaximus/github-workflows/.github/workflows/package.yaml@main
with:
env: "{\"REDIS_DSN\":\"redis://redis:6379/6\"}"
services: "{\"redis\":{\"image\":\"redis\",\"options\":\"--health-cmd \\\"redis-cli ping\\\" --health-interval 1s --health-timeout 5s --health-retries 50\"}}"
23 changes: 23 additions & 0 deletions .github/workflows/release-managment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release Management
on:
pull_request:
types:
- opened
- labeled
- unlabeled
- synchronize
- reopened
milestone:
types:
- closed
permissions:
contents: write
issues: write
pull-requests: write
jobs:
release-managment:
name: Create Release
uses: WyriHaximus/github-workflows/.github/workflows/package-release-managment.yaml@main
with:
milestone: ${{ github.event.milestone.title }}
description: ${{ github.event.milestone.title }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
var/
vendor/
etc/qa/.phpunit.result.cache
42 changes: 42 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Contributing

Pull requests are highly appreciated. Here's a quick guide.

Fork, then clone the repo:

git clone [email protected]:your-username/json.git

Set up your machine:

composer install

Make sure the tests pass:

make unit

Make sure the tests pass on all supported PHP versions (requires docker):

make dunit

Make your change. Add tests for your change. Make the tests pass:

make dunit && make unit

Before committing and submitting your pull request make sure it passes PSR2 coding style, unit tests pass and pass on all supported PHP versions:

make contrib

Push to your fork and [submit a pull request][pr].

[pr]: https://help.github.com/articles/creating-a-pull-request/

At this point you're waiting on me. I like to at least comment on pull requests
within a day or two. I may suggest some changes or improvements or alternatives.

Some things that will increase the chance that your pull request is accepted:

* Write tests.
* Follow PSR2 (travis will also check for this).
* Write a [good commit message][commit].

[commit]: http://chris.beams.io/posts/git-commit/
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Cees-Jan Kiewiet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
69 changes: 69 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# set all to phony
SHELL=bash

.PHONY: *

COMPOSER_SHOW_EXTENSION_LIST=$(shell composer show -t | grep -o "\-\-\(ext-\).\+" | sort | uniq | cut -d- -f4- | tr -d '\n' | grep . | sed '/^$$/d' | xargs | sed -e 's/ /, /g' | tr -cd '[:alnum:],' | sed 's/.$$//')
SLIM_DOCKER_IMAGE=$(shell php -r 'echo count(array_intersect(["gd", "vips"], explode(",", "${COMPOSER_SHOW_EXTENSION_LIST}"))) > 0 ? "" : "-slim";')
COMPOSER_CACHE_DIR=$(shell composer config --global cache-dir -q || echo ${HOME}/.composer-php/cache)
PHP_VERSION:=$(shell docker run --rm -v "`pwd`:`pwd`" jess/jq jq -r -c '.config.platform.php' "`pwd`/composer.json" | php -r "echo str_replace('|', '.', explode('.', implode('|', explode('.', stream_get_contents(STDIN), 2)), 2)[0]);")
COMPOSER_CONTAINER_CACHE_DIR=$(shell docker run --rm -it "ghcr.io/wyrihaximusnet/php:${PHP_VERSION}-nts-alpine${SLIM_DOCKER_IMAGE}-dev" composer config --global cache-dir -q || echo ${HOME}/.composer-php/cache)

ifneq ("$(wildcard /.you-are-in-a-wyrihaximus.net-php-docker-image)","")
IN_DOCKER=TRUE
else
IN_DOCKER=FALSE
endif

ifeq ("$(IN_DOCKER)","TRUE")
DOCKER_RUN:=
else
DOCKER_RUN:=docker run --rm -it \
-v "`pwd`:`pwd`" \
-v "${COMPOSER_CACHE_DIR}:${COMPOSER_CONTAINER_CACHE_DIR}" \
-w "`pwd`" \
"ghcr.io/wyrihaximusnet/php:${PHP_VERSION}-nts-alpine${SLIM_DOCKER_IMAGE}-dev"
endif

ifneq (,$(findstring icrosoft,$(shell cat /proc/version)))
THREADS=1
else
THREADS=$(shell nproc)
endif

all: ## Runs everything ###
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | grep -v "###" | awk 'BEGIN {FS = ":.*?## "}; {printf "%s\n", $$1}' | xargs --open-tty $(MAKE)

syntax-php: ## Lint PHP syntax
$(DOCKER_RUN) vendor/bin/parallel-lint --exclude vendor .

cs-fix: ## Fix any automatically fixable code style issues
$(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(THREADS) --cache=./var/.phpcs.cache.json --standard=./etc/qa/phpcs.xml || $(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(THREADS) --cache=./var/.phpcs.cache.json --standard=./etc/qa/phpcs.xml || $(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(THREADS) --cache=./var/.phpcs.cache.json --standard=./etc/qa/phpcs.xml -vvvv

cs: ## Check the code for code style issues
$(DOCKER_RUN) vendor/bin/phpcs --parallel=$(THREADS) --cache=./var/.phpcs.cache.json --standard=./etc/qa/phpcs.xml

stan: ## Run static analysis (PHPStan)
$(DOCKER_RUN) vendor/bin/phpstan analyse src --ansi -c ./etc/qa/phpstan.neon

psalm: ## Run static analysis (Psalm)
$(DOCKER_RUN) vendor/bin/psalm --threads=$(THREADS) --shepherd --stats --config=./etc/qa/psalm.xml

composer-install: ## Install dependencies
$(DOCKER_RUN) composer install --no-progress --ansi --no-interaction --prefer-dist -o

backward-compatibility-check: ## Check code for backwards incompatible changes
$(MAKE) backward-compatibility-check-raw || true

backward-compatibility-check-raw: ## Check code for backwards incompatible changes, doesn't ignore the failure ###
$(DOCKER_RUN) vendor/bin/roave-backward-compatibility-check

shell: ## Provides Shell access in the expected environment ###
$(DOCKER_RUN) ash

task-list-ci: ## CI: Generate a JSON array of jobs to run, matches the commands run when running `make (|all)` ###
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | grep -v "###" | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "%s\n", $$1}' | jq --raw-input --slurp -c 'split("\n")| .[0:-1]'

help: ## Show this help ###
@printf "\033[33mUsage:\033[0m\n make [target]\n\n\033[33mTargets:\033[0m\n"
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[32m%-32s\033[0m %s\n", $$1, $$2}' | tr -d '#'
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
# queue-contracts
# Contracts for the queue manager

[![Continuous Integration](https://github.com/MammatusPHP/queue-contracts/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/MammatusPHP/queue-contracts/actions/workflows/ci.yml)
[![Latest Stable Version](https://poser.pugx.org/mammatus/queue-contracts/v/stable.png)](https://packagist.org/packages/mammatus/queue-contracts)
[![Total Downloads](https://poser.pugx.org/mammatus/queue-contracts/downloads.png)](https://packagist.org/packages/mammatus/queue-contracts)
[![License](https://poser.pugx.org/mammatus/queue-contracts/license.png)](https://packagist.org/packages/mammatus/queue-contracts)

# Installation

To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.

```
composer require mammatus/queue-contracts
```

# Usage

See the [queue](https://github.com/MammatusPHP/queue) package on usage.

# License

The MIT License (MIT)

Copyright (c) 2024 Cees-Jan Kiewiet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

37 changes: 37 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "mammatus/queue-contracts",
"description": "\ud83d\udcdc Queue contracts",
"license": "MIT",
"require": {
"php": "^8.2"
},
"require-dev": {
"wyrihaximus/test-utilities": "^5.6"
},
"autoload": {
"psr-4": {
"Mammatus\\Queue\\Contracts\\": "src/"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"ergebnis/composer-normalize": true,
"infection/extension-installer": true
},
"platform": {
"php": "8.2.13"
},
"sort-packages": true
},
"scripts": {
"post-install-cmd": [
"composer normalize",
"composer update --lock --no-scripts"
],
"post-update-cmd": [
"composer normalize",
"composer update --lock --no-scripts"
]
}
}
10,261 changes: 10,261 additions & 0 deletions composer.lock

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions etc/qa/composer-require-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"symbol-whitelist" : [
"null", "true", "false",
"static", "self", "parent",
"array", "string", "int", "float", "bool", "iterable", "callable", "void", "object",
"Safe\\date", "WyriHaximus\\Constants\\Boolean\\FALSE_", "WyriHaximus\\Constants\\Boolean\\TRUE_",
"WyriHaximus\\Constants\\Numeric\\ONE_FLOAT"
],
"php-core-extensions" : [
"Core",
"date",
"pcre",
"Phar",
"Reflection",
"SPL",
"standard"
],
"scan-files" : []
}
12 changes: 12 additions & 0 deletions etc/qa/phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<ruleset>
<arg name="basepath" value="../../" />
<arg name="extensions" value="php" /> <!-- which extensions to look for -->
<arg name="colors" />
<arg name="cache" value=".phpcs.cache" /> <!-- cache the results and don't commit them -->
<arg value="np" /> <!-- n = ignore warnings, p = show progress -->

<file>../../src</file>

<rule ref="WyriHaximus-OSS" />
</ruleset>
9 changes: 9 additions & 0 deletions etc/qa/phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
parameters:
level: max
ergebnis:
noExtends:
classesAllowedToBeExtended:
- WyriHaximus\React\Mutex\AbstractMutexTestCase

includes:
- ../../vendor/wyrihaximus/test-utilities/rules.neon
13 changes: 13 additions & 0 deletions etc/qa/phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="../../vendor/autoload.php" colors="true">
<testsuites>
<testsuite name="Test Suite">
<directory>../../tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../../src/</directory>
</whitelist>
</filter>
</phpunit>
53 changes: 53 additions & 0 deletions etc/qa/psalm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0"?>
<psalm
totallyTyped="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config ../../vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="../../src"/>
<ignoreFiles>
<directory name="../../vendor"/>
</ignoreFiles>
</projectFiles>

<issueHandlers>

<LessSpecificReturnType errorLevel="error"/>

<!-- level 3 issues - slightly lazy code writing, but provably low false-negatives -->

<DeprecatedMethod errorLevel="error"/>
<DeprecatedProperty errorLevel="error"/>
<DeprecatedClass errorLevel="error"/>
<DeprecatedConstant errorLevel="error"/>
<DeprecatedInterface errorLevel="error"/>
<DeprecatedTrait errorLevel="error"/>

<InternalMethod errorLevel="error"/>
<InternalProperty errorLevel="error"/>
<InternalClass errorLevel="error"/>

<MissingClosureReturnType errorLevel="error"/>
<MissingReturnType errorLevel="error"/>
<MissingPropertyType errorLevel="error"/>
<InvalidDocblock errorLevel="error"/>

<PropertyNotSetInConstructor errorLevel="error"/>
<MissingConstructor errorLevel="error"/>
<MissingClosureParamType errorLevel="error"/>
<MissingParamType errorLevel="error"/>

<RedundantCondition errorLevel="error"/>

<DocblockTypeContradiction errorLevel="error"/>
<RedundantConditionGivenDocblockType errorLevel="error"/>

<UnresolvableInclude errorLevel="error"/>

<RawObjectIteration errorLevel="error"/>

<InvalidStringClass errorLevel="error"/>
</issueHandlers>
<plugins><pluginClass class="Psalm\PhpUnitPlugin\Plugin"/></plugins></psalm>
52 changes: 52 additions & 0 deletions infection.json.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"timeout": 300,
"source": {
"directories": [
"src"
]
},
"logs": {
"text": "./var/infection.log",
"summary": "./var/infection-summary.log",
"json": "./var/infection.json",
"perMutator": "./var/infection-per-mutator.md"
},
"mutators": {
"@default": true,
"ArrayItemRemoval": {
"ignore": [
"WyriHaximus\\React\\Mutex\\AbstractMutexTestCase::thatYouCantRequiredTheSameLockTwice"
]
},
"InstanceOf_": {
"ignore": [
"WyriHaximus\\React\\Mutex\\Memory::release"
]
},
"LogicalNot": {
"ignore": [
"WyriHaximus\\React\\Mutex\\Memory::release"
]
},
"LogicalOr": {
"ignore": [
"WyriHaximus\\React\\Mutex\\Memory::release"
]
},
"MethodCallRemoval": {
"ignore": [
"WyriHaximus\\React\\Mutex\\AbstractMutexTestCase::thatYouCantRequiredTheSameLockTwice",
"WyriHaximus\\React\\Mutex\\AbstractMutexTestCase::cannotReleaseLockWithWrongRng"
]
},
"PublicVisibility": {
"ignore": [
"WyriHaximus\\React\\Mutex\\AbstractMutexTestCase::thatYouCantRequiredTheSameLockTwice",
"WyriHaximus\\React\\Mutex\\AbstractMutexTestCase::cannotReleaseLockWithWrongRng"
]
}
},
"phpUnit": {
"configDir": "./etc/qa/"
}
}
10 changes: 10 additions & 0 deletions src/Action.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

declare(strict_types=1);

namespace Mammatus\Queue\Contracts;

interface Worker
{
public function perform(): void;
}