Skip to content

Commit

Permalink
Merge pull request #2 from cleaniquecoders/develop
Browse files Browse the repository at this point in the history
Refactor
  • Loading branch information
nasrulhazim authored Feb 10, 2023
2 parents 33fc005 + 793176c commit db8c063
Show file tree
Hide file tree
Showing 28 changed files with 4,012 additions and 5,176 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: PHP Linting (Pint)

on:
- push

jobs:
phplint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: "laravel-pint"
uses: aglipanci/laravel-pint-action@0.1.0
with:
preset: laravel

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: PHP Linting (Pint)
skip_fetch: true
40 changes: 40 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test
on: [push, pull_request]
jobs:
unit-test:
name: PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php-versions: ['8.2']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, dom, fileinfo
coverage: xdebug #optional
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer update -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Test with phpunit
run: vendor/bin/phpunit
env:
DB_CONNECTION: sqlite
DB_DATABASE: ":memory:"
28 changes: 28 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Update Changelog"

on:
release:
types: [released]

jobs:
update:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: main

- name: Update Changelog
uses: stefanzweifel/changelog-updater-action@v1
with:
latest-version: ${{ github.event.release.name }}
release-notes: ${{ github.event.release.body }}

- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: main
commit_message: Update CHANGELOG
file_pattern: CHANGELOG.md
37 changes: 0 additions & 37 deletions .php_cs

This file was deleted.

14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

[![Build Status](https://travis-ci.org/cleaniquecoders/lookup.svg?branch=master)](https://travis-ci.org/cleaniquecoders/lookup) [![Latest Stable Version](https://poser.pugx.org/cleaniquecoders/lookup/v/stable)](https://packagist.org/packages/cleaniquecoders/lookup) [![Total Downloads](https://poser.pugx.org/cleaniquecoders/lookup/downloads)](https://packagist.org/packages/cleaniquecoders/lookup) [![License](https://poser.pugx.org/cleaniquecoders/lookup/license)](https://packagist.org/packages/cleaniquecoders/lookup)
[![Test](https://github.com/cleaniquecoders/lookup/actions/workflows/run-tests.yml/badge.svg)](https://github.com/cleaniquecoders/lookup/actions/workflows/run-tests.yml) [![Update Changelog](https://github.com/cleaniquecoders/lookup/actions/workflows/update-changelog.yml/badge.svg)](https://github.com/cleaniquecoders/lookup/actions/workflows/update-changelog.yml) [![PHPStan](https://github.com/cleaniquecoders/lookup/actions/workflows/phpstan.yml/badge.svg)](https://github.com/cleaniquecoders/lookup/actions/workflows/phpstan.yml) [![Fix PHP Code Styling](https://github.com/cleaniquecoders/lookup/actions/workflows/fix-php-code-style-issues.yml.yml/badge.svg)](https://github.com/cleaniquecoders/lookup/actions/workflows/fix-php-code-style-issues.yml.yml)

## About Your Package

Expand All @@ -22,21 +21,21 @@ Please take note all above are sample of the data available. You may modify as n

## Installation

In order to install `cleaniquecoders/lookup` in your Laravel project, just run the *composer require* command from your terminal:
In order to install `cleaniquecoders/lookup` in your Laravel project, just run the _composer require_ command from your terminal:

```
$ composer require cleaniquecoders/lookup
```bash
composer require cleaniquecoders/lookup
```

## Usage

Publish lookup related assets:

```
$ php artisan vendor:publish --tag=lookup-config
$ php artisan vendor:publish --tag=lookup-migrations
$ php artisan vendor:publish --tag=lookup-seeder
$ php artisan vendor:publish --tag=lookup-schemas
```bash
php artisan vendor:publish --tag=lookup-config
php artisan vendor:publish --tag=lookup-migrations
php artisan vendor:publish --tag=lookup-seeder
php artisan vendor:publish --tag=lookup-schemas
```

Get lookup data:
Expand All @@ -55,8 +54,8 @@ metadata('Currency');

Run the following command:

```
$ vendor/bin/phpunit --testdox --verbose
```bash
vendor/bin/phpunit --testdox --verbose
```

## Contributing
Expand All @@ -73,10 +72,10 @@ Remember, bug reports are created in the hope that others with the same problem

## Coding Style

`cleaniquecoders/lookup` follows the PSR-2 coding standard and the PSR-4 autoloading standard.
`cleaniquecoders/lookup` follows the PSR-2 coding standard and the PSR-4 autoloading standard.

You may use PHP CS Fixer in order to keep things standardised. PHP CS Fixer configuration can be found in `.php_cs`.

## License

This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).
This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"CleaniqueCoders\\Lookup\\Database\\Seeders\\": "database/seeders/"
},
"files": [
"src/Support/helpers.php"
"support/helpers.php"
]
},
"autoload-dev": {
Expand All @@ -24,12 +24,12 @@
}
},
"require": {
"php": ">=7.3",
"illuminate/support": "^5.5|^5.6|^5.7|^5.8|^6.0|^7.0|^8.0",
"illuminate/auth": "^5.5|^5.6|^5.7|^5.8|^6.0|^7.0|^8.0"
"php": "^7.4|^8.0|^8.1|^8.2",
"illuminate/support": "^5.5|^5.6|^5.7|^5.8|^6.0|^7.0|^8.0|^9.0",
"illuminate/auth": "^5.5|^5.6|^5.7|^5.8|^6.0|^7.0|^8.0|^9.0"
},
"require-dev": {
"orchestra/testbench": "3.5.*|3.6.*|3.7.*|3.8.*|4.*|5.*|6.*"
"orchestra/testbench": "3.5.*|3.6.*|3.7.*|3.8.*|4.*|5.*|6.*|7.*"
},
"extra": {
"laravel": {
Expand Down
Loading

0 comments on commit db8c063

Please sign in to comment.