composer-php

Why should I never run 'composer update' in production?

烂漫一生 提交于 2019-12-23 07:26:59
问题 composer install will install whenever stated in the composer.lock file, but composer update will update all the dependencies and create a new composer.lock file based on what is required in composer.json . So many said only run composer update in development. But my question is doing composer update did replaced the old composer.lock file, if your app is going to break it will break, because there might be conflict with the new updated dependencies. I came across with a situation where I

Enable global middleware only for one environment in Laravel 5

血红的双手。 提交于 2019-12-23 07:07:44
问题 I'm using a global middleware in Laravel 5 (barryvdh/laravel-cors) but I only want it to be active on one environnement (dev). That's because I only require it with composer in dev environnement, so it's not installed in production. I registered it has a global middleware in App Kernel and so I have an error if I try to deploy my app in production ( Class 'Barryvdh\Cors\CorsServiceProvider' not found ). I know why, but I'm looking for a solution. Is there any way to declare a middleware

Enable global middleware only for one environment in Laravel 5

感情迁移 提交于 2019-12-23 07:07:06
问题 I'm using a global middleware in Laravel 5 (barryvdh/laravel-cors) but I only want it to be active on one environnement (dev). That's because I only require it with composer in dev environnement, so it's not installed in production. I registered it has a global middleware in App Kernel and so I have an error if I try to deploy my app in production ( Class 'Barryvdh\Cors\CorsServiceProvider' not found ). I know why, but I'm looking for a solution. Is there any way to declare a middleware

How to get Jenkins working with binaries from a subfolder of the root user?

隐身守侯 提交于 2019-12-23 05:44:23
问题 In my build.xml I defined some jobs, that should be executed by tools, I installed globally via Composer. That means, the binaries are stored in /root/.composer/vendor/bin/ (I'm working as root on my local VM). I set the PATH environment variable in the composer configs (without it the build process was failing): Now the building process is running in permission issues: Started by user anonymous Running as anonymous Building in workspace /path/to/myproject [myproject] $ ant Buildfile: /path

Starting, stopping or restarting apachectl always returns “</IfModule> without matching <IfModule>”

。_饼干妹妹 提交于 2019-12-23 04:57:14
问题 I posted earlier about my laravel projects always returning a 500 error, and I didn't receive much help but I've been trying to fix it for so many hours and I think I'm losing my mind. I did a bunch of updates in the terminal I think and just as I thought I fixed it, I got a ERR_CONNECTION_REFUSED error from chrome.. and when I tried sudo apachectl start/restart/stop I got this error: httpd: Syntax error on line 510 of /usr/local/etc/apache2/2.2/httpd.conf: </IfModule> without matching

Error Installing Composer on Windows 7 64-bit with Wampserver 2.5

荒凉一梦 提交于 2019-12-23 04:17:13
问题 I'm trying to install the Composer on W7 64x. Using the installer for Windows that the site Composer provides (Composer-setup.exe). I have installed the Wampserver 2.5 with php5.5.12 and Apache2.4.9. The openssl is enabled in php.ini. I'm having the following errors in the installation: Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed file_get_contents(): Failed to

Register a package service provider from within that package

你说的曾经没有我的故事 提交于 2019-12-23 03:11:33
问题 In all Laravel versions, if we want to register a new service provider, we can open the config/app.php file and add the new provider to the providers array, like so: 'providers' => [ ... Path\To\New\ServiceProvider::class, ], My idea is to install a package and have it automatically load its service provider, so without a need to add the new provider to the Laravel's app.php I have two questions: Is this a good idea? In both cases, why is it good / not good? Is there a preferred way of doing

Installation failed for laravel/lumen-installer: guzzlehttp/guzzle locked at 6.3.0

百般思念 提交于 2019-12-23 02:48:07
问题 I'm trying to install Lumen through the command composer global require "laravel/lumen-installer" but throws the following error on terminal. Changed current directory to /home/lykos/.config/composer Using version ^1.0 for laravel/lumen-installer ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages. Problem 1 - Conclusion: don't install

The “https://packagist.org/packages.json” file could not be downloaded: SSL operation failed

牧云@^-^@ 提交于 2019-12-22 17:11:09
问题 When I run the following command sudo composer update then I am getting following error. The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol Failed to enable crypto failed to open stream: operation failed 回答1: I came across this issue on OSX after using Homebrew to upgrade to PHP 7.0.12. To resolve the problem I downloaded cacert.pem using WGET.

ReflectionException Class does not exist happens on git branch switch Laravel

◇◆丶佛笑我妖孽 提交于 2019-12-22 13:56:52
问题 So I read like 100 post about this before deciding on creating this issue. This problem is actually very specific and it's 100% reproducable. I created a git branch lets call it storeUpdate , and in this branch I created a file called app/Http/Controllers/Admin/BatchUpdateStoresController.php which has the following: namespace App\Http\Controllers\Admin; use App\Http\Requests; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use App\Repositories\BatchUpdateStores; class