Cannot update composer dependencies on putty - laravel

Good day, I would like to ask some help, had a problem on composer update.
Here is the picture
but when I check using php -v, it says the php version is 7.1.21.
I really don't know what to do.

Try php composer.phar update.
Your "composer" could be an alias and it's probably pointing to a php 7.0 installation. Check using alias composer

Related

Could not find package codeigniter4/framework with stability stable

I'm doing exactly like what is suggested in the official documentation.
composer create-project codeigniter4/framework
However, I'm getting this error instead:
[InvalidArgumentException]
Could not find package codeigniter4/framework with stability stable.
I fully understand it is not stable yet but I'd like to try and develop a simple app for learning purpose since I've been using CI3 all this while. What should I do? This is the closest possible answer to this question but it was left hanging.
You may install develop branch by:
composer create-project codeigniter4/framework:dev-develop
Codeigniter 4 Moved to Production and also updated documentation in Feb 24,2020 you should try this code in composer
composer create-project codeigniter4/appstarter project-root
Check the latest documentation
Codeigniter4 Documentation
It looks like your PHP version is older than required in codeigniter4. please check whether your PHP version is 7.2(or higher) or not. if you're running below 7.2 version of PHP you'll not be able to use codeigniter4.
Check the php version you have installed globally,
using command php -v in cmd,
if it is below 7.2,
edit the php version in environmental variables.
example: D:\wamp64\bin\php\php7.3.12
this solved the issue I was facing while installing ci4 using composer,
have a good day.

Laravel 5.5 install not generating .env file

I have installed laravel 5.4 multiple times.
Now I'm trying to install laravel 5.5 using same command And it doesn't work.
composer create-project --prefer-dist laravel/laravel blog dev-develop
It doesn't seem to have any errors on installation, only lot of suggestions.
But no key is generated and no .env file is created.
When I try to make php artisan key:generate
/public_html/blog/.env): failed to open stream: No such file or directory
Got the same problem days a go, the problem was because composer was not updated, solved it updating composer, you can run:
composer self-update
Or you can download the latest version there, then you can create the project again and the .env file will be automatically created.
I have this version
Composer version #package_branch_alias_version# (1.0.0-beta2) 2016-03-27 16:00:34
When I run composer self-update I get
[InvalidArgumentException]
Command "self-update" is not defined.
shell command: cp .env.example .env
If you just want to make current setup work, just try doing the following:
cp .env.example .env
php artisan key:generate
But as suggested by one of the answers here, you should update your composer if you have an old version. To check your installed version, do so with composer -v
This is happening because of your Laravel Installer or Composer version. I have faced the same problem and found following 2 different solutions:
Generally, you can solve with by running composer global update command and then run composer update command from your project directory. This solution basically updates your installer and then your project.
If still, you have this problem, then you need to run composer self-update command first and then run composer update command from your project directory. It will update your composer version and then your project.
Hope this information will help you to fix.

How to Uninstall Laravel?

I am facing fatal errors regarding Artisan. I think I couldn't install laravel complete due to slow internet. Now I want to remove Laravel from root and want to have fresh installation.
Can anyone help me?
if you have installed it globally you can simply remove it by composer global remove laravel/installer
If you have installed it via composer project you simply remove the directory.
Since I was looking all around how to uninstall packages and after reading tones
of documentations here's the short how-to uninstall a workbench package in Laravel
Remove package service provider from 'providers' array in app/config/app.php
Remove the package folder in workbench/
Run:
php composer.phar dump-autoload
php artisan clear-compiled
php artisan optimize
(optional) remove all related code using the package (you'll get errors about that)
or use composer global remove laravel/installer
For me, the command that actually did the trick was: composer global remove laravel/installer

Cannot install Laravel correctly

I followed all the instruction by installing composer and then Laravel. Also I did everything what was shown in laracast series for installing Laravel and composer.
BUT I have some problems and I cannot solve them:
I don't have Vendor folder in my Laravel app folder
I cannot launch command 'composer artisan' as it says that
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "artisan" is not defined"
"php artisan" also doesn't work
All the answer in the web I have already tried to resolve my problems but nothing worked for me
Please, tell me, how can I install Laravel correctly and use it without errors
Run composer install or composer update. This will create the vendor folder and download all the dependent modules as mentioned in the composer.json
I want to add some more details which are asked but not clearly answered.
You did not install the composer dependencies. Try composer install.
It is not composer artisan. If you execute that command, you say hey composer! run your artisan command. And it says "Command "artisan" is not defined."
It is php artisan. But if you don't run composer install, php artisan will not work either. Because you are missing Symfony Console Component in your project (not the one used by composer) as well as a complete Laravel installation. Both will also be installed by the composer install command.
Well. I've solved my problem. As I mentioned before I had tried all the answer in the web but nothing had helped me. So then I just deleted my laravel project and ran this command
sudo apt-get upgrade
After some time packages were upgraded and I created new Laravel project. And Laravel started working perfectly! So in any incomprehensible situation do apt-get upgrade :))

How to install typo3 extension in composer via xampp shell command

I want to install the typo3 extension via composer so i have edited my composer.json file.
Like. "typo3-ter/fluidpages": "^4.0.0"
and saved it.
Now in xampp shell command i did like
d:\server\test
composer update
afterwards it took some time but came up with some errors. i don't know that what should i do in command line in order to get it done. I am beginner in it,
any help would be greatful
Thanks
Dont edit your composer.json file, just run
composer require typo3-ter/fluidpages
https://getcomposer.org/doc/03-cli.md#require
This will update your composer.json automatically and install the package.
Since v4 is currently latest release of typo3-ter/fluidpages you dont need to specify the version like
composer require typo3-ter/fluidpages:4

Resources