After upgrading from laravel 5.4 to 5.5 HTTP ERROR 500 - nginx

"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.6.4",
"MatthiasMullie/Minify": "^1.3",
"guzzlehttp/psr7": "^1.0",
"intervention/image": "^2.3",
"kbsali/redmine-api": "^1.5",
"kordy/ticketit": "^0.3.6",
"laravel/framework": "5.4.*",
"laravel/tinker": "~1.0",
"laravelcollective/html": "5.*",
"maatwebsite/excel": "~2.1.0",
"maddhatter/laravel-fullcalendar": "1.*",
"milon/barcode": "^5.0",
"psr/http-message": "^1.0",
"unisharp/laravel-filemanager": "^1.7"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.7",
"jamesiarmes/php-ntlm": "dev-master",
"php-ews/php-ews": "dev-master"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"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
}
}

Related

How to remove twbs folder in my Laravel project?

I don't know how to use twbs in my Laravel project. So how can I delete this folder?
composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.4.*",
"laravel/tinker": "~1.0",
"twbs/bootstrap": "4.0.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.7"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"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
}
}
The good idea is to use composer remove command without updating all other packages:
composer remove twbs/bootstrap
Remove "twbs/bootstrap": "4.0.0" line from composer.json and then run command:
composer update
Run This command For Remove any package
composer remove twbs/bootstrap

SonataUserBundle::registerFormMapping() return value

I'm currently creating a website with Symfony3.2.4, I've installed Sonata News Bundle on my website.
I'm trying to having an access to my website but Symfony show me an error.
Type error: Return value of Sonata\UserBundle\SonataUserBundle::registerFormMapping() must be an instance of Sonata\UserBundle\void, none returned
I don't know from where this error is coming for and how to fix it...
Here is my composer.json :
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-4": {
"AppBundle\\": "src/AppBundle",
"Application\\": "src/Application"
},
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
},
"autoload-dev": {
"psr-4": { "Tests\\": "tests/"
},
"files": [ "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
},
"require": {
"php": ">=5.6",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/orm": "^2.5",
"incenteev/composer-parameter-handler": "^2.0",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^5.0.0",
"sonata-project/admin-bundle": "^3.23",
"sonata-project/doctrine-orm-admin-bundle": "^3.1",
"sonata-project/news-bundle": "^3.1",
"sonata-project/user-bundle": "^3.3",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.6.4",
"symfony/symfony": "3.4.*",
"twig/twig": "^1.0||^2.0"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.0",
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
"scripts": {
"symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-install-cmd": [
"#symfony-scripts"
],
"post-update-cmd": [
"#symfony-scripts"
]
},
"config": {
"preferred-install": "dist",
"platform": {
"php": "5.5.9"
},
"sort-packages": true
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "3.4-dev"
}
}
}
I've got no idea from where this coming this error and hox to fix it.
That's why I request your help ^^.
Thanks a lot.
I had the same problem with my app. It turned out I was using PHP 7.0 and void is a feature introduced in PHP 7.1 (http://php.net/releases/7_1_0.php).
Please double check you are using PHP 7.1+.

Symfony fork a bundle

I forked this bundle "[egeloen/ivory-google-map][1]"
[1]: https://github.com/egeloen/ivory-google-map/ to this [repository][1]
[1]: https://github.com/spinoza123/ivory-google-map and i changed the original url in composer.json to my forked repository, but when i do composer update i have this error
[InvalidArgumentException]
Could not find a matching version of package spinoza123/google-map. Check the package spelling, your version constr
aint and that the package is available in a stability which matches your minimum-stability (stable).
Must i publish it in pakagist, if yes is it free and how to do that ?
my composer.json
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-4": {
"AppBundle\\": "src/AppBundle"
},
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
},
"autoload-dev": {
"psr-4": { "Tests\\": "tests/" },
"files": [ "vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php" ]
}
"require": {
"php": ">=5.5.9",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/orm": "^2.5",
"incenteev/composer-parameter-handler": "^2.0",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^5.0.0",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.6.4",
"symfony/symfony": "3.4.*",
"twig/twig": "^1.0||^2.0",
"spinoza123/ivory-google-map": "dev-master"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
"scripts": {
"symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-install-cmd": [
"#symfony-scripts"
],
"post-update-cmd": [
"#symfony-scripts"
]
},
"config": {
"platform": {
"php": "5.5.9"
},
"sort-packages": true
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "3.4-dev"
}
}
}
Thanks
Use VCS in your composer.json
There are a few use cases for this. The most common one is maintaining your own fork of a third party library. If you are using a certain library for your project and you decide to change something in the library, you will want your project to use the patched version. If the library is on GitHub (this is the case most of the time), you can simply fork it there and push your changes to your fork.
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/spinoza123/ivory-google-map"
}
],
"require": {
"egeloen/ivory-google-map": "dev-master"
}
}

