lundi 30 octobre 2017

Call to any public method of class work on develop area but not in production

I've a package for use with Laravel 5.5. This package work fine juts at yesterday on production and develop servers.

On my controller:

use Abkrim\Farid2Es\Farid2Es;
...

$es = New Farid2Es($request);
$params = $es->getParamsElasticSearch("searchProposals");  // Here fail on production server

On class file on vendor/abkrim/farid2es/src/Farid2Es:

namespace Abkrim\Farid2Es;

class Farid2Es {
function __construct($request)
{
    $this->request = $request;
}

/**
 * Method to perform the works depending on the type of action to be performed with ElasticSearch
 *
 * @param $action
 * @return array
 */
public function getParamsElasticSearch($action) {
    switch ($action) {
        /*
        case 'newProposal':
            $params = $this->setNewProposaltoEs();
            break;
        */
        case 'searchProposals':
            $params = $this->setParamsSearchProposals();
            break;
        case 'matchingProposals':
            $params = $this->setParamsWithScoringScript();
            break;
        default:
            // error
    }

    return $params;
}
}

When instance class not error. But line for call method fails I try put below for see list of all public methods, but get same error.

$es = New Farid2Es($request);
dd($es->getMethods(ReflectionMethod::IS_PUBLIC));

Develop server has PHP 7.1.X Production server has PHP 7.0.X



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2A0fIT6
via IFTTT

Aucun commentaire:

Enregistrer un commentaire