<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Rafael Corrêa Gomes - Ecommerce Developer]]></title><description><![CDATA[I’m an eCommerce architect developer / consultant based in Montreal, Canada. I work with brands and retailers from all over the world to support the technical strategical work with Magento and Shopify]]></description><link>https://blog.rafaelcg.com</link><generator>RSS for Node</generator><lastBuildDate>Wed, 20 May 2026 03:54:25 GMT</lastBuildDate><atom:link href="https://blog.rafaelcg.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Adobe Commerce upgrade and resign in parallel]]></title><description><![CDATA[Is it possible to have the upgrade and redesign in parallel? From the development standpoint, the answer is 100% yes, but what to consider then? This is a question that came to me by few merchants. It seems to be impossible when they were talking wit...]]></description><link>https://blog.rafaelcg.com/adobe-commerce-upgrade-and-resign-in-parallel</link><guid isPermaLink="true">https://blog.rafaelcg.com/adobe-commerce-upgrade-and-resign-in-parallel</guid><category><![CDATA[Magento]]></category><category><![CDATA[ecommerce]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Fri, 04 Jun 2021 19:29:24 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1622834941529/UVL7Z-6-X.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Is it possible to have the upgrade and redesign in parallel? From the development standpoint, the answer is 100% yes, but what to consider then? This is a question that came to me by few merchants. It seems to be impossible when they were talking with some teams, but not with others. What are the points that a technical architect might help them to see was the question?</p>
<h2 id="upgrade-and-redesign-limitations">Upgrade and redesign limitations</h2>
<p>You might see limitations from the current technology and team that you have, saying that. Let's analyze the Adobe Commerce infrastructure.</p>
<p>The image below shows the Adobe Commerce / Magento Cloud architecture by branches and environments. As you can see, we have different branches that allow merchants and development teams to have multiple validations running. It doesn't need to have all environments enable, you can have your developers working locally. The developer doing the QA, merging, and adjustments to push to one of the environments in Magento Cloud. You can even call them "upgrade" and "redesign" environments.</p>
<p><img src="https://i2.wp.com/rafaelcg.com/wp-content/uploads/2021/06/cloud_pro-branch-architecture.png?resize=840%2C496&amp;ssl=1" alt="Magento Cloud upgrade and redesign" /></p>
<p>If you face issues to have changes in parallel in your team, I highly recommend you to look into the <a target="_blank" href="https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow">Git Flow</a> strategy. It's a very good way to have your team working in parallel without many code conflicts.</p>
<h2 id="strategical-plan">Strategical plan</h2>
<p>You need to analyze your current scenario, but I will share a simple plan that might help you not start from scratch. Let's start talking about the redesign, you need to measure your capacity vs effort needed to allocate more or fewer developers to some tasks. The upgrade might have the same analyses.</p>
<p>Let's say you have 4 developers working with the redesign, on different pages. Probably you might have more than 2 developers working with the upgrade.</p>
<p>An easy formula to measure the number of devs required to do the extra verifications will be 4 x 2 = 8. Then get the 8 and remove the total of devs planned, so it will be 8 -- 6 = 2. It means that you might be able to predict at least 2 developers for QA, code review, and overview the implementations. You might have a CTO or TA (Technical Architect) who is going to be a final advisor of the project heath.</p>
<p><img src="https://i1.wp.com/rafaelcg.com/wp-content/uploads/2021/06/Adobe-Commerce-Redesign-and-upgrade.png?resize=840%2C708&amp;ssl=1" alt="Adobe Commerce - Redesign and upgrade" /></p>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/Linus_Torvalds">Linus Torvalds</a> created GIT for this purpose, our part is to plan how to use the tools available in a way that might fit with the current scenario.</p>
<p>As a technical architect, my main goals during this whole process are to measure and reduce risks, predict scenarios, validate and approve approaches. <a target="_blank" href="https://rafaelcg.com/contact/">Let me know how will be your next project!</a></p>
]]></content:encoded></item><item><title><![CDATA[PWA myths and secrets revealed]]></title><description><![CDATA[Here I'm going to tell you what nobody is going to tell you from the business and technical standpoint. The opposite side of the PWA word, the myths that might become the dark side of it for you. But first, let's cover what you hear from 99.9% of the...]]></description><link>https://blog.rafaelcg.com/pwa-myths-and-secrets-revealed</link><guid isPermaLink="true">https://blog.rafaelcg.com/pwa-myths-and-secrets-revealed</guid><category><![CDATA[PWA]]></category><category><![CDATA[ecommerce]]></category><category><![CDATA[headless cms]]></category><category><![CDATA[cms]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Fri, 28 May 2021 21:47:58 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1622238562691/qG6ygFUpu.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Here I'm going to tell you what nobody is going to tell you from the business and technical standpoint. The opposite side of the PWA word, the myths that might become the dark side of it for you. But first, let's cover what you hear from 99.9% of the agencies and developers, the good points. For those who understand more deeply the technology, I'm covering here PWA Headless which is the most sold thing.</p>
<p><strong>Disclaimer: </strong> I prefer PWA, I love the benefits that it provides to customers and merchants. I want to show what agencies and developers won't tell you about the experience working with PWA that they had. Some things will be hidden from you but will impact a lot your business decisions. The best method for anyone to apply PWA is when it wasn't a blind decision.</p>
<p><strong>Goal:</strong> I want to show you Technical Architect, developers or merchants how to identify the differences between PWA and Headless, not a PWA vs Headless because they aren't opposites, you might have PWA with or without headless architecture.</p>
<h2 id="the-seductive-world-of-pwa">The seductive world of PWA 😍</h2>
<p>When you hear about PWA, everyone will share their good points. You might hear it in a such manner, that seems like there no reason why you're not on it now. It's faster, cheaper, prettier and you won't have any problems anymore. The real silver bullet already exists and you're missing out. Ok, ok, telling like this you know it's not true, but when a developer or agency that usually has the more technical experience and shows many examples faster than your current store, then it feels like it's going to solve all the problems.</p>
<p>It's very usual to see as a sales argument numbers like these below.</p>
<ul>
<li>68% increase in mobile traffic</li>
<li>15-fold improvement of load and installation speed</li>
<li>25-times reduced use of device storage</li>
<li>52% average conversion increase</li>
<li>78% average session increase</li>
<li>137% engagement increase</li>
<li>42.86% lower bounce rate when compared to that of mobile websites</li>
<li>133.67% increase in page views</li>
</ul>
<h2 id="the-main-advantages-are-true">The main advantages are true? 🤔</h2>
<p>Usually when I go deep into the analyses made they aren't reporting the real truth. The words are true, but the intentional feeling looking at it, it's not. We didn't see the entire scenario to have been prepared to make a decision based on someone's words; Most of the time who sells it's hiding the bad points for a reason.</p>
<p>I don't believe in taking a decision alone. Without explain to the client and evaluate with them if it makes sense to their business. So, let's cover some of the main points.</p>
<h2 id="1-low-development-costs">1. Low Development Costs 🤑</h2>
<p>PWAs do not require different versions for various devices; a single progressive app meets the requirements of all endpoints on which it operates. It significantly reduces of efforts that developers provide, and as a result, the cost to create a PWA decrease. The cost is three or four times lower than that of a native mobile app.</p>
<h3 id="what-to-consider">⚠️ What to consider</h3>
<ul>
<li>If you don't have or you're not planning to have a mobile app soon, it doesn't make sense to consider. The cost of development reduces just when you have to maintain Web / Android / IOS vs PWA.</li>
<li>If you just have a web store to maintain the maintenance cost is going to increase.</li>
<li>50% of your application will be running into another application. It means that if you use a Shopify or Adobe Commerce store (Magento Commerce) and you usually install apps that change something in the frontend, like apps and modules that improve the customer experience as soon as you install them, forget it, a developer most customizes the 50% of your store that's not you Shopify or Magento store anymore, but a PWA technology running in another server. It usually represents more time to implement something and more money invested to customize 100% of those apps that you usually just have to install.</li>
<li>The new 50% custom part of your project will be in another language, probably Vue, React, or Angular. Probably your devs aren't familiar with these technologies, since they aren't not using them now to develop your store.</li>
</ul>
<h2 id="2-app-like-experience">2. App-Like Experience 📱</h2>
<p>Progressive web applications (a.k.a PWA) provide an advanced user experience by combining the look and feel of mobile applications and the best of website performance. They have the design and settings that are very similar to those of native mobile software. Regardless of technologies, tools, and frameworks on which PWAs are developed, they provide the same user experience as native mobile apps do, and it is considered to be superior to that of websites.</p>
<p>At the same time, they have the same speed, responsiveness, and comprehensive capabilities as websites with database access and automatic data. As a result, search engines index them, which is why systems such as Google or Bing can find PWA pages. When compared to mobile software that keeps its internal data only for its own use, the pages of these applications can be found on the internet, which may have a favourable impact on the number of page views.</p>
<h3 id="what-to-consider">⚠️ What to consider</h3>
<ul>
<li>There are many <a target="_blank" href="https://whatwebcando.today/">PWA capabilities </a>to match the same experience of a mobile app, each PWA solution offers its own possibilities, and it comes to the agency of developer dedicate more time to implement them, 99% of the PWA implementations that I've seen, just implemented the most basic features.</li>
<li>This is unbelievable but there are companies that sell PWA as Headless then when the project is launched, the project is headless and the experience is not PWA, it doesn't even pass in the <a target="_blank" href="https://developers.google.com/web/ilt/pwa/lighthouse-pwa-analysis-tool">Google PWA validation tool</a>.</li>
<li>If you don't track your KPIs you will have the costs and complexity of headless PWA applications but not the advantages that paid for.</li>
</ul>
<h2 id="3-fast-installation">3. Fast Installation 🔥</h2>
<p>Unlike regular mobile applications, PWAs do not require a long and complex installation process, which significantly improves user experience. Users just download an app, quickly and directly to their devices, and they do not need to go to the App Store or Google Play. It streamlines the procedure and significantly reduces user abandonment. After users have downloaded an app, they can access it via a desktop icon.</p>
<p>Some browsers even offer call-to-action-like teasers that prompt users to download these apps when they visit respective websites. This functionality comes built into browsers and allows the apps to enhance their credibility and reliability. As this software does not require installation on devices, users can easily access the PWA via a URL, which significantly contributes to the high shareability.</p>
<h3 id="what-to-consider">⚠️ What to consider</h3>
<ul>
<li>If you just want the basic features of PWA, measure if the agency is overselling a whole new project attached to it.</li>
<li>Basic PWA features might be achieved in a couple of days of work, but migration from Magento 2 to a Magento 2 headless structure might take a couple of months.</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1622238515804/MXDA3-H1r.png" alt /></p>
<h2 id="4-better-performance">4. Better Performance 🚀</h2>
<p>PWAs cache and serve text, images and other content in a specific, efficient manner, which enables them to operate like websites and significantly improves the running speed. Along with quick operation, impeccable performance is another attribute that has an impact on user experience and conversion rates.</p>
<p>Retailers and content providers should adopt this type of software as it enables a more positive user experience than mobile apps by improving retention and customer loyalty.</p>
<h3 id="what-to-consider">⚠️ What to consider</h3>
<ul>
<li>There are many projects that migrated to PWA aiming performance, and the final result was a slower <a target="_blank" href="https://developers.google.com/speed/pagespeed/insights/">Google Page Speed</a> or <a target="_blank" href="https://gtmetrix.com/">GTMetrix</a> ranking and even worst SEO.</li>
<li>The analyses if essential to define the performance KPIs, the styles and static files and pages must be offline, but without consuming time of the first rendering.</li>
<li>In general, make sure if you have the possibility of spending 500x less time and money doing performance improvements in your current installation that would bring the same performance result to your current performance metric.</li>
</ul>
<h2 id="5-platform-and-device-agnosticism">5. Platform- and Device-Agnosticism 🖥</h2>
<p>Unlike regular applications that are very demanding on operating systems and the technical capabilities of various devices, PWAs work everywhere. A single app can satisfy the needs of various consumers and provide a uniform user experience on different endpoints. At the same time, this type of application enables cross-support to users that switch between their devices by providing them with a continuous experience. Users can access an app that has the same settings and data like that on another device.</p>
<p>This fact also significantly contributes to business automation, as companies that rely on PWAs know that the software their employees use performs seamlessly regardless of the platform or app version. Also, PWAs are highly responsive to various form factors, as they adapt properly to various screen sizes.</p>
<h3 id="what-to-consider">⚠️ What to consider</h3>
<ul>
<li>Your store won't be responsive just because you migrate to PWA, it's something that might be in place today.</li>
</ul>
<h2 id="6-no-updating-issues">6. No Updating Issues 🤩</h2>
<p>PWAs have specific functionality that allows them to update automatically, without notifying users and bothering them with permission requests. These apps update themselves every time when users visit them, thus eliminating the need to download batch changes and install them. They just provide a renewed look with no human participation.</p>
<p>However, some of the producers of progressive apps send push notifications to users to inform them about the arrival of a new update. All the same, producers have full control of the information and content, to which users have access.</p>
<h3 id="what-to-consider">⚠️ What to consider</h3>
<ul>
<li>If you have an app today you know that it's a huge challenge. Basically, it's the same web experience, you deployed it, it's there for everyone.</li>
<li>Make sure you have the right "cache" invalidation to different kinds of pages and files. Styles might be saved in the client machine for more time than structural files.</li>
</ul>
<h2 id="7-seamless-offline-operation">7. Seamless Offline Operation 📡</h2>
<p>The capability to operate offline or in compromised networks makes PWAs much more convenient than websites. Built-in service workers cache important progressive web apps' features and information automatically, which eliminates the necessity to download it and allows users to access it without an internet connection.</p>
<p>It is based on the saving of information that users previously accessed, for example, pages. If they try to open those that they have not visited online, an app can show a custom offline page. This capability is crucial for retailers, as it allows them to prevent users from abandoning their catalogs and enhances customer retention.</p>
<h3 id="what-to-consider">⚠️ What to consider</h3>
<ul>
<li>Make sure you make the offline content be saved in the client's device during the first access. Check if it won't be requested from the server in the subsequent pages.</li>
<li>Dynamic contents might be loaded via AJAX. All public static content of your store will be saved to everyone but the dynamic content will be distributed differently.</li>
</ul>
<h2 id="8-no-dependence-on-app-distribution-services">8. No Dependence on App Distribution Services 🍎</h2>
<p>Usually, app distribution services, such as the App Store, Google Play or Microsoft Store, set high requirements to software that is included in their databases. Meeting their requirements may become quite a time- and effort-consuming process. Also, in some cases, services remove applications from databases without notice if a company fails to meet some of the requirements. So, PWAs allow producers to avoid complex reconciliation procedures as they do not need to be stored in similar services.</p>
<h3 id="what-to-consider">⚠️ What to consider</h3>
<ul>
<li>You might want to push your PWA app in the Apple and Google App stores, it will help you to achieve a bigger audience.</li>
</ul>
<h2 id="9-push-notification-functionality">9. Push Notification Functionality ⭐️</h2>
<p>Like native mobile applications, PWAs have access to device-specific functionality, such as push notifications. This capability can be performed in various ways and allows companies to make the best use of content advertising.</p>
<p>Why are push notifications especially efficient when it comes to PWAs? According to <a target="_blank" href="https://developers.google.com/web/showcase/2016/service-worker-perf">some statistical data</a>, almost 60% of users allow their progressive applications to send them notifications, which significantly increases opportunities to promote products or services. Moreover, these notifications are displayed on the screens of mobile devices, which is why there is a high probability that they attract users' attention, especially when compared to email newsletters, blog entries or posts in social networks.</p>
<p>In such a way, a company can better access its target audience, and chances are, the audience will respond. Another valuable outcome is that these bouncing notifications, along with app icons on device desktops, considerably add to brand recognition, as they allow a business to draw attention to itself. However, users that have numerous applications installed on their mobile devices and that allow a great number of them to send notifications risk making their digital experiences cluttered.</p>
<h3 id="what-to-consider">⚠️ What to consider</h3>
<ul>
<li>Most of the time that's a third-party system in the background that is going to handle it for you, have in mind that you might not need a PWA for it.</li>
</ul>
<h2 id="10-enhanced-security">10. Enhanced Security 👮‍♀️</h2>
<p>PWAs rely on HTTPS to provide data safety and minimize the risk of security issues, as this protocol allows to preclude snooping and content tampering. Also, the applications take advantage of Web Bluetooth technology that includes certain security capabilities.</p>
<h3 id="what-to-consider">⚠️ What to consider</h3>
<ul>
<li>More security is completely relative, you might have even less security depending on how the structure was made.</li>
<li>It seems to be a 100% guarantee by migrating to PWA but it's not.</li>
</ul>
<h2 id="my-thoughts">My thoughts</h2>
<p>I love web development and the power of PWA capabilities, I truly believe that PWA is the future and everyone can take parts of its advantages to improve their customer experience. What I don't like is when someone sells some PWA to merchants without telling the points to consider, it results in frustration, huge cost and the client thinks that PWA is what has been delivered by the agency and not what it really is. An awesome method to improve your customer experience.</p>
]]></content:encoded></item><item><title><![CDATA[Deploy a Next.js App to AWS Amplify]]></title><description><![CDATA[AWS Amplify just announced server-side rendering deployment support for Next.js! Here's a quick guide on how to deploy both an SSR and an SSG Next.js app.
Note: if you're new to Next.js check out this tutorial!
SSG
For a statically generated Next.js ...]]></description><link>https://blog.rafaelcg.com/deploy-a-nextjs-app-to-aws-amplify</link><guid isPermaLink="true">https://blog.rafaelcg.com/deploy-a-nextjs-app-to-aws-amplify</guid><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Wed, 19 May 2021 18:41:16 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1621531378143/6gtpzwkDd.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><a target="_blank" href="https://docs.aws.amazon.com/amplify/latest/userguide/server-side-rendering-amplify.html">AWS Amplify just announced server-side rendering deployment support for Next.js</a>! Here's a quick guide on how to deploy both an <a target="_blank" href="https://welearncode.com/ssr-vs-ssg/">SSR and an SSG</a> Next.js app.</p>
<p>Note: if you're new to Next.js check out <a target="_blank" href="https://welearncode.com/beginners-guide-nextjs/">this tutorial!</a></p>
<h2 id="ssg">SSG</h2>
<p>For a statically generated Next.js app, you'll first need to edit your <code>package.json</code> file. You'll need to change your <code>build</code> to <code>next build &amp;&amp; next export</code> instead of just <code>next build</code>.</p>
<pre><code class="lang-diff">"scripts": {
  "dev": "next dev",
<span class="hljs-addition">+ "build": "next build &amp;&amp; next export",</span>
  "start": "next start"
},
</code></pre>
<h2 id="ssr">SSR</h2>
<p>You don't need to change anything in your <code>package.json</code> for a server-side rendered app! Just keep the one that was generated by <code>create-next-app</code>.</p>
<h2 id="hybrid-ssg-ssr">Hybrid SSG + SSR</h2>
<p>If you have an app with both SSR and SSG pages, also keep the default <code>package.json</code>, same as a fully SSR app!</p>
<h2 id="for-both">For Both</h2>
<p>Then, create a repository on your git provider of choice, and push your code to it.</p>
<ol>
<li><p><a target="_blank" href="https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/">Create an AWS account</a> if you don't already have one.</p>
</li>
<li><p>Navigate to <a target="_blank" href="https://console.aws.amazon.com/amplify/home">the Amplify Console</a></p>
</li>
<li><p>Click on the orange <code>connect app</code> button.</p>
</li>
<li><p>Choose <code>GitHub</code> in the <code>From your existing code</code> menu, and click continue</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1621531368314/IZL4vNj2h.png" alt="Amplify interface with different remotes" /></p>
<ol>
<li>Type in the name of your GitHub repo you just created (it should autofill!) and then click <code>next</code></li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1621531371805/oRFth34EX.png" alt="Amplify interface with name of repo" /></p>
<ol>
<li>The build settings will auto-populate, and so you can just click <code>next</code> on the <code>Configure build settings</code></li>
<li>Click <code>Save and deploy</code>.</li>
</ol>
<h2 id="pricing">Pricing</h2>
<p>Behind the scenes, Amplify creates AWS resources used to deploy your app -- first an <a target="_blank" href="https://aws.amazon.com/s3/pricing/">Amazon S3 bucket</a> to store your app's static assets, then an <a target="_blank" href="https://aws.amazon.com/cloudfront/pricing/">Amazon CloudFront</a> to serve your app itself, finally a <a target="_blank" href="https://aws.amazon.com/lambda/pricing/">Lambda@Edge function</a> to SSR pages. The links to each service in this paragraph leads to info about the pricing for it.</p>
<h2 id="multi-branch-deployments">Multi-branch Deployments</h2>
<p>In order to deploy multiple branches to AWS Amplify, you can click the orange "Connect branch" button on the <a target="_blank" href="console.aws.amazon.com/amplify/home">Amplify Console</a> page for your app. So, if you want to test deployments of features before they go live to the <code>main</code> branch, you can do so in clicks!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1621531373950/vc9h9BEsw.png" alt="The connect branch button on the AWS Amplify Console" /></p>
<h2 id="pull-request-previews">Pull Request Previews</h2>
<p>You can also enable automatic pull request preview deployments. This will enable Amplify to deploy a preview of each pull request to a project so that you can click a link and see what the pull request does to the site!</p>
<p>First click on <code>previews</code> on the left side bar.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1621531375540/2jMRF6x9O.png" alt="Enable previews in the AWS Amplify Console" /></p>
<p>Then, click <code>Enable previews</code>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1621531376858/ZFkThjetP.png" alt="Enable pull request previews in aws amplify" /></p>
<h2 id="add-a-custom-domain">Add a Custom Domain</h2>
<p>You can also connect your domain name to your site by visiting <code>Domain management</code> and then <code>add domain</code> -- you'll see instructions for different domain providers or be able to buy one through Amazon Route53.</p>
<h2 id="conclusion">Conclusion</h2>
<p>These are just some of the things you can do when you deploy an app to AWS Amplify Hosting! There are also ways to add testing, monitoring, custom headers, access control and more. I hope this guide was helpful for those of you looking to deploy a Next.js app to Amplify.</p>
]]></content:encoded></item><item><title><![CDATA[How to downgrade Composer via homebrew?]]></title><description><![CDATA[Using Mac to develop PHP applications without Docker might be tricky sometimes. A useful thing to know is how to easily change your Composer version, following this tutorial you might be able to upgrade or downgrade to any version.
Downgrade Composer...]]></description><link>https://blog.rafaelcg.com/how-to-downgrade-composer-via-homebrew</link><guid isPermaLink="true">https://blog.rafaelcg.com/how-to-downgrade-composer-via-homebrew</guid><category><![CDATA[PHP]]></category><category><![CDATA[composer]]></category><category><![CDATA[Developer]]></category><category><![CDATA[Tutorial]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Tue, 18 May 2021 20:57:18 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1621371467507/0yuNXuRUd.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Using Mac to develop PHP applications without Docker might be tricky sometimes. A useful thing to know is how to easily change your Composer version, following this tutorial you might be able to upgrade or downgrade to any version.</p>
<h2 id="downgrade-composer">Downgrade Composer</h2>
<p>The first thing to check is the versions available to you, running this command below you will be able to see and select which version you want to migrate to.</p>
<pre><code>brew <span class="hljs-keyword">log</span> composer
</code></pre><h2 id="downgrade-composer-with-brew-on-macos">Downgrade Composer with Brew on macOS</h2>
<p>Then install Composer and change the version, doing the downgrade directly via Composer command.</p>
<pre><code><span class="hljs-attribute">brew</span> install composer
<span class="hljs-attribute">composer</span> self-update <span class="hljs-number">1</span>.<span class="hljs-number">10</span>.<span class="hljs-number">15</span>
</code></pre><h2 id="whats-the-composer-purpose">What’s the Composer purpose</h2>
<p><strong>Composer</strong> is an application-level package manager for PHP that provides a standard format for managing dependencies of PHP software and required libraries. Composer is strongly inspired by Node.js package manager npm, and the Ruby one called bundler.</p>
<p>You can run Composer from the command line and installs dependencies. It also allows users to install PHP applications that are available on Packagist, using the main repository containing available packages.</p>
<h2 id="thanks">Thanks!</h2>
<p>If you or your team is struggling with your development workflow using Composer, please don’t hesitate to <a target="_blank" href="https://rafaelcg.com/contact/">let me know</a>. We might be able to evolve your development process by seeing how your processes are set up.</p>
<p>This post was a question and answer that I created in the <a target="_blank" href="https://apple.stackexchange.com/a/406149/199010">Apple StackExchange</a>.</p>
]]></content:encoded></item><item><title><![CDATA[How to add new users to the Magento Cloud panel?]]></title><description><![CDATA[The Magento Cloud panel offers very easy control over the Magento 2 Commerce project. You might be able to control your users, environments, and general configurations easily. In case you can't find the control that you want to use you can try to use...]]></description><link>https://blog.rafaelcg.com/how-to-add-new-users-to-the-magento-cloud-panel</link><guid isPermaLink="true">https://blog.rafaelcg.com/how-to-add-new-users-to-the-magento-cloud-panel</guid><category><![CDATA[Magento]]></category><category><![CDATA[Tutorial]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Fri, 14 May 2021 20:02:04 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1621022556791/34yhoqr8l.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The Magento Cloud panel offers very easy control over the Magento 2 Commerce project. You might be able to control your users, environments, and general configurations easily. In case you can't find the control that you want to use you can try to use the Magento Cloud CLI to add users or the Adobe Support to guide you.</p>
<h2 id="magento-cloud-panel">Magento Cloud panel</h2>
<p>When you access the main project panel you might see the gear on the left side of the screen, right after the project name.</p>
<p><img src="https://i0.wp.com/rafaelcg.com/wp-content/uploads/2021/05/magento-cloud_project_gear.png?resize=461%2C173&amp;ssl=1" alt="Magento 2 gear icon to change the Magento Cloud configuration" /></p>
<p>You might see in the user tab an add button, entering the user email, you will send an invite.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1621022552831/a-WGrCC4C.png" alt /></p>
<p>If you don't know the right permission, you can consult the table of restrictions and descriptions in this post.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1621022554657/N7w3EEhsk.png" alt="Define Magento Cloud user restriction via panel" /></p>
<p>For a project administrator account, select Super User. This role provides Admin rights to all settings and environments. If not selected, the account has only view options for all project environments.\
Select permissions per specific environment (or branch) in the Integration environment:</p>
<ul>
<li>No access</li>
<li>Admin (change settings, execute an action, merge code)</li>
<li>Contributor (push code), or Reader (view only)</li>
</ul>
<p>When you add active environments, you can modify permissions per user.</p>
<h2 id="assign-project-level-roles">Assign project-level roles</h2>
<div class="hn-table">
<table>
<thead>
<tr>
<td>ROLE</td><td>SCOPE</td><td>ACCESS</td></tr>
</thead>
<tbody>
<tr>
<td>Account owner</td><td>Project</td><td>Perform any task in any project or environment, including deleting it. Magento assigns this role to the License Owner associated with the email address, name, and information of the person who registered the Magento Commerce Cloud account. You must submit a Magento Support ticket to modify settings or change the Account owner.</td></tr>
<tr>
<td>Superuser</td><td>Project</td><td>Administrator access to all project settings and Cloud environments. Superusers can change settings and perform tasks on any environment, including creating and restoring <a target="_blank" href="https://devdocs.magento.com/cloud/project/project-webint-snap.html">Magento Cloud</a> and managing users.</td></tr>
<tr>
<td>Project reader</td><td>Project</td><td>View access to all project environments. Users with this role cannot perform tasks on any environment. However, you can configure environment-level permissions for users with this role to permit write access to a specific environment.</td></tr>
<tr>
<td>Admin</td><td>Environment</td><td>Change settings and perform tasks on an environment, including merging with the parent environment</td></tr>
<tr>
<td>Contributor</td><td>Environment</td><td>Push code and branch the environment</td></tr>
<tr>
<td>Reader</td><td>Environment</td><td>View-only access to an environment</td></tr>
</tbody>
</table>
</div>]]></content:encoded></item><item><title><![CDATA[How to add Magento Cloud users via CLI]]></title><description><![CDATA[If you're a developer like me, for sure you will prefer to add new users via terminal via Magento Cloud CLI, not just add users, but you can edit, remove, list and edit the permissions via terminal. But in case you want to go to the visual way, I've ...]]></description><link>https://blog.rafaelcg.com/how-to-add-magento-cloud-users-via-cli</link><guid isPermaLink="true">https://blog.rafaelcg.com/how-to-add-magento-cloud-users-via-cli</guid><category><![CDATA[Magento]]></category><category><![CDATA[Tutorial]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Fri, 14 May 2021 19:55:07 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1621022129886/e97aBE6gj.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you're a developer like me, for sure you will prefer to add new users via terminal via Magento Cloud CLI, not just add users, but you can edit, remove, list and edit the permissions via terminal. But in case you want to go to the visual way, I've written the post <a target="_blank" href="https://rafaelcg.com/blog/tutorial/add-users-magento-cloud/">How to add new users to the Magento Cloud panel</a>.</p>
<h2 id="magento-cli-commands">Magento CLI Commands</h2>
<p>Specifically to control your users you have these available commands.</p>
<p>Add a user to the project</p>
<pre><code>magento-cloud <span class="hljs-keyword">user</span>:<span class="hljs-keyword">add</span>
</code></pre><p>Delete a user</p>
<pre><code>magento-cloud <span class="hljs-keyword">user</span>:<span class="hljs-keyword">delete</span>
</code></pre><p>List project users</p>
<pre><code><span class="hljs-selector-tag">magento-cloud</span> <span class="hljs-selector-tag">user</span><span class="hljs-selector-pseudo">:list</span> <span class="hljs-selector-attr">[users]</span>
</code></pre><p>View or change the user role</p>
<pre><code>magento-cloud <span class="hljs-keyword">user</span>:<span class="hljs-keyword">role</span>
</code></pre><p>The following examples use the CLI to add a user, configure roles, and modify project assignments and assigned user roles.</p>
<p>To add a user and assign roles:</p>
<p>Use the CLI to add the user. <code>magento-cloud user:add</code></p>
<p>Follow the prompts to specify the user email address, set the project and environment roles, and add the user:</p>
<pre><code>Enter the <span class="hljs-keyword">user</span><span class="hljs-string">'s email address: alice@example.com

