在没有 Composer 的情况下使用 Laravel 5 Illuminate\Html

Use Laravel 5 Illuminate\Html without Composer

好的,我需要在没有 composer 的情况下使用 Illuminate\Html 包。

我使用的是 Plesk,它默认安装了 php 5.3。我设法将另一个版本的 PHP (5.5) 使用 fastcgi 添加到 运行 并排。这让我可以安装 Laravel(因为它在 5.3 中运行不佳)。

我终于完成了所有设置并开始工作,但是现在当我尝试安装 Illuminate\Html 以访问 Form Facade 时,我收到错误消息:

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

我安装了 composer,但是因为 Plesk 运行s 默认为 PHP 5.3,而 composer 运行s 默认为 php,我收到以下错误:

./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.

我得到的只是一个接一个的错误。

如何在不使用 composer 的情况下使 Illuminate\HTML 工作?我用 Google 搜索过,我访问的每一页都告诉我 运行 作曲家更新。

我已将以下内容添加到 app.php

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

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

我检查过 Illuminate\Html 在服务器上,就是它,在 Vendor 目录中。

我还需要做什么?

谢谢,如果我能提供更多信息,请告诉我。

编辑

补充信息:

您可以 运行 composer 使用标志忽略系统要求,例如您的 php 版本。

composer update --ignore-platform-reqs

来自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.