skip to Main Content
+971 55 881 1725 hmimthiaz @ imthi.com

Symfony Doctrine Many to Many Relationship (ManyToMany)

Many to many relations are one of the mostly used relations in the relational database. It took a while for me to figure how to properly configure this relation in Symfony Doctrine. I am sharing this so it might be useful for someone.

Used very simple example students and course. A student can opt for multiple courses and a single course can be opted by multiple students.

And Entity class should be like this…

The above entities will create the following SQL and it will also create the cross-reference table.

Hope this helps 😉

Why do we need to upgrade PHP 5.6 to PHP 7.2?

Rest in peace PHP 5.6

  • The current version of PHP which is 5.6 has reached the end of life on 19th Jan 2017. PHP team has stopped support for 5.6, and no more new features added.
  • Security support for 5.6 is up to Jan 2019. On Jan 2019 PHP 5.6 officially dead.
  • The newer version of Linux and server software has already stopped supporting PHP 5.6 which creates a huge security risk.
  • Updating old server will be hard as it may break the PHP due to compatibility issues.
  • All major PHP libraries and frameworks will drop support for PHP 5.6
  • 7.2 end of life is in Jan 2021
  • 7.2 is so much faster than 5.6
  • 7.X has new Zend Engine
  • Reduction in the memory usage
  • Consistent 64bit support
  • Better Error handling
  • More secure & better handling with SSL and cryptography

WordPress Amazon S3 Plugin – New version 1.4 released

After 4 long years finally, I released an update for WordPress Amazon S3 Plugin. Thanks to Awad Abdelgayoum for inspiring me to blog again. For nearly couple of years, I haven’t been blogging anything interesting or worth reading.

My blog was almost dying due to lack of new content. So while investigating my S3 plugin had stopped working. I searched for alternative and most of it was very complicated or too much for the blog. So I decided to update the plugin and make it work for the newly updated WordPress.

Release update version 1.4

  • Changed the S3 library to Amazon SDK
  • Major Cleanup
  • Added support for WordPress JS files
  • Added support for fonts in CSS
  • Tested and released for WordPress 4.9.5

To download the updated version please visit WordPress S3 Plugin.

Messaging SDK and Chat API for Mobile Apps and Websites

Couple of days ago I was doing some research to build / integrate chat module for one of our client’s app. The client wanted a simple chat application for their enterprise where each employee can chat easily with others in the company. Reinventing the whole wheel would cost a big fortune for developing and maintaining the technology. Running cost has to be kept as minimum as possible. After doing some searching and testing these are they platform I was really happy with. I have given my review on each platform and I hope it helps.

Slack

  • Very strong platform
  • Bot support
  • So many vendors and app integration makes this platform very extendable
  • Perfect platform for small team who work in DevOps mode
  • If you are building custom App, no SDK available for iOS/Android
  • No push notification for custom apps
  • Very expensive if you need ingrate with large team.

SendBird

  • More focussed on Chat application
  • Bot Support
  • SDK available if you need to build your custom App for iOS and Android
  • Push notification support
  • Free model available and if you need enterprise options and more users you can pay for the same.

Applozic

  • More like SendBrid
  • Looks more mature than Sendbird
  • SDK available if you need to build your custom App for iOS and Android
  • Push notification support
  • Only 30 days trial available then only paid version.

One more QuickBlox and I didn’t have much time to explore this version.

Please feel free to let me know if my review above needs any correction….

Symfony: Adding custom route by code during runtime

During development we always come across situation where you need to add custom routes based on some settings based from the user. In this case we cannot use any of the standard methods like annotation and configuration files in symfony.

In this case you need to use a services and hooks to inject your custom route rules during runtime.

1) In your bundles under Resources\Config\services.yml add the following

2) Now we need to create a class RoutingService.php

3) Now in your main routing.yml please include these lines

4) Once you are done please make sure you clear cache both env

5) Now the custom route should be loaded in.. Please make sure if you add more routes make sure the cache is cleared.

Back To Top