Showing posts with label composer. Show all posts
Showing posts with label composer. Show all posts

Wednesday, January 29, 2014

Call to undefined method Illuminate\Foundation\Providers\ArtisanServiceProvider::when()

This error showed when trying to upgrade to Laravel 4.1, Also  when trying to  update composer , the first Solution to this problem is to change all your composer.json file (assumed that you have some in workbench folder), to be compatible with new versions of laravel :

Change this line in Composer.json :

"illuminate/support": "4.1.*" 

to be Like this


 "illuminate/support": "4.*" 

Then Run :

 Composer update --no-scripts  

In the main folder that contain composer.json And also on all the main folders of your packages .

Tuesday, June 25, 2013

Laravel-4 Tutorial-2 : Installation on Windows

The process of installation is clear and direct on windows and require 3 steps to do that : first , downloading the required packages, install them and check the path .

Downloading :
As I said in tutorial-1 , three main programs must be installed on your system Php,Composer And Git, Of course php will be installed with Apache server and mysql as a standard package (I use Wamp Server).

Download the Composer and Install it Just run the installation program , Then go to and download Git
Don't forget to choose the "Add to system Path" option when asked for .

Next check your installatio by running these commands from the command line :
C:\php --version
C:\composer --version
C:\git --version.
if it is ok and you will get a message of each program version.
Now you are ready to install Laravel-4 and begin creating your project.

Install  Laravel-4 using composer:
From the folder that you want to create laravel project in run the following command from command line:

composer create-project laravel/laravel 

The composer will connect to the git repository  and download the laravel
framework and all its components and their dependent packages.
even the Application key will be produces automatically by the installer. No need to do anything else just start configuring you application.

Monday, June 24, 2013

Laravel-4 Tutorial-1 : Things to know before Start developing on Windows

You Need To Install Composer And Git in order to work with  Laravel-4 and Packages Installation.
Three Folders must be added to your path    composer, php and  git.


Composer and Laravel

People on Laravel Project Didn't want to produce a strange php framework that don't know anything about the other Packages on the internet and that will enforce the developer to create his own version of every thing he needs to develop an application. instead the developer can benefit from other developers and can inject their standard packages into his project without the need to start from zero point again.
So,Composer  is just a utility that will help developers to install other packages into their project . That's it.

From Composer Site Documentation :

Composer is not a package manager. Yes, it deals with "packages" or libraries, but it manages them on a per-project basis, installing them in a directory (e.g. vendor) inside your project. By default it will never install anything globally. Thus, it is a dependency manager.

Also,  We need Composer to install the framework that we need like Laravel, Why we need composer .

You will get this error:

failed to open stream: Unable to find the socket transport
 "ssl" - did you forget to enable it when you configured PHP?

When try to install any package using composer and you didn't enable openssl extension

You will get this error :

'git' is not recognized as an internal or external command,  operable program or batch file.

When you try to run composer to install a packages that reside on git repository,That means the git program is not installed or is not added to your PATH.


Why do we need Git :

From Composer Site Documentation :
"To install packages from sources instead of simple zip archives, you will need git, svn or hg depending on how the package is version-controlled. "

-> For Tutorial-2