Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hkp22 committed Mar 19, 2019
2 parents b8500e0 + a41fdaf commit 2edd838
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 31 deletions.
25 changes: 18 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
language: php

php:
- 7.1
- 7.2
env:
global:
- SETUP=stable

before_script:
- composer self-update
- composer install --prefer-dist --no-interaction
matrix:
fast_finish: true
include:
- php: 7.1
- php: 7.1
env: SETUP=lowest
- php: 7.2
- php: 7.2
env: SETUP=lowest
- php: 7.3

script: ./vendor/bin/phpunit
install:
- if [[ $SETUP = 'stable' ]]; then travis_retry composer update --no-interaction --prefer-stable --no-suggest; fi
- if [[ $SETUP = 'lowest' ]]; then travis_retry composer update --no-interaction --prefer-lowest --prefer-stable --no-suggest; fi

script: vendor/bin/phpunit
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changelog

All notable changes to `permission` will be documented in this file

## 2.1.0 - 2018-03-16

- Laravel 5.8 compatibility

## 2.0.0 - 2018-12-31

- package namespace changed from Hkp22 to Qirolab.
- package vendor name changed from hkp22 to qirolab. Now to install this package required new command to run `composer require qirolab/laravel-reactions`.


## 1.0.0 - 2018-07-19

- initial release

55 changes: 55 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Contributing

Contributions are **welcome** and will be fully **credited**.

Please read and understand the contribution guide before creating an issue or pull request.

## Etiquette

This project is open source, and as such, the maintainers give their free time to build and maintain the source code
held within. They make the code freely available in the hope that it will be of use to other developers. It would be
extremely unfair for them to suffer abuse or anger for their hard work.

Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
world that developers are civilized and selfless people.

It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.

## Viability

When requesting or submitting new features, first consider whether it might be useful to others. Open
source projects are used by many developers, who may have entirely different needs to your own. Think about
whether or not your feature is likely to be used by other users of the project.

## Procedure

Before filing an issue:

- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
- Check to make sure your feature suggestion isn't already present within the project.
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
- Check the pull requests tab to ensure that the feature isn't already in progress.

Before submitting a pull request:

- Check the codebase to ensure that your feature doesn't already exist.
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.

## Requirements

If the project maintainer has any additional requirements, you will find them listed here.

- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer).

- **Add tests!** - Your patch won't be accepted if it doesn't have tests.

- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.

- **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.

- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.

- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.

**Happy coding**!
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
],
"require": {
"php": "^7.0",
"illuminate/database": "~5.5|~5.6",
"illuminate/support": "~5.5|~5.6"
"illuminate/database": "~5.5|~5.6|~5.7|~5.8",
"illuminate/support": "~5.5|~5.6|~5.7|~5.8"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.10",
"mockery/mockery": "^1.0",
"orchestra/database": "~3.5.0|~3.6.0",
"orchestra/testbench": "~3.5.0|~3.6.0",
"phpunit/phpunit": "^6.0|^7.0"
"phpunit/phpunit": "^7.0"
},
"autoload": {
"psr-4": {
Expand Down
30 changes: 9 additions & 21 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,10 @@ protected function setUp()

$this->publishPackageMigrations();

$this->migratePackageTables();

$this->migrateUnitTestTables();
$this->setUpDatabase();

$this->registerPackageFactories();

// $this->registerTestMorphMaps();

$this->registerUserModel();
}

Expand Down Expand Up @@ -79,27 +75,19 @@ protected function getPackageProviders($app)
}

/**
* Perform package database migrations.
* Set up the database.
*
* @return void
*/
protected function migratePackageTables()
protected function setUpDatabase()
{
$this->loadMigrationsFrom([
'--realpath' => database_path('migrations'),
]);
}
include_once __DIR__.'/../migrations/2018_07_10_000000_create_reactions_table.php';
include_once __DIR__.'/database/migrations/2018_07_10_000000_create_users_table.php';
include_once __DIR__.'/database/migrations/2018_07_11_000000_create_articles_table.php';

/**
* Perform unit test database migrations.
*
* @return void
*/
protected function migrateUnitTestTables()
{
$this->loadMigrationsFrom([
'--realpath' => realpath(__DIR__.'/database/migrations'),
]);
(new \CreateReactionsTable())->up();
(new \CreateUsersTable())->up();
(new \CreateArticlesTable())->up();
}

/**
Expand Down

0 comments on commit 2edd838

Please sign in to comment.