fusio icon indicating copy to clipboard operation
fusio copied to clipboard

Deploy succeeds 'silently'

Open ratsey opened this issue 5 years ago • 2 comments

I'm converting my deployment mechanism to use the bin/fusion deploy method so that I can retain all my code in Git.

When routes and PHP scripts align, the output shows a set of actions and finishes with Deploy Successful!

One of my PHP scripts is quite complex and requires the inclusion of libraries to support payments via Stripe. This necessitates the addition of these lines at the top of the PHP:

require "../../vendor/autoload.php";
require_once '../../vendor/stripe/stripe-php/init.php';

Adding those lines is accepted by the deploy mechanism and the code works, but there is no output at all when deploying with bin/fusion deploy.

[ratsey..@... fusio]$ php bin/fusio deploy
[ratsey...@... fusio]$ 

This is the top of the file, for full explanation:

<?php

namespace App\OMS\StripePaymentDev;

// Fusio deploy succeeds silently with these lines included
require "../../vendor/autoload.php";
require_once '../../vendor/stripe/stripe-php/init.php';


use Fusio\Engine\ActionAbstract;
use Fusio\Engine\ContextInterface;
use Fusio\Engine\ParametersInterface;
use Fusio\Engine\RequestInterface;
use PSX\Http\Exception as StatusCode;

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

ratsey avatar Oct 22 '20 00:10 ratsey

Hi, normally you dont need to require the vendor autoloader since this is done already automatically. Also Iam not too familiar with the Strip Libary but it looks like the init.php Script only includes Files which are also handled by the composer autoloader, so maybe you dont need both require statements. Regarding the deploy mechanism you may add -vvv and set the end to dev for more debug information.

chriskapp avatar Oct 28 '20 18:10 chriskapp

Great, I'll give that a try. I've made some changes via the UI since this - is it possible to generate the deploy files from the DB?

ratsey avatar Oct 28 '20 18:10 ratsey