composer-php

composer : is there a way to specify a preference order for package repositories?

白昼怎懂夜的黑 提交于 2020-02-23 12:51:31
问题 I am working with a package vendorName/moduleName (a Magento extension) that is present on packagist and on firegento. On my composer.json file, I have : "require": { ...................., ..................., "vendorName/moduleName":"*" }, "repositories": [ ......................, ...................., { "type": "composer", "url": "https://packages.firegento.com" } ], As Composer is downloaded pre-configured to use packagist.org , the vendorName/moduleName is loaded from packagist . I would

How to use Laravel libraries in Laravel project without composer

时光毁灭记忆、已成空白 提交于 2020-02-06 08:08:06
问题 I have libraries which I used to use repeatedly and have to be able to add it to Laravel project with the version I already download it before on local and may use it event with no internet connection is it possible to add it to Laravel in some way like Composer or is it possible to build my own local composer? 回答1: You can use the autoload mapping in order to adchieve that. Just create a folder with the file/files that you want to use. For example: YourProject/app/MyClasses/ And store the

Composer install doesn't actually install library

让人想犯罪 __ 提交于 2020-02-04 04:11:11
问题 Problem This is a weird one. I simply added this to my composer.json file: "maatwebsite/excel": "~2.1.0" Yet when I run composer install , that library doesn't get installed: composer show | grep excel returns nothing. And so every time I run my deployment script I get this error: > php artisan clear-compiled PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Class 'PHPExcel_Shared_Font' not found in /Users/Shared/dev/php/toters-api/config/excel.php:182 Stack

Laravel:syntax error in vendor/laravel/framework/src/Illuminate/Support/Arr.php on line 384

六月ゝ 毕业季﹏ 提交于 2020-02-04 03:44:04
问题 I tried to make a new laravel project work on my debian vps but nothing go right. I init the project with the basic composer create-project laravel/laravel , change the permissions to 755 so everything that is explained here. But I always have an error 500 when I tried to access to my <pathToMyProject>/public folder and when I read my php's logs is see this message : PHP Parse error: syntax error, unexpected '=' in <pathToMyProject>/vendor/laravel/framework/src/Illuminate/Support/Arr.php on

Symfony : Error : Attempted to call function “ctype_digit”

痞子三分冷 提交于 2020-02-04 01:52:05
问题 I'm experiencing an error while trying to install my Symfony (3.3) project on my server. I'm using an Apache HTTP Server and PHP 7.0. When i'm accessing app_dev.php, it shows that error : UndefinedFunctionException Attempted to call function "ctype_digit" from namespace "Symfony\Component\HttpKernel". in Kernel.php (line 274) at Kernel->getName()in Kernel.php (line 85) at Kernel->__construct('dev', true)in app_dev.php (line 25) My composer update works well. Does anybody know where it could

composer scripts use older php version

霸气de小男生 提交于 2020-02-03 08:37:01
问题 I host more and more sites on webfaction. Great provider! I ran into some problems though which I think are Linux related. Hope someone can help. SSH command php -v defaults to an older version of php, So I created an alias in my .bash_profile : alias composer="php70 $HOME/composer.phar" alias php="php70" When I preform a php -v now it returns PHP 7.0. So far, so good! PHP 7.0.0 (cli) (built: Dec 4 2015 12:58:58) ( NTS ) But now when I run a composer install and put a php -v in the scripts ->

composer scripts use older php version

时光毁灭记忆、已成空白 提交于 2020-02-03 08:36:07
问题 I host more and more sites on webfaction. Great provider! I ran into some problems though which I think are Linux related. Hope someone can help. SSH command php -v defaults to an older version of php, So I created an alias in my .bash_profile : alias composer="php70 $HOME/composer.phar" alias php="php70" When I preform a php -v now it returns PHP 7.0. So far, so good! PHP 7.0.0 (cli) (built: Dec 4 2015 12:58:58) ( NTS ) But now when I run a composer install and put a php -v in the scripts ->

cannot run vendor/bin/homestead make getting error yaml.php line 52

家住魔仙堡 提交于 2020-02-02 17:31:18
问题 I'm trying to install laravel/homestead and gettiong this error HP@carlas MINGW64 /c/vagrant-Laravel (master) $ vendor/bin/homestead make PHP Fatal error: Default value for parameters with a class type hint can only be NULL in C:\vagrant-Laravel\vendor\symfony\yaml\Yaml.php on line 52 Fatal error: Default value for parameters with a class type hint can only be NULL in C:\vagrant-Laravel\vendor\symfony\yaml\Yaml.php on line 52 I'm running Laravel Homestead 8.3.1 and as i have php 5.6 locally

dump-autoload command from php

断了今生、忘了曾经 提交于 2020-02-02 11:54:53
问题 I am building a web application where the user dynamically can upload Controllers php files from the web browser. There is a problem in all of this. Since every class should be compiled in order be used inside of laravel, the commmand composer dump-autoload must be executed. But I do not want to do this manually from the terminal. Inside of a "register class" I have called explicitly some commands that have not worked for me, for example: Artisan::call('dump-autoload'); exec("/path/to/app

dump-autoload command from php

試著忘記壹切 提交于 2020-02-02 11:54:50
问题 I am building a web application where the user dynamically can upload Controllers php files from the web browser. There is a problem in all of this. Since every class should be compiled in order be used inside of laravel, the commmand composer dump-autoload must be executed. But I do not want to do this manually from the terminal. Inside of a "register class" I have called explicitly some commands that have not worked for me, for example: Artisan::call('dump-autoload'); exec("/path/to/app