Download the PHP package modularize-rbac/core without Composer

On this page you can find all versions of the php package modularize-rbac/core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package core

modularize-rbac/core

Framework-agnostic core for modular RBAC: modules + roles + permissions + i18n translations in pure PHP 8.2+.

CI Packagist

What it is

access-core is the framework-agnostic heart of the modularize-rbac/* family — pure PHP with zero framework dependency. It contains:

Drop it into any PHP project, implement the ports with whatever ORM / HTTP / event bus you use, and the use-cases run.

Why a separate package

A clean port boundary between domain logic and Laravel-specific infrastructure:

Install

PHP 8.2+. No other runtime dependency.

Existing adapters

Quick example (wiring use-cases by hand)

In real apps, replace the in-memory doubles with adapters that talk to your DB / event bus / authz system.

Architecture

Ports you need to implement

For a host to use this package, it must provide implementations of these interfaces (defined in src/Application/Ports/):

Port What it does
ModuleRepository Persist/lookup Module aggregates
RoleRepository Persist/lookup Role aggregates
PermissionRepository Persist/lookup Permission aggregates
LanguageRepository Persist/lookup Language aggregates
TranslationRepository Persist/lookup Translation rows by polymorphic owner
RoleModulePermissionRepository Persist/lookup role-module binding rows
UnitOfWork Wrap a closure in a transaction
Clock Read "now" (DateTimeImmutable)
IdGenerator Mint fresh UUIDs
LocaleResolver Current locale + fallback locale
Authorizer Resolve actor id; check abilities; throw AuthorizationFailed
DomainEventDispatcher Forward domain events to the host's bus
ExternalPermissionGateway Optional — replicate grants/revokes into an external authz store (e.g. Spatie). A NullExternalPermissionGateway is a valid no-op.

The Laravel adapter implements all of these against Eloquent + Laravel's container.

Domain services

These pure-function services hold the non-trivial business logic; they're directly callable from any use-case or host code:

Test plan

License

MIT — see LICENSE.


All versions of core with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package modularize-rbac/core contains the following files

Loading the files please wait ...