How can I manually configure the laravel package without composer. I have a project in which I got error when installing Intervention package. Please suggest me Is it possible or not.
While you definitely can, for instance, simply clone their GitHub repo, eg.:
git clone https://github.com/Intervention/image.git
And then manually include corresponding files (classes) in your code, I wouldn't recommend it - composer generates autoload files, but this package will be ignored since it's not in composer.json. You will end up adding manual require()s somewhere in your code.
I would say try to fix your composer package issue first, and only if it cannot be helped - download and include Intervention manually
Related
I'm currently using composer for managing my projects requirements. One of the packages I use have a bug, which is fixed in the dev branch of this package, so I used "dev-dev#dev".
The problem is, the composer.json file of the given package, also requires and dev package of another package, which I dont want to install (actually I can't because of other requirements..)
Is there a way to tell composer, to ignore the requirements of my dev package, or how could I sovle this without patching the extension on my own?
need a --ignore-platform-requirements or such flag that skips those requirements while loading packages
I want to start making my own mods for PHPBB however I am having trouble setting up composer.
I have installed composer to my windows server and I run this in my command line
composer require :
C:\Inetpub\vhosts\Servers\5\localuser\gorrors\httpdocs\community
and I get this error:
"`UnexpectedValueExpection`" cannot parse version.
When googling this error message everyone else seems to fix the error by running selfupdate however when I do this it says I have the latest version?
What am I doing wrong? Any help would be great
Seems that you are using the require command wrong here. It is used to add a specified package to the composer.json file as one that your project depends on.
As for the expected package name... From the manual:
The package name consists of a vendor name and the project's name. Often these will be identical - the vendor name just exists to prevent naming clashes. It allows two different people to create a library named json, which would then just be named igorw/json and seldaek/json.
After specifying dependencies you can perform composer install, which will search for the packages from the set up repositories. Note that:
By default only the Packagist repository is registered in Composer. You can add more repositories to your project by declaring them in composer.json.
I'm using Symfony2 and for my projects I normally do composer require name/repository which will install the repository in the vendor folder and add a line in the composer.json including the package and the installed version.
Supposing that I fork a project because I want to add something to it or fix a bug and use it in my Symfony app, I'd have to run composer require myname/repository, modify it, test it and then submit a pull request. Afterwards, after the pull has been commit to the original repository, I'll have to delete my own and remove it from composer.json and reinstall the original repository.
Is there a better workflow to this that doesn't have to change the json file that much?
I have tried to install both ZendPdf and TCPDF into ZF2 using Composer without success.
Software is installed and autoload files are written but nothing works, ZF can't see them.
Which files do I need to edit in order to manually install TCPDF library so that it autoloads?
I have found lots of similar questions in StackOverflow but not many working answers that don't involve Composer.
In fact, you don't install them without Composer. I think it is easier to make Composer work than to install them by hand.
In theory you could install them by hand. Just download both components in a version you like. Then look into their composer.json file if you need to download some more software these libs need. Download them as well. Have a look in their composer.json to download even more software.
After these downloads, unpack the packages, create a whole directory tree of files, and create the autoloading manually. Which means again you have to look at all the composer.json files for the definition of autoloading. You are lucky if you find PSR-0 or PSR-4 autoloading, and you have to manually scan EVERY file in the directory if you have classmap autoloading.
You then simply push all these definitions into your own autoloader and hope it works.
Done. That was easy... NOT!
I can help you get Composer to work, but I cannot help you NOT use Composer. Ask a new question describing your problem using Composer.
Please follow these instruction below to install Zend without composer. But I recommend to use composer for future consistency
Download latest stable copy of ZF2 from http://framework.zend.com/downloads/latest and unpack, we call it "ZF2"
Download latest stable copy of ZF2 skeleton app from https://github.com/zendframework/ZendSkeletonApplication/ and unpack, we call it ZF2Skeleton
Create folder like /vendor/ZF2
Now copy ZF2/* into /vendor/ZF2
Now you need to fix ZF2_PATH or $zf2Path variable at “/init_autoloader.php” file of root to point our “/vendor/ZF2” folder. Find "$zf2Path = false;" line into "/init_autoloader.php" file and replace it by "$zf2Path = 'vendor/ZF2/library';"
That's all. You may visit https://shkhan.wordpress.com/2014/04/26/install-zend-framework-2-into-windows-iis/ for more information about installing ZF2 without composer.
Without using Composer, is it possible to download a repository in Github along with it's defined composer packages?
For example: FluxBB 2 requires Laravel 4.
I was hoping to download FluxBB and at the same time the packages of Laravel 4 without using Composer.
Usually projects that use composer will ignore 3rd party components. In .gitignore you will see /vendor. This is the place where Composer downloads its dependencies.
This will find the latest version of monolog/monolog that matches the supplied version constraint and download it into the vendor directory. It's a convention to put third party code into a directory named vendor. In case of monolog it will put it into vendor/monolog/monolog.
Tip: If you are using git for your project, you probably want to add vendor into your .gitignore. You really don't want to add all of that code to your repository.
http://getcomposer.org/doc/01-basic-usage.md#installing-dependencies
Doing it manually is a bit of a hassle. Composer uses packagist to get its files (if you look at a package it has a source added to it Laravel https://packagist.org/packages/laravel/framework).
Composer auto loads the needed files automatically so its a big time saver.
For libraries that specify autoload information, Composer generates a vendor/autoload.php file. You can simply include this file and you will get autoloading for free.
require 'vendor/autoload.php';
This makes it really easy to use third party code. For example: If
your project depends on monolog, you can just start using classes from
it, and they will be autoloaded.
http://getcomposer.org/doc/01-basic-usage.md#autoloading