Skip to content

Support of Laravel 12 and Laravel Doctrine ORM 3.1 #67

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

Closed
wants to merge 14 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
39 changes: 0 additions & 39 deletions .github/workflows/ci.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Coding Standards"

on:
pull_request:
branches:
- "*.x"
- "main"
push:
branches:
- "*.x"
- "main"

jobs:
coding-standards:
name: "Coding Standards"
uses: "doctrine/.github/.github/workflows/[email protected]"
with:
php-version: '8.2'
composer-options: '--prefer-dist --ignore-platform-req=php'

61 changes: 61 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: "Continuous Integration"

on:
pull_request:
branches:
- "*.x"
- "main"
push:
branches:
- "*.x"
- "main"

jobs:
phpunit:
name: "PHPUnit"
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-version:
- "8.2"
- "8.3"
- "8.4"
dependencies:
- "highest"
- "lowest"
optional-dependencies:
- true
- false

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 2

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
coverage: "pcov"
ini-values: "zend.assertions=1"
extensions: "pdo_mysql"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--prefer-dist"

- name: "Show Composer packages"
run: "composer show"

- name: "Run PHPUnit"
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"

- name: "Upload coverage"
uses: "codecov/codecov-action@v5"
with:
token: ${{ secrets.CODECOV_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "Static Analysis"

on:
pull_request:
push:

jobs:
static-analysis-phpstan:
name: "Static Analysis with PHPStan"
runs-on: "ubuntu-22.04"

strategy:
matrix:
php-version:
- "8.2"
- "8.3"
- "8.4"

steps:
- name: "Checkout code"
uses: "actions/checkout@v3"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
extensions: "pdo_sqlite"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Run a static analysis with phpstan/phpstan"
run: "vendor/bin/phpstan analyse src --level 1"
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
/coverage
/vendor
composer.phar
composer.lock
.DS_Store
.php_cs.cache
.phpcs-cache
.phpunit.cache
.phpunit.result.cache


.idea
.vscode

/tests/Stubs/storage/framework/views/*
!/tests/Stubs/storage/framework/views/.gitkeep
/tests/Stubs/storage/doctrine.generated.php
laravel-doctrine-orm.iml
/workbench/bootstrap/cache/*
!/workbench/bootstrap/cache/.gitkeep
/workbench/storage/logs/*
/workbench/vendor
48 changes: 48 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Contributing to Laravel Doctrine ACL

First off, thanks for taking the time to contribute! 🎉

The following is a set of guidelines for contributing to Laravel Doctrine ACL. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

## Code of Conduct

This project and everyone participating in it is governed by the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/). By participating, you are expected to uphold this code. Please report unacceptable behavior to [[email protected]](mailto:[email protected]).

## How Can I Contribute?

### Reporting Bugs
- Ensure the bug was not already reported by searching [existing issues](https://github.com/sowl/laravel-doctrine-acl/issues).
- If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/sowl/laravel-doctrine-acl/issues/new/choose). Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.

### Suggesting Enhancements
- Use the [discussions](https://github.com/sowl/laravel-doctrine-acl/discussions) or open an issue to suggest an idea.
- Explain in detail how it would work, why it is needed, and any alternatives considered.

### Pull Requests
- Fork the repository and create your branch from `1.x` (or the latest active branch).
- Add tests for new features or bug fixes.
- Ensure your code passes all tests (`composer test`) and follows the existing code style (PSR-12).
- Keep pull requests focused and describe the motivation and context.
- Reference any related issues in your PR description (e.g., `Closes #123`).

### Style Guide
- Follow [PSR-12](https://www.php-fig.org/psr/psr-12/) coding standards.
- Use descriptive commit messages.
- Document public methods and classes using PHPDoc.

## Running Tests

```bash
composer test
```

## Community
- Be respectful and inclusive.
- For questions, use [GitHub Discussions](https://github.com/sowl/laravel-doctrine-acl/discussions) or open an issue.

## License
By contributing, you agree that your contributions will be licensed under the MIT License.

---

Thanks for helping make this project better!
56 changes: 38 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,44 @@
# Laravel Doctrine ACL
<p align="center">
<img src="https://placehold.co/10x10/337ab7/337ab7.png" width="100%" height="15px">
<img width="450px" src="https://github.com/laravel-doctrine/acl/blob/2.0.x/docs/banner.png"/>
</p>

<img src="https://cloud.githubusercontent.com/assets/7728097/12727113/9e4fbc48-c91b-11e5-9987-e263eee9db12.jpg"/>
Laravel Doctrine ACL
====================

[![GitHub release](https://img.shields.io/github/release/laravel-doctrine/acl.svg?style=flat-square)](https://packagist.org/packages/laravel-doctrine/acl)
[![Github actions](https://github.com/laravel-doctrine/acl/workflows/CI/badge.svg?branch=1.x)](https://github.com/laravel-doctrine/acl/actions?query=workflow%3ACI+branch%3A1.x)
[![Packagist](https://img.shields.io/packagist/dm/laravel-doctrine/acl.svg?style=flat-square)](https://packagist.org/packages/laravel-doctrine/acl)
[![Packagist](https://img.shields.io/packagist/dt/laravel-doctrine/acl.svg?style=flat-square)](https://packagist.org/packages/laravel-doctrine/acl)
Laravel Doctrine ACL is a package that provides RBAC (Role-Based Access Control) functionality for Laravel applications using Doctrine. It allows you to manage roles, permissions, and organisations, and seamlessly integrates with Laravel's Authorization system.

*ACL functionality for Laravel powered by Doctrine*
[![Build Status](https://github.com/ScholarshipOwl/laravel-doctrine-acl/actions/workflows/php.yml/badge.svg)](https://github.com/ScholarshipOwl/laravel-doctrine-acl/actions)
[![Code Coverage](https://codecov.io/gh/laravel-doctrine/acl/graph/badge.svg?token=3CpQzDXOWX)](https://codecov.io/gh/laravel-doctrine/acl)
[![PHPStan](https://img.shields.io/badge/PHPStan-level%201-brightgreen.svg)](https://img.shields.io/badge/PHPStan-level%201-brightgreen.svg)
[![Documentation](https://readthedocs.org/projects/laravel-doctrine-acl-official/badge/?version=latest)](https://laravel-doctrine-acl-official.readthedocs.io/en/latest/)
[![Packagist Downloads](https://img.shields.io/packagist/dd/laravel-doctrine/acl)](https://packagist.org/packages/laravel-doctrine/acl)

* Roles
* Permissions
* Organisations
* Seamless integration with Laravel's Authorization system
Installation
------------

## Versions
Via composer:

Version | Supported Laravel Versions
:---------|:----------
~1.1.0 | 6.x
~1.2.0 | 7.x
~1.3.0 | 8.x
^1.4.0 | 6.x, 7.x, 8.x, 9.x, 10.x
```bash
composer require laravel-doctrine/acl
```

The ServiceProvider and Facades are autodiscovered.

Publish the configuration:

```bash
php artisan vendor:publish --tag="config" --provider="LaravelDoctrine\ACL\AclServiceProvider"
```

Documentation
-------------

Full documentation at https://laravel-doctrine-acl.readthedocs.io/en/latest/index.html
or in the docs directory.

Versions
--------

* Version 2 supports DBAL ^4.0, ORM ^3.0, and PHP 8.2.
* Version 1 supports Laravel 6 - 11, DBAL ^2.0, ORM ^2.0, and PHP ^5.5 - ^8.0.
Loading
Loading