Posts

Showing posts from November, 2017

Fast mass price update in Magento 1.X

Fast mass price update in Magento 1.X

Leverage The Power Of CDN In Symfony 3 Applications

Image
Leverage The Power Of CDN In Symfony 3 Applications Over years, Symfony has consolidated its position as the preferred development framework for PHP projects. With the recent release of Symfony Flex, the framework is now in a great position to help developers launch RAD enabled apps quickly. At Cloudways, we try to facilitate Symfony developers in launching their projects without worrying about the hassles of server management. Our about-to-be-released Content Delivery System (CDN) is a continuation of this commitment. In this article, I will go over the process of enabling and configuring Cloudways CDN for your Symfony applications. Prerequisites Cloudways server with PHP application Symfony installed on the server  (or Symfony Flex enabled application) Your domain should be mapped You can follow the following GIF to launch a server and a PHP application on Cloudways. By default, you will get PHP 7.0; however, you could downgrade or upgrade to PHP 5.6 or 7.1. ...

Short and safe array iteration

Short and safe array iteration One reason to follow development mailing lists is you sometimes pick up on some very neat tricks. Here's one that I spotted on the PHP Internals list recently to simplify array iteration in PHP 7. PHP's largely loose, dynamic typing has plenty of both pros and cons. One con in particular is that you don't always know for sure if a value you're trying to use has been set yet, or is non-null. PHP will dutifully whine at you if you try to use a null value, sometimes fatally. (Yet another reason to structure your code to avoid nulls, period.) One place this comes up in particular is in  foreach()  loops, especially when working with nested array structures. (PHP lacks a struct type, but makes anonymous hash maps so easy that they get used as the uber data type, for better or worse.) Consider the following: <?php foreach ( $definition [ 'keys' ] as  $id  =>  $val ) {    // ... } ?> This not-at-all uncommo...

How do I deploy my Symfony API - Part 5 - Conclusion

How do I deploy my Symfony API - Part 5 - Conclusion This is the fifth post from a series of posts that described the whole deploy process from development to production of a  Symfony  API. This series of blog posts had the aim to show a possible approach to build a continuous integration and continuous delivery pipeline. The continuous integration and continuous delivery process reduces bugs and makes the development simper. The blog post story was divided into: Part 1 - Development  In this step was shown how to build the local development environment using Docker and Docker Compose. Considering some important details (as example: stateless application or share-nothing containers...), the work in the next steps will be much easier. Part 2 - Build  This step was about "building" and "pushing" the artifacts (the docker images to the docker registry). Docker images are ready-to-run applications containing almost everything necessary to be executed on...

PHPStorm's performance

PHPStorm's performance Java VM options PHPStorm is made in Java. If you ever played Minecraft, you know you could allocate extra RAM by adding flags to your startup command. You can also do this in PHPStorm, it's even built into the UI. Go to  help > Edit Custom VM Options . You can play around with the settings here. I for one changed the maximum amount of RAM allocated to PHPStorm, and added two graphics options (at the end of the file). -Xms500m -Xmx1500m -Dawt.useSystemAAFontSettings=lcd -Dawt.java2d.opengl=true # Only for people on Mac, it makes Java use an optimised graphics engine. -Dapple.awt.graphics.UseQuartz=true Custom properties PHPStorm also has a file to set custom properties:  help > Edit Custom Properties . Adding one option here changed the way PHPStorm renders text: it will show text immediately, instead of analysing it first. The downside is that you can sometimes see a flash of unstyled text. It feels much smoother though. editor.zer...