Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

[WIP] Refactory & Enhancement #96

Open
wants to merge 45 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
173a199
Merge branch 'develop'
feryardiant Feb 6, 2016
b42c81c
Merge branch 'develop'
feryardiant Feb 6, 2016
9166b31
Merge branch 'develop'
feryardiant Feb 6, 2016
8e8ec29
Update dependencies
feryardiant Feb 6, 2016
e8f65af
Merge branch 'develop'
feryardiant Feb 6, 2016
087b677
Update dependencies
feryardiant Apr 27, 2017
f2ce96a
Fix container docblock
feryardiant Apr 27, 2017
75ca754
[skip ci] fix merge conflict
feryardiant Apr 27, 2017
c82a334
Init refactory
feryardiant Apr 27, 2017
d05b7d3
Refactor Database namespace
feryardiant Apr 27, 2017
bcca41f
Fix docblock
feryardiant Apr 27, 2017
005ceb8
Fix some issue due to previous commit
feryardiant Apr 27, 2017
ca3aa53
Update homepage url to new phpindonesia.id
feryardiant Apr 27, 2017
759bad6
Update readme.md
feryardiant Apr 27, 2017
1d7332b
Bring back old directory structures with some additional changes
feryardiant Apr 28, 2017
40fd5f3
Update .editorconfig due to latest directory changes
feryardiant Apr 28, 2017
8ff736b
Create .env.example
feryardiant Apr 28, 2017
801a4e0
Update readme & remove setting.php.disabled
feryardiant Apr 28, 2017
a0c69c7
[refactor] Middleware & Controllers classes now under Memberhsip\Http…
feryardiant Apr 28, 2017
732e414
Remove Libraries namespace and move all classes to root
feryardiant Apr 28, 2017
bb2ca4e
Register errorHanler first
feryardiant Apr 28, 2017
2cc85e5
Fix something due to 732e4147
feryardiant Apr 28, 2017
b50b097
Fix controller classes due to a0c69c74
feryardiant Apr 28, 2017
41125ca
Add app.json for heroku reviews
feryardiant Apr 28, 2017
cc187e2
Add lisence.md
feryardiant Apr 28, 2017
a9c4c04
Add DB_DRIVER envvar
feryardiant Apr 28, 2017
a7328e6
Fix some settings
feryardiant Apr 28, 2017
82f83e3
Patch docblock
feryardiant Apr 28, 2017
9c113ce
Simplify usage of Models classes
feryardiant Apr 28, 2017
0174eda
Extend Slim\Http\Response and inject view engine
feryardiant Apr 28, 2017
1cb24d9
Install spackpost client
feryardiant Apr 28, 2017
a43de20
Change mailer container to mail
feryardiant Apr 29, 2017
9783162
Update mailer
feryardiant Apr 29, 2017
6a723e6
Patch mailer container
feryardiant May 3, 2017
819a7f8
Add ActionResolver class to make easier resolve controller methods
feryardiant May 3, 2017
5533249
Some updates:
feryardiant May 3, 2017
4450cf7
Fix validation issue
feryardiant May 3, 2017
5bb7684
Use httpclient directly to send mail instead of SparkPost client
feryardiant May 3, 2017
b7af819
Fix sending mail via sparkpost :tada:
feryardiant May 3, 2017
9483be4
Remove sparkpost/sparkpost
feryardiant May 3, 2017
7997383
Add phpunit for testing
feryardiant May 3, 2017
c6e3bc9
Patch user activation
feryardiant May 4, 2017
8ca9805
Add withRedirectRoute method
feryardiant May 4, 2017
e68fee2
Patch validation request
feryardiant May 4, 2017
f1cef7d
Cleanup unused params
feryardiant May 4, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space

