Browse Source

Merge pull request #66 from nafiesl/laravel_7_upgrade

Laravel 7 upgrade
pull/67/head
Nafies Luthfi 5 years ago
committed by GitHub
parent
commit
92423dba31
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      .gitignore
  2. 2
      .travis.yml
  3. 7
      README.id.md
  4. 7
      README.md
  5. 2
      app/Entities/Projects/Project.php
  6. 10
      app/Exceptions/Handler.php
  7. 0
      app/Services/InvoiceDrafts/InvoiceDraft.php
  8. 0
      app/Services/InvoiceDrafts/InvoiceDraftCollection.php
  9. 0
      app/Services/InvoiceDrafts/Item.php
  10. 9
      composer.json
  11. 3224
      composer.lock
  12. 2
      config/session.php
  13. 2
      resources/views/payments/index.blade.php
  14. 2
      resources/views/projects/issues/partials/comment-section.blade.php
  15. 2
      tests/Feature/AgencyProfileTest.php
  16. 5
      tests/Feature/Invoices/InvoiceEntryTest.php
  17. 2
      tests/Feature/Partners/ManageCustomersTest.php
  18. 4
      tests/Feature/Payments/ManagePaymentsTest.php
  19. 2
      tests/Feature/Projects/ProjectIssuesTest.php
  20. 2
      tests/Feature/References/SiteOptionsTest.php
  21. 3
      tests/Unit/Models/CustomerTest.php
  22. 2
      tests/Unit/Models/JobTest.php
  23. 2
      tests/Unit/Models/ProjectTest.php
  24. 2
      tests/Unit/References/PaymentTypeTest.php
  25. 2
      tests/Unit/References/ProjectStatusTest.php
  26. 2
      tests/Unit/References/SubscriptionTypeTest.php

8
.gitignore

