Last year, we wrote about using Laravel Homestead with ZF projects. Today, we contributed some changes to the Homestead project that make the integration even smoother and more seamless for developers.
What is Homestead?
Laravel Homestead is an official, pre-packaged Vagrant development environment that provides a wonderful development environment without requiring you to install PHP, a web server, or any other server software on your local machine. No more worrying about messing up your operating system!
Homestead runs on any Windows, Mac, or Linux system, and includes Nginx, PHP, MySQL, PostgreSQL, Redis, Memcached, Node, and all the other goodies you need to develop amazing Laravel applications.
ZF Integration Improvements
The changes we contributed allow you to use a zf-sites key in your Homestead.yaml configuration to specify Zend Framework sites. The key accepts the same options as the sites key, but sets the appropriate document root and configuration for ZF applications automatically.
zf-sites:
- map: zf-project.test
to: /home/vagrant/code/zf-project/public
Getting Started
To use the new integration, update your Homestead box to the latest version and add your ZF sites to your Homestead.yaml as described above. Run vagrant provision to apply the changes, and your ZF application will be available at the specified hostname.
This integration removes the manual configuration steps that were previously required when setting up Zend Framework applications in Homestead, making the local development experience much smoother.