Skip to content

Commit

Permalink
Merge pull request #43 from visto9259/4.x-dev-GH-actions
Browse files Browse the repository at this point in the history
Added GitHub actions. added PHP 8.1 and 8.2, dropped PHP 7 and 8.0
  • Loading branch information
visto9259 authored Feb 15, 2024
2 parents 1b40c32 + 83561aa commit f5560b9
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .cloveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ coverage_clover: build/logs/clover.xml
# Same folder here
json_path: build/logs/coveralls-upload.json
# Don't touch that
service_name: travis-ci
# service_name: travis-ci
61 changes: 61 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build

on:
push:
pull_request:

env:
COMPOSER_ARGS: '--no-progress'

jobs:
build:
strategy:
matrix:
php_version: ['8.1', '8.2']
deps: ['--prefer-lowest --prefer-dist', '']
include:
- code-coverage: 'yes'
php_version: '8.2'
deps: ''
runs-on: ubuntu-latest

steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{matrix.php_version}}

- name: Show PHP version
run: php -v

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

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

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{matrix.php_version}}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php--${{matrix.php_version}}-
- name: Install/update dependencies
run: composer update ${{matrix.deps}} $COMPOSER_ARGS

- name: Run PHPUnit test suite
if: ${{ matrix.code-coverage != 'yes' }}
run: composer run-script test

- name: Run PHPUnit test suite with coverage
if: ${{ matrix.code-coverage == 'yes' }}
run: composer run-script test-coverage

- name: Upload coverage results to Coverall
if: ${{ matrix.code-coverage == 'yes' }}
uses: coverallsapp/github-action@v2


File renamed without changes.
28 changes: 8 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,18 @@
[![Version](https://poser.pugx.org/lm-commons/lmc-rbac-mvc/version)](//packagist.org/packages/lm-commons/lmc-rbac-mvc)
[![Total Downloads](https://poser.pugx.org/lm-commons/lmc-rbac-mvc/downloads)](//packagist.org/packages/lm-commons/lmc-rbac-mvc)
[![License](https://poser.pugx.org/lm-commons/lmc-rbac-mvc/license)](//packagist.org/packages/lm-commons/lmc-rbac-mvc)
[![Master Branch Build Status](https://travis-ci.com/LM-Commons/LmcRbacMvc.svg?branch=master)](http://travis-ci.com/LM-Commons/LmcRbac)
[![Gitter](https://badges.gitter.im/LM-Commons/community.svg)](https://gitter.im/LM-Commons/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Build](https://github.com/lm-commons/LmcRbacMvc/actions/workflows/build_test.yml/badge.svg)](https://github.com/lm-commons/LmcRbacMvc/actions/workflows/build_test.yml)
<!-- ![Gitter](https://badges.gitter.im/LM-Commons/community.svg)](https://gitter.im/LM-Commons/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -->
[![Coverage Status](https://coveralls.io/repos/github/LM-Commons/LmcRbacMvc/badge.svg?branch=master)](https://coveralls.io/github/LM-Commons/LmcRbacMvc?branch=master)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/LM-Commons/LmcRbacMvc/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/LM-Commons/LmcRbacMvc/?branch=master)

Role-based access control module to provide additional features on top of Zend\Permissions\Rbac

Based on [ZF-Commons/zfc-rbac](https://github.com/ZF-Commons/zfc-rbac) v2.6.x. If you are looking for the Laminas version of zfc-rbac v3, please use [LM-Commons/LmcRbac](https://github.com/LM-Commons/LmcRbac).

### Important Notes:

This version has breaking changes with respect to ZfcRbac v2. See the [Upgrade](#upgrade) section for details.
<!-- [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/LM-Commons/LmcRbacMvc/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/LM-Commons/LmcRbacMvc/?branch=master) -->

Role-based access control module to provide additional features on top of Laminas\Permissions\Rbac

## Requirements

- PHP 7.2 or higher
- [Zf-fr/Rbac component v1](https://github.com/zf-fr/rbac): this is actually a prototype for the ZF3 Rbac component.
- [Laminas Components 2.x | 3.x or higher](http://www.github.com/laminas)
- PHP 8.1 or higher
- [Laminas Components 3.x or higher](http://www.github.com/laminas)

>

## Optional

Expand All @@ -33,7 +24,7 @@ the Laminas Developer toolbar.

## Upgrade

LmcRbac introduces breaking changes from zfcrbac v2:
LmcRbacMvc introduces breaking changes from zfcrbac v2:
- The namespace has been changed from `ZfcRbac` to `LmcRbacMvc`.
- The key `zfc_rbac` in autoload and module config files has been replaced
by the `lmc_rbac` key.
Expand All @@ -48,10 +39,8 @@ LmcRbacMvc only officially supports installation through Composer. For Composer
Install the module:

```sh
$ php composer.phar require lm-commons/lmc-rbac-mvc:^3.0
$ php composer.phar require lm-commons/lmc-rbac-mvc
```
This will install a Laminas MVC equivalent of zfc-rbac 2.6.3.

Enable the module by adding `LmcRbacMvc` key to your `application.config.php` or `modules.config.php` file. Customize the module by copy-pasting
the `lmc_rbac.global.php.dist` file to your `config/autoload` folder.

Expand All @@ -65,4 +54,3 @@ of LmcRbac.
## Support

- File issues at https://github.com/LM-Commons/LmcRbacMvc/issues.
- Ask questions in the [LM-Commons gitter](https://gitter.im/LM-Commons/community) chat.
9 changes: 7 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@
{
"name": "Jean-Marie Leroux",
"email": "[email protected]"
},
{
"name": "Eric Richer",
"email": "[email protected]"
}
],
"require": {
"php": "^7.4 || ^8.0",
"php": "^8.1.0 | ^8.2.0",
"laminas/laminas-config": "^3.1",
"laminas/laminas-eventmanager": "^3.0",
"laminas/laminas-mvc": "^3.0",
Expand All @@ -47,7 +51,8 @@
"squizlabs/php_codesniffer": "^3.5.5",
"php-coveralls/php-coveralls": "^2.2",
"phpspec/prophecy-phpunit": "^2.0",
"doctrine/doctrine-orm-module": "^4.1"
"doctrine/doctrine-orm-module": "^5.3",
"ext-mbstring": "*"
},
"suggest": {
"laminas/laminas-developer-tools": "if you want to show information about the roles",
Expand Down

0 comments on commit f5560b9

Please sign in to comment.