Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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.



2.2k
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.phalconphp.com/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://phalconphp.com/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.

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!



2.2k
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://phalconphp.com/en/download/linux