Removed php 8.4 deprications

This commit is contained in:
2025-04-25 20:38:26 -04:00
parent ad88f128b9
commit c56226ca7d
13 changed files with 77 additions and 20 deletions

View File

@@ -80,12 +80,12 @@ class Config extends AbstractConfig
* Loads a Config instance.
*
* @param string|array $values Filenames or string with configuration
* @param ParserInterface | null $parser Configuration parser
* @param ParserInterface | null $parser Configuration parser
* @throws EmptyDirectoryException
* @throws FileNotFoundException
* @throws UnsupportedFormatException
*/
private function __construct(string | array $values, ParserInterface $parser = null, bool $loadFromString = false)
private function __construct(string | array $values, ?ParserInterface $parser = null, bool $loadFromString = false)
{
if ($loadFromString && !is_array($values) && !file_exists($values)) {
if ($parser === null) {
@@ -156,7 +156,7 @@ class Config extends AbstractConfig
* @throws Exception\WriteException if the data could not be written to the file
* @throws UnsupportedFormatException
*/
public function toFile(string $filename, WriterInterface $writer = null): void
public function toFile(string $filename, ?WriterInterface $writer = null): void
{
if ($writer === null) {
// Get file information