apioo / fusio

Open source API management platform
https://www.fusio-project.org
Apache License 2.0
1.87k stars 223 forks source link

Deploy succeeds 'silently' #340

Open ratsey opened 4 years ago

ratsey commented 4 years ago

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;
chriskapp commented 4 years ago

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.

ratsey commented 4 years ago

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?