Most voted "commiserate" questions
Composer is a tool for managing dependencies in PHP. It allows you to declare the libraries your project depends on and it will manage (install / update) them for you.
Learn more…189 questions
Sort by count of
-
29
votes2
answers13485
viewsComposer - Autoload and PSR-0 vs PSR-4
I’m starting to study Composer and am developing a system where I separate files from the core of the application files, as follows: / root |-- /src |-- /App |-- /DBConfig |-- /Controller |-- /Model…
-
12
votes1
answer3675
viewsWhat is the difference between "dependencies" and "devDependencies"?
What’s the difference between saving a component like "dependencies" or "devDependencies" in the Bower, npm, commiserate among others using this structure ?…
-
10
votes2
answers15531
viewsHow to find the version of Laravel installed in my project?
I was with the version of Laravel 4.2.7 installed on my computer. I missed two important methods in Illuminate\Database\Eloquent\Builder, which is the whereDoesntHave and the doesntHave. When…
-
10
votes4
answers2392
viewsNPM, Bower and Composer, which one to use?
Can someone explain to me the difference between NPM, Bower and Composer. They are all package managers, correct? But when each must be used?
-
9
votes1
answer210
viewsNetbeans Project with git and Composer repository
I am developing a PHP project that requires two libraries separately. I am required to use NETBEANS. To develop the three separately but at the same time and because the main project "MAIN PROJECT"…
-
9
votes2
answers3718
viewsHow do I create my own package/project for "Composer" on github?
I never distribute a library using a repository with commiserate, I have no experience with this, what I tried to do was to create a folder structure like this: ./ |-- composer.json |-- src/ |--…
-
9
votes1
answer732
viewsWhat is ~ (til) and (circumflex accent) in the Composer versioning scheme for?
In some cases, I see that some libraries that use the Composer, place ~ or ^ at the beginning of the library version, thus: "orchestra/testbench" : "^3.6" Or "phpunit/phpunit" : "~7.0" I wanted to…
commiserateasked 6 years, 5 months ago Wallace Maxters 102,340 -
8
votes2
answers650
viewsHow to use Packages in Laravel 4?
I am new to the Laravel 4 framework. In Laravel 3 it was simple to use Bundles. In version 4 the use of the Bundles was removed and started to use Packages, but I didn’t understand how it is used,…
-
8
votes1
answer2008
viewsInstall Codeigniter 3 with Doctrine and Composer
What is the best way to install Doctrine via commiserate in the codeigniter 3.0? I plan to leave the files in the folder libraries. I created the file composer.json: { "config": { "vendor-dir":…
-
7
votes1
answer9516
viewsHow to change the version of PHP in which Composer runs on Linux?
I installed Composer on my Ubuntu via the following command: apt-get install composer Ubuntu currently supports multiple installed PHP versions. I have PHP5.6, PHP7.0 and PHP7.1 installed on my…
-
7
votes2
answers221
viewsMerge project when using the "Composer create-project" command
I have a project (a blog) based on Laravel/Laravel (note that this is the application and not the framework only), but I wish to send to my repository only the contents of the folders app/ and…
-
7
votes2
answers1712
viewsWhat is the difference between the prefer-dist and prefer-source options in Composer?
In Composer, when we install the library, we can add as an argument the options --prefer-source or --prefer-dist. I would like to know what each one does and/or if there is a difference between the…
commiserateasked 6 years, 7 months ago Wallace Maxters 102,340 -
6
votes6
answers1001
viewsError installing Composer in Laravel 4 Project
I’m starting out in the Laravel world and I’m having a problem spinning the composer install in the project. Running the command shows the following error: D:\htdocs\cpi2>composer install Loading…
-
6
votes1
answer1981
viewsProblems configuring Composer with XAMPP in Windows environment
Installing Composer in windows has given me some work. I have some doubts: The Composer installer on Windows asks to inform the location of php.exe, and settle in there. After that I ran the…
-
6
votes1
answer1571
viewsComposer - What is it and what is it for?
I have seen several times in projects the archive composer.json! I’d like to know what it is and what it’s used for?
-
5
votes1
answer191
viewsSimulate another environment by using the `Composer update`command
I have a project Symfony2 with facilities managed by composer, with their respective files composer.json and composer.lock synchronized between my local machine and the production server via git. It…
-
5
votes1
answer1028
viewsDifference between new project command and create-project command
What is the difference between commands laravel new nome-projeto and composer create-project laravel/laravel nome-projeto --prefer-dist? In both cases the result is the same but in the case of via…
-
5
votes1
answer11573
viewsWhat is the difference between normal dump-autoload and optimized dump-autoload in Composer?
In the Poser it is possible to automatically generate autoload using the command composer dump-autoload. But it is also possible to generate an "optimized autoload" through the command composer…
commiserateasked 8 years, 8 months ago Wallace Maxters 102,340 -
4
votes3
answers6502
viewsHow to install Composer globally on linux?
Usually, when we install Composer, I usually do so: curl -sS https://getcomposer.org/installer | php It downloads a file called composer.phar. But then I have to keep putting the path of the folder…
-
4
votes3
answers13726
viewsError while running Composer
I created a virtual machine with Vagrant and used Puphpet. However when I run Composer I have as return only this list of error,I have created 4 different machines and always the same error. Someone…
-
4
votes2
answers425
viewsWhat’s the difference between "require" and "require-dev"?
In the Composer, Grunt for example, has the require and the require-dev. My question is what’s the difference between them? Example phpBB "require": { "php": ">=5.3.3,<7.0",…
-
4
votes1
answer2598
viewsWhat is a. lock file?
I’m using git to convert a project and noticed when checking for modifications, that some files . json have a file with the same name, but with different extension and content. Example:…
-
4
votes1
answer16148
views500 | Server Error - Laravel
I created a new project in Laravel with the command laravel new server. I updated the Poser, inside the same, with composer update. However, when accessing the http://localhost:8000/, it returns me…
-
4
votes1
answer317
viewsHow to change default Composer installation folder?
Is there any way to change where Composer installs the dependencies? Composer always installs in the folder vendor, but would have to change to another folder?
-
3
votes1
answer64
viewsComposer.lock accessible via web
Lately I installed the Composer in a project of mine, I really liked because it is a great tool, however one of the files generator the Composer.lock is accessible by the browser, as I do not…
-
3
votes1
answer399
viewsWhat is the best way to organize a directory for a web project?
What is the best way to organize directories for a PHP web development project?
-
3
votes1
answer83
viewsHow to automatically include a file, which is not a class, in Composer?
In Composer, usually when we configure autoload for files that contain classes, I usually do so: "autoload" : { "psr-4" : { "WallaceMaxters\\Timer\\" : 'src/timer'} } Composer will automatically…
-
3
votes1
answer567
viewsComposer with XDEBUG - PHP
I have XDEBUG installed in my PHP. In this scenario, when doing a Composer installation I get an error message about Runtime performance, according to the photo below: My question is, what is the…
-
3
votes1
answer580
viewsHow to make available a package created with Composer?
The json below is part of the Composer.json file of a package I created: { "name": "libspkgs/utils", "type": "library", "description": "Descrição aqui.", "keywords": ["key1", "key2"], "homepage":…
-
3
votes1
answer58
viewsHow to define the semantics of downloaded packages with Composer?
I created some PHP packages with the help of Composer as dependency manager and made them available in Packagist (https://packagist.org/users/fabiojaniolima/packages/). After uploading the packages…
-
3
votes1
answer985
viewsDowngrade of package in Laravel
I’m facing a problem to run the composer install due to a package that is incompatible with the version of the Laravel that I currently use; The version I have is 4.1 with php 5.6, but when I run…
-
3
votes1
answer61
viewsHow can I manage Javascript bilbiotecas in my PHP project?
I have a PHP project and use commiserate to manage libraries such as Phpmailer for sending emails. To be able to use the installed libraries just include the autoload: require…
-
2
votes2
answers601
viewsSwap the Ckeditor Toolbar
I’m using Ckeditor on a PHP site using Composer to install Ckeditor. I’ve set up several types of Toolbar in the archive config.js of it. When I change the Toolbar that I want on file config.js he…
-
2
votes1
answer133
viewsHow to use a local directory as a dependency?
I am designing a relatively large project in my company that consists of several packages in PHP. Some of these packages are normal packages and others are Bundles of Symfony applications. When we…
-
2
votes1
answer384
viewsConfiguring Cakephp with Composer
I installed Cakephp on a MAMP (Mac OS X) server and configured the cakephp-upload plugin there was the hint of installing the plugin using the Composer. I set up my composer.json as follows: {…
-
2
votes1
answer30
viewsHow to avoid dependency dependencies in Composer?
I own a project A which has a dependency on project B which in turn has a dependency on project C. So the dependency chart would look like this: A -> B -> C (ps: all projects are developed…
commiserateasked 9 years, 3 months ago Rodrigo Rigotti 12,139 -
2
votes1
answer178
viewsProblems installing Composer on Windows
I’m trying to install Composer by this tutorial on Windows, but I’m having trouble downloading from both PHP and Curl.…
-
2
votes3
answers1586
viewsComposer does not install packages
I recently installed Ubuntu on my machine and am preparing the environment to work with Laravel. Everything is working except that I can’t create the Laravel project when I run command composer…
-
2
votes3
answers1872
viewsError running Composer update while trying to install package scafold in Laravel 5.1
I’m trying to install the package scafold in Laravel 5.1 only when I run Composer update it shows me an error. C: xampp htdocs sites stock>Composer update Loading repositories with package…
-
2
votes0
answers808
viewsComposer SSL3_GET_SERVER_CERTIFICATE:Certificate Verify failed
I work in a public body and here the access is very restricted. I have been facing problems when trying to run "Composer install" or "Composer update", this also goes for pro NPM or Bower. Follow…
-
2
votes1
answer930
viewsAutoload PSR4 class
I would like to create a class of autoload to follow the recommendations of PSR4 which can be used jointly and independently of the autoload of the Composer. The application I’m creating will have…
-
2
votes1
answer116
viewsHow to create a project based on Laravel to be the basis of others?
My idea is to create a base administrative panel, where I can use the next sites, without having to copy and paste. At the base I have only control of users and menus, the rest I create packages and…
-
2
votes1
answer336
viewsError placing Poser as global MAC
Personal installed the Composer on my mac by this command : curl -s https://getcomposer.org/installer | php He downloaded the Poser.phar and tested it : php compser.phar Returned to me everything ok…
-
2
votes2
answers2923
viewsInstallation of the Laravel
I followed the installation text of the Laravel that is on the official website and returned me the following errors. Warning: require(C: xampp htdocs primeiro_app_laravel…
-
2
votes1
answer2494
viewsHow to install dependencies from Composer, but ignoring require-dev?
Here in the company where I work we use the git for versioning the application. They all use Composer to install dependencies. Because it is the most correct approach, removing the vendor generated…
commiserateasked 8 years, 7 months ago Wallace Maxters 102,340 -
2
votes1
answer25
viewsDependency installation adds extra dependencies
This is the first time I’ve tried to work with composer, the purpose is to use only the PHPUnit, because I no longer use any dependencies. By installing composer, with the composer.json having only…
-
2
votes1
answer83
viewsDisable Composer require with php
I have an example of JSON: { "name": "xxxxxx", "description": "xxxxx", "type": "beta", "license": "MITS", "authors": [ { "name": "Leonardo Vilarinho", "email": "[email protected]" } ],…
-
2
votes1
answer245
viewsPHP in production with Composer
I have an application that uses some dependencies and these same managed by the commiserate everything working in the development environment. But in production, how is it possible to install an…
-
2
votes1
answer435
viewsWith Docker, should I use Composer in the container or host?
I have some questions about the development environment. I have a project in Laravel and I’m using Docker. When using Composer or Artisan from Laravel, what is the right place to do this? On my host…
-
2
votes0
answers44
viewsIs it appropriate to migrate common resources to more than one project into an independent package?
I built two packages in PHP, each of these perform very different functions, however, both implement practically the same interfaces and abstract classes. Because of this I created a third package…