Symfony2 on the Mac - some php issues

If you are programming in an OSX environment with symfony, you will likely come across the following software error:
Fatal error: Call to undefined function Symfony\Component\Form\Extension\Core\DataTransformer\intl_is_failure()
As of PHP 5.3, intl is a core extension, but it doesn't ship with OSX. Symfony is supposed to account for this in a stub re-implementation, but there appears to be a bug in play. However, there is a workaround.
First, ensure your autoload.php file contains:

Then, you have to make sure that the stub/functions.php file is in play:
   require_once __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';

That keeps you running on a Mac.

No comments:

Post a Comment