Email address: alice@example.com

The user'</span>s project <span class="hljs-keyword">role</span> can be <span class="hljs-string">'viewer'</span> (<span class="hljs-string">'v'</span>) <span class="hljs-keyword">or</span> <span class="hljs-string">'admin'</span> (<span class="hljs-string">'a'</span>).

Project <span class="hljs-keyword">role</span> [V/a]: a

The <span class="hljs-keyword">user</span><span class="hljs-string">'s environment-level roles can be '</span>viewer<span class="hljs-string">', '</span>contributor<span class="hljs-string">', or '</span><span class="hljs-keyword">admin</span><span class="hljs-string">'.

development environment role [V/c/a]: c

Summary: Email address: alice@example.com

Project role: contributor

Adding users can result in additional charges.

Are you sure you want to add this user? [Y/n]

Adding the user to the project</span>
</code></pre><p>This operation triggers the Cloud build and deploy process, which takes your site offline until deployment completes. For production environments, we recommend completing this operation during off-peak hours to prevent service disruptions.</p>
<p>After you add the user, Magento sends an email to the specified address with instructions for accessing the Magento Commerce Cloud project.</p>
<p>The following example changes the environment-level role that is assigned to a user:</p>
<pre><code>magento-cloud <span class="hljs-keyword">user</span>:<span class="hljs-keyword">role</span> alice@example.com <span class="hljs-comment">--level environment --environment development --role admin</span>
</code></pre><p>The <code>magento-cloud list</code> command displays all the <code>magento-cloud</code> CLI commands.</p>
]]></content:encoded></item><item><title><![CDATA[What to consider when upgrading Magento 2]]></title><description><![CDATA[The biggest mistake that 90% of the agencies do when upgrading a Magento 2 Commerce to a stable version is not planning accordingly with each client. My goal with this article is to introduce you to the basis of an upgrade strategy and measurements t...]]></description><link>https://blog.rafaelcg.com/what-to-consider-when-upgrading-magento-2</link><guid isPermaLink="true">https://blog.rafaelcg.com/what-to-consider-when-upgrading-magento-2</guid><category><![CDATA[Magento]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Wed, 12 May 2021 21:30:37 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1620855049615/gmAi30rHl.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The biggest mistake that 90% of the agencies do when upgrading a Magento 2 Commerce to a stable version is not planning accordingly with each client. My goal with this article is to introduce you to the basis of an upgrade strategy and measurements to do before starting to code. If you want to have guidance or help with this process don't hesitate to <a target="_blank" href="https://rafaelcg.com/contact/">contact me</a>.</p>
<p>The mindset to perform the upgrade most of the time must be to avoid bottlenecks, mistakes and predict risks. Facing two ways to go, time and cost versus risks and tests, you’ll want to either go to the slower and safest than to the quicker and broken way.</p>
<h2 id="how-to-detect-not-trustable-estimation">How to detect not trustable estimation</h2>
<p>We have exceptions to almost everything upgrading Magento 2, there are many different scenarios, but to someone who doesn't have a  technical architect background, these easy points might help to do the right questions to your agency and developers.</p>
<ul>
<li>Template of estimation to upgrade any project or version.</li>
<li>There’s no analysis phase.</li>
<li>Unique overall estimation.</li>
<li>There’s no timeline for each phase.</li>
<li>Not predict the out-of-the-box modules and bug fixes to the next version.</li>
<li>You don’t have a list of risks and critical points to take business decisions.</li>
<li>The same amount of hours to upgrade a small version to a bigger version, e.g. from Magento 2.4.1 to Magento 2.4.2 and from Magento 2.3.6 to Magento 2.4.3.</li>
</ul>
<p>A clear vision of what will be done, when, and how your team will achieve it is the goal of the doc, I personally don’t see many developers doing these analyses with clients, you will have it from a Technical Architect, Business Analytics, or Lead Developer.</p>
<h2 id="upgrading-magento-2-in-6-steps">Upgrading Magento 2 in 6 steps</h2>
<p>These below are the main steps that I recommend going through to understand your customer and project.</p>
<ul>
<li>Getting information</li>
<li>Measuring risks</li>
<li>Preparing for the technical step</li>
<li>Step-by-step</li>
<li>Clean as you go</li>
<li>Finishing and measuring</li>
</ul>
<h3 id="1-getting-information">1. Getting information</h3>
<p>The getting information step is the data that you have today about the current project setup. E.g. the number of products, customers, product variations, particularities of the project, integrations, age of the project, current Magento version…</p>
<p>As an initial report, we’ll obtain the most important information to proceed, but it’s essential to keep a wiki to keep your finds.</p>
<h3 id="2-measuring-risks">2. Measuring risks</h3>
<p>Measuring risks is the most missed point by merchants and agencies. Here we’ll make sure we’ll measure the risk of upgrade to one version or another based on your current and future scenario, checking if we have integrations with PIM, POS, ERP, OMS, CMS, or other systems. We will check the modules bought, custom modules created, and everything that will change the estimation, risk, and cost. Most of the time we will need to discuss the topics with a business decision-maker in order to decide if something worth the risk of each approach.</p>
<h3 id="3-preparing-for-the-technical-step">3. Preparing for the technical step</h3>
<p>You will see agencies doing the initial plan, then starting to code to do the upgrade. Doing the initial strategy and business analyses but not the technical strategy to achieve it. At this point, the lead developer and the technical architect must talk with the team and create a “getting started” documentation.</p>
<p>The goal is to show where to go, the technical architect and the lead developer will be the most experienced technical persons to predict bottlenecks. A simple example is when the guidance is to use the out-of-the-box feature instead of building a module or to avoid implementing something that caused issues in other projects.</p>
<h3 id="4-step-by-step">4. Step-by-step</h3>
<p>With the experience of the lead developer, technical architect, and development team we can have a step-by-step to create a feedback cycle. The goal of this strategy is to have frequent and continuous validations and deploys.</p>
<p>If you see complaints about it, it’s probably because they aren’t predicting possible scenarios or because they are focused on the cost and not the reliability. When we have a production store the cost of losing customer experience is higher in the long term than perform more validations.</p>
<h3 id="5-clean-as-you-go">5. Clean as you go</h3>
<p>If you don’t have a clean routine, it’s good to set up one as soon as possible. In case you left things to be cleaned (e.g. old modules, bugs, code to refactor) this is the time to cleaning them and to set up a new cleaning routine. More important than do the cleaning is to do it constantly, it’ll be cheaper and faster for your team. I highly recommend setting up automated tests to check the code quality and the maintainability of the code.</p>
<p>The lead developer is the one that might take the main role in this step. The pattern to follow the tools to use and the logic of it will most of the time is created and monitored by the lead developer.</p>
<h3 id="6-finishing-and-measuring">6. Finishing and measuring</h3>
<p>When finishing an upgrade, we must follow the same approach as new implementations, which is to monitor it and measure it. Since we had a clear vision about what has been updated and the metrics already set, we might put in place tools to check the impact of the changes in the layout, performance, customer experience, or security that might change due to the new implementations. As sooner as you notice something wrong, as better and cheaper it will be to you. But if you’re not keeping an eye on it, your client must call you to complain about something broken to your team see that the implementation made 2 months ago didn’t work well.</p>
<p>The measurement is not applied once at the end, it’s running since the first phase continuously.</p>
<h3 id="thanks">Thanks</h3>
<p>Thank you for checking this article, if you need help to predict scenarios and measure possible risks during your integrations and new implementations please <a target="_blank" href="https://rafaelcg.com/contact/">let me know</a>!</p>
]]></content:encoded></item><item><title><![CDATA[How to uninstall and completely remove Valet+?]]></title><description><![CDATA[I began to use  Valet Plus  when I switch my MacBook and I had to avoid using Docker during the Magento 2 development, I didn't know in the beginning that Valet Plus is a fork of  Valet from Laravel and that the main differences are between them, so ...]]></description><link>https://blog.rafaelcg.com/how-to-uninstall-and-completely-remove-valet</link><guid isPermaLink="true">https://blog.rafaelcg.com/how-to-uninstall-and-completely-remove-valet</guid><category><![CDATA[PHP]]></category><category><![CDATA[Magento]]></category><category><![CDATA[Developer]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Mon, 03 May 2021 13:35:20 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1620047692557/idVWW1loI.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I began to use  <a target="_blank" href="https://github.com/weprovide/valet-plus">Valet Plus</a>  when I switch my MacBook and I had to avoid using Docker during the Magento 2 development, I didn't know in the beginning that Valet Plus is a fork of  <a target="_blank" href="https://laravel.com/docs/8.x/valet">Valet from Laravel</a> and that the main differences are between them, so I added them in this article to let you know too.</p>
<p>Since one and a half year I switched again to a better Macbook Pro which allowed me to return to Docker with no problems, then I decided to keep my Valet Plus installation just to have the basic commands locally, for example, composer, CLIs from Magento Cloud, Platform.sh and others. Even though we all know that Valet Plus brings a lot of issues because of its instability, and most of the time a definitive fix might be achieved by executing a complete removal of it and reinstall it.</p>
<h1 id="remove-valet">Remove Valet+</h1>
<p>To remove it completely I use a  <a target="_blank" href="https://gist.githubusercontent.com/dannygsmith/5b74ba708d7bf8621c1cb6b959ece99f/raw/f1b0e88ba4e0a753b112bd2187c22bf8eaa9a234/valet-plus-destroy">gist</a>  that contains all the required commands, you can run it directly via this command below.</p>
<pre><code><span class="hljs-attribute">bash</span> &lt;(curl -s https://gist.githubusercontent.com/dannygsmith/<span class="hljs-number">5</span>b<span class="hljs-number">74</span>ba<span class="hljs-number">708</span>d<span class="hljs-number">7</span>bf<span class="hljs-number">8621</span>c<span class="hljs-number">1</span>cb<span class="hljs-number">6</span>b<span class="hljs-number">959</span>ece<span class="hljs-number">99</span>f/raw/f<span class="hljs-number">1</span>b<span class="hljs-number">0</span>e<span class="hljs-number">88</span>ba<span class="hljs-number">4</span>e<span class="hljs-number">0</span>a<span class="hljs-number">753</span>b<span class="hljs-number">112</span>bd<span class="hljs-number">2187</span>c<span class="hljs-number">22</span>bf<span class="hljs-number">8</span>eaa<span class="hljs-number">9</span>a<span class="hljs-number">234</span>/valet-plus-destroy)
</code></pre><p>You will see this screen below at the finish.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1620048477708/e-v0JIeqZ.png" alt="How to uninstall and completely remove Valet Plus" /></p>
<h2 id="what-does-it-run">What does it run?</h2>
<p>The raw script is this one below in case you want to run command by command.</p>
<pre><code><span class="hljs-comment">#!/usr/bin/env bash</span>

<span class="hljs-comment">#styles</span>
<span class="hljs-attribute">VP_NONE</span>='\<span class="hljs-number">033</span>[<span class="hljs-number">00</span>m'
<span class="hljs-attribute">VP_RED</span>='\<span class="hljs-number">033</span>[<span class="hljs-number">01</span>;<span class="hljs-number">31</span>m'
<span class="hljs-attribute">VP_GREEN</span>='\<span class="hljs-number">033</span>[<span class="hljs-number">01</span>;<span class="hljs-number">32</span>m'
<span class="hljs-attribute">VP_YELLOW</span>='\<span class="hljs-number">033</span>[<span class="hljs-number">01</span>;<span class="hljs-number">33</span>m'
<span class="hljs-attribute">VP_PURPLE</span>='\<span class="hljs-number">033</span>[<span class="hljs-number">01</span>;<span class="hljs-number">35</span>m'
<span class="hljs-attribute">VP_CYAN</span>='\<span class="hljs-number">033</span>[<span class="hljs-number">01</span>;<span class="hljs-number">36</span>m'
<span class="hljs-attribute">VP_WHITE</span>='\<span class="hljs-number">033</span>[<span class="hljs-number">01</span>;<span class="hljs-number">37</span>m'
<span class="hljs-attribute">VP_BOLD</span>='\<span class="hljs-number">033</span>[<span class="hljs-number">1</span>m'
<span class="hljs-attribute">VP_UNDERLINE</span>='\<span class="hljs-number">033</span>[<span class="hljs-number">4</span>m'

<span class="hljs-comment"># clear the screen</span>
<span class="hljs-attribute">clear</span>

<span class="hljs-comment"># cache sudo password so it will only need to be entered once.</span>
<span class="hljs-attribute">echo</span> -e <span class="hljs-string">"${VP_RED}${VP_BOLD}You may be asked to enter your password twice….${VP_NONE}"</span>
<span class="hljs-attribute">sudo</span> -v

<span class="hljs-comment"># update homebrew</span>
<span class="hljs-attribute">brew</span> update

<span class="hljs-comment"># upgrade homebrew formulas</span>
<span class="hljs-attribute">brew</span> upgrade

<span class="hljs-comment"># cleanup mess</span>
<span class="hljs-attribute">brew</span> doctor
<span class="hljs-attribute">brew</span> cleanup
<span class="hljs-attribute">brew</span> prune

<span class="hljs-comment"># stop Valet</span>
<span class="hljs-comment">#==================</span>
<span class="hljs-attribute">valet</span> stop
<span class="hljs-attribute">sudo</span> valet stop
<span class="hljs-attribute">composer</span> global remove laravel/valet
<span class="hljs-attribute">composer</span> global remove weprovide/valet-plus
<span class="hljs-attribute">brew</span> services stop  --<span class="hljs-literal">all</span>

<span class="hljs-comment"># Uninstall dnsmasq</span>
<span class="hljs-comment">#==================</span>
<span class="hljs-attribute">sudo</span> launchctl unload homebrew.mxcl.dnsmasq.plist
<span class="hljs-attribute">brew</span> uninstall dnsmasq
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/etc/dnsmasq.conf
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/Cellar/dnsmasq
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/opt/dnsmasq
<span class="hljs-attribute">sudo</span> rm -rf /etc/resolver
<span class="hljs-attribute">sudo</span> rm /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
<span class="hljs-attribute">sudo</span> killall dnsmasq

<span class="hljs-comment"># Uninstall nginx</span>
<span class="hljs-comment">#================</span>
<span class="hljs-attribute">sudo</span> launchctl unload homebrew.mxcl.nginx.plist
<span class="hljs-attribute">brew</span> uninstall nginx
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/etc/nginx/
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/Cellar/nginx
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/opt/nginx
<span class="hljs-attribute">sudo</span> rm /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
<span class="hljs-attribute">sudo</span> killall nginx
<span class="hljs-attribute">killall</span> nginx

<span class="hljs-comment"># Uninstall PHP72</span>
<span class="hljs-comment">#================</span>
<span class="hljs-attribute">sudo</span> launchctl unload homebrew.mxcl.php<span class="hljs-number">72</span>.plist
<span class="hljs-attribute">brew</span> uninstall php<span class="hljs-number">72</span> php<span class="hljs-number">72</span>-mcrypt php<span class="hljs-number">72</span>-xdebug php<span class="hljs-number">72</span>-opcache php<span class="hljs-number">72</span>-apcu php<span class="hljs-number">72</span>-geoip php<span class="hljs-number">72</span>-intl php<span class="hljs-number">72</span>-opcache n<span class="hljs-number">98</span>-magerun n<span class="hljs-number">98</span>-magerun<span class="hljs-number">2</span>
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/etc/php
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/Cellar/php<span class="hljs-number">72</span>*
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/opt/php<span class="hljs-number">72</span>*
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/opt/php<span class="hljs-number">72</span>
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/sbin/php*
<span class="hljs-attribute">sudo</span> rm /Library/LaunchDaemons/homebrew.mxcl.php<span class="hljs-number">72</span>.plist
<span class="hljs-attribute">sudo</span> killall php-fpm

<span class="hljs-comment"># Uninstall PHP71</span>
<span class="hljs-comment">#================</span>
<span class="hljs-attribute">sudo</span> launchctl unload homebrew.mxcl.php<span class="hljs-number">71</span>.plist
<span class="hljs-attribute">brew</span> uninstall php<span class="hljs-number">71</span> php<span class="hljs-number">71</span>-mcrypt php<span class="hljs-number">71</span>-xdebug php<span class="hljs-number">71</span>-opcache php<span class="hljs-number">71</span>-apcu php<span class="hljs-number">71</span>-geoip php<span class="hljs-number">71</span>-intl php<span class="hljs-number">71</span>-opcache n<span class="hljs-number">98</span>-magerun n<span class="hljs-number">98</span>-magerun<span class="hljs-number">2</span>
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/etc/php
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/Cellar/php<span class="hljs-number">71</span>*
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/opt/php<span class="hljs-number">71</span>*
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/opt/php<span class="hljs-number">71</span>
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/sbin/php*
<span class="hljs-attribute">sudo</span> rm /Library/LaunchDaemons/homebrew.mxcl.php<span class="hljs-number">71</span>.plist
<span class="hljs-attribute">sudo</span> killall php-fpm

<span class="hljs-comment"># Uninstall PHP70</span>
<span class="hljs-comment">#================</span>
<span class="hljs-attribute">sudo</span> launchctl unload homebrew.mxcl.php<span class="hljs-number">70</span>.plist
<span class="hljs-attribute">brew</span> uninstall php<span class="hljs-number">70</span> php<span class="hljs-number">70</span>-mcrypt php<span class="hljs-number">70</span>-xdebug php<span class="hljs-number">70</span>-opcache php<span class="hljs-number">70</span>-apcu php<span class="hljs-number">70</span>-geoip php<span class="hljs-number">70</span>-intl php<span class="hljs-number">70</span>-opcache n<span class="hljs-number">98</span>-magerun n<span class="hljs-number">98</span>-magerun<span class="hljs-number">2</span>
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/etc/php
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/Cellar/php<span class="hljs-number">70</span>*
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/opt/php<span class="hljs-number">70</span>*
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/opt/php<span class="hljs-number">70</span>
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/sbin/php*
<span class="hljs-attribute">sudo</span> rm /Library/LaunchDaemons/homebrew.mxcl.php<span class="hljs-number">70</span>.plist
<span class="hljs-attribute">sudo</span> killall php-fpm

<span class="hljs-comment"># Uninstall PHP56</span>
<span class="hljs-comment">#================</span>
<span class="hljs-attribute">sudo</span> launchctl unload homebrew.mxcl.php<span class="hljs-number">56</span>.plist
<span class="hljs-attribute">brew</span> uninstall php<span class="hljs-number">56</span> php<span class="hljs-number">56</span>-mcrypt php<span class="hljs-number">56</span>-xdebug php<span class="hljs-number">56</span>-opcache php<span class="hljs-number">56</span>-apcu php<span class="hljs-number">56</span>-geoip php<span class="hljs-number">56</span>-intl php<span class="hljs-number">56</span>-opcache n<span class="hljs-number">98</span>-magerun n<span class="hljs-number">98</span>-magerun<span class="hljs-number">2</span>
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/etc/php
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/Cellar/php<span class="hljs-number">56</span>*
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/opt/php<span class="hljs-number">56</span>*
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/opt/php<span class="hljs-number">56</span>
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/sbin/php*
<span class="hljs-attribute">sudo</span> rm /Library/LaunchDaemons/homebrew.mxcl.php<span class="hljs-number">56</span>.plist
<span class="hljs-attribute">sudo</span> killall php-fpm

<span class="hljs-comment"># Uninstall Mysql</span>
<span class="hljs-comment">#================</span>
<span class="hljs-attribute">brew</span> uninstall mysql
<span class="hljs-attribute">brew</span> cleanup
<span class="hljs-attribute">sudo</span> rm /usr/local/my.cnf
<span class="hljs-attribute">sudo</span> rm /usr/local/etc/my.cnf
<span class="hljs-attribute">sudo</span> rm /usr/local/mysql
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/var/mysql
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/mysql*
<span class="hljs-attribute">sudo</span> rm ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
<span class="hljs-attribute">sudo</span> rm -rf /Library/StartupItems/MySQLCOM
<span class="hljs-attribute">sudo</span> rm -rf /Library/PreferencePanes/My*
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/Cellar/mysql
<span class="hljs-attribute">sudo</span> rm -rf /usr/local/var/mysql

<span class="hljs-attribute">launchctl</span> unload -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
<span class="hljs-attribute">rm</span> ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

<span class="hljs-attribute">rm</span> -rf ~/Library/PreferencePanes/My*
<span class="hljs-attribute">sudo</span> rm -rf /Library/Receipts/mysql*
<span class="hljs-attribute">sudo</span> rm -rf /Library/Receipts/MySQL*
<span class="hljs-attribute">sudo</span> rm -rf /private/var/db/receipts/*mysql*
<span class="hljs-attribute">sudo</span> killall mysqld

<span class="hljs-comment"># Uninstall Valet</span>
<span class="hljs-comment">#================</span>
<span class="hljs-attribute">brew</span> uninstall mailhog
<span class="hljs-attribute">brew</span> uninstall redis
<span class="hljs-attribute">sudo</span> launchctl unload homebrew.mxcl.mailhog.plist
<span class="hljs-attribute">sudo</span> launchctl unload homebrew.mxcl.redis.plist
<span class="hljs-attribute">sudo</span> rm /Library/LaunchDaemons/homebrew.mxcl.*
<span class="hljs-attribute">sudo</span> killall mailhog
<span class="hljs-attribute">sudo</span> killall redis

<span class="hljs-attribute">sudo</span> rm -rf ~/.valet
<span class="hljs-attribute">sudo</span> rm -rf ~/.composer/vendor/weprovide/
<span class="hljs-attribute">brew</span> services stop  --<span class="hljs-literal">all</span>

<span class="hljs-comment"># remove composer from path</span>
<span class="hljs-attribute">before</span>='export PATH=<span class="hljs-string">"$PATH:$HOME/.composer/vendor/bin"</span>'
<span class="hljs-attribute">after</span>=''
<span class="hljs-attribute">sed</span> -i  <span class="hljs-string">"s#${before}##g"</span> ~/.bash_profile

<span class="hljs-comment"># update homebrew</span>
<span class="hljs-attribute">brew</span> update
<span class="hljs-comment"># upgrade homebrew formulas</span>
<span class="hljs-attribute">brew</span> upgrade
<span class="hljs-comment"># cleanup mess</span>
<span class="hljs-attribute">brew</span> doctor
<span class="hljs-attribute">brew</span> cleanup
<span class="hljs-attribute">brew</span> prune

<span class="hljs-attribute">echo</span> <span class="hljs-string">" "</span>
<span class="hljs-attribute">echo</span> -e <span class="hljs-string">"${VP_GREEN}${VP_BOLD}user brew services list to see if any services are running${VP_NONE}"</span>
<span class="hljs-attribute">brew</span> services list

<span class="hljs-attribute">echo</span> <span class="hljs-string">" "</span>
<span class="hljs-attribute">echo</span> -e <span class="hljs-string">"${VP_GREEN}${VP_BOLD}use ps to see if any process's are running${VP_NONE}"</span>
<span class="hljs-attribute">ps</span>  aux | grep DesktopServer.app       | grep -v grep| head -<span class="hljs-number">1</span>
<span class="hljs-attribute">ps</span>  aux | grep <span class="hljs-string">"Local by Flywheel.app"</span> | grep -v grep| head -<span class="hljs-number">1</span>
<span class="hljs-attribute">ps</span>  aux | grep -i <span class="hljs-string">"xamp"</span>               | grep -v grep| head -<span class="hljs-number">1</span>
<span class="hljs-attribute">ps</span>  aux | grep -i <span class="hljs-string">"mamp"</span>               | grep -v grep| head -<span class="hljs-number">1</span>
<span class="hljs-attribute">ps</span>  aux | grep dnsmasq                 | grep -v grep| head -<span class="hljs-number">1</span>
<span class="hljs-attribute">ps</span>  aux | grep nginx                   | grep -v grep| head -<span class="hljs-number">1</span>
<span class="hljs-attribute">ps</span>  aux | grep php                     | grep -v grep| head -<span class="hljs-number">1</span>
<span class="hljs-attribute">ps</span>  aux | grep mysql                   | grep -v grep| head -<span class="hljs-number">1</span>

<span class="hljs-attribute">echo</span> -e <span class="hljs-string">"${VP_RED}${VP_BOLD}REBOOT NOW BEFORE YOU RUN THE INSTALL${VP_NONE}"</span>
</code></pre><h1 id="valet-vs-valet">Valet vs. Valet+</h1>
<p>Valet+ is a third-party fork of Laravel Valet. Valet+ adds functionality to Valet with the goal of making things even simpler and faster. We are very grateful to the Laravel team for providing the base that we built Valet+ on. Since this is a fork we'll pull in changes from the original Valet regularly as they are released.</p>
<p>Some of the documentation in this readme was taken from the Valet website and provided here for convenience so that you can read this document and know about all features provided. The original documentation can be found here: laravel.com/docs/valet.</p>
<p>Since Valet+ is intended to replace Valet, it still uses the same valet command-line name. Any changes in its interface are documented below.</p>
<h1 id="why-valetvalet">Why Valet/Valet+?</h1>
<p>Valet+ configures your Mac to always run Nginx in the background when your machine starts. Then, using DnsMasq, Valet+ proxies all requests on the *.test domain to point to sites installed on your local machine.</p>
<p>In other words, a blazing fast development environment. Valet+ provides a great alternative if you want flexible basics or prefer extreme speed.</p>
<h1 id="differences-from-valet">Differences from Valet</h1>
<p>Here are a few key differences compared to the original Valet:</p>
<ul>
<li>PHP version switch</li>
<li>Xdebug (on/off mode)</li>
<li>PHP extensions (mcrypt, intl, opcache)</li>
<li>Optimized PHP configuration using opcache</li>
<li>MySQL (with optimized configuration)</li>
<li>Redis</li>
<li>Elasticsearch (optional)</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Check quickly the TTFB via terminal]]></title><description><![CDATA[For a long time, an alias helped me to return the TTFB during my dev tests, and talking with beginner developers I noticed that something small as an alias could be simpler, so I created a simple and developer-friendly tool to help beginners in a dev...]]></description><link>https://blog.rafaelcg.com/check-quickly-the-ttfb-via-terminal</link><guid isPermaLink="true">https://blog.rafaelcg.com/check-quickly-the-ttfb-via-terminal</guid><category><![CDATA[terminal]]></category><category><![CDATA[Linux]]></category><category><![CDATA[Productivity]]></category><category><![CDATA[tools]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Fri, 23 Apr 2021 21:53:35 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1619214738528/bmnkq8nF2.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>For a long time, an alias helped me to return the TTFB during my dev tests, and talking with beginner developers I noticed that something small as an alias could be simpler, so I created a simple and developer-friendly tool to help beginners in a developer team to have access to this solution.</p>
<p>To install the <a target="_blank" href="https://github.com/rafaelstz/ttfb-terminal">TTFB Terminal</a> you just need to run the command below.</p>
<pre><code class="lang-bash">bash &lt;(curl -s https://raw.githubusercontent.com/rafaelstz/ttfb-terminal/master/setup-ttfb)
</code></pre>
<p><img src="https://github.com/rafaelstz/ttfb-terminal/raw/develop/ttfb-terminal.png" alt="ttfb terminal - rafael correa gomes" /></p>
<h2 id="why">Why?</h2>
<p>You can use this tool to check the server response and detect some kind of issues, for example:</p>
<ul>
<li>Network issues</li>
<li>Dynamic content creation</li>
<li>Web server configuration</li>
<li>Amount of traffic</li>
</ul>
<h2 id="whats-ttfb">What's TTFB?</h2>
<p>According to <a target="_blank" href="https://www.keycdn.com/support/what-is-ttfb">KeyCDN</a>. TTFB, which stands for time to the first byte, is the amount of time it takes from when a client makes an HTTP request to it receiving its first byte of data from the webserver. TTFB is an important aspect of website optimization since the faster the TTFB, the faster the requested resource can start being delivered to the browser.</p>
<p>The time to the first byte is made up of three separate components.</p>
<ul>
<li>The time needed to send the HTTP request</li>
<li>The time needed for the server to process the request</li>
<li>The time needed for the server to send back the first byte of the response to the client</li>
</ul>
<h2 id="thanks">Thanks!</h2>
<p>How do you usually check the TTFB? Do you know some other alias that can easily become a tool? Let me know in the comments below.</p>
]]></content:encoded></item><item><title><![CDATA[Versioning or not the composer.lock file?]]></title><description><![CDATA[Many developers ignore the composer.lock into their .gitignore, it because it's an auto-generated file. By analyzing the .gitignore's purpose this theory is correct, however, is a good practice to manage the version control of this file, and using th...]]></description><link>https://blog.rafaelcg.com/versioning-or-not-the-composerlock-file</link><guid isPermaLink="true">https://blog.rafaelcg.com/versioning-or-not-the-composerlock-file</guid><category><![CDATA[composer]]></category><category><![CDATA[PHP]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Fri, 23 Apr 2021 15:58:04 GMT</pubDate><content:encoded><![CDATA[<p>Many developers ignore the composer.lock into their .gitignore, it because it's an auto-generated file. By analyzing the .gitignore's purpose this theory is correct, however, is a good practice to manage the version control of this file, and using the composer install command to prepare an environment, not composer update, let's check the basis that sustains that idea in order to apply this change on your projects.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1619193391397/B_WjolWWL.png" alt="Using or not the composer.lock file" /></p>
<p>- You can find in the <a target="_blank" href="https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control">Composer documentation</a> saying:</p>
<blockquote>
<p>"You should commit the composer.lock file to your project repo so that all people working on the project are locked to the same versions of dependencies."</p>
</blockquote>
<p>- Having the composer.lock file, it will become the installation of composer dependencies <strong>2x faster</strong>.</p>
<p>- You can let it more optimized using the parameters to optimize the autoload, prefer the packages via source, and avoiding getting the dev dependencies in a production environment.</p>
<p>- As each install will use the composer.lock file, it will install the same package distribution version for each developer, avoiding the famous sentence <strong>"It's working in my machine"</strong>.</p>
<p>- This practice is not recommended for libraries according to the <a target="_blank" href="https://getcomposer.org/doc/02-libraries.md#lock-file">Composer Documentation</a>.</p>
<blockquote>
<p>"For your library, you may commit the composer.lock file if you want to."</p>
</blockquote>
<p>- Never use composer update in your production, it might update packages that you didn't update in UAT yet, so, UAT environment loses its purpose.</p>
<p>Are you versioning your composer.lock? let me know in the comments below!</p>
]]></content:encoded></item><item><title><![CDATA[Shopify App CLI]]></title><description><![CDATA[If you are going to start developing Shopify Apps the Shopify CLI is one of the tools that will optimize a lot your workflow, mainly if you are creating a NodeJS or Ruby on Rails app.
You can install it on Linux, macOS or Windows 10, I used it in my ...]]></description><link>https://blog.rafaelcg.com/shopify-app-cli</link><guid isPermaLink="true">https://blog.rafaelcg.com/shopify-app-cli</guid><category><![CDATA[shopify]]></category><category><![CDATA[Node.js]]></category><category><![CDATA[Ruby on Rails]]></category><category><![CDATA[Ruby]]></category><category><![CDATA[terminal]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Thu, 22 Apr 2021 19:48:46 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1619120562128/tzX8CMmf2.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you are going to start developing Shopify Apps the Shopify CLI is one of the tools that will optimize a lot your workflow, mainly if you are creating a NodeJS or Ruby on Rails app.</p>
<p>You can install it on Linux, macOS or Windows 10, I used it in my MacOs via Homebrew, if you use Linux or macOS these descriptions below will be exactly what you need to know, on Windows you might have some headaches because you will need to install  <a target="_blank" href="https://rubyinstaller.org/downloads/">RubyInstaller for Windows</a>  or some VM.</p>
<h2 id="installing-shopify-cli">Installing Shopify CLI ⚡️</h2>
<p>The process to install it and configure it is very simple, as soon as you have the requirements you can set it up in minutes.</p>
<h3 id="requirements">Requirements</h3>
<ul>
<li><a target="_blank" href="https://partners.shopify.com/signup">Shopify partner account</a> </li>
<li><a target="_blank" href="https://help.shopify.com/en/partners/dashboard/development-stores#create-a-development-store">Shopify development store</a>  to install and test apps</li>
<li><a target="_blank" href="https://www.ruby-lang.org/">Ruby</a>  2.5.1+</li>
</ul>
<h3 id="macos">macOS</h3>
<pre><code>$ brew tap shopify/shopify
$ brew install shopify-cli
</code></pre><h3 id="debianubuntu-linux">Debian/Ubuntu Linux</h3>
<ol>
<li>Download the .deb file from the  <a target="_blank" href="https://github.com/Shopify/shopify-app-cli/releases">releases page</a> </li>
<li>Install the downloaded file:</li>
</ol>
<pre><code>$ sudo apt <span class="hljs-keyword">install</span> /<span class="hljs-keyword">path</span>/<span class="hljs-keyword">to</span>/downloaded/shopify-cli-x.y.z.deb
</code></pre><h3 id="centos-8fedorared-hatsuse-linux">CentOS 8+/Fedora/Red Hat/SUSE Linux</h3>
<ol>
<li>Download the .rpm file from the  <a target="_blank" href="https://github.com/Shopify/shopify-app-cli/releases">releases page</a> </li>
<li>Install the downloaded file:</li>
</ol>
<pre><code>$ sudo yum <span class="hljs-keyword">install</span> /<span class="hljs-keyword">path</span>/<span class="hljs-keyword">to</span>/downloaded/shopify-cli-x.y.x.rpm
</code></pre><h2 id="start-to-use-it">Start to use it 👨‍💻</h2>
<p>The first step is to create our app automatically via the Shopify CLI, the CLI will ask you some questions, like what’s store that you would like to install it, which Shopify Partner account would you like to use. As soon as you have your base app created you can access the app folder and run the command to start the local server to test it.</p>
<ol>
<li>Create the app in your terminal.</li>
</ol>
<pre><code>$ shopify <span class="hljs-keyword">create</span>
</code></pre><ol>
<li>Start it.</li>
</ol>
<pre><code>$ shopify serve
</code></pre><h2 id="core-commands">Core commands</h2>
<p>These below are all the commands available to you to use after creating the NodeJS app like mine.</p>
<p><strong>connect:</strong> Connect (or re-connect) an existing project to a Shopify partner organization and/or a store. Creates or updates the .env file, and creates the .shopify-cli.yml file.</p>
<p>Usage: shopify connect</p>
<p><strong>create:</strong> Create a new project.</p>
<p>Usage: shopify create [ node | rails ]</p>
<p><strong>logout:</strong> Log out of a currently authenticated partner organization and store, or clear invalid credentials</p>
<p>Usage: shopify logout</p>
<p><strong>version:</strong> Prints version number.</p>
<p>Usage: shopify version</p>
<p><strong>deploy:</strong> Deploy the current Node project to a hosting service.  <a target="_blank" href="https://www.heroku.com/">Heroku</a>  is currently the only option, but more will be added in the future.</p>
<p>Usage: shopify deploy [ heroku ]</p>
<p><strong>generate:</strong> Generate code in your Node project. Supports generating new billing API calls, new pages, or new webhooks.</p>
<p>Usage: shopify generate [ billing | page | webhook ]</p>
<p><strong>open:</strong> Open your local development app in the default browser.</p>
<p>Usage: shopify open</p>
<p><strong>populate:</strong> Populate your Shopify development store with example customers, orders, or products.</p>
<p>Usage: shopify populate [ customers | draftorders | products ]</p>
<p><strong>serve:</strong> Start a local development node server for your project, as well as a public ngrok tunnel to your localhost.</p>
<p>Usage: shopify serve</p>
<p><strong>tunnel:</strong> Start or stop an http tunnel to your local development app using ngrok.</p>
<p>Usage: shopify tunnel [ auth | start | stop ]</p>
<h2 id="thank-you">Thank you</h2>
<p>Let me know what do you think of this CLI if you have used it, if you had some difficulties you can check the original  <a target="_blank" href="https://shopify.github.io/shopify-app-cli/">Shopify documentation</a>  about it.</p>
]]></content:encoded></item><item><title><![CDATA[Magento 2: cache clean vs cache flush]]></title><description><![CDATA[During the development we constantly use the Magento feature to clean or flush the cache, but do you know the difference? Check out this difference based on DevDoc.
php bin/magento cache:clean
Cleaning a cache type deletes all items from enabled Mage...]]></description><link>https://blog.rafaelcg.com/magento-2-cache-clean-vs-cache-flush</link><guid isPermaLink="true">https://blog.rafaelcg.com/magento-2-cache-clean-vs-cache-flush</guid><category><![CDATA[Magento]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Thu, 22 Apr 2021 19:34:31 GMT</pubDate><content:encoded><![CDATA[<p>During the development we constantly use the Magento feature to clean or flush the cache, but do you know the difference? Check out this difference based on DevDoc.</p>
<pre><code>php bin/magento <span class="hljs-keyword">cache</span>:clean
</code></pre><p>Cleaning a cache type deletes all items from enabled Magento cache types only. In other words, this option does not affect other processes or applications because it cleans only the cache that Magento uses.</p>
<p>Disabled cache types are not cleaned.</p>
<pre><code>php bin/magento <span class="hljs-keyword">cache</span>:<span class="hljs-keyword">flush</span>
</code></pre><p>Flushing a cache type purges the cache storage, which might affect other processes applications that are using the same storage.</p>
<p>Reference:  <a target="_blank" href="https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-cache.html">DevDocs Manage the cache</a> </p>
]]></content:encoded></item><item><title><![CDATA[Configure a local Magento 2 multi-store]]></title><description><![CDATA[When we have to configure a multi-store in your local machine you can configure the local NGINX or Apache configuration to make it work, or you can quickly change your index.php just to test, fix the issues and not commit this change.
In this same ca...]]></description><link>https://blog.rafaelcg.com/configure-a-local-magento-2-multi-store</link><guid isPermaLink="true">https://blog.rafaelcg.com/configure-a-local-magento-2-multi-store</guid><category><![CDATA[Magento]]></category><category><![CDATA[PHP]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Thu, 22 Apr 2021 16:49:47 GMT</pubDate><content:encoded><![CDATA[<p>When we have to configure a multi-store in your local machine you can configure the local NGINX or Apache configuration to make it work, or you can quickly change your <code>index.php</code> just to test, fix the issues and not commit this change.</p>
<p>In this same case just to test using Magento 1 we used to change the <code>$mageRunCode</code> and <code>$mageRunType</code> in the <strong>.htaccess</strong> or <strong>httpd.conf</strong>.</p>
<p>In Magento 2 to test quickly you can use that code into your <code>index.php</code>:</p>
<pre><code>$params = $_SERVER;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = <span class="hljs-string">'website_code'</span>;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = <span class="hljs-string">'website'</span>;
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);
</code></pre>]]></content:encoded></item><item><title><![CDATA[Develop Shopify NodeJS apps with VSCode Dev Container]]></title><description><![CDATA[If you work with VSCode and have your local environment directly in your machine I recommend starting to looking Docker, it’s an easy way to have your app running in a virtualized environment with its own OS and packages to each app.
Advantages

Work...]]></description><link>https://blog.rafaelcg.com/how-to-setup-dev-container-in-vscode-to-develop-shopify-nodejs-apps</link><guid isPermaLink="true">https://blog.rafaelcg.com/how-to-setup-dev-container-in-vscode-to-develop-shopify-nodejs-apps</guid><category><![CDATA[shopify]]></category><category><![CDATA[Node.js]]></category><category><![CDATA[Docker]]></category><category><![CDATA[Visual Studio Code]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Thu, 22 Apr 2021 16:12:16 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1620856888705/1ib8Uxkru.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you work with VSCode and have your local environment directly in your machine I recommend starting to looking Docker, it’s an easy way to have your app running in a virtualized environment with its own OS and packages to each app.</p>
<h2 id="advantages">Advantages</h2>
<ul>
<li><p>Work in an environment exactly as production.</p>
</li>
<li><p>Don’t install all the packages to all projects directly on your machine.</p>
</li>
<li><p>Be more productive, avoiding issues and mistakes with node version or Shopify CLI version.</p>
</li>
</ul>
<h2 id="how-to-start">How to start</h2>
<p>You just need to create these two files in your project’s root folder.</p>
<p><strong>.devcontainer/devcontainer.json</strong></p>
<pre><code>{
  <span class="hljs-attr">"name"</span>: <span class="hljs-string">"Node.js"</span>,
  <span class="hljs-attr">"build"</span>: {
    <span class="hljs-attr">"dockerfile"</span>: <span class="hljs-string">"Dockerfile"</span>,
    <span class="hljs-comment">// Update 'VARIANT' to pick a Node version: 10, 12, 14</span>
    <span class="hljs-attr">"args"</span>: {<span class="hljs-attr">"VARIANT"</span>: <span class="hljs-string">"14"</span>, <span class="hljs-attr">"SHOPIFYCLI"</span>: <span class="hljs-string">"1.8.0"</span>}
  },

  <span class="hljs-comment">// Set *default* container specific settings.json values on container create.</span>
  <span class="hljs-attr">"settings"</span>: {
    <span class="hljs-attr">"terminal.integrated.shell.linux"</span>: <span class="hljs-string">"/bin/bash"</span>
  },

  <span class="hljs-comment">// Add the IDs of extensions you want installed when the container is created.</span>
  <span class="hljs-attr">"extensions"</span>: [<span class="hljs-string">"dbaeumer.vscode-eslint"</span>],

  <span class="hljs-comment">// Use 'forwardPorts' to make a list of ports inside the container available locally.</span>
  <span class="hljs-attr">"forwardPorts"</span>: [<span class="hljs-number">80</span>, <span class="hljs-number">3456</span>, <span class="hljs-number">4040</span>],

  <span class="hljs-comment">// Use 'postCreateCommand' to run commands after the container is created.</span>
  <span class="hljs-attr">"postCreateCommand"</span>: <span class="hljs-string">"npm install"</span>,

  <span class="hljs-comment">// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.</span>
  <span class="hljs-attr">"remoteUser"</span>: <span class="hljs-string">"node"</span>
}
</code></pre><p><strong>.devcontainer/Dockerfile</strong></p>
<pre><code><span class="hljs-attribute">ARG</span> VARIANT=<span class="hljs-string">"14-buster"</span>

FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:<span class="hljs-number">0</span>-<span class="hljs-variable">${VARIANT}</span>

RUN apt-get update &amp;&amp; export DEBIAN_FRONTEND=noninteractive \
    &amp;&amp; apt-get -y install --<span class="hljs-literal">no</span>-install-recommends ruby

ARG SHOPIFYCLI=<span class="hljs-string">"1.8.0"</span>

RUN wget https://github.com/Shopify/shopify-app-cli/releases/download/v<span class="hljs-variable">${SHOPIFYCLI}</span>/shopify-cli-<span class="hljs-variable">${SHOPIFYCLI}</span>.deb \
    &amp;&amp; sudo apt install ./shopify-cli-<span class="hljs-variable">${SHOPIFYCLI}</span>.deb &amp;&amp; rm ./shopify-cli-<span class="hljs-variable">${SHOPIFYCLI}</span>.deb
</code></pre><p>To finish it, you just need to open your VSCode and type <code>CMD + Shift + P</code>, and execute the command below.</p>
<p><code>&gt; Remote-Containers: Open Folder in Container</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1620856594156/g5cceu1PM.png" alt="VSCode and Shopify NodeJS Apps" /></p>
<h3 id="how-remote-containers-feature-works">How Remote Containers feature works?</h3>
<p>The<strong> Visual Studio Code Remote – Containers</strong> extension lets you use a  <a target="_blank" href="https://docker.com/">Docker container</a>  as a full-featured development environment. It allows you to open any folder inside (or mounted into) a container and take advantage of Visual Studio Code’s full feature set. A  <a target="_blank" href="https://code.visualstudio.com/docs/remote/containers#_create-a-devcontainerjson-file">devcontainer.json</a>  file in your project tells VS Code how to access (or create) a <strong>development container</strong> with a well-defined tool and runtime stack. This container can be used to run an application or to sandbox tools, libraries, or runtimes needed for working with a codebase.</p>
<p>Workspace files are mounted from the local file system or copied or cloned into the container. Extensions are installed and run inside the container, where they have full access to the tools, platform, and file system. This means that you can seamlessly switch your entire development environment just by connecting to a different container.</p>
<p>This lets VS Code provide a <strong>local-quality development experience</strong> — including full IntelliSense (completions), code navigation, and debugging — <strong>regardless of where your tools (or code) are located</strong>. In case you want more details about this feature, you can check the  <a target="_blank" href="https://code.visualstudio.com/docs/remote/containers">official doc</a>.</p>
]]></content:encoded></item><item><title><![CDATA[How to apply PWA + Next JS]]></title><description><![CDATA[When starting with  Next framework  probably you’re going to start setting up a basic landing page or some kind of concept prove, seeing how simple it’s to have PWA on it.
If you’re creating your project now you can just run this command below, then ...]]></description><link>https://blog.rafaelcg.com/how-to-apply-pwa-next-js</link><guid isPermaLink="true">https://blog.rafaelcg.com/how-to-apply-pwa-next-js</guid><category><![CDATA[PWA]]></category><category><![CDATA[Next.js]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Wed, 21 Apr 2021 04:15:38 GMT</pubDate><content:encoded><![CDATA[<p>When starting with  <a target="_blank" href="https://nextjs.org/">Next framework</a>  probably you’re going to start setting up a basic landing page or some kind of concept prove, seeing how simple it’s to have PWA on it.</p>
<p>If you’re creating your project now you can just run this command below, then it’s going to create a boilerplate of a simple Next project.</p>
<pre><code>npx <span class="hljs-keyword">create</span>-<span class="hljs-keyword">next</span>-app
</code></pre><p>Checking the folder you will be able to see a complete project ready to be customized and tested, just running <code>npm run dev</code>.</p>
<h3 id="setup-pwa">Setup PWA</h3>
<p>The first thing to install is the package <strong>next-pwa</strong>, to them add a new configuration that makes the application create the required service worker files during the compilation. To finish you will need to create files with the project’s configuration.</p>
<p>Let’s start creating the <code>next.config.js</code> when putting this content below.</p>
<pre><code><span class="hljs-keyword">const</span> withPWA = <span class="hljs-built_in">require</span>(<span class="hljs-string">'next-pwa'</span>)

<span class="hljs-built_in">module</span>.<span class="hljs-built_in">exports</span> = withPWA({
    pwa: {
        dest: <span class="hljs-string">'public'</span>
    }
})
</code></pre><p>This file is going to say to Next to generate the required files in the public folder. One of the files that we need to create to specify the project’s properties is the manifest.json, it’ll be in the public folder and you can generate it here:</p>
<p> <a target="_blank" href="https://app-manifest.firebaseapp.com/">App Manifest Generator</a> </p>
<p>Your application must have some meta tags to specify the icons, theme color and etc. To have all the head information you can create a file <code>components/header.js</code> and put this content like below.</p>
<pre><code><span class="hljs-keyword">import</span> Head <span class="hljs-keyword">from</span> <span class="hljs-string">'next/head'</span>

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Header</span>(<span class="hljs-params"></span>) </span>{
   <span class="hljs-keyword">return</span>(
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Head</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">'utf-8'</span> /&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">http-equiv</span>=<span class="hljs-string">'X-UA-Compatible'</span> <span class="hljs-attr">content</span>=<span class="hljs-string">'IE=edge'</span> /&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">'viewport'</span> <span class="hljs-attr">content</span>=<span class="hljs-string">'width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no'</span> /&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">'description'</span> <span class="hljs-attr">content</span>=<span class="hljs-string">'Description'</span> /&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Next.js PWA<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>

      <span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">'manifest'</span> <span class="hljs-attr">href</span>=<span class="hljs-string">'/manifest.json'</span> /&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">href</span>=<span class="hljs-string">'/favicon-16x16.png'</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">'icon'</span> <span class="hljs-attr">type</span>=<span class="hljs-string">'image/png'</span> <span class="hljs-attr">sizes</span>=<span class="hljs-string">'16x16'</span> /&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">href</span>=<span class="hljs-string">'/favicon-32x32.png'</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">'icon'</span> <span class="hljs-attr">type</span>=<span class="hljs-string">'image/png'</span> <span class="hljs-attr">sizes</span>=<span class="hljs-string">'32x32'</span> /&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">'apple-touch-icon'</span> <span class="hljs-attr">href</span>=<span class="hljs-string">'/apple-icon.png'</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">link</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">'theme-color'</span> <span class="hljs-attr">content</span>=<span class="hljs-string">'#333333'</span> /&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">Head</span>&gt;</span></span>
   )
}
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> Header
</code></pre><p>To generate the favicons you can use this online tool.</p>
<p> <a target="_blank" href="https://www.favicon-generator.org/">Favicon &amp; App Icon Generator</a> </p>
<p>After that you just need to run the command <code>npm run dev</code>, you will be able to have a PWA application running and saving the cache via service workers in your browser.</p>
<h2 id="tips">Tips</h2>
<ul>
<li>It’s not needed to have the favicons generated to have the service workers working and ready to be tested.</li>
<li>Compare your code with the code in the  <a target="_blank" href="https://github.com/skolhustick/next-js-pwa-create-next-app/tree/master">next-js-pwa-example</a> .</li>
<li>Utilize HTTPS to test it.</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[8 habits to become a better software engineer]]></title><description><![CDATA[I’ve read some weeks ago an interesting topic on Quora, it’s a question about how to become a better software engineer. I liked the answers and I guess that it will be useful to improve your techniques of developing your skills with these 8 habits to...]]></description><link>https://blog.rafaelcg.com/8-habits-to-become-a-better-software-engineer</link><guid isPermaLink="true">https://blog.rafaelcg.com/8-habits-to-become-a-better-software-engineer</guid><category><![CDATA[Career]]></category><category><![CDATA[software development]]></category><category><![CDATA[habits]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Wed, 21 Apr 2021 03:27:26 GMT</pubDate><content:encoded><![CDATA[<p>I’ve read some weeks ago an interesting topic on Quora, it’s a question about how to become a better software engineer. I liked the answers and I guess that it will be useful to improve your techniques of developing your skills with these 8 habits to become a better software engineer.</p>
<h2 id="1-prototype">1. Prototype</h2>
<p>The most positive feedback comes from Jeff Nelson, inventor of the Chromebook. The engineer focuses on creating small prototypes when learning new concepts: in these situations, he writes a few dozen programs, all short, to demonstrate a simple idea. According to the developer, this prototyping makes it much easier to test several concepts in a short period of time.</p>
<h2 id="2-brick-walls">2. Brick Walls</h2>
<p>Another interesting tip comes from web developer Damien Roche, who talks about his set of notes christened Brick Walls. It lists all the more complicated problems of those who require hours of work to solve there together with their solutions. If he stops using the list for a long time, it is because he is not challenging himself enough, and thinks it necessary to look for new goals.</p>
<h2 id="3-time">3. Time</h2>
<p>Ed Prentice, a software engineer, is another of the most voted positively, for his list of good habits that he says to follow. The first ones revolve around the main point proposed by the developer, saving as much time as possible: automate everything you can get, he writes. To do this, use a powerful IDE, and configure it to do what you can for yourself, create macros for things you do repeatedly, and learn keyboard shortcuts and the UNIX command line, for example.</p>
<h2 id="4-challenges-and-teachings">4. Challenges and teachings</h2>
<p>The same Prentice is not limited to automation in its large list of customs. Other tips given by him involve challenging yourself, especially. Never written a web app? He asks, before suggesting that you try doing this in Ruby on Rails, for example. It is also worth teaching something, even if it is not about development, as well as checking the Stack Exchange frequently for topics you are familiar with or not, as a way to improve your knowledge. Finally, sharing experiences and lessons learned is a habit that is also worth adopting.</p>
<h2 id="5-repetition">5. Repetition</h2>
<p>The user Rafael Buch already brings to light two exercises and habits said traditional between programmers: Kaizen and Kata. The first is to rewrite and reshape or polish your code like a gemstone. Every time you need to make a change (on the code), re-evaluate the design around it, he writes. The second focuses on writing the same lines over and over again, making careful changes in each attempt. Each repetition will yield minor improvements, and it will be easier to find errors early on that could lead to larger problems later, he says.</p>
<h2 id="6-divide-and-conquer">6. Divide and conquer</h2>
<p>Author and programmer Debasish Ghosh already tries to keep up the habit of reading many good and bad codes. This second part, he says, is equally important, as it highlights many patterns that should not be followed. He also recommends using a divide-and-conquer policy when solving complex problems, starting with the simple, then exploring the more complex parts. Another good habit suggested is to associate with a project, preferably an open-source project.</p>
<h2 id="7-design-first">7. Design first</h2>
<p>Ankit Gupta, an Amazon software engineer, says that a valid idea is to think first about design before going to deployment. I agree that there are things that will be solved only during this second stage, but a solid design will leave its concrete architecture, he writes. This advice he admits does not always follow, Gupta is another who talks about process automation, just like Prentice.</p>
<h2 id="8-in-search-of-bugs">8. In search of bugs</h2>
<p>Creator of the programs Tune Smithy and Bounce Metronome, among others, Robert Walker is one of those who maintain the apparently obvious habit to write down all the bugs, however small they are. It is a way of not forgetting anything since small flaws can be left out. Walker also saves the modifications in different .ini projects, as a way to reproduce old problems when it is necessary even if this is never the case. And of course, it also makes frequent backups of the code, so as not to risk losing any of the work.</p>
<p><strong>And you?</strong></p>
<p>Do you also develop programs and have some habits that you usually follow? So share it here down in the comments.</p>
]]></content:encoded></item><item><title><![CDATA[How to change php.ini CapRover WordPress]]></title><description><![CDATA[When we utilize the native CapRover method to install a new WordPress blog, we see just a few options to prepare our installation, it includes the native WordPress php.ini configuration with the upload_max_filesize set to 2M, which is too low.
In thi...]]></description><link>https://blog.rafaelcg.com/change-php-ini-caprover-wordpress</link><guid isPermaLink="true">https://blog.rafaelcg.com/change-php-ini-caprover-wordpress</guid><category><![CDATA[Devops]]></category><category><![CDATA[WordPress]]></category><category><![CDATA[Docker]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Wed, 21 Apr 2021 03:09:04 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1618973992708/BTIN9jgWi.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When we utilize the native CapRover method to install a new WordPress blog, we see just a few options to prepare our installation, it includes the native WordPress <code>php.ini</code> configuration with the <strong>upload_max_filesize</strong> set to 2M, which is too low.
In this screen below you can see the native options.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1618974334380/kkI4-VllZ.png" alt="CapRover Wordpress installation" /></p>
<p>If we try to change the Docker container configuration, it will be missed during the container reloads, in order to customize it and keep using the native Docker from WordPress you just need to access your server, create a file <code>uploads.ini</code> which is including your changes, and set this file as persistent, I created a file in this path below with the respective content.</p>
<p>Path in App: <code>/usr/local/etc/php/conf.d/uploads.ini</code></p>
<p>Path on Host: <code>/var/lib/docker/volumes/caprover–rafael-wp-data/uploads.ini</code></p>
<pre><code><span class="hljs-attr">file_uploads</span> = <span class="hljs-literal">On</span>
<span class="hljs-attr">memory_limit</span> = <span class="hljs-number">500</span>M
<span class="hljs-attr">upload_max_filesize</span> = <span class="hljs-number">500</span>M
<span class="hljs-attr">post_max_size</span> = <span class="hljs-number">500</span>M
<span class="hljs-attr">max_execution_time</span> = <span class="hljs-number">600</span>
</code></pre><p>Setting it in our CapRover, our WordPress container will be reloaded and our panel will show the new persistent directory like this image below.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1618974415779/8Zrw6OTHo.png" alt="CapRover Wordpress installation and configuration" /></p>
]]></content:encoded></item><item><title><![CDATA[How to create a Windows 10 bootable pen drive from a macOS]]></title><description><![CDATA[Download the Windows 10
You can download the ISO file straight from Windows. That's right - everything we're going to do here is 100% legal and sanctioned by Microsoft.
If you want an English-language version of the latest update of Windows 10, you c...]]></description><link>https://blog.rafaelcg.com/how-to-create-a-windows-10-bootable-pen-drive-from-a-macos</link><guid isPermaLink="true">https://blog.rafaelcg.com/how-to-create-a-windows-10-bootable-pen-drive-from-a-macos</guid><category><![CDATA[Windows]]></category><category><![CDATA[macOS]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Wed, 17 Feb 2021 23:18:32 GMT</pubDate><content:encoded><![CDATA[<h2 id="download-the-windows-10">Download the Windows 10</h2>
<p>You can download the ISO file straight from Windows. That's right - everything we're going to do here is 100% legal and sanctioned by Microsoft.</p>
<p>If you want an English-language version of the latest update of Windows 10, <a target="_blank" href="https://www.microsoft.com/en-gb/software-download/windows10ISO">you can download the ISO in this link</a>.</p>
<p>If you have a relatively new computer, you probably want the 64-bit version. If you're not sure, go with the 32-bit version to be safe.</p>
<p>If you want a non-English-language version of Windows, or want to get an older update version, <a target="_blank" href="https://www.microsoft.com/en-gb/software-download/windows10">download this another ISO instead</a>.</p>
<h1 id="mac-terminal">Mac Terminal</h1>
<p>From your Mac terminal run this command below to see what's the disk number, for example <code>/dev/disk2</code> or <code>/dev/disk3</code>. In my case, it's <code>disk2</code>.</p>
<p>Let's erase your pendrive running this command.</p>
<pre><code><span class="hljs-attribute">diskutil</span> eraseDisk MS-DOS <span class="hljs-string">"WIN10"</span> GPT /dev/disk<span class="hljs-number">2</span>
</code></pre><p>For some hardware you will need an MBR format, you might be able to have it running this command instead.</p>
<pre><code><span class="hljs-attribute">diskutil</span> eraseDisk MS-DOS <span class="hljs-string">"WIN10"</span> MBR /dev/disk<span class="hljs-number">2</span>
</code></pre><p>Let's prepare your ISO and move the content to your pendrive running these commands.</p>
<pre><code><span class="hljs-attribute">hdiutil</span> mount ~/Downloads/Win<span class="hljs-number">10</span>_<span class="hljs-number">1903</span>_V<span class="hljs-number">1</span>_English_x<span class="hljs-number">64</span>.iso
<span class="hljs-attribute">rsync</span> -vha --exclude=sources/install.wim /Volumes/CCCOMA_X<span class="hljs-number">64</span>FRE_EN-US_DV<span class="hljs-number">9</span>/* /Volumes/WIN<span class="hljs-number">10</span>
</code></pre><p>You will need to use Wimlib in your MacOS, so let's install it and run it.</p>
<pre><code>/usr/bin/ruby -e <span class="hljs-string">"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"</span>
brew install wimlib
<span class="hljs-keyword">mkdir</span> /Volumes/WIN1<span class="hljs-number">0</span>/sources
wimlib-imagex <span class="hljs-keyword">split</span> <span class="hljs-regexp">/Volumes/</span>CCCOMA_X64FRE_EN-US_DV9/sources/install.wim /Volumes/WIN1<span class="hljs-number">0</span>/sources/install.swm <span class="hljs-number">3800</span>
</code></pre><h2 id="ready">Ready!</h2>
<p>Now you have a bootable pen drive ready to be used on your PC.</p>
]]></content:encoded></item><item><title><![CDATA[How to resolve Magento 2 stock inconsistencies?]]></title><description><![CDATA[There are some issues that might cause the stock inconsistency issue, but before anything make sure you’re running the most updated version of the MSI in your current Magento 2 installation, you can update it via Composer even not updating the entire...]]></description><link>https://blog.rafaelcg.com/how-to-resolve-magento-2-stock-inconsistencies</link><guid isPermaLink="true">https://blog.rafaelcg.com/how-to-resolve-magento-2-stock-inconsistencies</guid><category><![CDATA[Magento]]></category><category><![CDATA[ecommerce]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Tue, 09 Feb 2021 05:35:59 GMT</pubDate><content:encoded><![CDATA[<p>There are some issues that might cause the stock inconsistency issue, but before anything make sure you’re running the most updated version of the MSI in your current Magento 2 installation, you can update it via Composer even not updating the entire Magento 2 installation.</p>
<h3 id="what-causes-reservation-inconsistencies">What causes reservation inconsistencies?</h3>
<p>Inventory Management generates reservations for key events:</p>
<ul>
<li>Order placement (initial reservation)</li>
<li>Order shipment (compensation reservation)</li>
<li>Refund order or issue a credit memo (compensation reservation)</li>
<li>Order cancellation (compensation reservation)</li>
</ul>
<p>Reservation inconsistencies may occur when Inventory Management loses the initial reservation and enters too many reservation compensations (overcompensating and leading to inconsistent amounts), or correctly places the initial reservation but loses compensational reservations.</p>
<p>The following configurations and events can cause reservation inconsistencies:</p>
<ul>
<li><p>Upgrade Magento to 2.3.x with orders, not in a completed state (Complete, Canceled, or Closed). - Inventory Management will create compensational reservations for these orders, but it will not enter or have the initial reservation that deducts from the salable quantity. We recommend using these commands after upgrading to Magento v2.3.x from 2.1.x or 2.2.x. If you have pending orders, the commands correctly update your salable quantity and reservations for sales and order fulfillment.</p>
</li>
<li><p>You do not manage stock then later change this configuration. You may start using 2.3.x with Manage Stock set to “No” in the Magento configuration. Magento does not place reservations at order placement and shipment events. If you later enable the Manage Stock configuration and some orders were created at that time, the Salable Qty would be corrupted with compensation reservation when you handle and fulfill that order.</p>
</li>
<li><p>You re-assign the Stock for a Website while orders submit to that website. The initial reservation enters for the initial stock and all compensational reservations enter the new stock.</p>
</li>
<li><p>The sum total of all reservations may not resolve to 0. All reservations in the scope of an Order in a completed state (Complete, Canceled, Closed) should resolve to 0, clearing all salable quantity holds.
Reservations place a salable quantity hold for product SKUs per stock. When you ship, add products, cancel, or refund an order, compensation reservations enter to place or clear these holds.</p>
</li>
</ul>
<h3 id="resolve-reservations-inconsistencies">Resolve reservations inconsistencies</h3>
<p>MSI provides two CLI commands to check and resolve reservation inconsistencies:</p>
<pre><code><span class="hljs-attribute">inventory</span>:<span class="hljs-attribute">reservation</span>:list-inconsistencies
<span class="hljs-attribute">inventory</span>:<span class="hljs-attribute">reservation</span>:create-compensations
</code></pre><p>References:  <a target="_blank" href="https://github.com/magento/inventory/wiki/CLI-Reference">Magento CLI Reference</a> </p>
]]></content:encoded></item><item><title><![CDATA[Shopify API Release: January 2021]]></title><description><![CDATA[If you are a Shopify developer it's good to know the last updates, it includes features to use in your new app, deprecations to keep your app healthy, and the new possibilities to innovate. So let's check out the news for Q1.
1º – Subscription APIs
A...]]></description><link>https://blog.rafaelcg.com/shopify-api-release-january-2021</link><guid isPermaLink="true">https://blog.rafaelcg.com/shopify-api-release-january-2021</guid><category><![CDATA[shopify]]></category><category><![CDATA[APIs]]></category><dc:creator><![CDATA[Rafael Corrêa Gomes]]></dc:creator><pubDate>Thu, 28 Jan 2021 04:14:05 GMT</pubDate><content:encoded><![CDATA[<p>If you are a Shopify developer it's good to know the last updates, it includes features to use in your new app, deprecations to keep your app healthy, and the new possibilities to innovate. So let's check out the news for Q1.</p>
<h3 id="1o-subscription-apis">1º – Subscription APIs</h3>
<p>A subscription is a business model that allows customers to pay a recurring price at scheduled intervals for goods or services. With subscription APIs, you can sell goods and services in multiple ways. For example, you can sell a product as a one-time purchase or as a recurring subscription.</p>
<p>The following diagram illustrates a high-level subscription flow for an app that has implemented a subscription flow using the product subscription app extension. As you can see you have many possibilities to bring subscription solutions to merchants, it includes management, automation and report apps.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1618974819176/IW4Pe1FNE.png" alt="shopify-workflow.png" /></p>
<h3 id="2o-product-subscription-app-extension">2º – Product Subscription App Extension</h3>
<p>You can create this new kind of app extension called subscription using a single command from the Shopify App CLI, and it includes scaffolding for everything you need to start building an excellent merchant experience.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1618974829303/L_EwxgLLg.png" alt="shopify-subscription-update.png" /></p>
<h3 id="3o-scheduled-fulfillments">3º – Scheduled fulfillments</h3>
<p>API clients can also reschedule fulfillment orders to a later date by using the new fulfillmentOrderReschedule mutation, and specifying a fulfillAt date in the future. Rescheduling a fulfillment order is especially helpful for prepaid subscriptions, when a customer may want to skip a shipment of consumable items like coffee or granola if they haven’t run out.</p>
<h3 id="4o-automatic-activation-of-app-charges">4º – Automatic activation of app charges</h3>
<p>This was my favorite improvement, billing for apps using the REST API was made in a three-step process:</p>
<p>Step one: Create an application charge.
Step two: The merchant accepts or declines the charge.
Step three: If the charge is accepted, make an API call to activate the pending accepted charge.
If we didn’t execute the last step we didn’t have the charges applied to our clients, apps no longer need to perform that third step. Accepted application charges will automatically be transitioned into an “active” state, eliminating the possibility of charges that have been created by the app, accepted by the merchant, but then never activated and paid out to the partner.</p>
<h3 id="5o-financial-reporting-improvements">5º – Financial reporting improvements</h3>
<p>The 2021-01 version includes two changes to improve the accuracy of accounting apps.</p>
<p>First, TransactionFee is a new object available as a part of the API which includes much more detailed information about fees collected as a part of Shopify Payments payouts, including the flat rate charges, percentage charges, and a breakdown of the tax charged on these fees.</p>
<p>Second, API now includes tips received as a part of an order in both shop and presentment currencies using the totalTipReceivedSet field on the order object. This increased granularity will help accounting apps report even more accurately on fees and tips on any given order transaction.</p>
<p>Were you looking to have the 4º item as I was? Let me know which was your favorite item.</p>
]]></content:encoded></item></channel></rss>