[{app,www}/**.{php,html}]
[{app,asset}/**.{php,html}]
indent_size = 4

[www/**.{css,js}]
[asset/**.{css,js}]
indent_size = 2

[*.{json,yml}]
Expand Down
17 changes: 17 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
DB_DRIVER=mysql
DB_HOST=localhost
DB_USER=root
DB_PASS=
DB_NAME=

MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USER=
MAIL_PASS=

CLOUDINARY_NAME=
CLOUDINARY_KEY=
CLOUDINARY_SECRET=

GCAPTCHA_KEY=
GCAPTCHA_SECRET=
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ Icon?

# Development files
# --------------------------
app/settings.php
.env

# Dependency folders
# --------------------------
/vendor
/.htaccess

# IDE Project Configurations
# --------------------------
Expand All @@ -30,5 +28,4 @@ nbproject/

# But Keep these
# --------------------------
!/www/.htaccess
!.gitkeep
File renamed without changes.
21 changes: 21 additions & 0 deletions LISENCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017 by PHP Indonesia <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: vendor/bin/heroku-php-apache2 www/
web: vendor/bin/heroku-php-apache2 .
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### Kebutuhan

- PHP 5.5 keatas.
- HTTP Server, misal NginX or Apache.
- HTTP Server, misal NginX atau Apache.
- MySQL Server 5.x keatas untuk database utama.

### Instalasi
Expand Down Expand Up @@ -31,28 +31,28 @@

**NOTE**: sesuaikan `[db-user]` anda, umumnya adalah `root`

4. Import kedua file `.sql` yang ada dalam folder `app/data` secara berurutan ke `[db-name]` yang telah anda buat:
4. Import kedua file `.sql` yang ada dalam folder `app/database` secara berurutan ke `[db-name]` yang telah anda buat:

1. `membership-schema.sql`
2. `membership-values.sql`

Dari terminal bisa dilakukan dengan cara

```bash
$ mysql -u[db-user] -p [db-name] < app/data/membership-schema.sql app/data/membership-values.sql
$ mysql -u[db-user] -p [db-name] < app/database/membership-schema.sql app/database/membership-values.sql
```

5. Copy-Paste file `settings.php.disable` didalam folder `app` dan rename menjadi `settings.php` lalu buka dengan editor favorit anda dan sesuaikan isi konfigurasi didalamnya, misal Sublime Text: `subl`.
5. Copy-Paste file `.env.example` didalam direktori projek dan rename menjadi `.env` lalu buka dengan editor favorit anda dan sesuaikan isi konfigurasi didalamnya, misal Sublime Text: `subl`.

```
$ cp app/settings.php.disable app/settings.php
$ subl -a app/settings.php
$ cp .env.example .env
$ subl -a .env
```

6. Jika anda menggunakan web server seperti Apache atau NginX, silahkan sesuaikan vhost -nya atau gunakan PHP built in server dan arahkan ke folder `www` sebagai docroot.
6. Jika anda menggunakan web server seperti Apache atau NginX, silahkan sesuaikan vhost -nya atau gunakan PHP built in server dan arahkan project root sebagai docroot.

```
$ php -S localhost:8088 -t www/
$ php -S localhost:8088
```

7. Terakhir, buka url sesuai dengan konfigurasi lokal server anda. Misal [`http://localhost:8088/`](http://localhost:8088/).
Expand All @@ -61,11 +61,10 @@

| Path | Keterangan |
| --- | --- |
| `app/` | Direktori utama aplikasi |
| `app/data/` | Direktori database |
| `app/src/` | Direktori source code aplikasi |
| `app/` | Berisi source code utama aplikasi |
| `app/database/` | Berisi file database `*.sql` |
| `app/views/` | Direktori template |
| `www/` | Direktori public |
| `assets/` | Asset directori |

### Cara berkontribusi:

Expand Down
10 changes: 10 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "PHP.id Membership Reloaded",
"repository": "https://github.com/phpindonesia/phpindonesia.or.id-membership2",
"image": "heroku/php",
"scripts": {
"postdeploy": "echo deployed; return 0;",
"pr-predestroy": "echo destroyng; return 0;"
},
"env": {}
}
2 changes: 2 additions & 0 deletions app/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Options -Indexes
deny from all
21 changes: 0 additions & 21 deletions app/bootstrap.php

This file was deleted.

Loading