Download the PHP package wubbleyou/laravel-access-control-checker without Composer

On this page you can find all versions of the php package wubbleyou/laravel-access-control-checker. 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 laravel-access-control-checker

Wubbleyou Boundaries

Boundaries is a DX tool used to generate unit tests to automatically test your routes against developer-determined rules.

Two rules are provided with out of the box with Boundaries, a MiddlewareRule and a PolicyRule

Installation

Install the package normally via Composer

Usage

To get started you'll need to run the following command to generate the base test file:

Configuration

Now you've got your test generated and saved in tests\Feature\Boundaries\BoundaryTest.php you might notice a trait has been placed in app\Traits\BoundaryRouteTrait.php which contains 2 methods, please read the additional information at the bottom to understand why you need to supply these.

getWhitelist()

The getWhitelist() method allows you to return an array of all the routes you want to be ignored by Wubbleyou\Boundaries.

getRoutes()

The getRoutes() method allows you to return an array to specify the exact assertions that should be ran on each route, here's an example:

MiddlewareRule

The middleware rule tests your route against a certain set of middleware, if it doesn't match all of these middleware the test will fail.

MiddlewareRule also has an optional second parameter for $strict (default: false). If strict is enabled the supplied array of expected middleware must match exactly to the middleware present on the route. If strict is not enabled the middleware present on the route must contain all the expected middleware but can also contain other middleware we're not testing for.

PolicyRule

The policy rule performs a test against a specific route to test the HTTP status code. You supply it with:

And it will test that route and return an error if the response code doesn't match the one you've supplied.

Custom BoundaryRules

You can also generate custom BoundaryRules using the following command:

An example BoundaryRule would look like:

Closures

You can also supply a Closure as a BoundaryRule instead:

Additional Information

Boundaries testing will fail if every route is not accounted for in either getWhitelist() or getRoutes(), if you want to generate a list of routes you that aren't in either of those run the following command:

Please note this command requires you to have generated the BoundaryRouteTrait to function, if you need to generate just the trait without any of the tests you can run:


All versions of laravel-access-control-checker with dependencies

PHP Build Version
Package Version
No informations.
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 wubbleyou/laravel-access-control-checker contains the following files

Loading the files please wait ....