Hi Jonnathan, thanks for your reply. PHP was merged to homebrew/core so it is still normally available via brew. Only problem is that phalcon got axed along the way. Sure, compiling is always an option, but it is certainly not as much convenient as running brew update/upgrade commands. If just there were any way how to get phalcon back to brew repositories, it would be awesome.
Reinstalling PHP from homebrew/core in this series of articles https://getgrav.org/blog/macos-sierra-apache-upgrade-homebrew and using the instructions from https://docs.phalconphp.com/en/3.3/installation Chapter "Compile Phalcon" worked for me:
brew list | grep php brew uninstall --force php71 php71-apcu php71-gearman php71-geos php71-igbinary php71-imagick php71-intl php71-mcrypt php71-mecab php71-memcached php71-meminfo php71-mongodb php71-msgpack php71-oauth php71-opcache php71-pdo-dblib php71-pdo-pgsql php71-phalcon php71-rdkafka php71-redis php71-ssh2 php71-timezonedb php71-uuid php71-v8js php71-xdebug php71-yaml rm -Rf /usr/local/etc/php/* brew doctor brew install [email protected] git clone https://github.com/phalcon/cphalcon cd cphalcon/build sudo ./install
look for this line in output:
Installing shared extensions: /usr/local/Cellar/[email protected]/7.1.16_1/pecl/20160303/
phalcon.so exists inside this directory, so your extension is available in
Create a new extension ini
[phalcon] extension="/usr/local/Cellar/[email protected]/7.1.16_1/pecl/20160303/phalcon.so"
sudo apachectl restart
done. Hope this saves you some nerves.
I was able to install the latest version of Phalcon 3.3 for PHP 7.2 with Homebrew by using the following commands:
$ brew tap tigerstrikemedia/homebrew-phalconphp $ brew install php72-phalcon
With Phalcon installed, edit your
php.ini with the path to the Homebrew built extension:
Once done, restart Apache, Nginx or your application's web server.
You can verify Phalcon is installed by viewing the output of
phpinfo() or by inspecting PHP interactively:
$ php -i | grep "phalcon."
Which, if successfull, would show something similar to the the following:
phalcon => enabled phalcon.db.escape_identifiers => On => On phalcon.db.force_casting => Off => Off phalcon.orm.cast_on_hydrate => Off => Off phalcon.orm.column_renaming => On => On phalcon.orm.disable_assign_setters => Off => Off phalcon.orm.enable_implicit_joins => On => On phalcon.orm.enable_literals => On => On phalcon.orm.events => On => On phalcon.orm.exception_on_failed_save => Off => Off phalcon.orm.ignore_unknown_columns => Off => Off phalcon.orm.late_state_binding => Off => Off phalcon.orm.not_null_validations => On => On phalcon.orm.update_snapshot_on_save => On => On phalcon.orm.virtual_foreign_keys => On => On
Tested using Homebrew 1.6.3, Laravel Valet 2.0.12 and PHP 7.2.5 on macOS 10.13 "High Sierra".
macOS High Sierra 10.13.6, installing
tigerstrikemedia/phalconphp does not create
ext-phalcon.ini even though it says it does.
One has to do it manually.