-
Notifications
You must be signed in to change notification settings - Fork 33
Version 2.0.x support of Laravel Doctrine ORM ^3.1 and Laravel 12 #73
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b96a3e8
Version 2.0.x support of Laravel Doctrine ORM ^3.1 and Laravel 12
R3VoLuT1OneR ef6a9b1
docs(fixes): documentation update
R3VoLuT1OneR 9c0c95b
chore(phpcs): added phpcs to workbench and refactored mapping namespace
R3VoLuT1OneR 9fb64d7
refactor: use same approach for config as ORM
R3VoLuT1OneR 9392911
refactor: improve mappings classes readability
R3VoLuT1OneR 98a1a87
fix(docs): CI badge in readme
R3VoLuT1OneR 2a78a9b
refactor: small fixes
R3VoLuT1OneR 0575128
refacotr: use Laravel approach With prefix for the traits
R3VoLuT1OneR adb2027
feat(stubs): publish entities from stubs
R3VoLuT1OneR File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
==================== | ||
|
||
[](https://packagist.org/packages/laravel-doctrine/acl) | ||
[](https://github.com/laravel-doctrine/acl/actions?query=workflow%3ACI+branch%3A1.x) | ||
[](https://packagist.org/packages/laravel-doctrine/acl) | ||
[](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* | ||
[](https://github.com/ScholarshipOwl/laravel-doctrine-acl/actions) | ||
[](https://codecov.io/gh/laravel-doctrine/acl) | ||
[](https://img.shields.io/badge/PHPStan-level%201-brightgreen.svg) | ||
[](https://laravel-doctrine-acl-official.readthedocs.io/en/latest/) | ||
[](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. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,97 @@ | ||
{ | ||
"name": "laravel-doctrine/acl", | ||
"type": "library", | ||
"description": "Doctrine ACL for Doctrine 2 and Laravel", | ||
"license": "MIT", | ||
"keywords": [ | ||
"doctrine", | ||
"laravel", | ||
"orm", | ||
"data mapper", | ||
"database", | ||
"acl", | ||
"abilities", | ||
"policies", | ||
"permissions", | ||
"roles", | ||
"organisations" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "Patrick Brouwers", | ||
"email": "[email protected]" | ||
"name": "laravel-doctrine/acl", | ||
"type": "library", | ||
"description": "Doctrine ACL for Doctrine 2 and Laravel", | ||
R3VoLuT1OneR marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"license": "MIT", | ||
"keywords": [ | ||
"doctrine", | ||
"laravel", | ||
"orm", | ||
"data mapper", | ||
"database", | ||
"acl", | ||
"abilities", | ||
"policies", | ||
"permissions", | ||
"roles", | ||
"organisations" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "Patrick Brouwers", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Pavlo Zhytomyrskyi", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": "^8.2", | ||
"illuminate/auth": "^11.0|^12.0", | ||
"illuminate/config": "^11.0|^12.0", | ||
"illuminate/contracts": "^11.0|^12.0", | ||
"illuminate/support": "^11.0|^12.0", | ||
"laravel-doctrine/orm": "^3.1" | ||
}, | ||
"require-dev": { | ||
"mockery/mockery": "^1.3.1", | ||
"phpunit/phpunit": "^11.5", | ||
"laravel/framework": "^11.0|^12.0", | ||
"orchestra/testbench": "^10.2", | ||
"laravel-doctrine/migrations": "^3.4", | ||
"doctrine/coding-standard": "^12.0", | ||
"php-parallel-lint/php-parallel-lint": "^1.4", | ||
"phpstan/phpstan": "^2.1", | ||
"phpstan/phpstan-deprecation-rules": "^2.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"LaravelDoctrine\\ACL\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Tests\\": "tests", | ||
"Workbench\\App\\": "workbench/app/", | ||
"Workbench\\Database\\Factories\\": "workbench/database/factories/", | ||
"Workbench\\Database\\Seeders\\": "workbench/database/seeders/" | ||
} | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"LaravelDoctrine\\ACL\\AclServiceProvider" | ||
] | ||
} | ||
}, | ||
"config": { | ||
"allow-plugins": { | ||
"dealerdirect/phpcodesniffer-composer-installer": true | ||
} | ||
}, | ||
"scripts": { | ||
"test": [ | ||
"vendor/bin/parallel-lint src tests", | ||
"vendor/bin/phpcs", | ||
"vendor/bin/phpunit", | ||
"vendor/bin/phpstan analyze src --level 1" | ||
], | ||
"coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-html=coverage", | ||
"post-autoload-dump": [ | ||
"@clear", | ||
"@prepare" | ||
], | ||
"clear": "@php vendor/bin/testbench package:purge-skeleton --ansi", | ||
"prepare": "@php vendor/bin/testbench package:discover --ansi", | ||
"build": "@php vendor/bin/testbench workbench:build --ansi", | ||
"serve": [ | ||
"Composer\\Config::disableProcessTimeout", | ||
"@build", | ||
"@php vendor/bin/testbench serve --ansi" | ||
], | ||
"lint": [ | ||
"@php vendor/bin/phpstan analyse --verbose --ansi" | ||
] | ||
} | ||
], | ||
"require": { | ||
"php": "^7.2.5|^8.0", | ||
"illuminate/auth": "^6.0|^7.0|^8.0|^9.0|^10.0", | ||
"illuminate/config": "^6.0|^7.0|^8.0|^9.0|^10.0", | ||
"illuminate/contracts": "^6.0|^7.0|^8.0|^9.0|^10.0", | ||
"illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0", | ||
"laravel-doctrine/orm": "^1|^2.0", | ||
"doctrine/annotations": "^1.10|^2.0" | ||
}, | ||
"require-dev": { | ||
"mockery/mockery": "^1.3.1", | ||
"phpunit/phpunit": "^8.5" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"LaravelDoctrine\\ACL\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"classmap": [ | ||
"tests" | ||
] | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"LaravelDoctrine\\ACL\\AclServiceProvider" | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.