Downgrade from Laravel 5.2 back to 5.1, I'm using Omnipay
but it is not compatible with Laravel 5.2 / Symfony 3.
Or configured symfony/http-foundation:2.8.* , I have understood that it is compatible.
My composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"intervention/image": "^2.3",
"fzaninotto/faker": "^1.6",
"jrean/laravel-user-verification": "^2.2",
"guzzlehttp/guzzle": "~5.3|~6.0",
"zgabievi/promocodes": "^0.1.5",
"greggilbert/recaptcha": "dev-master",
"barryvdh/laravel-dompdf": "0.6.*",
"omnipay/omnipay": "~2.0",
"dabsquared/omnipay-cybersource-soap": "dev-master"
},
"require-dev": {
"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"
}
}
Related
I'm struggling to update an 2015 application from laravel 5.1.46(LTS) to 5.2,
I've done composer require "laravelcollective/html:5.8.0" --with-all-dependencies
and it fails.
I'm doing this because I see the error Call to undefined method Illuminate\Foundation\Application::bindShared() in some step when following https://laravel.com/docs/5.2/upgrade#upgrade-5.2.0 and cant continue unless I do a git reset --hard, I'm clueless.
here is my composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"illuminate/html": "^5.0",
"jenssegers/date": "^3.0",
"intervention/imagecache": "^2.3",
"guzzlehttp/guzzle": "~5.3|~6.0",
"vinkla/hashids": "^2.3",
"milon/barcode": "^5.2"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
},
"files": [
"app/fpdf/fpdf.php"
]
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
],
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
}
}
I have an old project with laravel 5.8;
I've tried to update to 6 & 7 & 8, no luck.
I just want to know where to start from. Right now, all i'm doing is changing versions of different packages...Should i remove any lines or what? What all ways do you upgrade a really old project?
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.1.3",
"aporat/store-receipt-validator": "dev-master",
"barryvdh/laravel-debugbar": "^3.0",
"chumper/zipper": "1.0.x",
"doctrine/cache": "^1.6",
"doctrine/dbal": "^2.5",
"google/apiclient": "^2.0",
"intervention/image": "^2.4",
"laravel/framework": "5.8.*",
"laravel/tinker": "~1.0",
"laravelcollective/html": "^5.3.0",
"maatwebsite/excel": "~3.1",
"mariuzzo/laravel-js-localization": "^1.4",
"piwik/device-detector": "^3.9",
"spatie/pdf-to-image": "^1.5",
"spatie/laravel-image-optimizer": "^1.1"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~6.0"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"Weltwoche\\": "app/"
},
"files": [
"app/Helpers/helpers.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"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",
"sort-packages": true,
"optimize-autoloader": true
}
}
I got an error while trying to run composer update after adding laravel/cashier in my composer.json file.
Below is the screenshot of the error. Don't seem to understand what the error is.
Please, what I'm I missing here?
And my composer.json file is here below
{
"name": "lufficc/xblog",
"description": "A powerful and responsive blog system powered by laravel.",
"keywords": ["blog", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.4.*",
"predis/predis": "^1.1",
"erusev/parsedown": "^1.6",
"qiniu/php-sdk": "^7.0",
"laravel/socialite": "^2.0",
"mews/purifier": "^2.0",
"league/html-to-markdown": "^4.3",
"laravel/tinker": "^1.0",
"laravel/cashier": "~7.0"
},
"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"
],
"files":[
"app/Helpers/helpers.php"
],
"psr-4": {
"App\\": "app/",
"Lufficc\\": "app/Lufficc/"
}
},
"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"
},
"minimum-stability": "dev",
"prefer-stable": true
}
It is now resolved by adding below code to my composer.json file
"repositories": [
{
"type": "composer",
"url": "https://packagist.org"
},
{ "packagist": false }
]
Problem is in installing the vendor folder.the error message says:
The composer.phpr doesn't contain valid JSON error
Please suggest
copy this into your composer.json file
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*"
},
"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": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
After this, run composer install.
Ive created a helper file which i am trying to autoload in my composer.json see composer below:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"laravelcollective/html": "5.1.*",
"zurb/foundation": "5.4.*",
"caffeinated/presenter": "~2.0",
"guzzlehttp/guzzle": "4.0",
"guzzlehttp/oauth-subscriber": "*"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1",
"barryvdh/laravel-debugbar": "^2.0"
},
"autoload": {
"files": [
"app/Project/Helpers/Helpers.php"
],
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/",
"Project\\": "app/Project"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
],
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
}
}
After a composer install and dumpautoload this works completely fine on my local environment but when i push to production i get an undefinded function error (function is located in my helpers.php)
Ive composer installed/dumpautoload on my server but still now luck. Any ideas?
Use composer update. This solved the problem for laravel 5.2.