Trying to install Cashier on Laravel 5.4.36 - php

I am using Laravel 5.4.36 and I am trying to install Cashier using these steps: https://www.nicesnippets.com/blog/laravel-7-cashier-stripe-subscription-tutorial
However when I try to run this line:
sudo composer require laravel/cashier
I get this error:
Problem 1
- laravel/cashier[v12.6.0, ..., v12.6.1] require illuminate/contracts ^6.0|^7.0|^8.0 -> found illuminate/contra
cts[v6.0.0, ..., v6.20.7, v7.0.0, ..., v7.30.0, v8.0.0, ..., v8.19.0] but these were not loaded, likely because it
conflicts with another require.
- Root composer.json requires laravel/cashier ^12.6 -> satisfiable by laravel/cashier[v12.6.0, v12.6.1].
What am I doing wrong and how do I fix this?
Thanks,

When you do
composer require laravel/cashier
this will install the current version of the cashier package that works with the current version of Laravel. You have to check what version of cashier (if any), your current Laravel version installed, supports.

Related

Exporting command results into a file (.csv)

After running my command in the CLI I want to save the results in a file on my machine. I saw a couple of solutions and all of them require this -
composer require maatwebsite/excel
But upon running the command I am given this error...
Your requirements could not be resolved to an installable set of packages.
Problem 1
- maatwebsite/excel[3.1.0, ..., 3.1.25] require php ^7.0 -> your php version (8.1.2) does not satisfy that requirement.
- maatwebsite/excel[3.1.26, ..., 3.1.35] require illuminate/support 5.8.*|^6.0|^7.0|^8.0 -> found illuminate/support[v5.8.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
- phpoffice/phpspreadsheet[1.18.0, ..., 1.25.2] require ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.
- maatwebsite/excel[3.1.41, ..., 3.1.x-dev] require psr/simple-cache ^1.0|^2.0 -> found psr/simple-cache[1.0.0, 1.0.1, 2.0.0, 2.x-dev] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- maatwebsite/excel[3.1.36, ..., 3.1.40] require phpoffice/phpspreadsheet ^1.18 -> satisfiable by phpoffice/phpspreadsheet[1.18.0, ..., 1.25.2].
- Root composer.json requires maatwebsite/excel ^3.1 -> satisfiable by maatwebsite/excel[3.1.0, ..., 3.1.x-dev].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/8.1/cli/php.ini
- /etc/php/8.1/cli/conf.d/10-mysqlnd.ini
- /etc/php/8.1/cli/conf.d/10-opcache.ini
- /etc/php/8.1/cli/conf.d/10-pdo.ini
- /etc/php/8.1/cli/conf.d/15-xml.ini
- /etc/php/8.1/cli/conf.d/20-calendar.ini
- /etc/php/8.1/cli/conf.d/20-ctype.ini
- /etc/php/8.1/cli/conf.d/20-curl.ini
- /etc/php/8.1/cli/conf.d/20-dom.ini
- /etc/php/8.1/cli/conf.d/20-exif.ini
- /etc/php/8.1/cli/conf.d/20-ffi.ini
- /etc/php/8.1/cli/conf.d/20-fileinfo.ini
- /etc/php/8.1/cli/conf.d/20-ftp.ini
- /etc/php/8.1/cli/conf.d/20-gettext.ini
- /etc/php/8.1/cli/conf.d/20-iconv.ini
- /etc/php/8.1/cli/conf.d/20-mysqli.ini
- /etc/php/8.1/cli/conf.d/20-pdo_mysql.ini
- /etc/php/8.1/cli/conf.d/20-phar.ini
- /etc/php/8.1/cli/conf.d/20-posix.ini
- /etc/php/8.1/cli/conf.d/20-readline.ini
- /etc/php/8.1/cli/conf.d/20-shmop.ini
- /etc/php/8.1/cli/conf.d/20-simplexml.ini
- /etc/php/8.1/cli/conf.d/20-sockets.ini
- /etc/php/8.1/cli/conf.d/20-sysvmsg.ini
- /etc/php/8.1/cli/conf.d/20-sysvsem.ini
- /etc/php/8.1/cli/conf.d/20-sysvshm.ini
- /etc/php/8.1/cli/conf.d/20-tokenizer.ini
- /etc/php/8.1/cli/conf.d/20-xmlreader.ini
- /etc/php/8.1/cli/conf.d/20-xmlwriter.ini
- /etc/php/8.1/cli/conf.d/20-xsl.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-gd` to temporarily ignore these required extensions.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require maatwebsite/excel:*" to figure out if any version is installable, or "composer require maatwebsite/excel:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Any other suggestions on how to export the files?
php artisan select:values --year=2020 --month=02 that's how I am running my command
Running this solved my problem
composer require psr/simple-cache:^1.0 maatwebsite/excel:3.1.44 --ignore-platform-req=ext-gd --ignore-platform-req=ext-zip
phpoffice/phpspreadsheet[1.18.0, ..., 1.25.2] require ext-gd *
By looking at the commandline error you need to enable this extention in your xampp or apache server configurations.
In case of Windows
just enable it in php.ini file like this
Now find extention:gd2
and remove the semi colon from start like this.
now simply restart the server and you are good to go.

Why can't I bind Elasticsearch and Laravel Scout?

I decided to test Elasticsearch in conjunction with Laravel Scout. I took this article as a basis
Attempt #1
composer require elasticsearch/elasticsearch - installing ES for Laravel
composer require laravel/scout - installing latest version for Scout (9.1)
composer require tamayo/laravel-scout-elastic - installing package for ES+Scout
I get this error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- tamayo/laravel-scout-elastic[8.0.0, ..., 8.0.2] require laravel/scout ^8.0 -> found laravel/scout[v8.0.0, ..., 8.x-dev] but it conflicts with your root composer.json require (^9.1).
- Root composer.json requires tamayo/laravel-scout-elastic ^8.0 -> satisfiable by tamayo/laravel-scout-elastic[8.0.0, 8.0.1, 8.0.2].
I understand for myself that this bundle package has not been updated on github for six months and it is necessary to get to it the necessary version of laravel/scout, so I change the order of actions and do so:
Attempt #2
composer require elasticsearch/elasticsearch - installing ES for Laravel
composer require tamayo/laravel-scout-elastic - installing this package hoping that he will get the necessary version of laravel/scout for himself as a dependency, in confirmation of this - I see in the console that he pulled up laravel/scout:8.6.1
Now no mistakes, I'm moving on:
I go to config/app.php and add:
Laravel\Scout\ScoutServiceProvider::class,
ScoutEngines\Elasticsearch\ElasticsearchProvider::class,
Run php artisan vendor:publish
And now I get new error:
Class 'ScoutElastic\ScoutElasticServiceProvider' not found
What am I doing wrong?
Solution: don't add ScoutEngines\Elasticsearch\Elastic search Provider:: class, to config/app.php
Everything works fine without adding this provider

Composer Update Error "Requirements could not be resolved to an installable set of packages" in Laravel [duplicate]

This question already has answers here:
Reference - Composer error "Your PHP version does not satisfy requirements" after upgrading PHP
(3 answers)
How to explain Composer's error log?
(2 answers)
Closed 1 year ago.
I Just Update My Composer Which Returns with some errors and issues:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- jeremykenedy/laravel-roles v1.2.0 requires laravel/framework 5.3.*|5.4.*|5.5.*|5.6.* -> found
laravel/framework[v5.3.0-RC1, ..., 5.6.x-dev] but it conflicts with your root composer.json require
(^8.0).
- jeremykenedy/laravel-roles v1.3.0 requires laravel/framework 5.3.*|5.4.*|5.5.*|5.6.*|5.7.* -> found
laravel/framework[v5.3.0-RC1, ..., 5.7.x-dev] but it conflicts with your root composer.json require
(^8.0).
- jeremykenedy/laravel-roles[v1.4.0, ..., v1.7.0] require laravel/framework
5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.* -> found laravel/framework[v5.3.0-RC1, ..., 5.8.x-dev] but it
conflicts with your root composer.json require (^8.0).
- Root composer.json requires jeremykenedy/laravel-roles ^1.2 -> satisfiable by jeremykenedy/laravel-
roles[v1.2.0, ..., v1.7.0].
I Searched on google but failed to solve my issue. Plz, Provide me clear answer So I solve my error.
Thanks, Brother For the Help.
After execution of
composer install --ignore-platform-reqs
Following Errors Also Occur:
Class App\Http\Controllers\riderOrders located in L:/Live/cyber-food-
fiji/app\Http\Controllers\RiderOrders.php does not comply with psr-4
autoloading standard. Skipping.
Class "Grimzy\LaravelMysqlSpatial\SpatialServiceProvider" not found
Script #php artisan package: discover handling the post-autoload-dump
event returned with error code 1
After Execution of
composer update
Your requirements could not be resolved to an installable set of
packages.
Problem 1
- pusher/pusher-php-server[v3.2.0, ..., v3.3.1] require php ^5.4 || ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
- pusher/pusher-php-server v3.4.0 requires php >=5.4 <7.3 -> your php version (8.0.0) does not satisfy that requirement.
- pusher/pusher-php-server v3.4.1 requires php >=5.4 <7.4 -> your php version (8.0.0) does not satisfy that requirement.
- Root composer.json requires pusher/pusher-php-server ^3.2 -> satisfiable by pusher/pusher-php-server[v3.2.0, ..., v3.4.1].
Thanks For Helping me with the last bug.
Plz Also guide in the above errors.
Thanks...
Run this command:
composer install --ignore-platform-reqs
or
composer update --ignore-platform-reqs
Note:
--ignore-platform-reqs: ignore all platform requirements (php, hhvm, lib-* and ext-) and force the installation even if the local machine does not fulfill these. See also the platform config option.
--ignore-platform-req: ignore a specific platform requirement(php, hhvm, lib- and ext-*) and force the installation even if the local machine does not fulfill it.

The package willvincent/laravel-rateable failed to install on laravel 8

I'm trying to install willvincent/laravel-rateable package on laravel 8 but it requires:
illuminate/support ^6.0|^7.0
How do I solve this issue in order to use the rateable package?
- willvincent/laravel-rateable[2.2.0, ..., 2.2.1] require illuminate/support ^6.0|^7.0 -> found illuminate/support[v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev] but it conflicts with another require.
- Root composer.json requires willvincent/laravel-rateable ^2.2 -> satisfiable by willvincent/laravel-rateable[2.2.0, 2.2.1].
Have a look at https://packagist.org/packages/willvincent/laravel-rateable: this package is not compatibel with Laravel 8. There's already an issue posted at https://github.com/willvincent/laravel-rateable/issues/50, and a pull request at https://github.com/willvincent/laravel-rateable/pull/49/files.
You need to wait until the maintainer makes the package compatible - but through testing the pull request in your own application, you could provide feedback to the maintainer. That could speed up the process

unisharp/laravel-ckeditor on Laravel 8+ cannot install package

I'm trying to install ckeditor on my Laravel 8+ project, but can't.
I have the errors:
Problem 1:
Root composer.json requires unisharp/laravel-ckeditor 4.7.2 -> satisfiable by unisharp/laravel-ckeditor[4.7.2].
unisharp/laravel-ckeditor 4.7.2 requires illuminate/support ~5.0 -> found illuminate/support[v5.0.0, ..., 5.8.x-dev] but it conflicts with another require.
this is the errors
I've tried install version 4.7.2 and 5.0, but that still not working.
Is someone know how to solve this problem?
I had the same problem. The command composer require ckeditor/ckeditor worked for me.
unisharp/laravel-ckeditor has seen it's latest release in Nov 2017, more than three years ago. As the error message tells you: this package is not compatible with current versions of Laravel. Either downgrade Laravel to v5 (not recommended), search for another package providing such functionality, or fork the package to provide the neccessary updates.
To install ckeditor on Laravel 8+ project.
If you already have npm installed then use this line:
$ npm install ckeditor4
Then execute the following command:
$ npm update
i ran in to the same problem using`
composer require unisharp/laravel-ckeditor
then i used
$ composer require ckeditor/ckeditor
and it solved it

Categories