Alpine Linux has become increasingly important as it’s a popular base linux for Docker containers. One it’s many quirks is it doesn’t use Debian (apt) or RPM (yum) software repositories. Insteak alpine uses a package managment client called apk, which reads from repositories that are neither debian, nor RPM [...]
astorm
In my longer introduction to PHP generators we didn’t talk much about a generator’s “key” values. In other words — when presented with code like this function someGeneratorFunction() { yield 'foo'; yield 'baz'; yield 'bar'; } $generator = someGeneratorFunction(); foreach($generator as $key=>$value) { echo [...]
astorm
Fuzzers are a category of security testing software that will throw all sorts of random data at a software system looking for flaws that can then be exploited by individual penetration testers. Sort of like throwing a bunch of paint around the room trying to find the invisible man. I found this talk about a PHP Internals Fuzzer from [...]
astorm
Visit Linked Page
When I’m working solo, (which usually means I’m doing the initial scoping and prototyping of some sort of feature and/or system), my “git workflow” is usually a shove it all into master affair. When I switch off to team work I often find myself in a situation where I’ve done a done of work without branching first. That’s where git move comes to the rescue. Okay, one more… Ever commit something only to immediately realize that you're on the wrong branch? Use "git move <branch>". pic.twitter.com/fKpZTRkdRu — coderabbi™[for rent] (@coderabbi) September 4, 2017
astorm
With all the Yahoo and Verizon shenanigans going on I decided to pull my Magento Quickies posts off Tumblr and hold them close again at my personal home page. You can find all the old posts in the Programming Quickies category. DNS is doing its DNS thing, but magento-quickies.alanstorm.com should eventually redirect to that same category [...]
astorm
Visit Linked Page
Re: A Declarative Approach for Database Schema Upgrades It sounds like Magento’s planning a pretty radical overhaul of how it handles schema and data upgrades between versions. The looks to be a fiat from on high (vs. the community driven approach they’ve been using for bug fixes). If you’re making schema/data changes that aren’t in Magento’s core or Marketplace code bases, you’ll want to pay attention to this – your deck chairs may need shifting about.
astorm
Visit Linked Page
Menu Editor to Replace Category Based Menus in Magento 2. Feels like I can recommend checking out stuff from SnowdogApps, sight unseen.
astorm
Visit Linked Page
Create a PHPUnit Dashboard With New Relic Not strictly Magento related, but if you’re using New Relic it looks like they can automatically detect test runs and give you useful metrics about your tests. Neat!
astorm
Visit Linked Page
Reserved Words in Magento 2 URL Paths A StackExchange self answer where I use a plugin to work around the reserved-PHP-symbol-in-class-name problem that can plague Magento 2 URL routing. What’s extra baffling about this is Magento has a fix coded up, but only applies it to one URL segment. I suspect this is less baffling if you can gives up the idea that Magento 2 should retain its the rapid application prototyping roots of its ancestors.
astorm
Visit Linked Page
Magento 2 – Form Validation A StackExchange post that contains most (all?) of the CSS classes that can control Magento 2’s form validation. Magento seems to apply the validation rules on all form submits – although I haven’t dug too deeply into that one so caveat emptor etc. Also, a bonus for folks who read these Tumblr desciptions — here’s a quick bit of javascript that will take M1 style HTML and make all the fields required in an M2 context. require(['jquery'], function($){ $('.required-entry').each(function(key, element){ $(element).attr('required','required'); }); }); Useful if you have a complex form built with a combination of […]
astorm
Visit Linked Page
Magento custom Knockout.js bindings | Magento 2 Developer Documentation It might have taken 11 months, but it looks like Magento finally gave its dev docs team the resources they needed to document the UI Component Knockout JS custom bindings.
astorm
Visit Linked Page
JavaScript unit testing with Jasmine | Magento 2 Developer Documentation Jasmine’s a testing framework for javascript code – I didn’t know until today that Magento 2 had setup a framework for these tests. (Via the tremendous Vinai)
astorm
Visit Linked Page
Packagento – A curated list of open source Magento 2 modules A new Composer repository from Adam Johnson that’s curating open-source Magento 2 extensions.
astorm
(Putting this here in an external-memory/thinking-out-loud sort of way) Prior to Magento 2’s release, Magento executives circulated the idea that Magento 1 would reach its “end-of-life” three years after the release of Magento 2. Magento 2 was released November 17, 2015, which means Magento 1 reaches its end-of-life [...]
astorm
(With apologies to whomever originally posted this technique – I can’t seem to find your original article. If you’d like link/credit just let me know) As companies start to go ahead with Magento 2 builds and Magento 2 upgrades, more an more developers are wondering what to do about the missing code pools from Magento 1. [...]
astorm
Visit Linked Page
List of mod_security Rules for Magento 1 A list of instructions from the (semi?) independent Mage Security Council on installing their scanner. This sort of buries the lead – the end of the instructions point off to a list of malware fingerprint, which server administrators can use to block common attacks before they ever reach Magento.
astorm
Visit Linked Page
BFG Repo-Cleaner by rtyley Not quite Magento related, but we’ll let that slide. BFG is a command line program that lets you remove unwanted content from your a git repository’s history. Discovered it via a GitHub support issue on the same topic.
astorm
There’s a new point release of pestle available for immediate download — this one’s mostly a “bug fixes and improvements” sort of release, with the exception of the new mysql:key-check command, and some early alpha work on a Magento 2 webapi/service-contract generator. If “bug fixes and [...]
astorm
Visit Linked Page
The bin/magento setup:upgrade Command will Enable Non-Enabled modules · Issue #9516 · magento/magento2 Weird bit of behavior where the setup:upgrade command will automatically enable any module you’ve dropped into app/code. Small, but annoying bit of behavior if your run into it.
astorm