composer-php

dump-autoload command from php

大城市里の小女人 提交于 2020-02-02 11:54:24
问题 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

configuration does not allow connection to http://packagist.org/packages.json

末鹿安然 提交于 2020-01-30 06:07:50
问题 I am trying to install laravel in my computer. I am refering to turorails point laravel installation tutorial. After installing composer trying to create new larael project but getting this error. This is the error which I am getting: 回答1: You need to enable OpenSSL in your Windows. You can enable it from your php.ini file: extension=php_openssl.dll 回答2: It works for me, try the step below : 1 First clear the cached composer clear-cache 2 You have 2 options here: enable OpenSSL in your php

(https:// wrapper is disabled in the server configuration by allow_url_fopen =0 [closed]

随声附和 提交于 2020-01-26 04:48:18
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 days ago . Hello Guys am working on laravel project and now i want to install passport for api in laravel i but i am getting an error during installation of passport in laravel project i was find the solution of this problem and i apply in it but still i am getting same error i have lost my

Laravel migrate unknown database

依然范特西╮ 提交于 2020-01-25 14:25:06
问题 I am having some errors with laravels php artisan migrate command, when I try to migrate, it keeps throwing errors saying, unknown database 'database name' I have checked my database configure file and even copied to a different project and it works perfectly there, I have tried composer dump-autoload command but that didn't solve the problem either. Please I will really appreciate if someone helps, since this is a new project and can't afford to lose even a minute to my deadline, thanks in

I cant install a Specific version of Symfony using Composer

隐身守侯 提交于 2020-01-25 10:13:36
问题 I want to install Symfony 4.0.6 version! using composer with cmd when I write composer create-project Symfony/framework-standard-edition Stage_App "4.0.*" also tried composer create-project Symfony/skeleton Stage_App "4.0.*" and both install Symfony 5.0.2 note: I don't want to work with the last version! i just want to work with 4.0.6 how can I install that version? 回答1: since the 4.0.* of symfony version is deprecated, the symfony/skeleton creates a project on the 5.0 version. Since 4.4.*

How to constraint compatibility with PHP without explicitly constraint all the depending packages

我只是一个虾纸丫 提交于 2020-01-25 09:20:30
问题 I got this requirement in my composer.json : "php": ">= 5.6", "symfony/http-foundation": "^3.0" The problem with that configuration is that it will install paragonie/random_compat v9.99.99 which is only compatible with PHP 7 and more. But the thing is that I don't want my composer.lock file to require PHP 7, I want it to still be compatible with PHP 5.6. The solution I found is to track down which package was pulling this dependency and, once I found it, I added this to my requirements:

Mcrypt PHP extension required.IN Laravel With Ubuntu 14

一个人想着一个人 提交于 2020-01-25 02:57:08
问题 I am trying to migrate laravel app into ubuntu and getting error like Mcrypt PHP extension required. when i check php details with phpinfo() function it showing below screen. PLlease find the Terminal Screenshot below, php.ini How to solve this issue ? 回答1: If you have installed PHP through apt-get then find the mcrypt extension you are using either for apache by using $ locate *mcrypt.ini /etc/php5/apache2/conf.d/20-mcrypt.ini /etc/php5/cli/conf.d/20-mcrypt.ini /etc/php5/fpm/conf.d/20-mcrypt

Why does 'composer dumpautoload -o' fix 'Class not found' PHP error?

别等时光非礼了梦想. 提交于 2020-01-25 00:20:09
问题 I have a Laravel 5.8 project that is dependent on a private package. When I run composer install the package is installed and shows up in the vendor folder. project composer.json { ... "require": { "php": ">=7.0", "company/api-request": ">=1.0.0" } ... } package src/ApiRequest.php <?php namespace Company; class APIRequest { ... } package composer.json { ... "autoload": { "psr-4": { "Company\\": "src/" } } ... } When I call the package \Company\APIRequest::run(); I am getting Message: Class

PHP composer autoload not loading class

浪子不回头ぞ 提交于 2020-01-24 08:41:26
问题 I'm just getting started using composer for dependency management and I'm having a hard time figuring out how I'm not adhering to psr-4 for autoloading so I'm here for advice. I've got a class that generates random values that is already on the packagist. The project structure is the following (I've labeled the composer.json files A and B): project dir |classfile.php A |composer.json |vendor |autoload.php |ejfrancis |php-random-value B |composer.json |RandomValue.php <--the class I want

Loading a composer package through a Github fork

左心房为你撑大大i 提交于 2020-01-24 04:46:45
问题 I forked a library on Github and now want to load my fork into the project without adding the forked library into packagist. I get the following error after adding the repository and require to my composer.json: Your requirements could not be resolved to an installable set of packages. Problem 1 - The requested package cnizzardini/ssl-certificate could not be found in any version, there may be a typo in the package name. Potential causes: - A typo in the package name - The package is not