Skip to content

Commit

Permalink
docs: add dev instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
uwla committed Aug 12, 2024
1 parent 893646e commit 7168a83
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 9 deletions.
47 changes: 47 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# DEVELOPMENT

## Installing

1. Clone the repository:
```shell
git clone https://github.com/uwla/lacl
```
2. Install dependencies:
```shell
composer install
```
3. Refresh composer:
```shell
composer dump-autoload
```

Or, in a single line:

```shell
git clone https://github.com/uwla/lacl && cd lacl && composer install && composer dump-autoload
```

## Project structure

- `database/migration/`: database migration files
- `src/`: source files
- `src/Contracts`: interfaces used in the package
- `src/Models`: database eloquent models
- `src/Traits`: traits provided by the package
- `src/AclServiceProvider.php`: this Service Provider publishes migration files
- `tests`: test files
- `tests/app`: sample `app` for mocking tests
- `tests/Feature`: integration tests
-
## Testing

To run the the tests you need `pdo_sqlite` extension installed and enabled in `php.ini`.

* Run all tests:
```shell
composer test
```
* Run a single test (for example, `HasPermissionTest`:
```shell
composer test ./tests/Feature/HasPermissionTest.php
```
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -877,15 +877,15 @@ protected static function Role()
}
```

## Contributions
## CONTRIBUTIONS

Contributions are welcome. Fork the repository, make your changes, then make a
pull request.
pull request. Check [development](DEVELOPMENT.md) for all development-related instructions.

## HELP

If you any need help, feel free to open an issue on this package's github repo.

## LICENSE

MIT.
MIT.
12 changes: 6 additions & 6 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
</coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<testsuites>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
Expand All @@ -14,4 +9,9 @@
<env name="DB_CONNECTION" value="testing"/>
<env name="APP_KEY" value="base64:2fA+KtvkKl+Fuz4Qp/A75G2RTiWVA/ZoKZvp6fiiM10="/>
</php>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
</phpunit>

0 comments on commit 7168a83

Please sign in to comment.