@ -1,8 +1,16 @@
/vendor
/node_modules
/public/hot
/public/storage
Homestead.yaml
Homestead.json
/storage/*.key
/.vagrant
npm-debug.log
.env
/.idea/
.phpunit.result.cache
.php_cs.cache
.env.backup
yarn-error.log
/ftpsync.settings

2
.travis.yml

@ -1,7 +1,7 @@
language: php
php:
- 7.2
- 7.3
before_script:
- travis_retry composer self-update

7
README.id.md

@ -30,9 +30,6 @@ Free PMO (Project Management Office), software management project untuk *freelan
Fitur utama Free PMO adalah pengelolaan project dan transaksi pembayaran setiap project. Fitur-fitur lain software ini tertuang dalam file [konsep](CONCEPT.id.md).
> **Development in progress**
> Dalam proses development, perubahan struktur tabel existing akan **diubah langsung pada file migration** yang sesuai, lihat [panduan kontribusi](CONTRIBUTING.id.md#catatan).
## Tujuan
Tujuan utama Free PMO adalah membantu pengelolaan data project dengan mudah dan profesional.
@ -41,7 +38,7 @@ Tujuan utama Free PMO adalah membantu pengelolaan data project dengan mudah dan
Aplikasi ini dapat dipasang dalam server lokal (PC/Laptop) dan server online, dengan spesifikasi berikut :
#### Spesifikasi minimum server
1. PHP >= 7.2.0 (dan memenuhi [server requirement Laravel 6.x](https://laravel.com/docs/6.x#server-requirements)),
1. PHP >= 7.3 (dan memenuhi [server requirement Laravel 7.x](https://laravel.com/docs/7.x#server-requirements)),
2. MySQL atau MariaDB,
3. SQlite (untuk automated testing).
@ -73,7 +70,7 @@ Project ini dikembangkan oleh [Nafies Luthfi](https://github.com/nafiesl) dan pa
Free PMO dibangun menggunakan [metode TDD](https://blog.nafies.id/laravel/testing-laravel-tentang-automated-testing) dengan bahan dan dukungan dari paket-paket berikut ini :
##### Dependencies
* [Framework Laravel](https://laravel.com/docs/6.x) (versi 5.2 s/d 6.x).
* [Framework Laravel](https://laravel.com/docs/6.x) (versi 5.2 s/d 7.x).
* [luthfi/formfield](https://github.com/nafiesl/FormField), Wrapper Form dari [laravelcollective/html](https://github.com/laravelcollective/html) dengan Bootstrap 3.
* [riskihajar/terbilang](https://github.com/riskihajar/terbilang), membuat angka terbilang (pada fitur cetak kuitansi) dan romawi.

7
README.md

@ -32,9 +32,6 @@ Free PMO (Project Management Office), management project software for *freelance
Main features on Free PMO are project management and project payment trasanctions. Other features are explaied on this [concept](CONCEPT.md) file.
> **Development in progress**
> In development progress, any table structure changes will directly **updated on coresponding migration file**, see [contributing guidelines](CONTRIBUTING.md#notes).
## Goals
Free PMO was built for easy and professional project management.
@ -43,7 +40,7 @@ Free PMO was built for easy and professional project management.
This application can be installed on local server and online server with these specifications :
#### Server Requirements
1. PHP >= 7.2.0 (and meet [Laravel 6.x server requirements](https://laravel.com/docs/6.x#server-requirements)),
1. PHP >= 7.3.0 (and meet [Laravel 7.x server requirements](https://laravel.com/docs/7.x#server-requirements)),
2. MySQL or MariaDB database,
3. SQlite (for automated testing).
@ -75,7 +72,7 @@ This project maintained by [Nafies Luthfi](https://github.com/nafiesl) and devel
Free PMO built with [TDD metode](https://blog.nafies.id/laravel/testing-laravel-tentang-automated-testing) with these ingredients support :
##### Dependencies
* [Framework Laravel](https://laravel.com/docs/6.x) (version 5.2 to 6.x).
* [Framework Laravel](https://laravel.com/docs/6.x) (version 5.2 to 7.x).
* [luthfi/formfield](https://github.com/nafiesl/FormField), Bootstrap 3 Form Wrapper for [laravelcollective/html](https://github.com/laravelcollective/html).
* [riskihajar/terbilang](https://github.com/riskihajar/terbilang), create indonesian in-word number (for payment receipt) and roman numeral.

2
app/Entities/Projects/Project.php

@ -36,7 +36,7 @@ class Project extends Model
*/
public function nameLink()
{
return link_to_route('projects.show', $this->name, [$this->id], [
return link_to_route('projects.show', $this->name, [$this], [
'title' => trans(
'app.show_detail_title',
['name' => $this->name, 'type' => trans('project.project')]

10
app/Exceptions/Handler.php

@ -2,10 +2,10 @@
namespace App\Exceptions;
use Exception;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
class Handler extends ExceptionHandler
{
@ -28,11 +28,11 @@ class Handler extends ExceptionHandler
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $exception
* @param \Throwable $exception
*
* @return void
*/
public function report(Exception $exception)
public function report(Throwable $exception)
{
parent::report($exception);
}
@ -41,11 +41,11 @@ class Handler extends ExceptionHandler
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @param \Throwable $exception
*
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
public function render($request, Throwable $exception)
{
// throw $exception;

0
app/Services/InvoiceDraft/InvoiceDraft.php → app/Services/InvoiceDrafts/InvoiceDraft.php

0
app/Services/InvoiceDraft/InvoiceDraftCollection.php → app/Services/InvoiceDrafts/InvoiceDraftCollection.php

0
app/Services/InvoiceDraft/Item.php → app/Services/InvoiceDrafts/Item.php

9
composer.json

@ -5,11 +5,12 @@
"license": "MIT",
"type": "project",
"require": {
"php": "^7.2",
"backup-manager/laravel": "^1.4",
"php": "^7.3",
"backup-manager/laravel": "^2.0",
"fideloper/proxy": "^4.0",
"laracasts/presenter": "^0.2.1",
"laravel/framework": "^6.0",
"laravel/framework": "^7.0",
"laravel/ui": "^2.0",
"luthfi/formfield": "1.*",
"riskihajar/terbilang": "^1.2",
"spatie/laravel-fractal": "^5.0"
@ -21,7 +22,7 @@
"johnkary/phpunit-speedtrap": "^3.0",
"luthfi/simple-crud-generator": "^1.2",
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^7.0"
"phpunit/phpunit": "^8.5"
},
"autoload": {
"classmap": [

3224
composer.lock
File diff suppressed because it is too large
View File

2
config/session.php

@ -148,6 +148,6 @@ return [
|
*/
'secure' => false,
'secure' => env('SESSION_SECURE_COOKIE', null),
];

2
resources/views/payments/index.blade.php

@ -47,7 +47,7 @@
<td class="text-right">{{ $payment->present()->amount }}</td>
<td>{{ $payment->description }}</td>
<td class="text-center">
{!! html_link_to_route('payments.show', '', [$payment->id], ['icon' => 'search', 'class' => 'btn btn-info btn-xs', 'title' => __('app.show')]) !!}
{!! html_link_to_route('payments.show', '', [$payment->id], ['icon' => 'search', 'class' => 'btn btn-info btn-xs', 'title' => __('app.show'), 'id' => 'show_payment-'.$payment->id]) !!}
{!! html_link_to_route('payments.pdf', '', [$payment->id], ['icon' => 'print', 'class' => 'btn btn-warning btn-xs', 'title' => __('app.print')]) !!}
</td>
</tr>

2
resources/views/projects/issues/partials/comment-section.blade.php

@ -45,7 +45,7 @@
</div>
<div class="modal-footer">
{!! Form::submit(__('comment.update'), ['class' => 'btn btn-success']) !!}
{{ link_to_route('projects.issues.show', __('app.cancel'), [$project->issue, $issue] + request(['page']), ['class' => 'btn btn-default']) }}
{{ link_to_route('projects.issues.show', __('app.cancel'), [$project, $issue] + request(['page']), ['class' => 'btn btn-default']) }}
</div>
{!! Form::close() !!}
</div>

2
tests/Feature/AgencyProfileTest.php

@ -1,6 +1,6 @@
<?php
namespace Tests\Feature\Users;
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

5
tests/Feature/Invoices/InvoiceEntryTest.php

@ -86,7 +86,6 @@ class InvoiceEntryTest extends TestCase
$this->press(trans('invoice.add_item'));
$this->seePageIs(route('invoice-drafts.show', $draft->draftKey));
$this->assertEquals(5000, $draft->getTotal());
$this->see(format_money(5000));
}
@ -135,9 +134,7 @@ class InvoiceEntryTest extends TestCase
'amount[1]' => 100,
]);
$this->assertEquals(200, $draft->getTotal());
$this->see(format_money($draft->getTotal()));
$this->see(format_money(200));
}
/** @test */

2
tests/Feature/Partners/ManageCustomersTest.php

@ -1,6 +1,6 @@
<?php
namespace Tests\Feature;
namespace Tests\Feature\Partners;
use App\Entities\Partners\Customer;
use Illuminate\Foundation\Testing\RefreshDatabase;

4
tests/Feature/Payments/ManagePaymentsTest.php

@ -212,7 +212,7 @@ class ManagePaymentsTest extends TestCase
$payment = factory(Payment::class)->create();
$this->visit(route('payments.index'));
$this->click($payment->number);
$this->click('show_payment-'.$payment->id);
$this->seePageIs(route('payments.show', $payment->id));
$this->see(trans('payment.detail'));
$this->see($payment->date);
@ -253,7 +253,7 @@ class ManagePaymentsTest extends TestCase
'in_out' => 1,
'date' => '2015-05-01',
'partner_type' => Customer::class,
'partner_id' => $project->customer_id,
'partner_id' => $project->customer_id,
]);
}
}

2
tests/Feature/Projects/ProjectIssuesTest.php

@ -160,7 +160,7 @@ class ProjectIssuesTest extends TestCase
$this->visitRoute('projects.issues.show', [$issue->project, $issue]);
$this->submitForm(__('issue.update'), [
'pic_id' => null,
'pic_id' => '',
]);
$this->seeRouteIs('projects.issues.show', [$issue->project, $issue]);
$this->seeText(__('issue.updated'));

2
tests/Feature/References/SiteOptionsTest.php

@ -1,6 +1,6 @@
<?php
namespace Tests\Feature\Users;
namespace Tests\Feature\References;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

3
tests/Unit/Models/CustomerTest.php

@ -62,7 +62,8 @@ class CustomerTest extends TestCase
/** @test */
public function a_customer_has_name_link_method()
{
$customer = factory(Customer::class)->make();
$customer = factory(Customer::class)->create();
$this->assertEquals(
link_to_route('customers.show', $customer->name, [$customer->id], [
'title' => trans(

2
tests/Unit/Models/JobTest.php

@ -22,7 +22,7 @@ class JobTest extends TestCase
/** @test */
public function a_job_has_name_link_method()
{
$job = factory(Job::class)->make();
$job = factory(Job::class)->create();
$this->assertEquals(
link_to_route('jobs.show', $job->name, [$job->id], [

2
tests/Unit/Models/ProjectTest.php

@ -23,7 +23,7 @@ class ProjectTest extends TestCase
/** @test */
public function a_project_has_name_link_method()
{
$project = factory(Project::class)->make();
$project = factory(Project::class)->create();
$this->assertEquals(
link_to_route('projects.show', $project->name, [$project->id], [
'title' => trans(

2
tests/Unit/References/PaymentTypeTest.php

@ -1,6 +1,6 @@
<?php
namespace Tests\Unit\Reference;
namespace Tests\Unit\References;
use App\Entities\Payments\Type;
use Tests\TestCase;

2
tests/Unit/References/ProjectStatusTest.php

@ -1,6 +1,6 @@
<?php
namespace Tests\Unit\Reference;
namespace Tests\Unit\References;
use App\Entities\Projects\Status;
use Tests\TestCase;

2
tests/Unit/References/SubscriptionTypeTest.php

@ -1,6 +1,6 @@
<?php
namespace Tests\Unit\Reference;
namespace Tests\Unit\References;
use App\Entities\Subscriptions\Type;
use Tests\TestCase;

Loading…
Cancel
Save