It seems like you do not handle an error condition here. This can introduce security issues, and is generally not recommended.
If you suppress an error, we recommend checking for the error condition explicitly:
// For example instead of@mkdir($dir);// Better useif(@mkdir($dir)===false){thrownew\RuntimeException('The directory '.$dir.' could not be created.');}
Loading history...
24
}
25
parent::__construct($message, $code, $previous);
26
}
27
28
public static function hydratorDirectoryNotWritable() : self
29
{
30
return new self('Your hydrator directory must be writable.');
31
}
32
33
public static function hydratorDirectoryRequired() : self
34
{
35
return new self('You must configure a hydrator directory. See docs for details.');
36
}
37
38
public static function hydratorNamespaceRequired() : self
39
{
40
return new self('You must configure a hydrator namespace. See docs for details');
If you suppress an error, we recommend checking for the error condition explicitly: