How to install tinymce package with composer in laravel - php

I am trying to use tinymce with Laravel 5.2.
Till now I am done with composer require tinymce/tinymce and composer update.
The package got installed in vendor directory with the directory name tinymce.
What are the next steps ? I guess we have to add PackageServiceProvider in app/config/app.php but how ?
Thanks in advance,
Sambhav

I found this lib of tinymce for laravel. you can try it.
https://github.com/ktquez/laravel-tinymce

Related

Laravel on Google App Engine Class 'Facade\Ignition\IgnitionServiceProvider' not found

I'm deploying my laravel web on google app engine but it keeps showing the Class 'Facade\Ignition\IgnitionServiceProvider' not found error. Here's what i've done :
move facade/ignition from require -dev to require
move nunomaduro/collision as well
all sorts of cache clearing php artisan commands
deleting composer.lock and vendor folder then run composer install
none of the above seems to work.
Problem : GAE showing Class 'Facade\Ignition\IgnitionServiceProvider' not found
Expected output : login page to the website
Query : what else can i do to fix this issue?
try
composer remove --dev facade/ignition
as it is only need in development mode
i reliaze that there is a problem updating vendor when you install or change composer dependencies. Try to create a new project and deploy again with "nunomaduro/collision" in require. I didn´t find other solution.

Laravel PackageManifest.php: Undefined index: name

I'm just trying to deploy my application and I just ran composer update on my server and I got the following error:
In PackageManifest.php line 122:
Undefined index: name
How can I fix this issue?
As a temporary fix, try this, it worked for me, in the following file:
vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php
Find line 116 and comment it:
$packages = json_decode($this->files->get($path), true);
Add two new lines after the above commented line:
$installed = json_decode($this->files->get($path), true);
$packages = $installed['packages'] ?? $installed;
I had the same problem, I just execute the command:
composer update
this will updated the composer.lock file.
After that worked like a charm.
I found this issue on the composer GitHub repo that helped a lot
I updated my Laravel framework from 5.8 to 5.8.38, following the table displayed in that issue and the error disappeared.
This Laravel blog post also helps
If you can't upgrade Laravel, you can just stay with Composer 1 by running
composer self-update --1
I recently switched composer 2.0.8 and my Laravel version is 6.20.27
To solve this issue:
Step 1:
Delete compose.lock File
Step 2:
Install dependencies.
composer install
I had the same problem.
In my case downgrading the composer version fixed the problem.
They updated Composer 4 times within 2 days - I think they had a problem with their newest updates.
In my case version 1.10.1 was the version to go with.
sudo composer self-update --1
I hope it'll work.
I had a problem like this, and also tried composer self-update --stable, but there was no result. So, I found that this file belongs to the Laravel framework. So the following command resolved this issue:
$ composer update laravel/framework
In my case downgrading the composer version fixed the problem.
sudo composer self-update --1
https://github.com/composer/composer/issues/9340#issuecomment-716210369
As stated in here, your laravel version may conflict with composer 2
composer update laravel/framework
should fix your problem :D
The easiest way to solve this issue is
delete composer.lock file from your project.
Run composer install
I was facing the same issue. I Saw my Laravel framework version is "laravel/framework": "6.0"
So just put the cap before the version and it starts working fine.
"laravel/framework": "^6.0"
Running the following command worked for me. Maybe this will help someone needy.
composer update
I removed my vendor folder and composer.lock and ran composer install again. This solved it for me.
Running composer update worked for my project with Laravel 5.7
Some versions of composer give this error, the version 1.10.20 doesn't throw this error
composer self-update 1.10.20
composer install
For my Laravel 5.7 project deleting vendor folder and composer.lock file fixed the issue.
I have a solution:
Delete the vendor folder.
run composer install
Don't use --no-scripts. This will cause a problem, and will not create the appropiate folders which the file PackageManifest.php and others need.
run composer update
This is so you don't have problems with bugs in the file.
Try this, it is worked for me, in the following file:
vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php
Find this line and comment on it
$packages = json_decode($this->files->get($path), true);
Add two new lines after the above-commented line
$installed = json_decode($this->files->get($path), true);
$packages = $installed['packages'] ?? $installed;
If you want to fix without making updates and composer updates
just go to vendor/composer and remove installed.json
Running the following command fixed it for us
composer self-update --stable
No need to force an upgrade on your packages (running composer update on production is not recommended anyway) or downgrade your Composer if it's on version 2.
If you have a website that requires Composer v1 for updates (because, for example, v2 causes errors) and you have version v2 installed globally, the quickest solution is:
Step 1
Download the latest stable 1.x composer.phar from https://getcomposer.org/download/ (under Manual Download).
Step 2
Place the downloaded composer.phar file in the root of your project (where the composer.json file resides).
Step 3
Run your command using the composer.phar file. Example:
php composer.phar install
To downgrade composer to an old version:
composer self-update <version>
Example:
composer self-update 1.10.1
here's a solution that worked for me. https://github.com/composer/composer/issues/9340#issuecomment-716210369
change your laravel framework to 6.18.7 so that its compatible with composer 2
If you have composer version 2 upgrade your laravel to 6.2.
https://github.com/composer/composer/issues/9340#issuecomment-716210369
I had the same problem after i clone an laravel project and start composer install. Then I read through some solutions here. In my opinion, it is not a good idea to edit the laravel core. But if it's just for testing, why not.
My solution in my case was composer update instead composer install. In the case of composer update, it does not use the composer.lock file and updates the packages from composer.json. For me and in my special case works.
On my computer composer version 2.0.9 was installed, I had the same problem when upgrade laravel project.
the solution is :
Delete Vendor folder inside your project if exist.
inside composer.json for laravel version write this "laravel/framework": "^6.0" don't forget ^ in front of 6.0 it needs to install latest version of laravel 6
then composer update
finally, it works perfectly.
I updated to Composer 2.0.11 and I had the error. Downgraded to Composer 1.10.20, it worked great, BUT IT'S VERY VERY SLOW.
So for those like me who don't want to change the vendor code, and still want Composer 2.0.x know that it was a kind of bug in Laravel, and Laravel has fixed it in minor versions (or hotfixes). I was using Laravel 5.7.9 and my vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php ->build() was like:
if ($this->files->exists($path = $this->vendorPath.'/composer/installed.json')) {
$packages = json_decode($this->files->get($path), true);
}
But in Laravel 5.7.29 PackageManifest.php , the same file is fixed:
if ($this->files->exists($path = $this->vendorPath.'/composer/installed.json')) {
$installed = json_decode($this->files->get($path), true);
$packages = $installed['packages'] ?? $installed;
}
Same goes for Laravel 5.6.0 that had the bug, and is fixed in 5.6.40 Laravel 5.6.40 PackageManifest.php. I don't know from which minor version it has been fixed at each level, but I suggest to go for the last, like 5.7.29, 5.6.40 etc. Or you can go look the versions to see if it has been fixed.
NOW COMPOSER 2.0 IS VERY VERY FAST.
If the error is after self updating the composer, just replace composer with composer1.Just change:
composer install ...
into:
composer1 install ...
Just this!
I got this issue because of a Laravel and composer version are not compatible.
Following are the steps I follow to solve this issue:
I update Laravel version from 6.1 to 6.20 in composer.json file Eg: "laravel/framework": "6.20.*"
then delete composer.lock file.
And run composer install command
Now Problem is fixed. :)
run a composer upgrade.
This work for me on laravel 7

