phpspreadsheet composer没有安装

时间:2018-02-21 14:12:10

标签: composer-php phpspreadsheet

我在本地运行composer来生成必要的文件,然后我将单独部署到服务器。因此我正在运行:

Problem 1
    - The requested package phpoffice/phpspreadsheet No version set (parsed as 1.0.0) is satisfiable by phpoffice/phpspreadsheet[No version set (parsed as 1.0.0)] but these conflict with your requirements or minimum-stability.

然而,它失败了:

"phpoffice/phpspreadsheet":"^1.0"

我对作曲家并不熟悉。我已经尝试了https://github.com/google/google-api-php-client/issues/971建议的解决方案,将dev添加到composer.json,但这不起作用。我也尝试将最小稳定性设置为{ "name": "phpoffice/phpspreadsheet", "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", "keywords": ["PHP", "OpenXML", "Excel", "xlsx", "xls", "ods", "gnumeric", "spreadsheet"], "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", "type": "library", "license": "LGPL-2.1-or-later", "authors": [ { "name": "Maarten Balliauw", "homepage": "http://blog.maartenballiauw.be" }, { "name": "Mark Baker", "homepage": "http://markbakeruk.net" }, { "name": "Franck Lefevre", "homepage": "http://rootslabs.net" }, { "name": "Erik Tilt" } ], "scripts": { "check": [ "php-cs-fixer fix --ansi --dry-run --diff", "phpcs --report-width=200 --report-summary --report-full samples/ src/ tests/ --ignore=samples/Header.php --standard=PSR2 -n", "phpunit --color=always" ], "fix": [ "php-cs-fixer fix --ansi" ] }, "require": { "php": "^5.6|^7.0", "ext-ctype": "*", "ext-dom": "*", "ext-gd": "*", "ext-iconv": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-SimpleXML": "*", "ext-xml": "*", "ext-xmlreader": "*", "ext-xmlwriter": "*", "ext-zip": "*", "ext-zlib": "*", "psr/simple-cache": "^1.0" }, "require-dev": { "tecnickcom/tcpdf": "^6.2", "squizlabs/php_codesniffer": "^2.7", "phpunit/phpunit": "^5.7", "dompdf/dompdf": "^0.8.0", "mpdf/mpdf": "^7.0.0", "jpgraph/jpgraph": "^4.0", "friendsofphp/php-cs-fixer": "@stable" }, "suggest": { "mpdf/mpdf": "Option for rendering PDF with PDF Writer", "dompdf/dompdf": "Option for rendering PDF with PDF Writer", "tecnick.com/tcpdf": "Option for rendering PDF with PDF Writer", "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers" }, "autoload": { "psr-4": { "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" } }, "autoload-dev": { "psr-4": { "PhpOffice\\PhpSpreadsheetTests\\": "tests/PhpSpreadsheetTests" } } } 而没有运气。

有人可以帮忙吗?

使用更多信息编辑***

我安装了PHP 7.2,完整.json与https://github.com/PHPOffice/PhpSpreadsheet

中的相同

下面:

CreatedAtAction

1 个答案:

答案 0 :(得分:4)

好的,所以这个答案适用于其他任何人认为这是作曲家的新手:

我假设作曲家会访问我从GIT下载的本地文件来配置所有内容。所以我在库源目录中运行了composer命令。

这不是它的工作原理。您需要从项目目录中运行composer命令,它将通过互联网提取文件并安装'它们在您的项目目录结构中。