I had issue when i add code "laravelcollective/html": "5.3.*" in composer.json, and then i try to update composer via command line in windows and show this in my command line.
PLEASE HELP ME GUYS, THANKS :))
always show like this, if i try to update composer
This my composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*"
"laravelcollective/html": "5.3.*"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.0",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
You're missing a comma(,) here "laravel/framework": "5.3.*",
If invalid json error occurred you can check which line creates error by validating your json code here. Just paste your code and it will highlight the line(s) for you.
You may try to change the line where it gives an error to something like this.
"laravelcollective/html": "^5.2",
ANd to make it easier. Add a comma at the end of the
"laravel/framework": "5.3.*"
Hope it could help.
Correct answer :D
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.3.*",
"laravelcollective/html": "^5.2"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.0",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
Finally i can update composer :D
Update your laravel/framework dependency to 5.3.* in your composer.json file.
You should also upgrade your symfony/css-selector and symfony/dom-crawler dependencies to 3.1.* in the require-dev section of your composer.json file.
Related
composer.json >>>>
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.3",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.0",
"laravel/tinker": "^2.0",
"laravel/ui": "^3.0",
"laravelcollective/html": "^6.2",
"spatie/laravel-permission": "^3.17",
"tcg/voyager": "^1.6"
},
"require-dev": {
"facade/ignition": "^2.3.6",
"fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover --ansi"
],
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate --ansi"
]
}
}
this is laravel 8 php 7 and think it could be related to my namespace configuration, because i haven't all understood yet.
hat I have already done :
Delete /vendor and make a new install with composer install
composer dump-autoload
composer update btw, I get the error when I insert the php serve
Please inform me if i should post another file that could be useful.
Here is my composer.json file :
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.3",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.0",
"laravel/tinker": "^2.0",
"laravel/ui": "^3.0",
"laravelcollective/html": "^6.2",
"spatie/laravel-permission": "^3.17",
"tcg/voyager": "^1.6"
},
"require-dev": {
"facade/ignition": "^2.3.6",
"fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover --ansi"
],
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate --ansi"
]
}
}
I am trying to insert a composer JSON text into a TEXT column of a MySQL database.
If I insert the following
insert into server_details set composer = '"psr-4": {
"App\\": "app/"
}'
What is inserted into the database is
"psr-4": { "App\": "app/" }
Notice only a single back slash after App. How can I insert the composer JSON into a sql database without making the JSON invalid?
Full JSON being inserted is:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.3",
"barryvdh/laravel-dompdf": "^0.8.7",
"facade/ignition": "^2.10.2",
"fideloper/proxy": "^4.3.0",
"freshbitsweb/laratables": "^2.4",
"guzzlehttp/guzzle": "^7.3.0",
"ignited/laravel-omnipay": "3.3.*",
"intervention/image": "^2.5",
"ivopetkov/html5-dom-document-php": "^2.2.9",
"laravel/framework": "8.*",
"laravel/ui": "^v3.3.0",
"laravelcollective/html": "^v6.2.1",
"league/csv": "^9.7.1",
"milon/barcode": "^8.0",
"omnipay/sagepay": "3.*",
"predis/predis": "^1.1",
"shvetsgroup/laravel-email-database-log": "^8.0",
"spatie/eloquent-sortable": "^3.11.0",
"spatie/laravel-activitylog": "^3.17.0",
"spatie/laravel-newsletter": "^4.10",
"spatie/laravel-permission": "^4.2"
},
"require-dev": {
"laravel/tinker": "^2.6.1",
"barryvdh/laravel-debugbar": "^3.6.2",
"barryvdh/laravel-ide-helper": "^v2.8.2",
"filp/whoops": "^2.13",
"laminas/laminas-code": "^3.4.1",
"laracasts/generators": "^1.1.8",
"mockery/mockery": "^1.3.1",
"phpunit/phpunit": "^7.5.20",
"symfony/yaml": "^4.1"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
Disabling NO_BACKSLASH_ESCAPES mode disables black slashes.
if
NO_BACKSLASH_ESCAPES mode is enabled, use "App\/";
I think question is almost same but error is different.
I just install laravel 5.2 and trying to install quickadmin packages. But I got this error. I also update composer. I tried this suggestion and also some other suggestions. But It's not working. I also tried older version of composer.json configuration. But unfortunately It's not working.
Error:
Here is my Composer.json configuration without changing anything.
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
Any suggestions how to solve in laravel 5.2?
I recently ran latest composer installation for a Yii2 basic application template.
But running php composer.phar install throws this exception:
Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not
exist
The "yiisoft/yii2-composer" plugin requires composer-plugin-api 1.0.0,
this WIL L break in the future and it should be fixed ASAP (require
^1.0 for example).
[ReflectionException] Class
Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist
[ErrorException]
Declaration of
Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository::w
hatProvides() should be compatible with
Composer\Repository\ComposerRepository::
whatProvides(Composer\DependencyResolver\Pool $pool, $name,
$bypassFilters = fal se)
Here is my composer.json:
{
"name": "yiisoft/yii2-app-basic",
"description": "Yii 2 Basic Project Template",
"keywords": ["yii2", "framework", "basic", "project template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "stable",
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": ">=2.0.5",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*"
},
"require-dev": {
"yiisoft/yii2-codeception": "*",
"yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*",
"yiisoft/yii2-faker": "*"
},
"config": {
"process-timeout": 1800
},
"scripts": {
"post-create-project-cmd": [
"yii\\composer\\Installer::postCreateProject"
]
},
"extra": {
"yii\\composer\\Installer::postCreateProject": {
"setPermission": [
{
"runtime": "0777",
"web/assets": "0777",
"yii": "0755"
}
],
"generateCookieValidationKey": [
"config/web.php"
]
},
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
}
What could have gone wrong? Anyone experiencing this?
Like the error message says:
The "yiisoft/yii2-composer" plugin requires composer-plugin-api 1.0.0, this WILL break in the future and it should be fixed ASAP (require ^1.0 for example).
Try to update your fxp/composer-asset-plugin:
php composer.phar global update fxp/composer-asset-plugin --no-plugins
PS: If after update it still not working, try also following:
composer global require fxp/composer-asset-plugin --no-plugins
I'm trying to install something that I created on git in my laravel site and I keep getting this error when I hit composer update I have git version 2.0.1 and my mac is version 10.8.5
[RuntimeException]
Failed to execute git clone --no-checkout 'git#bitbucket.org:PATH-TO-REPO.git' '/Applications/MAMP/htdocs/test-modules/vendor/test/tinymce' && cd '/Applications/MAMP/htdocs/test-modules/vendor/test/tinymce' && git
remote add composer 'git#bitbucket.org:PATH-TO-REPO.git' && git fetch composer
dyld: lazy symbol binding failed: Symbol not found: ___strlcpy_chk
Referenced from: /usr/local/git/bin/git
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: ___strlcpy_chk
Referenced from: /usr/local/git/bin/git
Expected in: /usr/lib/libSystem.B.dylib
sh: line 1: 504 Trace/BPT trap: 5 git clone --no-checkout 'git#bitbucket.org:PATH-TO-REPO.git' '/Applications/MAMP/htdocs/test-modules/vendor/test/tinymce'
In my composer.json I have
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"laravel/framework": "4.2.6",
"test/tinymce": "dev-master",
"test/uploadify": "dev-master",
"mews/captcha": "dev-master"
},
"require-dev": {
"way/generators": "~2.0"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php",
"app/modules"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "stable",
"repositories": [
{
"type": "composer",
"url": "http://localhost:8888/test-modules/packages.json"
}
]
}
and in my packages.json
{
"packages": {
"test/tinymce": {
"dev-master": {
"name": "test/tinymce",
"version": "dev-master",
"source": {
"url": "git#bitbucket.org:PATH-TO-REPO.git",
"type": "git",
"reference": "master"
}
}
},
"test/uploadify": {
"dev-master": {
"name": "test/uploadify",
"version": "dev-master",
"source": {
"url": "git#bitbucket.org:PATH-TO-REPO.git",
"type": "git",
"reference": "master"
}
}
}
}
}
dyld: Symbol not found: ___strlcpy_chk
You need to re-install your Git. On macOS, use Brew, e.g.: git reinstall git. This is usually the issue when your program points to the wrong or outdated libraries.