Class 'Codesleeve\LaravelStapler\Providers\L5ServiceProvider' not found when installing

I'm using LaravelStapler package to manage image in Laravel 5.1.
I installed LaravelStapler with the following steps:
Add "codesleeve/laravel-stapler": "^1.0" into composer.json file
Add 'Codesleeve\LaravelStapler\Providers\L5ServiceProvider' into providers array in config/app.php file
Run composer install
And faced the error:
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Codesleeve\LaravelStapler\Providers\L5ServiceProvider' not found
If i run composer install before add 'Codesleeve\LaravelStapler\Providers\L5ServiceProvider' into providers array in config/app.php file, no error occurs.
It's hard for me to deploy into productions when I need to comment out 'Codesleeve\LaravelStapler\Providers\L5ServiceProvider' before composer install and uncomment after in production.
Are there any solutions which I can install it without commenting out 'Codesleeve\LaravelStapler\Providers\L5ServiceProvider' ?
Thanks in advance !
Update:
Sorry, It's my mistake. My team mate ignored composer.lock in Repository. I reviewed his pull-request and didn't realize that. Everything works as normal.

Installing Yii2: Invalid Parameter – yii\base\InvalidParamException

I'm installing Yii2 in the way that shows the Getting Started tutorial:
composer global require "fxp/composer-asset-plugin:~1.1.1"
composer create-project --prefer-dist yiisoft/yii2-app-basic basic
When I try to access localhost/YiiTutorial/basic/web I get this error:
Invalid Parameter – yii\base\InvalidParamException
The file or directory to be published does not exist: C:\wamp\www\YiiTutorial\basic\vendor\bower/jquery/dist
In the tutorial says that is nothing to edit... it should work right out of the box... what I'm missing?
If I download the package and place it in the same folder, it works perfect, but I want to install it from composer!
Inside vendor/bower folder it's another one called bower-asset.
Copy this folder content (some other folders named bootstrap, jquery, etc...) and move them to vender/bower.
it a recent bug. update your fxp plugin to latest version (1.1.1) and clear composer's cache and try :
composer self-update
composer global update
composer update
Mainly if not issue regarding to vendor installation so please give permission to your /assets and /runtime folers of your projects and try to run again.
In your vendor folder you should rename bower-asset to bower .
OR you can use the following
make sure that you have the following in your composer.json:
composer.json
Other ways
I have encountered this kind of problem lately, the issue is in your composer it missing the asset-plugins which allows managing bower and npm package dependencies through Composer. Just run this command, you only need to run this command once for all. You can read the yii2 docs. Yii2 Installation
composer global require "fxp/composer-asset-plugin:^1.2.0"

Installed Cartalyst Sentry on Laravel 4 - missing src files

I've installed Sentry on Laravel 4 through composer following these instructions but the vendor/cartalyst/sentry/src folder is empty. Why is that? Does anyone know? I didn't get any errors during composer update.
Thanks a lot!
Sentry didn't install properly because I also used the fzaninotto/faker package in my app. I guess they just don't work well together. After removing fzaninotto/faker package from my composer.json file and re-running composer update it worked perfectly.

Categories