Open danieliser opened 4 years ago
Completely agree. A PR to fix this is very welcome. Since we only need the version right now, I'm leaning towards option 2, which we can always further expand upon should we need more data.
@coenjacobs - Sweet, PR incoming as soon as I get a few minutes to test it.
The line below loads what could be a heavy file into memory.
https://github.com/coenjacobs/conductor/blob/master/src/FileReader.php#L9
The way WP core does it is likely more ideal, so we should either patch it to use the
get_plugin_data
function, or mimic it's functionality.Specifically, core only loads the first 8 bytes of the file or so via
get_file_data
.Option 1
Option 2 - A little lighter as it has none of the overhead logic.