Category: Software Development

  • Linux cp command how to copy files to a directory excluding current directory name

    Linux cp command how to copy files to a directory excluding current directory name

    So you want to copy files from one directory to another including all sub directories and files. It sounds simple at first. Say you have a directory with files named /directory1 and you want to move the files and directories within that directory to another named /directory2. How do you do this with the cp […]

  • How to add a fulltext index in Doctrine with Symfony 5+

    I had to google to find this answer on Stackexchange because I can’t find anything in the docs. Apparently this is something new so you don’t have to jump through the old circus hoops of the past. Apparently you can add a flags section like this to one of the index definitions of your Entity […]

  • Symfony 5+ how to view dump output with AJAX requests

    Symfony 5+ how to view dump output with AJAX requests

    So the idea is to be able to use the Symfony VarDumper component to be able to dump values when sending an AJAX request and view them for debugging while in development mode, but not in production mode. Create a new directory To do this you will need to create an event subscriber and listen […]

  • How to update Symfony minor versions

    How to update Symfony minor versions

    This is a work in progress. I’ll keep updating it with time.  Most of my articles are for me so I can remember what I did and the problems I had and how I solved them. I’d suggest updating your composer packages more often than just when you are moving to a newer version of […]

  • How to set application values for easy reuse in Symfony 5+

    How to set application values for easy reuse in Symfony 5+

    This article is a work in progress and will be further updated much more in the future. I don’t feel it is complete yet, I’d like to cover more details, more screenshots etc.. So how do you set/configure a value like an upload directory in one location in Symfony so that you can easily use […]

  • How to fix Composer GitHub API limit (0 calls/hr) is exhausted … errors

    How to fix Composer GitHub API limit (0 calls/hr) is exhausted … errors

    Programming Joke. How does a mechanic start their day? They go to work. They get their tools and start working. How does a carpenter start their day? They go to work. They pick up their tools and begin where they left off the previous day. How does a web developer start their day? They go […]

  • Symfony 5+ error logging handlers explained

    Symfony 5+ error logging handlers explained

    This will be a super long article, this subject is way more complex than it originally sounds. As always, I’ll be updating this soon with more info and possibly more examples as I figure it out better. First off, you are not limited to just one logger in Symfony. However, the most popular is Monolog […]

  • PHP Enumeration classes vs fake enumerations what to use.

    PHP Enumeration classes vs fake enumerations what to use.

    I am growing to HATE PHP ENUMS. Why? Because if you forget to call ->value you get BS errors about cannot convert object to string. It is just another un-needed step. Enums sounded cool at first but fuq the BS with calling ->value, it is entirely too easy to forget. Enumeration classes in PHP are […]

  • Javascript and contenteditable how to move the cursor to the end of user input

    Javascript and contenteditable how to move the cursor to the end of user input

    This appears to work in all browsers. Let me know if you find issues. So this is something I needed to do and all the examples I found didn’t work properly. Or they worked partially, or only in one browser. The idea seems super simple, but in reality the problem becomes complex for several reasons. […]

  • Symfony how to get query string values sent by AJAX calls

    Symfony how to get query string values sent by AJAX calls

    When using a Symfony API endpoint for getting values such as maybe something like an auto-complete feature you will need to be able to send some text(what the user enters) to the backend. Then have the backend return a response based on that. For example with an auto complete feature, you might want to send […]