Target not instantiable while building MailThiefFiveFourCompatible (Laravel 5.1 to 5.4)

I'm in the process of upgrading our Laravel 5.1 app to Laravel 5.5, and have been following the upgrade guides.
Whilst performing the upgrade from 5.3 to 5.4, I've run into an issue with failing unit tests that use MailThief's InteractsWithMail trait.
composer.json:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7",
"laravel/framework": "5.4.*",
"laravelcollective/html": "5.4.*",
"jeremykendall/php-domain-parser": "^3.0",
"laracasts/flash": "^2.0",
"aws/aws-sdk-php": "^3.21",
"league/flysystem-aws-s3-v3": "~1.0",
"maatwebsite/excel": "^2.1",
"league/oauth2-client": "1.4.*",
"microsoft/microsoft-graph": "^0.1.1",
"guzzlehttp/guzzle": "^6.2",
"dusterio/laravel-aws-worker": "^0.1.9",
"zizaco/entrust": "5.2.x-dev",
"anchu/ftp": "^2.0",
"predis/predis": "~1.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~6",
"phpspec/phpspec": "~2.1",
"laravel/homestead": "^4.0",
"tightenco/mailthief": ">=0.3.8",
"barryvdh/laravel-ide-helper": "*",
"doctrine/dbal": "^2.5",
"symfony/dom-crawler": "~3.1",
"symfony/css-selector": "~3.1",
"laravel/browser-kit-testing": "^2.0"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
},
"files": [
"app/Support/Helpers.php"
]
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
],
"psr-4": {
"Tests\\": "tests/"
}
},
"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 ide-helper:generate -M",
"php artisan ide-helper:meta",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
Unit test stack trace:
Target [Illuminate\Contracts\View\Factory] is not instantiable while building [MailThief\MailThiefFiveFourCompatible].
/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:895
/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:735
/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:608
/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:575
/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:728
/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:862
/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:790
/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:756
/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:608
/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:575
/app/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:728
/app/vendor/laravel/framework/src/Illuminate/Container/Container.php:1172
/app/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:159
/app/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:128
/app/vendor/tightenco/mailthief/src/Testing/InteractsWithMail.php:21
/app/vendor/tightenco/mailthief/src/Testing/InteractsWithMail.php:59
I'm using Homestead hosted on Windows 10.

Composer removes web/bundles even if in .gitignore

Ok, starting from this morning composer update removes all the assets from web/bundles.
It never did it before. I've searched here and i've found this link so i've checked my .gitignore (I can't find a .svnignore), here it is.
How can i solve?
/app/config/parameters.yml
/build/
/phpunit.xml
/var/*
!/var/cache
/var/cache/*
!var/cache/.gitkeep
!/var/logs
/var/logs/*
!var/logs/.gitkeep
!/var/sessions
/var/sessions/*
!var/sessions/.gitkeep
!var/SymfonyRequirements.php
/vendor/
/web/bundles/
[ EDIT ]
This is my composer.json, it did never delete the content of web/bundles folder. The only difference is that it upgraded symfony from 3.3.2 to 3.3.3
{
"name": "app/demo",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
},
"files": [
"vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php"
]
},
"require": {
"php": ">=5.5.9",
"commerceguys/addressing": "^1.0.0-beta3",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-cache-bundle": "^1.2",
"doctrine/orm": "^2.5",
"egulias/email-validator": "^2.1",
"fdisotto/partita-iva": "^3.0",
"friendsofsymfony/user-bundle": "^2.0",
"incenteev/composer-parameter-handler": "^2.0",
"intervention/image": "^2.3",
"jstayton/google-maps-geocoder": "^2.4",
"knplabs/knp-menu-bundle": "^2.1",
"leafo/scssphp": "^0.6.7",
"misd/phone-number-bundle": "^1.2",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"symfony/assetic-bundle": "^2.8",
"symfony/monolog-bundle": "^3.0.2",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.3.10",
"symfony/symfony": "3.3.*",
"twig/twig": "^1.0||^2.0",
"usu/codice-fiscale": "^1.0"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
"scripts": {
"symfony-scripts": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-install-cmd": [
"#symfony-scripts"
],
"post-update-cmd": [
"#symfony-scripts"
]
},
"config": {
"sort-packages": true
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": null
}
}

Resources