Best Way to Develop a Composer Package [closed] - php

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have a large project, I'm using git as VCS. Also, I have some modules that I'm able to use in other projects. I want to publish these packages on composer. I'm storing these packages in the vendor directory. I'm not pushing the vendor directory to VCS.
My problem starts here, Some times I'm developing the project at the same time with the packages. So I need "composer update" etc... but this kind of command may overwrite my development package, or may cause some other problems.
I don't know which is the best way to handle both project and composer packages together.

Related

What is the correct way to remove library using composer? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I've been install 2 libraries into my php project. Now I want to remove on of them because I've install the wrong library (my bad). Is it okay if I just delete the folder ? If there is another way to do that correctly, please tell me.
Running the following command will remove the package from vendor (or wherever you install packages), composer.json and composer.lock. Change vendor/package appropriately.
composer remove vendor/package

how to work with non laravel packages? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
How to work with non laravel packages as i want to use https://packagist.org/packages/kerphi/phpfreechat this packages
You can use the simple composer functionality. Via commandline run:
composer require kerphi/phpfreechat
That's it the package classes should now be available within your application.
You can view the complete documentation on loading packagist dependancies on the composer website.
update
You won't be able to use this package as the package requires the slim framework. You can see this on the package github page: https://github.com/kerphi/phpfreechat and the index file called during javascript usage: https://github.com/stmolivier/phpfreechat/blob/master/server/index.php
If you are using windows then In cmd go to your project location and run this code
composer require kerphi/phpfreechat

Composer packages for functions. Bad form? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I just recently got into (learned how to) making composer packages, and want to distribute some functions I've made over the years.
I understand that you can autoload files containing just functions by using the files autoloader, but I was wondering what the "best practice limit" is for doing this.
Namely: Is it acceptable to distribute composer packages containing only functions? What about single functions?
I think it is very acceptable.
The composer documentation states:
It allows you to declare the dependent libraries your project needs and it will install them in your project for you.
If your functions can be seen as a software package there is no reason why you should not publish them via. composer. There are countless composer-packages out there only consisting of a single class or even a single interface.
But you should try to group functions that belong together in one composer-package.

How do I install lithium framework without git? [closed]

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 8 years ago.
Improve this question
My webhost doesn't have git installed (I know, I know). I have downloaded the source code to the lithium project. How do I configure this to work on my webhost? I need the lithium core? Where does this go in relation to my www dir? I'm familiar with rails, if you could point out the analogues I'd greatly appreciate it.
Just extract the source code in the webroot folder and follow the manual,
Installing Lithium.

Is Composer for server or local use? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Is Composer designed to be installed on a web server or on a local computer?
It is designed for both.
You can use it in development (you will use composer update a lot then) and you can use it in production (you will install your dependencies with composer install then).
In development phrase, you define with which dependencies your project works. And in production, you make sure these dependencies are installed.

Categories