Laravel 5.1 Composer install error - php

When running composer install I get the following error:
php artisan clear-compiled
PHP Fatal error: Uncaught TypeError: Argument 1 passed to App\Exceptions\Handler::report() must be an instance of Exception, instance of Error given, called in /home/vagrant/Code/courtesy-sys/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php on line 73 and defined in /home/vagrant/Code/courtesy-sys/app/Exceptions/Handler.php:25
Stack trace:
#0 /home/vagrant/Code/courtesy-sys/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(73): App\Exceptions\Handler->report(Object(Error))
#1 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(Error))
#2 {main}
thrown in /home/vagrant/Code/courtesy-sys/app/Exceptions/Handler.php on line 25
[Symfony\Component\Debug\Exception\FatalErrorException]
Uncaught TypeError: Argument 1 passed to App\Exceptions\Handler::report() must be an instance of Exception, instance of Error given, called in /home/vagrant/Code/courtesy-sys/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php on line 73 and defined in /home/vagrant/Code/courtesy-sys/app/Exceptions/Handler.php:25
Stack trace:
#0 /home/vagrant/Code/courtesy-sys/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(73): App\Exceptions\Handler->report(Object(Error))
#1 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(Error))
#2 {main}
thrown
Script php artisan clear-compiled handling the post-install-cmd event returned with error code 255
Is there someone with a similar problem and can provide me with the solution. I tried Google without any results...

Try it:
composer install --no-scripts

Related

