Try to debug API, find where did the connection failed
continuous-integration/drone/push Build is passing Details

master
dorian.hodin 2 years ago
parent 57a229e307
commit 28e5cab80d

@ -1,4 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="MessDetectorOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCSFixerOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCodeSnifferOptionsConfiguration">
<option name="highlightLevel" value="WARNING" />
<option name="transferred" value="true" />
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="8.1" /> <component name="PhpProjectSharedConfiguration" php_language_level="8.1" />
<component name="PhpStanOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PsalmOptionsConfiguration">
<option name="transferred" value="true" />
</component>
</project> </project>

@ -21,9 +21,9 @@ class ConnectClass{
function connect(): int|Connection function connect(): int|Connection
{ {
try { try {
echo "OKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK"; echo $this->dsn." ".$this->login." ".$this->password;
$connection = new Connection($this->dsn,$this->login,$this->password); $connection = new Connection($this->dsn,$this->login,$this->password);
echo "OKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK";
}catch (PDOException){ }catch (PDOException){
throw new PDOException(); throw new PDOException();
} }

@ -14,8 +14,8 @@ class GatewayForm
public function __construct() public function __construct()
{ {
try{ try{
echo "ici???";
$this->connection = (new ConnectClass)->connect(); $this->connection = (new ConnectClass)->connect();
echo "ici???";
}catch(PDOException){ }catch(PDOException){
throw new PDOException(); throw new PDOException();
} }

Loading…
Cancel
Save