Phil Cross
Phil Cross

Reputation: 9302

Use Laravel 5 Illuminate\Html without Composer

Ok, I need to use the Illuminate\Html package WITHOUT composer.

I'm using Plesk, which has php 5.3 installed by default. I managed to add another version of PHP (5.5) using fastcgi to run side by side. This allowed me to install Laravel (since it didn't play well with 5.3).

I've finally got it all setup and working, but now when I try to install Illuminate\Html to access the Form Facade, I'm getting the error message:

FatalErrorException in compiled.php line 6466:
Class 'illuminate\html\HtmlServiceProvider' not found

I installed composer, but because Plesk runs PHP 5.3 by default, and composer runs default php, I get the following errors:

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for illuminate/html 5.0.* -> satisfiable by illuminate/html[v5.0.0].
    - illuminate/html v5.0.0 requires php >=5.4.0 -> your PHP version does not satisfy that requirement.
  Problem 2
    - league/flysystem 1.0.2 requires php >=5.4.0 -> your PHP version does not satisfy that requirement.
    - league/flysystem 1.0.2 requires php >=5.4.0 -> your PHP version does not satisfy that requirement.
    - Installation request for league/flysystem == 1.0.2.0 -> satisfiable by league/flysystem[1.0.2].


Installation failed, reverting ./composer.json to its original content.

All I'm getting is error after error after error.

How can I get Illuminate\HTML to work, without requiring the use of composer? I've Googled and every page I go to tells me to run composer update.

I've added the following to app.php

'providers' => [
...
   'Illuminate\Html\HtmlServiceProvider'

and

'aliases' => [
...
    'Html' => 'Illuminate\Html\HtmlFacade',
    'Form' => 'Illuminate\Html\FormFacade'

I've checked that Illuminate\Html is on the server, which is it, in the Vendor directory.

What else do I need to do?

Thanks, and if I can provide more information, please let me know.

EDIT

Extra information:

Upvotes: 2

Views: 2081

Answers (1)

lukasgeiter
lukasgeiter

Reputation: 153140

You can run composer with a flag to ignore system requirements such as your php version.

composer update --ignore-platform-reqs

From the composer docs

--ignore-platform-reqs: ignore php, hhvm, lib-* and ext-* requirements and force the installation even if the local machine does not fulfill these.

Upvotes: 4

Related Questions