composer-php

In PHP & Composer How do I require a git repository with non standard branch name

风流意气都作罢 提交于 2019-12-25 04:38:08
问题 This is probably a stupid question: I am trying to include the following library from github into my project. PHPOffice/PHPExcel branch name: develop_2.0.0 I would like to install it with composer and have it autoload with the rest of the libraries I am using. The develop_ part is causing the problem. 回答1: Nevermind, Just figured it out. Always seem to figure it out the second after I post the question. Just prepend dev- to the branch name. Thus: dev-develop_2.0.0 来源: https://stackoverflow

CodeIgniter Composer “package.json” locations shluld be in application or root folder?

坚强是说给别人听的谎言 提交于 2019-12-25 03:22:55
问题 I working with code igniter v3.x and I would like to add some composer packages. looking at application/config/config.php file, it says that will load packages inside application folder | package auto-loader script in application/vendor/autoload.php. However in the codeigniter package it already has a package.json that installs packages on root folder. I suspect that the package.json on the root must hold only information about CodeIgniter it self. But I'm not sure. So I have three options:

PHP Composer PSR-4 Autoloading And Sub-Namespaces, Class Not Found

北战南征 提交于 2019-12-25 02:59:09
问题 This question is independent but I did ask a similar question before:- Composer Gives Error, "Class Not Found" The problem was solved but I failed to explain the nesting issue. I thought it will be more appropriate to make a new question. I searched a lot but I can't make the nesting namespaces to work with psr-4 autoloading. Directory Structure:- │ composer.json │ run.php │ ├───src │ ├───one │ │ parentclass.php │ │ │ └───two │ childclass.php │ └───vendor │ autoload.php │ └───composer

PHP Composer PSR-4 Autoloading And Sub-Namespaces, Class Not Found

大城市里の小女人 提交于 2019-12-25 02:59:02
问题 This question is independent but I did ask a similar question before:- Composer Gives Error, "Class Not Found" The problem was solved but I failed to explain the nesting issue. I thought it will be more appropriate to make a new question. I searched a lot but I can't make the nesting namespaces to work with psr-4 autoloading. Directory Structure:- │ composer.json │ run.php │ ├───src │ ├───one │ │ parentclass.php │ │ │ └───two │ childclass.php │ └───vendor │ autoload.php │ └───composer

Can't move composer

独自空忆成欢 提交于 2019-12-25 02:49:11
问题 When I install composer on my mac with: curl -sS https://getcomposer.org/installer | php And then try to move it like this: sudo mv php composer.phar /usr/local/bin/composer it's telling me: rename composer.phar to /usr/local/bin/composer: No such file or directory When I look to my path: echo $PATH It's telling me: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin That can't be right I guess, I'm not very familiair with composer what should I do? Thankyou 回答1: Try with below command to install

Installing laravel suddenly some json file cannot be downloaded

倾然丶 夕夏残阳落幕 提交于 2019-12-25 01:55:06
问题 I typed create-project laravel/laravel "foldername" and got this message: [Composer\Downloader\TransportException] The "http://packagist.org/p/illuminate/console%241d2f57f687204b9a57e5848fe9f49e79bc2fb7ed0cafc6d1387ad4760a1b155c.json" file could not be downloaded (HTTP/1.1 404 Not Found) What's this for? I already got the laravel structure files but i don't want to continue without knowing whats with this error. Update: composer.json content under my laravel folder structure { "name":

Override vendor autoload composer

微笑、不失礼 提交于 2019-12-25 01:34:27
问题 Is there a way to have an autoload file you created run before the vendor autoload is called? We seem to be running into an issue with SimpleSAML's autoload overriding one of the autoload files we created. I am new to Composer, and couldn't seem to find any solutions online. I tried including our autoload file in the file that needs it as well and that still did not work. A workaround is to just include the files explicitly, but being able to use the autoloader would be preferred. 回答1: Yes,

Create diff patch for a composer package

佐手、 提交于 2019-12-25 00:22:52
问题 I'm contributing to quite a large project with lots of submodules, and using repositories section of composer.json etc. Sometimes it is handy to edit files in the vendor directory instead of the real repository (e.g. there are some submodules with tests for the other ones). Then I use composer update and a message pops up: Discard changes [y,n,v,d,s,?]? I can choose the option d , thus getting a nice diff patch I can later use for the real Git repository. Can I have such a patch in a simpler

How to recompile PHP with either NTS or TS?

不问归期 提交于 2019-12-25 00:06:40
问题 I am trying to get SQLSRV PDO to work with PHP. I run PHP -v and get the following error Warning: PHP Startup: pdo_sqlsrv: Unable to initialize module Module compiled with build ID=API20180718,NTS,VC15 PHP compiled with build ID=API20180718,TS,VC15 These options need to match in Unknown on line 0 I was getting a different error where the dates in the IDs didn't match, but I have fixed that by getting the current version of PHP (7.2) and putting that in place. It wasn't installed it was a

Fatal error while creating Symfony 4 project

萝らか妹 提交于 2019-12-24 20:44:46
问题 after running composer create-project symfony/website-skeleton my-project I get an error : Executing script cache:clear [KO] [KO] Script cache:clear returned with error code 255 !! !! Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "FileResource" from namespace "App". !! Did you forget a "use" statement for "Symfony\Component\Config\Resource\FileResource"? in /Users/bastiennicolau/Documents/dev_web/my-project/src/Kernel.php:39 !! Stack