Another +1 for progress on this. @clay (or anyone from the team): any news?
Hey everyone, thanks for your patience with this!
I wish I had a solution for you right now, but I’ve been cracking at this for a bit now and haven’t been able to get the intl extension to build for MacOS. From what I can tell, it seems like intl is no longer compiled as a separate extension, and instead, needs to be compiled when building php itself.
I’m working with the Local team to get this extension compiled when building PHP itself, but I don’t have an exact time for when this will be ready.
If anyone is curious about the general workflow for what was tried, here we go:
-
Right-click on the site you wish to install the extension for and “Open Site Shell.”
-
Download and untar extension from
PECL- https://pecl.php.net/package/intl -
Change to the extension directory
cd ~/Downloads/intl-3.0.0/intl-3.0.0 -
Update
prefixinphpizeandphp-configto point to the php that is bundled with Local. This path would look something like:/Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-7.3.5+10/bin/darwin/ -
Run
phpize -
Run
./configure- Check for missing dependencies.
- This seemed to be fixed with
brew install intltool icu4c gettext - Then adding
echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.zshrcthis to the shell environment
-
Run
make, which results in errors similar to: PHP :: Bug #72879 :: Pecl install intl make error with PHP 7.0.8
From here, I went to see what others in the space are doing, and at least with Homebrew’s php@7.4 formula, they are compiling php with a specific extension:
Thanks for the update, @ben.turner!
It’s a bummer to hear it’s a rather complicated process. Please post if you’re able to even find a workaround such as directing Local to use a compiled version of PHP with Intl included.
Looking forward to further updates as they come in!
+1 to see if there’s any update on how to enable Intl extension on mac?
With latest Wordpress is even flagged in the Site Health screen - Screenshot by Lightshot
+1 for Mac
I didn’t see an existing feature request (my apologies if I missed it), so I went ahead and created one here. Compile PHP with the `intl` extension. This will allow the community to upvote for it.
That said, it is clear this is important to a large number of users. I will work on getting this prioritized with the development team.
Hi,
my folder is /Users//Library/Application\ Support/Local/lightning-services/php-7.3.5+11/bin/darwin/
but when run phpize /Users/*/Library/Application\ Support/Local/lightning-services/php-7.3.5+11/bin/darwin/ view this error:
Cannot find build files at ‘/Users/runner/work/_temp/local-lightning-php/php-7.3.5/build/lib/php/build’. Please check your PHP installation.
why?
It’s because your machine likely doesn’t have the same folder structure as our build machine – note the url that was mentioned:
/Users/runner/work/_temp/l....
In any case, we recently improved our PHP lighting services and included the intl extension. See the solved feature request for more details:
