mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
Implement composer internally to support self-update (#3476)
* Make notifications queueable * Make composer a dependency so we can support self updating! * Allow composer to update internally
This commit is contained in:
parent
26cffd90e1
commit
ee0a529118
@ -4,6 +4,8 @@ namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Composer\Console\Application;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
|
||||
class ArtisanUpgrade extends Command
|
||||
{
|
||||
@ -38,8 +40,17 @@ class ArtisanUpgrade extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
set_time_limit(0);
|
||||
// Composer\Factory::getHomeDir() method
|
||||
// needs COMPOSER_HOME environment variable set
|
||||
putenv('COMPOSER_HOME=' . __DIR__ . '/vendor/bin/composer');
|
||||
|
||||
// call `composer install` command programmatically
|
||||
$input = new ArrayInput(array('command' => 'install'));
|
||||
$application = new Application();
|
||||
$application->setAutoExit(false); // prevent `$application->run` method from exitting the script
|
||||
$application->run($input);
|
||||
|
||||
exec("composer install");
|
||||
|
||||
try {
|
||||
|
||||
|
@ -5,13 +5,17 @@ namespace App\Notifications\Admin;
|
||||
use App\Utils\Number;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Messages\SlackMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
class EntityViewedNotification extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
|
@ -5,13 +5,16 @@ namespace App\Notifications\Admin;
|
||||
use App\Utils\Number;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Messages\SlackMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class InvoiceSentNotification extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
|
@ -5,13 +5,16 @@ namespace App\Notifications\Admin;
|
||||
use App\Utils\Number;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Messages\SlackMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class InvoiceViewedNotification extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
|
@ -6,13 +6,16 @@ use App\Mail\Signup\NewSignup;
|
||||
use App\Utils\Number;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Messages\SlackMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class NewPartialPaymentNotification extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
|
@ -6,13 +6,16 @@ use App\Mail\Signup\NewSignup;
|
||||
use App\Utils\Number;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Messages\SlackMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class NewPaymentNotification extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
|
@ -5,14 +5,17 @@ namespace App\Notifications;
|
||||
use App\Mail\RecurringCancellationRequest;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Messages\SlackMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
|
||||
class ClientContactRequestCancellation extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
|
@ -3,14 +3,17 @@
|
||||
namespace App\Notifications;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\Lang;
|
||||
|
||||
class ClientContactResetPassword extends Notification
|
||||
{
|
||||
use Queueable;
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
/**
|
||||
* The password reset token.
|
||||
*
|
||||
|
@ -4,12 +4,15 @@ namespace App\Notifications;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class GmailTestNotification extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
|
@ -5,13 +5,16 @@ namespace App\Notifications;
|
||||
use App\Mail\Signup\NewSignup;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Messages\SlackMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class NewAccountCreated extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new notification instance.
|
||||
|
@ -19,9 +19,11 @@
|
||||
"type": "project",
|
||||
"require": {
|
||||
"php": ">=7.3",
|
||||
"ext-json": "*",
|
||||
"anahkiasen/former": "^4.2",
|
||||
"asgrim/ofxparser": "^1.2",
|
||||
"codedge/laravel-selfupdater": "2.5.1",
|
||||
"composer/composer": "^1.10",
|
||||
"dacastro4/laravel-gmail": "^3.2",
|
||||
"davejamesmiller/laravel-breadcrumbs": "5.x",
|
||||
"fideloper/proxy": "^4.0",
|
||||
@ -49,8 +51,7 @@
|
||||
"webpatser/laravel-countries": "dev-master#75992ad",
|
||||
"wildbit/postmark-php": "^2.6",
|
||||
"yajra/laravel-datatables-html": "^4.0",
|
||||
"yajra/laravel-datatables-oracle": "~9.0",
|
||||
"ext-json": "*"
|
||||
"yajra/laravel-datatables-oracle": "~9.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-json": "*",
|
||||
|
Loading…
Reference in New Issue
Block a user