By now, you should be familiar with this post type. Every few weeks (months?), I do a summary of all the “popular but not popular enough” news from the PHP world that I think you should know about, and I link to sources containing more information. Some of those might be things we’ve already talked about on SitePoint but warrant a repost, others may have been swept under the rug by more popular news (like, I dunno, PHP 5.6 being released).
Let’s see what’s new.
HHVM announces LTS
HHVM, which we’ve covered to a certain degree before, has announced Long Term Support editions. This means you can now feel safer deploying your production code with HHVM, due to their “promise” of keeping said version alive for the foreseeable future. The skeptics in the PHP community who doubted the longevity of the project can now rest assured that their code will keep working, BC-safe, for at least another while. You can read more about this here.
Geocoder at 2.6
Geocoder, the library that helps you build geo-aware applications, got to version 2.6. This sounds minor, bit given the additions we got, it really isn’t. Got any geo-aware PHP apps you’d like to share with us? Let us know – we’d love to publish and promote your work, as long as it follows best practices and people can learn from it!
Zend Framework 2 for Beginners
Our very own Matthew Setter published his own Zend Framework book, titled Zend Framework 2 Foundations. In it, he explores the intricate depths of the behemoth framework, covering everything a beginning Zender needs to get familiar with the framework enough to proceed on his own. Matthew put his heart and soul into this manuscript, so make sure you give it a shot if you’re the least bit interested in Zend Framework 2.
Versionscan 1.0
The Versionscan tool by Chris Cornutt reached its 1.0 milestone. We covered the tool a bit here, but in essence, you use it to scan your PHP’s version for known unfixed bugs and issues, thereby gauging your installation’s default security and maturity. If you’ve ever been unsure of whether you should invest the time to update the version on your production server to the newest one, use this tool to help yourself out.
Recki-CT and JitFu
Anthony Ferrara released his 20% project recently, calling it ReckiCT. Explaining it and/or arguing whether or not it makes sense to use it seeing as it seems to be slower than native implementation right now is beyond the scope of this post, so just check out the quick tip if you’d like to learn how to install it and give it a go.
If you’re completely unaware of what it is, it’s a compiler written in PHP, which produces optimized PHP code the speed of which rivals recent implementations – one difference being that you don’t move away from PHP syntax, unlike in most other solutions like Zephir. You can, allegedly, use Recki to optimize parts of your app without changing the entire underlying runtime (unlike with HHVM).
Read more here.
Laravel 5 News
Laracon is over, and the new version (now 5.0 instead of 4.3) brings us some interesting goodies. First and foremost, the directory structure has changed – the app folder now only contains three folders: Console, HTTP, and Providers. Under Console, you’ll have all the CLI aspects of your application. HTTP will contain everything that happens when you access your website in the browser, and you’ll use Providers to register filters, services and such. The models now go into the root of the app directory, and all the classes are namespaced with PSR-4. You can rename the main root namespace of the application from App to X (where X is anything you want) by running php artisan app:name X
. This will traverse all the files and rename the app name where needed. Furthermore, namespaces can be custom configured in config/namespaces.php
.
You can also have arguments auto-injected into controller methods from the IoC container, which is very useful when validating stuff – it cuts down on the amount of code drastically. New generators were added, so you can have a bunch of files written for you automatically. There’s also multiple filesystem support via FlySystem, Contracts, Route Caching for ultra fast route registration and Socialite for dead easy social network authentication, but Jeffrey Way covers all these very very well, for free.
Phalcon 2.0 beta 2
Whilst on the topic of new versions of popular frameworks, the ever more amazing Phalcon has released beta 2 and is looking for user feedback. Install it, test it, dive in and see what you can do with it – it has now been almost completely rewritten in Zephir (the API is still the same), so you can lend a hand at further conversions and tests as well. Read their official blog post for more info!
PhpStorm 8.0 adds Z-Ray and PHP 5.6 support!
The upcoming version of PHPStorm will not only have full support for PHP 5.6, but Jebrains, the makers of PHPStorm, have also struck a deal with Zend Technologies to include Z-Ray in the next release. If you’re unclear on Z-Ray, it’s a part of Zend Server which we’ve covered before to some extent, and which you can find out more about at this link.
In the words of Alexey Gopachenko, JetBrains PhpStorm Product Manager:
“The integration with Zend Server, and specifically Z-Ray, provides an unprecedented level of visibility that allows developers to see how their code is running as they develop it. This ‘X-Ray’ insight puts the developer in control, translating to higher quality code produced faster. The Zend Server Z-Ray and PhpStorm combination is a true win-win throughout the development cycle for both developers and managers, especially for enterprise-oriented projects.”
For more information on Zend Server, see http://zend.com/server. Zend Server Developer Edition is available starting at $195, and for a limited time, PhpStorm users can save 20% off the regular price with coupon code PHPSTORM.
To quickly see Z-Ray in action in an interactive online demo, see http://www.zend.com/en/products/server/z-ray-use-cases.
Let us know if you try it out, we’d love to publish some detailed insights and offset your Zend Server bill ;)
Signing out
That’s it for this time around, if you feel like I’ve missed anything, let me know!
Bruno is a blockchain developer and technical educator at the Web3 Foundation, the foundation that's building the next generation of the free people's internet. He runs two newsletters you should subscribe to if you're interested in Web3.0: Dot Leap covers ecosystem and tech development of Web3, and NFT Review covers the evolution of the non-fungible token (digital collectibles) ecosystem inside this emerging new web. His current passion project is RMRK.app, the most advanced NFT system in the world, which allows NFTs to own other NFTs, NFTs to react to emotion, NFTs to be governed democratically, and NFTs to be multiple things at once.