Skip to content

PHP Fatal error: Cannot redeclare Safe\substr() #3112

@bendavies

Description

@bendavies

Bug Report

Subject Details
Rector version Rector 0.8.x-dev@8b66cbc
Installed as git checkout

Minimal PHP Code Causing Issue

Running rector on a project that has thecodingmachine/safe installed errors with:

PHP Fatal error:  Cannot redeclare Safe\substr() (previously declared in /Code/project/vendor/thecodingmachine/safe/generated/strings.php:532) in /Code/rector/rules/coding-style/tests/Rector/Namespace_/ImportFullyQualifiedNamesRector/Source/safe_count.php on line 12

Expected Behaviour

No error.

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