Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 52f9fde

Browse files
authored
Merge pull request #21 from LaraChimp/release/v1.0.0
Release v1.0.0
2 parents de20c16 + 503298d commit 52f9fde

File tree

8 files changed

+52
-27
lines changed

8 files changed

+52
-27
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
/vendor
2-
/.env
32
composer.phar
43
composer.lock
4+
.DS_Store
5+
Thumbs.db
6+
/phpunit.xml
7+
/.idea
8+
/.vscode
9+
.phpunit.result.cache

.travis.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,29 @@
1+
dist: xenial
12
language: php
23

3-
php:
4-
- 7.1
5-
- 7.2
4+
env:
5+
global:
6+
- SETUP=stable
67

7-
sudo: false
8+
matrix:
9+
fast_finish: true
10+
include:
11+
- php: 7.2
12+
- php: 7.2
13+
env: SETUP=lowest
14+
- php: 7.3
15+
- php: 7.3
16+
env: SETUP=lowest
17+
- php: 7.4snapshot
18+
- php: 7.4snapshot
19+
env: SETUP=lowest
820

9-
install: travis_retry composer install --no-interaction --prefer-source
21+
cache:
22+
directories:
23+
- $HOME/.composer/cache
24+
25+
install:
26+
- if [[ $SETUP = 'stable' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --no-suggest; fi
27+
- if [[ $SETUP = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable --no-suggest; fi
1028

1129
script: vendor/bin/phpunit --verbose

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Mango Repo is open-sourced software licensed under the [MIT license](http://open
3333
5.6.x | 0.3.x
3434
5.7.x | 0.3.x
3535
5.8.x | 0.4.x
36+
6.x | 1.x
3637

3738
### Installation
3839
Install Mango Repo as you would with any other dependency managed by Composer:

composer.json

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
{
22
"name": "larachimp/mango-repo",
3-
"description": "Simple repository package for Laravel 5.",
4-
"keywords": [
5-
"php",
6-
"Laravel5",
7-
"database",
8-
"repository",
9-
"pattern"
10-
],
3+
"description": "Simple repository package for Laravel.",
4+
"keywords": ["php", "Laravel", "database", "repository", "pattern"],
115
"license": "MIT",
126
"authors": [
137
{
@@ -16,13 +10,14 @@
1610
}
1711
],
1812
"require": {
19-
"php": "^7.1.3",
20-
"illuminate/support": "^5.8",
21-
"larachimp/pine-annotations": "0.2.*"
13+
"php": "^7.2",
14+
"illuminate/support": "^6.0",
15+
"larachimp/pine-annotations": "^1.0"
2216
},
2317
"require-dev": {
24-
"orchestra/testbench": "3.8.*",
25-
"mockery/mockery": "^1.0"
18+
"mockery/mockery": "^1.1",
19+
"orchestra/testbench": "^4.0",
20+
"phpunit/phpunit": "^8.0"
2621
},
2722
"autoload": {
2823
"psr-4": {
@@ -36,7 +31,7 @@
3631
},
3732
"extra": {
3833
"branch-alias": {
39-
"dev-master": "0.5.x-dev"
34+
"dev-master": "develop"
4035
},
4136
"laravel": {
4237
"providers": [

phpunit.xml renamed to phpunit.xml.dist

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit backupGlobals="false"
33
backupStaticAttributes="false"
4+
beStrictAboutTestsThatDoNotTestAnything="false"
45
bootstrap="vendor/autoload.php"
56
colors="true"
67
convertErrorsToExceptions="true"
78
convertNoticesToExceptions="true"
89
convertWarningsToExceptions="true"
910
processIsolation="false"
11+
stopOnError="false"
1012
stopOnFailure="false"
11-
syntaxCheck="false"
13+
verbose="true"
1214
>
1315
<testsuites>
1416
<testsuite name="MangoRepo Test Suite">
15-
<directory suffix=".php">./tests/</directory>
17+
<directory suffix=".php">./tests</directory>
1618
</testsuite>
1719
</testsuites>
1820
<php>

tests/Fixtures/database/factories/ModelFactory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
use Illuminate\Support\Str;
4+
35
/*
46
|--------------------------------------------------------------------------
57
| Model Factories
@@ -20,7 +22,7 @@
2022
'name' => $faker->name,
2123
'email' => $faker->unique()->safeEmail,
2224
'password' => $password ?: $password = bcrypt('secret'),
23-
'remember_token' => str_random(10),
25+
'remember_token' => Str::random(10),
2426
'is_active' => true,
2527
];
2628
});

tests/TestRepository.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,12 @@ public function testUpdateMethod()
151151
/**
152152
* Test the delete method.
153153
*
154-
* @expectedException \Illuminate\Database\Eloquent\ModelNotFoundException
155154
* @return void
156155
*/
157156
public function testDeleteMethod()
158157
{
158+
$this->expectException(\Illuminate\Database\Eloquent\ModelNotFoundException::class);
159+
159160
$user1 = factory(User::class)->create([
160161
'name' => 'User 1',
161162
'email' => 'hello@larachimp.com',
@@ -201,11 +202,12 @@ public function testFindMethod()
201202
/**
202203
* Test the findOrFail method.
203204
*
204-
* @expectedException \Illuminate\Database\Eloquent\ModelNotFoundException
205205
* @return void
206206
*/
207207
public function testFindOrFailMethod()
208208
{
209+
$this->expectException(\Illuminate\Database\Eloquent\ModelNotFoundException::class);
210+
209211
$user1 = factory(User::class)->create([
210212
'name' => 'User 1',
211213
'email' => 'hello@larachimp.com',

tests/TestRepositoryScopes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ public function testGlobalScopeOnModelIsAppliedWhenQueringByRepository()
5252
/**
5353
* We will test if an inexistent method is called.
5454
*
55-
* @expectedException \BadMethodCallException
56-
*
5755
* @return void
5856
*/
5957
public function testInExistentScope()
6058
{
59+
$this->expectException(\BadMethodCallException::class);
60+
6161
$foos = $this->app->make(FooRepository::class);
6262
$foos->isNotActive()->get();
6363
}

0 commit comments

Comments
 (0)