From 3302701ae73297513190f6ab39577000190a9eff Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Thu, 26 May 2022 15:20:41 +0200 Subject: [PATCH] Declare a few return datatypes --- README.md | 38 ++++++++++++++++++++++++++++++++++++++ docs/index.md | 27 ++++++++++++++++++++++++++- 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2a94e0d3..40b025e7 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,44 @@ PhpSpreadsheet is a library written in pure PHP and offers a set of classes that allow you to read and write various spreadsheet file formats such as Excel and LibreOffice Calc. +## PHP version support + +LTS: Support for PHP versions will only be maintained for a period of six months beyond the +[end of life of that PHP version](https://www.php.net/eol.php). + +Currently the required PHP minimum version is PHP __7.3__. + +See the `composer.json` for other requirements. + +## Installation + +Use [composer](https://getcomposer.org) to install PhpSpreadsheet into your project: + +```sh +composer require phpoffice/phpspreadsheet +``` + +If you are building your installation on a development machine that is on a different PHP version to the server where it will be deployed, or if your PHP CLI version is not the same as your run-time such as `php-fpm` or Apache's `mod_php`, then you might want to add the following to your `composer.json` before installing: +```json lines +{ + "require": { + "phpoffice/phpspreadsheet": "^1.23" + }, + "config": { + "platform": { + "php": "7.3" + } + } +} +``` +and then run +```sh +composer install +``` +to ensure that the correct dependencies are retrieved to match your deployment environment. + +See [CLI vs Application run-time](https://php.watch/articles/composer-platform-check) for more details. + ## Documentation Read more about it, including install instructions, in the [official documentation](https://phpspreadsheet.readthedocs.io). Or check out the [API documentation](https://phpoffice.github.io/PhpSpreadsheet). diff --git a/docs/index.md b/docs/index.md index 98a2d3d8..ff137c26 100644 --- a/docs/index.md +++ b/docs/index.md @@ -30,9 +30,14 @@ for details. ### PHP version support -Support for PHP versions will only be maintained for a period of six months beyond the +LTS: Support for PHP versions will only be maintained for a period of six months beyond the [end of life of that PHP version](https://www.php.net/eol.php). +Currently the required PHP minimum version is PHP 7.3. The last PHP release was 7.3.33 on 6th December 2021, so PhpSpreadsheet will support PHP 7.3 until 6th June 2022. +PHP 7.4 is officially [End of Life](https://www.php.net/supported-versions.php) on 28th November 2022, and PhpSpreadsheet will continue to support PHP 7.4 for six months after that date. + +See the `composer.json` for other requirements. + ## Installation Use [composer](https://getcomposer.org) to install PhpSpreadsheet into your project: @@ -47,6 +52,26 @@ Or also download the documentation and samples if you plan to use them: composer require phpoffice/phpspreadsheet --prefer-source ``` +If you are building your installation on a development machine that is on a different PHP version to the server where it will be deployed, or if your PHP CLI version is not the same as your run-time such as `php-fpm` or Apache's `mod_php`, then you might want to add the following to your `composer.json` before installing: +```json lines +{ + "require": { + "phpoffice/phpspreadsheet": "^1.23" + }, + "config": { + "platform": { + "php": "7.3" + } + } +} +``` +and then run +```sh +composer install +``` +to ensure that the correct dependencies are retrieved to match your deployment environment. + +See [CLI vs Application run-time](https://php.watch/articles/composer-platform-check) for more details. ## Hello World