Skip to content

Commit

Permalink
reformat codes
Browse files Browse the repository at this point in the history
  • Loading branch information
voltan committed Mar 20, 2022
1 parent 5abb8e4 commit 2974c4e
Show file tree
Hide file tree
Showing 18 changed files with 42 additions and 325 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
# User module
# User module

Api base authentication and user management via laminas and pi engine

## 1. Important note
This is the first development version of the user module, please don't install it on production projects now, we will work on finishing and testing this module in the next weeks and ready the production version ASAP

This is the first development version of the user module, please don't install it on production projects now, we will
work on finishing and testing this module in the next weeks and ready the production version ASAP

## 2. Installation

Follow the below steps to install the module via composer

### Step 1

Run the following to install this library:

```bash
$ composer require pi/user
```

### Step 2

Edit `config\modules.config.php` and add `'User'` end of array, for example like this

```
Expand All @@ -28,6 +34,7 @@ return [
```

### Step 3

Edit `composer.json` and add this line

```
Expand All @@ -40,9 +47,11 @@ Edit `composer.json` and add this line
```

### Step 4

Run `composer dump-autoload`.

### Step 5

Open `data/schema.sql` and create tablas in your database

## 3. List of TODO tasks for this module
Expand Down
6 changes: 3 additions & 3 deletions bin/post-install.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
'config' => false,
];

$config = new Config(include realpath(__DIR__ . '/../../../config/autoload/global.php'));
$adapter = new Adapter($config->db->toArray());
$install = new Install($adapter);
$config = new Config(include realpath(__DIR__ . '/../../../config/autoload/global.php'));
$adapter = new Adapter($config->db->toArray());
$install = new Install($adapter);
echo $install->database();
echo $install->config();
6 changes: 3 additions & 3 deletions bin/post-remove.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
'config' => false,
];

$config = new Config(include realpath(__DIR__ . '/../../../config/autoload/global.php'));
$adapter = new Adapter($config->db->toArray());
$install = new Remove($adapter);
$config = new Config(include realpath(__DIR__ . '/../../../config/autoload/global.php'));
$adapter = new Adapter($config->db->toArray());
$install = new Remove($adapter);
echo $install->database();
echo $install->config();
6 changes: 3 additions & 3 deletions bin/post-update.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
'config' => false,
];

$config = new Config(include realpath(__DIR__ . '/../../../config/autoload/global.php'));
$adapter = new Adapter($config->db->toArray());
$install = new Update($adapter);
$config = new Config(include realpath(__DIR__ . '/../../../config/autoload/global.php'));
$adapter = new Adapter($config->db->toArray());
$install = new Update($adapter);
echo $install->database();
echo $install->config();
4 changes: 0 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"ext-pdo": "*",
"ext-spl": "*",
"lib-curl": "*",

"laminas/laminas-mvc": "^3.1.1",
"laminas/laminas-mvc-i18n": "^1.2.0",
"laminas/laminas-mvc-plugins": "^1.1.0",
Expand All @@ -52,13 +51,11 @@
"laminas/laminas-i18n": "^2.14",
"firebase/php-jwt": "^5.5"
},

"autoload": {
"psr-4": {
"User\\": "vendor/pi/user/src/"
}
},

"scripts": {
"post-install-cmd": [
"php -r 'if (file_exists(\"bin/post-install.php\")) include \"bin/post-install.php\";'"
Expand All @@ -70,7 +67,6 @@
"php -r 'if (file_exists(\"bin/post-remove.php\")) include \"bin/post-remove.php\";'"
]
},

"suggest": {
"ext-apc": "for opcode cache and system persistent data",
"ext-discount": "for Markdown text parsing",
Expand Down
Loading

0 comments on commit 2974c4e

Please sign in to comment.