Download the PHP package kubawerlos/composer-require-better without Composer

On this page you can find all versions of the php package kubawerlos/composer-require-better. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package composer-require-better

composer-require-better

This repository is abandoned, use composer bump instead.

Plugin for Composer to require package with constraint having patch version.

Current version PHP version CI Status Code coverage Psalm type coverage

Installation

Usage

All Composer's require options (except prefer-lowest and prefer-stable) can be used.

Motivation

Let's assume we want to install package acme-corporation/adding-machine for our project and it has versions 1.0.0 and 1.0.1 released. Usually, we run:

We will have the latest version installed (1.0.1) and constraint ^1.0 added to composer.json. The constraint means all version from 1.0.0, but lower than 2.0.0 are allowed.

This can result in some problems in the future:

  1. If we would want to install another package, that allows acme-corporation/adding-machine only in version 1.0.0 (or has a conflict with acme-corporation/adding-machine version 1.0.1) it would result with acme-corporation/adding-machine being downgraded to version 1.0.0 - we can easily miss that downgrade (as it will be one line in the console) - what if 1.0.1 fixes critical bug for us?
  2. If we run composer update --prefer-lowest (quite often practice when developing a library) we would end up with acme-corporation/adding-machine in version 1.0.0.
  3. Command composer update could take a long time to run when having many packages with many allowed versions (e.g. Symfony 3 LTS has current version 3.4.38, so constraint ^3.4 is allowing 39 versions - from 3.4.0 to 3.4.38).

So instead we can run:

We will have the latest version installed - the same as with require command, but the constraint added to composer.json will be ^1.0.1 - it would mean all version from 1.0.0, but lower than 2.0.0 are allowed. What would that change?

  1. If we would want to install the package that previously downgraded acme-corporation/adding-machine we would see an error and would have to make a decision - is this acceptable to us or we cannot allow it?
  2. Running composer update --prefer-lowest would do nothing for the package as now installed version is the lowest allowed with the constraint.
  3. Command composer update would work faster - mentioned Symfony 3 LST constraint would be ^3.4.38, so it would allow only single version, not 39 versions.
  4. In composer.json we now have the installed version as the constraint, so we don't have to check with composer show or in composer.lock (if we even have it in the repository) which version is used in the project.

All versions of composer-require-better with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
composer-plugin-api Version ^2.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kubawerlos/composer-require-better contains the following files

Loading the files please wait ....