cannot execute php artisan command [php fatal error[

I have a laravel project I installed the composer
and run
composer install
After that I executed the update command
composer update
on the project's root directory, and during the execution on the command
php artisan optimize
I got the error shown in the attached image.
When I try to execute any php artisan command I got the same error too.
Error lines
PHP Fatal error: Uncaught Error: Call to undefined method Illuminate\Support\Facades\Auth::check() in C:\xampp\htdocs\projectx\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:221
Stack trace:
#0 C:\xampp\htdocs\projectx\app\Exceptions\Handler.php(39): Illuminate\Support\Facades\Facade::__callStatic('check', Array)
#1 C:\xampp\htdocs\projectx\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(81): App\Exceptions\Handler->report(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#2 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(Symfony\Component\Debug\Exception\FatalThrowableError))
#3 {main}
thrown in C:\xampp\htdocs\projectx\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 221
PHP Fatal error: Uncaught Error: Call to undefined method Illuminate\Support\Facades\Auth::check() in C:\xampp\htdocs\projectx\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:221
Stack trace:
#0 C:\xampp\htdocs\projectx\app\Exceptions\Handler.php(39): Illuminate\Support\Facades\Facade::__callStatic('check', Array)
#1 C:\xampp\htdocs\projectx\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(81): App\Exceptions\Handler->report(Object(Symfony\Component\Debug\Exception\FatalErrorException))
#2 C:\xampp\htdocs\projectx\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(123): Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(Symfony\Component\Debug\Exception\FatalErrorException))
#3 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown()
#4 {main}
thrown in C:\xampp\htdocs\projectx\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 221
You could try to use the append_config() helper method in your environment app configuration file:
'providers' => append_config(array(
'LocalOnlyServiceProvider',
))
The command php artisan optimize has been remove in laravel 5.6
see more: https://laravel.com/docs/5.6/upgrade

Invalid Parameter – yii\base\InvalidParamException The file or directory to be published does not exist: /frontend/web

Moved the site from one server to another with postgresql database. Db has been connected. Then I used this command:
composer install
While loading the site, yii debugger shows an error
What is more, composer update shows many errors in console:
PHP Fatal error: Uncaught Error: Call to undefined method Composer\Package\RootPackage::getConfig() in /var/www/907-irbis/data/www/site.ru/vendor/fxp/composer-asset-plugin/Config/ConfigBuilder.php:111
Stack trace:
#0 /var/www/907-irbis/data/www/site.ru/vendor/fxp/composer-asset-plugin/Config/ConfigBuilder.php(74): Fxp\Composer\AssetPlugin\Config\ConfigBuilder::getConfigBase(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#1 /var/www/907-irbis/data/www/site.ru/vendor/fxp/composer-asset-plugin/FxpAssetPlugin.php(82): Fxp\Composer\AssetPlugin\Config\ConfigBuilder::build(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#2 /usr/share/php/Composer/Plugin/PluginManager.php(215): Fxp\Composer\AssetPlugin\FxpAssetPlugin->activate(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#3 /usr/share/php/Composer/Plugin/PluginManager.php(188): Composer\Plugin\PluginManager->addPlugin(Object(Fxp\Composer\AssetPlugin\FxpAssetPlugin))
#4 /usr/share/php/Composer/Installer/PluginInstaller.php(62): Composer\Pl in /var/www/907-irbis/data/www/site.ru/vendor/fxp/composer-asset-plugin/Config/ConfigBuilder.php on line 111
Fatal error: Uncaught Error: Call to undefined method Composer\Package\RootPackage::getConfig() in /var/www/907-irbis/data/www/site.ru/vendor/fxp/composer-asset-plugin/Config/ConfigBuilder.php:111
Stack trace:
#0 /var/www/907-irbis/data/www/site.ru/vendor/fxp/composer-asset-plugin/Config/ConfigBuilder.php(74): Fxp\Composer\AssetPlugin\Config\ConfigBuilder::getConfigBase(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#1 /var/www/907-irbis/data/www/site.ru/vendor/fxp/composer-asset-plugin/FxpAssetPlugin.php(82): Fxp\Composer\AssetPlugin\Config\ConfigBuilder::build(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#2 /usr/share/php/Composer/Plugin/PluginManager.php(215): Fxp\Composer\AssetPlugin\FxpAssetPlugin->activate(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#3 /usr/share/php/Composer/Plugin/PluginManager.php(188): Composer\Plugin\PluginManager->addPlugin(Object(Fxp\Composer\AssetPlugin\FxpAssetPlugin))
#4 /usr/share/php/Composer/Installer/PluginInstaller.php(62): Composer\Pl in /var/www/907-irbis/data/www/site.ru/vendor/fxp/composer-asset-plugin/Config/ConfigBuilder.php on line 111

CI_Exceptions::show_exception() must be an instance of Exception

I got error in codeigniter 3.0 with php7. please look below error and help me.
Can you please let me know what wrong with my code and system library of codeigniter 3.o.
PHP Fatal error: Uncaught TypeError: Argument 1 passed to CI_Exceptions::show_exception() must be an instance of Exception, instance of Error given, called in /var/www/html/vsports/cron/system/core/Common.php on line 663 and defined in /var/www/html/vsports/cron/system/core/Exceptions.php:190
Stack trace:
#0 /var/www/html/vsports/cron/system/core/Common.php(663): CI_Exceptions->show_exception(Object(Error))
#1 [internal function]: _exception_handler(Object(Error))
#2 {main}
thrown in /var/www/html/vsports/cron/system/core/Exceptions.php on line 190
Fatal error: Uncaught TypeError: Argument 1 passed to CI_Exceptions::show_exception() must be an instance of Exception, instance of Error given, called in /var/www/html/vsports/cron/system/core/Common.php on line 663 and defined in /var/www/html/vsports/cron/system/core/Exceptions.php:190
Stack trace:
#0 /var/www/html/vsports/cron/system/core/Common.php(663): CI_Exceptions->show_exception(Object(Error))
#1 [internal function]: _exception_handler(Object(Error))
#2 {main}
thrown in /var/www/html/vsports/cron/system/core/Exceptions.php on line 190
A PHP Error was encountered
Severity: ErrorMessage: Uncaught TypeError: Argument 1 passed to CI_Exceptions::show_exception() must be an instance of Exception, instance of Error given, called in /var/www/html/vsports/cron/system/core/Common.php on line 663 and defined in /var/www/html/vsports/cron/system/core/Exceptions.php:190
Stack trace:
#0 /var/www/html/vsports/cron/system/core/Common.php(663): CI_Exceptions->show_exception(Object(Error))
#1 [internal function]: _exception_handler(Object(Error))
#2 {main}
thrownFilename: /var/www/html/vsports/cron/system/core/Exceptions.phpLine Number: 190

ErrorHandler issue Migrating from PHP 5.5 to 7

I'm working on migrating from Ubuntu 14 to 16 and php 5.5 to 7. When I'm trying to turn on my application, I keep running into an ErrorHandler Fatal Error. Does anyone know a quick way to resolve this?
ubuntu#dev2:/var/www/xyz$ php app/console
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\Debug\ErrorHandler::handleException() must be an instance of Exception, instance of Error given in /var/www/xyz/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php:436
Stack trace:
#0 [internal function]: Symfony\Component\Debug\ErrorHandler->handleException(Object(Error))
#1 {main}
thrown in /var/www/xyz/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php on line 436

Developing PHPUnit: how to run its tests

I want to play around with changing PHPUnit's source, but first I'd like to be able to run its tests to make sure I don't break anything.
I used git to get version 4.7.7 out into a directory. In that directory, I then ran composer install.
Then I cd into tests and run:
phpunit --bootstrap ./bootstrap.php ./
(The version of PHPUnit I'm using to run the tests is also 4.7.7.)
but I get this:
PHP Fatal error: Uncaught exception 'Exception' with message 'PHPUnit suppresses exceptions thrown outside of test case function' in C:\Users\jodes\Documents\NetBeansProjects\PHPUnit\phpunit\tests\Regression\GitHub\873\Issue873Test.php:7
Stack trace:
#0 phar://C:/phpbin/phpunit.phar/phpunit/Util/Fileloader.php(52): include_once()
#1 phar://C:/phpbin/phpunit.phar/phpunit/Util/Fileloader.php(36): PHPUnit_Util_Fileloader::load('C:\Users\jody\D...')
#2 phar://C:/phpbin/phpunit.phar/phpunit/Framework/TestSuite.php(334): PHPUnit_Util_Fileloader::checkAndLoad('C:\Users\jody\D...')
#3 phar://C:/phpbin/phpunit.phar/phpunit/Framework/TestSuite.php(406): PHPUnit_Framework_TestSuite->addTestFile('C:\Users\jody\D...')
#4 phar://C:/phpbin/phpunit.phar/phpunit/Runner/BaseTestRunner.php(57): PHPUnit_Framework_TestSuite->addTestFiles(Array)
#5 phar://C:/phpbin/phpunit.phar/phpunit/TextUI/Command.php(121): PHPUnit_Runner_BaseTestRunner->getTest('.\tests\', '', Array)
#6 phar://C:/phpbin/phpunit.phar/phpunit/TextUI/Command.php(99): PHPUnit_TextU in C:\Users\jody\Documents\NetBeansProjects\PHPUnit\phpunit\tests\Regression\GitHub\873\Issue873Test.php on line 7
Fatal error: Uncaught exception 'Exception' with message 'PHPUnit suppresses exceptions thrown outside of test case function' in C:\Users\jodes\Documents\NetBeansProjects\PHPUnit\phpunit\tests\Regression\GitHub\873\Issue873Test.php:7
Stack trace:
#0 phar://C:/phpbin/phpunit.phar/phpunit/Util/Fileloader.php(52): include_once()
#1 phar://C:/phpbin/phpunit.phar/phpunit/Util/Fileloader.php(36): PHPUnit_Util_Fileloader::load('C:\Users\jody\D...')
#2 phar://C:/phpbin/phpunit.phar/phpunit/Framework/TestSuite.php(334): PHPUnit_Util_Fileloader::checkAndLoad('C:\Users\jody\D...')
#3 phar://C:/phpbin/phpunit.phar/phpunit/Framework/TestSuite.php(406): PHPUnit_Framework_TestSuite->addTestFile('C:\Users\jody\D...')
#4 phar://C:/phpbin/phpunit.phar/phpunit/Runner/BaseTestRunner.php(57): PHPUnit_Framework_TestSuite->addTestFiles(Array)
#5 phar://C:/phpbin/phpunit.phar/phpunit/TextUI/Command.php(121): PHPUnit_Runner_BaseTestRunner->getTest('.\tests\', '', Array)
#6 phar://C:/phpbin/phpunit.phar/phpunit/TextUI/Command.php(99): PHPUnit_TextU in C:\Users\jody\Documents\NetBeansProjects\PHPUnit\phpunit\tests\Regression\GitHub\873\Issue873Test.php on line 7
What am I doing wrong? Thanks
If your class "Success" have a namespace, you better use your autoloader with phpunit's --bootstrap parameter
if this situation is related with autoloading, you maybe want to read http://jes.st/2011/phpunit-bootstrap-and-autoloading-classes/ (an old one, but a clear one)

Categories