Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Symfony Finland:
PHP development with Windows Subsystem for Linux (WSL)
Aug 08, 2016 @ 14:48:19

On the Symfony Finland site there's a new article posted talking about the use of the Windows subsystem for Linux, an environment that allows for the execution of Linux binaries in a Windows environment.

Windows has always been somewhat of an oddball when it comes to PHP development. In the past years it has lost out on developer mindshare to UNIX-like Operating Systems like Linux and macOS.

With the release of Windows 10 Anniversary Update in August 2016 Microsoft now offers an interesting option for PHP development in the Windows environment: The Windows Subsystem for Linux (WSL). The Windows Subsystem for Linux allows the execution of Linux binaries in Windows 10. The feature is not enabled by default and is targeted for developers.

They show you how to get into the Linux-compatible shell on your Windows system after enabling it in your System Settings. From there, he says, it's basically like working in a Linux-based server and includes some of the actions he took (including installing PHP 7, Symfony and Composer). He also shows the integration the environment has back with the Windows system including access to local drives (but that there's still some tricky bits involved in using them).

tagged: development windows subsystem linux commandline install symfony environment

Link: https://www.symfony.fi/entry/php-development-with-windows-subsystem-for-linux-wsl

Matthias Noback:
Symfony2: Event subsystems
Aug 25, 2014 @ 15:07:09

In his latest post Mathias Noback takes a look at the Symfony2 event subsystems and the answer to a common problem he's had with it in the past: circular references.

Recently I realized that some of the problems I encountered in the past could have been easily solved by what I'm about to explain in this post. [...] The problem is: having a complicated graph of service definitions and their dependencies, which causes a ServiceCircularReferenceException, saying 'Circular reference detected for service "...", path: "... -> ... -> ...".' Somewhere in the path of services that form the circle you then find the event_dispatcher service.

He shows the wrong way to solve the problem first by injecting a service container into the listener and using services directly from there. In his "entirely different and much better way" he shows a solution that removes dependencies on the main event dispatcher. He shows how to use the event subsystems to avoid this link and gives a more concrete example for domain-related events (with both code and config).

tagged: symfony2 event subsystem listener dispatcher domain

Link: http://php-and-symfony.matthiasnoback.nl/2014/08/symfony2-event-subsystems/


Trending Topics: