We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Installing Phalcon through composer

I am brand new to this php framework, and have chosen to install phalcon through composer. I was wondering however if composer comes with zephir or if I have to compile/install it on the machine as well. I have zend engine installed on my machine but not sure how to find out if composer did install zephir.

If I do have to install it seperately would I just install it to vendor/phalcon?

Im running php 7.1.6, zend 3.0.0 and phalcon 3.1.2.



3.4k
Accepted
answer
edited Jun '17

Zephir come with phalcon I think because It's work without any additional installation.

You can check your phalcon's installation like this : https://docs.phalcon.io/en/latest/reference/install.html#checking-your-installation

Composer don't come with zephir, you need to install it like explain there : https://getcomposer.org/doc/00-intro.md

Composer is to install project's dependencies or phalcon developer tools. https://phalcon.io/en/download/tools

Firsts tutorials until invo included don't need any dependencies installed via composer.

You need it for vokuro for example. https://github.com/phalcon/vokuro

It's needed if you see a composer.json file in root directory.



3.7k

Ah okay, that's really useful to know. So if I compile and install on my machine and then use composer to make a project it should work fine? Thanks for the answer, I think I know what the deal is now!



3.4k
edited Jun '17

Ah okay, that's really useful to know. So if I compile and install on my machine and then use composer to make a project it should work fine? Thanks for the answer, I think I know what the deal is now!

I haven't look about zephir compilation yet ;o))

If you want to see some informations about that, you can read https://github.com/phalcon/zephir

Phalcon is a compiled binary module for PHP, you cannot download/install it though Composer. Not only that, but you also have to enable the downloaded so/dll file in your PHP configuration.

Zephir is a language+transpiler, used to generate and compile the C++ code into the binary so/dll module.

Please refere to the install instructions: https://phalcon.io/en/download/linux