Skip to content

Make all functions static methods #53

@BackEndTea

Description

@BackEndTea

I'd like to implement this library in one of my projects, but i'm a bit worried about the added overhead of all the files, when i won't use 90% of them.

So my proposal would be to change all the functions and add as static methods to classes.

So instead of calling Safe\getcwd(); I would call Safe\Dir::getcwd();. This means that the classes can be added to the autoloader through psr-4, and they won't be loaded unless needed.

I understand that this would be a big BC break, but i think it has some benefits to take this approach.

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