Skip to content

Commit

Permalink
Fixed deprecations for PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
oojacoboo committed Dec 7, 2024
1 parent db74838 commit 6e9ce11
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions lib/config/sfProjectConfiguration.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class sfProjectConfiguration
* @param string $rootDir The project root directory
* @param sfEventDispatcher $dispatcher The event dispatcher
*/
public function __construct($rootDir = null, sfEventDispatcher $dispatcher = null)
public function __construct(?string $rootDir = null, ?sfEventDispatcher $dispatcher = null)
{
if (null === self::$active || $this instanceof sfApplicationConfiguration) {
self::$active = $this;
Expand Down Expand Up @@ -578,16 +578,14 @@ public static function guessRootDir()

/**
* Returns a sfApplicationConfiguration configuration for a given application.
*
* @param string $application An application name
* @param string $environment The environment name
* @param bool $debug true to enable debug mode
* @param string $rootDir The project root directory
* @param sfEventDispatcher $dispatcher An event dispatcher
*
* @return sfApplicationConfiguration A sfApplicationConfiguration instance
*/
public static function getApplicationConfiguration($application, $environment, $debug, $rootDir = null, sfEventDispatcher $dispatcher = null)
public static function getApplicationConfiguration(
string $application,
string $environment,
bool $debug,
?string $rootDir = null,
sfEventDispatcher $dispatcher = null,
): sfApplicationConfiguration
{
$class = $application.'Configuration';

Expand Down

0 comments on commit 6e9ce11

Please sign in to comment.