fuel / docs

Fuel PHP Framework - Fuel v1.x documentation
http://fuelphp.com/docs
Other
166 stars 233 forks source link

Quick Installation is really slow #716

Open kenjis opened 8 years ago

kenjis commented 8 years ago

If you value your time and want to get things up and running in seconds instead of minutes, you can use our quick installer instead. http://fuelphp.com/dev-docs/#/quick_install

But in reality, now it takes long time. In my case, it took about 9 minutes. It is not quick at all.

WanWizard commented 8 years ago

It is a lot quicker here:

real    1m46.500s

but it will greatly depend on your internet connection, and the response of packagist and github. Also, composer slows down considerably when you have xdebug enabled. Without xdebug is goes down to 0m56.222s.

But yeah, it's not a matter of seconds anymore now that we've switched to composer, and composer has to check all dependencies and clone the different repo's.

If you have any idea how it can be improved?

kenjis commented 8 years ago

Yes, to check all dependencies and clone repos takes time. And the worse thing is GItHub API limit. Many users reach the limit, and if they are not familiar with Composer and/or GitHub, they might have a hard time. In my country, there are users who don't read English! Some users do not have GitHub account.

oil create or composer create-project is not quick. You have fast connection, but it is common it takes several minutes to install here in Japan.

I think the quickest installation is downloading the official Zip file. Downloading it from here takes only 30 seconds. And most users have no problem with the Zip file. They use the offical release version and do not need git repos. They can even update fuel/core etc to next release version with using composer update command.

WanWizard commented 8 years ago

Ok, I will have a look.

That will mean that with every release, the install procedure has to be updated, unless we can find a clever way to find out what the latest version is.

kenjis commented 8 years ago

How about like this?

$page_url = 'http://fuelphp.com/';
$link_regex = '/<a href="(.+?)" class="button large purple download-icon">/u';
$html = file_get_contents($page_url);
preg_match($link_regex, $html, $matches);
$zip_url = $matches[1];
WanWizard commented 8 years ago

The logic might work, but "oil create" is bash, not PHP. I have managed to handle it server side, probably easier and more reliable: http://fuelphp.com/downloads/download-link

Next challenge is that you need to be able to unzip it locally. It's not said that that is possible, so we need a solution for that as well.

kenjis commented 8 years ago

Should oil be bash?

The following script works on Mac.

url=`curl http://fuelphp.com/downloads/download-link | sed -e 's/<[^>]*>//g'`

dir="tmp.$$"
rm -rf $dir
mkdir $dir
curl -o $dir/fuelphp.zip $url

cd $dir
unzip fuelphp.zip