OpenLampTech No. 140
Solve PHP null on member function error | Content Security Policies | HTML 5 support in PHP | Drupal Migrate API | MySQL v8.0.37 (and later) upgrade bug
Thank you for reading the OpenLampTech newsletter!
If someone awesome shared this newsletter with you and you are not yet subscribed, please use the Subscribe button below and join:
OpenLampTech has sponsorship opportunities for your brand, product, or service in the weekly newsletter. As an independent publication, collaboration is very affordable.
All commentary is mine unless otherwise quoted.
Container Efficiency in Modular Monoliths: Symfony vs. Laravel
Both Laravel and Symfony are massive in the PHP framework world. I personally have not used either framework so my knowledge (and 2 cents) is very limited.
That can't be said for the author of this article.
If you are facing the decision of using either Laravel or Symfony, this article may be helpful.
Specifically where modular monolithic applications are concerned.
How to resolve “call to a member function get() on null” error
We've all (likely) encountered this error at some point. Lord knows I have.
At least there are far more cryptic errors to try and solve in PHP.
The “on null” indicates the object you are using doesn't exist.
While the examples in this article cover debugging this error in Magento, the concepts can be applied to any PHP code.
[M.academy]
3 Powerful SQL Queries To Work With Date-Time Data
Querying date and time values is essential for many reasons. Be it analysis, bookings, birthdays, or anything in between, dates are highly important.
Most SQL implementations support several date-related functions and other means of analyzing and manipulating date and time values.
BETWEEN is used to filter dates between a lower and upper bound range and is often a go-to for date-based queries.
[Medium]
Security Tip: Getting Started with Content Security Policies
Laravel security expert Stephen Rees-Carter sheds light on the Content Security Policy (of which I am/was unaware).
A Content Security Policy provides rules for how resources interact with your application.
Just what a Content Security Policy does is best described by Stephen (quoted from the source post-opening section):
“When fully configured, a CSP can prevent any unwanted scripts, styles, fonts, forms, etc, from being executed - locking a site down completely.”
Learn how to configure a Content Security Policy along with best practices in this article.
[Securing Laravel]
[Affiliate]
Consuming APIs in Laravel - Learn how to confidently integrate third-party APIs in your Laravel projects using maintainable, testable, and extensible code.
I'll preface this by saying this isn't necessarily my point of view. However, this isn't the first time I've seen this sort of sentiment towards Awesome Motive either.
I will agree that Awesome Motive seems to acquire products and companies more so than create and innovate. But, with a large pocketbook, you can do that and that's nothing new in business.
Like them or not, you can't ignore the fact that Awesome Motive is huge in the WordPress space.
I will say that the one AM product I am familiar with, WP Forms, is a decent enough form plugin for the free version at least.
[WPJohnny]
Do Not Upgrade to Any Version of MySQL After 8.0.37 (July 11th, 2024)
Hopefully, by the time you are reading this, patches will be available for this bug.
Here is my understanding.
This bug was noted by a community member who discovered that in specific MySQL versions, the MySQL daemon crashes at restart if you create a large number of tables (ex: 10,000).
[Percona]
Using Drupal Migrations to Modify Content Within a Site
This is an interesting (and useful - I'm sure) article covering Drupal functionality for a site refresh instead of migrating data from an older versioned Drupal site. Or another CMS altogether.
The Migrate API can be used ‘in-site’ to move existing content, useful when restructuring content types and fields.
[The Drop Times]
Better late than never (or ever), right?
When I saw this, I did a double-take. Of course, PHP supports HTML 5…
Or does it?
Turns out, PHP v8.4 will support HTML 5 with a compliant parser.
A (new) supporting class, \Dom\HTMLDocument, will be available.
WooCommerce news and updates
Developer Advisory: Minimum version requirements on Woo developed extensions (July 15th, 2024)
[#Affiliates and Classifieds] - Your support keeps the OpenLampTech newsletter free for readers
Ultimate Laravel Boilerplate to help other indie hackers deliver their SaaS in hours. Get started with LaraFast today! (affiliate)
Popups, newsletters, and abandoned carts. Use Omnisend with integrated email and SMS campaigns. (affiliate)
Thank you for reading. I hope you have a great rest of your week.
Take care.
Josh Otwell
Some links may be affiliate links from which I earn a small commission at no additional cost to you.


