From 04b6b1806dcfbac7362f69cc027784c64e6ff5ba Mon Sep 17 00:00:00 2001 From: michalsn Date: Fri, 29 Dec 2023 09:18:53 +0100 Subject: [PATCH] docs: add composer minimum-stability instructions --- docs/installation.md | 25 +++++++++++++++++++++++++ docs/troubleshooting.md | 4 ++++ 2 files changed, 29 insertions(+) diff --git a/docs/installation.md b/docs/installation.md index fd9df7b..0363de1 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -10,6 +10,31 @@ The only thing you have to do is to run this command, and you're ready to go. composer require codeigniter4/queue +#### A composer error occurred? + +If you get the following error: + +```console +Could not find a version of package codeigniter4/queue matching your minimum-stability (stable). +Require it with an explicit version constraint allowing its desired stability. +``` + +1. Run the following commands to change your [minimum-stability](https://getcomposer.org/doc/articles/versions.md#minimum-stability) in your project `composer.json`: + + ```console + composer config minimum-stability dev + composer config prefer-stable true + ``` + +2. Or specify an explicit version: + + ```console + composer require codeigniter4/queue:dev-develop + ``` + + The above specifies `develop` branch. + See + ## Manual Installation In the example below we will assume, that files from this project will be located in `app/ThirdParty/queue` directory. diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 58d91bc..10cd890 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -5,3 +5,7 @@ If you want to assign an object to the queue, please make sure it implements `JsonSerializable` interface. This is how CodeIgniter [Entities](https://codeigniter.com/user_guide/models/entities.html) are handled by default. You may ask, why not just use `serialize` and `unserialize`? There are security reasons that keep us from doing so. These functions are not safe to use with user provided data. + +### I get an error when trying to install via composer. + +Please see these [instructions](installation.md/#a-composer-error-occurred).