Skip to content

Code patching should insert after strict type declares #200

Closed
@mikeymike

Description

@mikeymike

declare(strict_types=1); is pretty much the norm now however providing a solution with this results in any before patches coming before this, e.g.

<?php

date_default_timezone_set("Europe/London");
error_reporting(E_ALL);
ini_set("display_errors", 1);
declare(strict_types=1);

This may also be an issue with transformers where the declare could end up in a try block 🤔

It doesn't AFAIK cause errors but I think strict types would be disabled if it's not the first statement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions