Skip to content

Latest flightphp #674

@ponasromas

Description

@ponasromas

PHP 8.4 and while running php runway make:controller myController receiving this:

ErrorException: flight\Permission::__construct(): Implicitly marking parameter $app as nullable is deprecated, the explicit nullable type must be used instead in /home/domain/web/domain.com/public_html/vendor/flightphp/permissions/src/Permission.php:35

Simple fix:

    public function __construct(string $currentRole = '', ?Engine $app = null, $Cache = null)
    {
        $this->currentRole = $currentRole;
        $this->app = $app === null ? Flight::app() : $app;
        $this->Cache = $Cache;
    }

flightphp/runway (v1.2.4)
flightphp/core (v3.17.4)

Also a side note:

After runway update, I begaun to receive warnings like this in services.php and in config.php:

PHP Warning: Undefined variable $ds

That's directory separator in bootstrap.php, which is defined:

$ds = DIRECTORY_SEPARATOR;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions