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

Michael Dryrynda:
Using Laravel Telescope in specific environments
Oct 29, 2018 @ 14:45:34

Michael Dryrynda has a post to his site sharing a method for using Laravel Telescope in specific environments. Telescope provides enhanced debugging functionality to Laravel applications for introspection into data about requests, jobs, queues and more.

Whilst its primary purpose is as a debugging tool in development, it is also a powerful asset in debugging your production environment. In order to get Telescope, however, I ran in to some stumbling points in my CI environment in GitLab.

To work around this, I set out to conditionally load Telescope. I stumbled upon this comment from Mohamed Said, which suggested loading the TelescopeServiceProvider in one of your application's service providers, but doing so was not enough.

He goes on to talk about the package auto-discover functionality Telescope uses to load its provider and how this, along with the dont-discover configuration option in Composer's extra section can be used to control its loading. He also includes the code needed to register the provider classes but only in the environments other than "build" and "testing".

tagged: laravel telescope environment load provider autodiscover tutorial

Link: https://dyrynda.com.au/blog/using-laravel-telescope-in-specific-environments

King Foo Blog:
Using Complex Type with Zend_Soap
Sep 23, 2011 @ 13:37:10

New from the King Foo blog there's a tutorial showing how to use complex types in a SOAP request with Zend_Soap, a component of the Zend Framework.

To be able to use complex types with Soap requests, they need to be fully defined in the WSDL file. Zend_Soap can automate this process, if you know how to define those complex types. Let us start without it Zend_Soap's magic and compare it with a fully discovered complex request type afterwards.

In their example, they have a collection of books (objects) that they want to send over to the web service. The code for both the server and client side are included with the WSDL automagically created by the Zend_Soap_Server component. By setting docblock comments on the properties of the Book objects, the SOAP components automatically know what types they are. Their example defines these, and sets up the web service on the other side with a classmap to define where the "tags" information for each book lies.

tagged: zendsoap soap zendframework component autodiscover docblock

Link:


Trending Topics: