Skip to content

MacOS metadata files break the library #68

@jay-knight

Description

@jay-knight

We ran into a problem where some MacOS metadata files (see https://apple.stackexchange.com/questions/14980/why-are-dot-underscore-files-created-and-how-can-i-avoid-them) got included in the deployment to production. This broke the library because files like vendor/ircmaxell/random-lib/lib/RandomLib/Mixer/._McryptRijndael128.php existed, and AbstractFactory::loadFiles() tried to load them, resulting in

PHP Fatal error: Uncaught ReflectionException: Class RandomLib\\Mixer\\._McryptRijndael128 does not exist in
[snip]/vendor/ircmaxell/security-lib/lib/SecurityLib/AbstractFactory.php:50 

Redeploying without those files fixed the problem.

However, consider adding a check that the file is a "real" php file. Or perhaps catch that exception, error_log() a message and skip that file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions