Skip to content

Commit

Permalink
Initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
Articus committed Apr 16, 2023
0 parents commit bdb8583
Show file tree
Hide file tree
Showing 30 changed files with 2,278 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coverage_clover:
- spec_output/kahlan.coverage.xml
json_path: spec_output/coveralls-upload.json
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/.github export-ignore
/spec export-ignore
.coveralls.yml export-ignore
.gitattributes export-ignore
.gitignore export-ignore
composer.lock export-ignore
composer.lock.* export-ignore
composer.phar export-ignore
kahlan-config.php export-ignore
40 changes: 40 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Run tests
on:
- push
- pull_request
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: '7.4'
has_unique_dependencies: true
- php: '8.0'
has_unique_dependencies: true
- php: '8.1'
- php: '8.2'
upload_coverage: true
container: ghcr.io/articus/phpdbg-coveralls:${{ matrix.php }}_2.5.3_2022-12-10
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Use unique composer.lock
if: matrix.has_unique_dependencies
run: cp ./composer.lock.${{ matrix.php }} ./composer.lock

- name: Install dependencies via Composer
run: php ./composer.phar install --no-interaction --no-progress --prefer-dist --classmap-authoritative

- name: Run Kahlan tests
run: |
mkdir -p ./spec_output
phpdbg -qrr ./vendor/kahlan/kahlan/bin/kahlan
- name: Upload coverage to coveralls.io
if: matrix.upload_coverage
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls -v
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.idea/
/spec_output/
/vendor/
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) 2023 Articus

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.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Plugin Manager

This library provides unified interface for opinionated service building using different service containers.
It is meant to be a replacement for [plugin manager functionality](https://docs.laminas.dev/laminas-servicemanager/plugin-managers/) from [`lamanas/laminas-servicemanager`](https://packagist.org/packages/laminas/laminas-servicemanager) if you have to use another service container.

## Enjoy!
I really hope that this library will be useful for someone except me.
It is used for production purposes but it lacks lots of refinement, especially in terms of tests and documentation.

If you have any suggestions, advices, questions or fixes feel free to submit [issue](https://github.com/Articus/PluginManager/issues/new) or [pull request](https://github.com/Articus/PluginManager/compare).
31 changes: 31 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "articus/plugin-manager",
"type": "library",
"description": "Library that provides unified interface for opinionated service building using different service containers",
"license": "MIT",
"authors": [
{
"name": "Arthur Mogliev"
}
],
"require": {
"php": "^7.4|^8.0",
"psr/container": "^1.0|^2.0"
},
"require-dev": {
"kahlan/kahlan": "^5.2",
"mockery/mockery": "^1.3",
"laminas/laminas-servicemanager": "^3.17",
"symfony/polyfill-mbstring": "^1.27"
},
"autoload": {
"psr-4": {
"": "src/"
}
},
"autoload-dev": {
"psr-4": {
"spec\\": "spec/"
}
}
}
Loading

0 comments on commit bdb8583

Please sign in to comment.