Gargron / fileupload

PHP FileUpload library that supports chunked uploads
MIT License
460 stars 87 forks source link

Bump the minimum supported PHP version #36

Closed adelowo closed 6 years ago

adelowo commented 7 years ago

Right now, 5.3 is still supported. https://github.com/Gargron/fileupload/blob/master/.travis.yml#L4-L9

From http://php.net/eol.php

I have thought of this and would want to pin the minimum version to 5.6 (Update 7.0).

Hey @Gargron , i most likely would need your opinions on this.

adelowo commented 7 years ago

This would be a silly idea to implement if code doesn't change but i have that laid out already.

We could introduce variadic arguments to those interfaces (esp. the FileNameGenerator) As an example, this (https://github.com/Gargron/fileupload/blob/master/src/FileUpload/FileNameGenerator/MD5.php#L37-L63) would become this


public function getFileName(...$args)
{
    list($source_name, $type, $tmp_name, $index, $content_range,  $upload) = $args;

    //previous code left untouched
   //we lose IDE typehinting for `$upload` but we can always annotate that ?
}
adelowo commented 7 years ago

Another thing is the library makes use of phpunit 3.7. 4.8 used to be the most stable version but support has ended. https://thephp.cc/news/2017/02/migrating-to-phpunit-6