Beeline 🐝

for Magento 2 + PhpStorm

Sick of typing in Magento? Waste your time somewhere else. Create entire files, classes & blocks with just a few keystrokes.

Animated gif of beelines

Anyone who has been a Magento developer for a while knows that calling it a "strongly typed" framework is an understatement. Sick & tired of typing in Magento, for days upon end?

After over a decade of coding in Magento, I created the tool I wish I had all these years. Simple. Straight-forward. Type a few letters... and entire files seem to magically generate, all according to Magento's best practices & coding standards.

Code templates for PhpStorm

Beeline writes code that works for you

With 96 templates & counting, this is by far the most extensive list of code templates ever created for Magento 2, but is by no means complete. The number of templates will continue to grow as more templates are added over time.

How does it work?

Beeline uses intuitive naming conventions so you don't get lost.

The name matches the file

To find the name of the template, you must first know the name of the file you want to use it in.

For example, want a template for a route? Since routes are defined within a routes.xml file...

routes.xml -> m2routes

All templates are prefixed with m2, followed by the name of the file (without the extension).

Then, the magic happens 🪄

Once you pick a template, the template populates code. In this case, for a fictitious Macademy_Beeline module.

Notice how this event name attribute is prefixed with macademy_beeline? Beeline does that for you, automagically.


If a template needs input, it pauses right where you'd expect, and you can just start typing.

Sample events.xml file generation

Then, even more magic 🧙‍♂️

Some files don't require any user input, like this example that used m2resourceModel to create a resource model.

Beeline is smart enough to derive the namespace, class & table name, populated entirely from Magento's naming conventions.


Beeline uses Magento's naming conventions for your profit, greatly improving the efficiency of your development workflow. It also follows Magento's official coding standards, so you can be sure you are writing clean code that abides by core best practices.

Time is money

Save time & get stuff done

Why spend a few minutes creating a controller class, when you can just type m2controller and be done in a few seconds?

Do things right

Unconciously code best practices

Other code generators may spit out working code, but they don't usually follow any known coding guidelines. Since this is created by M.academy, you can be sure every best practice is followed, so you'll be ahead before you even start.

Always up-to-date

Easy updates

Simply issue a "git pull" from your checked-out Beeline code, and everything will be automatically updated the next time you restart PhpStorm.

Magento 2.4+ & Day zero PHP 8 support

Automatically use new language features

Every version from Magento 2.4.3 is supported. Beeline supports PHP 8, so you can use all of the new language-level features in the language such as constructor property promotion and trailing commas.

Magento batteries needed

Will I still need to learn Magento?

Beeline generates tons of boilerplate code so you don't have to, but you will absolutely still need to understand Magento and how it works. If you buy this to avoid learning the stuff, you'll be sorely disappointed.

Live templates, reimagined

Aren't these just live templates?

Yes. But you've never seen them like this. You can create your own, if you are one of those crazies that likes spending hours building & debugging stuff with RegEx, and know all about implementing best practices in Magento.

CHANGELOG

Beeline is regularly updated with enhancements & bug fixes.

# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

N/A

## 2024-03-18

### Added

- New m2diRouter and m2diTypeRouter XML keywords to create custom routers.
- New m2router PHP keyword to create a custom router.

### Updated

- XML indentation per Magento's coding standards.

## 2024-03-13

### Added

- New m2dbSchemaTableColumnVarchar keyword.

## 2024-01-27

### Added

- New m2readme keyword to generate a README.md template.

## 2024-01-27

### Added

- roave/security-advisories package to require-dev for composer.json file generation for additional recommended security on all modules.

## 2024-01-21

### Added

- New m2communication, m2queueTopology, m2queuePublisher, and m2queueConsumer templates for worker queues.

## 2024-01-17

### Added

- Blank lines to PHP files for PSR-12 support.
- Visibility declarations on class constants and readonly factory objects.

### Updated

- All PHP snippets to now follow constructor property promotion and added trailing commas.

## 2023-07-29

### Added

- New m2viewModel to generate ViewModel classes.

## 2023-03-07

### Added

- New m2xmlProlog and m2pageLayout keywords.

## 2022-12-13

### Removed

- Unused ModuleSetupInterface from m2setupPatchData keyword.

### Added

- Line breaks to plugin function params.

## 2022-11-05


### Added

- New m2ConfigMap keyword to create config map in requirejs-config.js.
- New m2setupPatchDataBlock keyword to create block with a setup patch data script.

## 2022-10-11

### Fixed

- Fixed m2composerTheme template to prefix theme name with magento2-theme.

## 2022-09-13

### Added

- New m2layoutLiveReload keyword which includes livereload.js script in layout XML.

## 2022-09-06

### Changed

- Changed m2composer keyword to m2ComposerModule.

### Updated

- Updated m2composerModule keyword's PHP version constraint to match more standard semantic versioning practices.

### Added

- New m2composerTheme keyword to generate composer.json files for themes.
- New m2theme keyword to generate theme.xml files.

## 2022-01-07

### Updated

- Renamed m2diTypeCheckoutConfigProvider to m2diTypeCheckoutCompositeConfigProvider.

### Added

- New m2diTypeArgument keyword to create di argument substitutions.
- New m2diTypeCheckoutLayoutProcessorArgumentItem keyword to create a checkout layout processor argument.

## 2022-01-05

### Updated

- Simplified return value for m2checkoutConfigProvider.

## 2021-12-31

### Added

- JavaScript: m2defineMixin & m2configMixin for creating mixins.
- PHP: m2checkoutConfigProvider & m2blockCheckoutLayoutProcessor for assistance creating code relating to checkout.
- XML: m2diTypeCheckoutConfigProvider & m2diTypeCheckoutLayoutProcessor for help to create checkout config providers & layout processors.

## 2021-11-09

### Added

- Added m2controllerJson for generating controllers with JSON responses.

## 2021-09-21

### Updated

- Updated m2dbSchemaTableColumnInt "identity" column to default to "false".

## 2021-06-12

### Fixed

- Fixed m2dbSchemaTableConstraintForeign not auto-populating in the correct order.
- Fixed vendorModuleCaps expression for more consistent naming conventions.

## 2021-06-02

### Updated

- Updated m2Keywords to m2keywords for faster lookups, and consistency with HTML & JavaScript templates.

## 2021-05-28

### Added

- Added initial templates for Knockout.js HTML & JavaScript.

## 2021-05-25

### Fixed

- Fixed template hint missing for m2RoutesRoot.
- Fixed invalid vendor name for m2LayoutBlock for location-scoped templates.

## 2021-05-14

### Updated
- Updated mKeywords to m2Keywords. [#2](https://github.com/macademy/beeline-magento-2-phpstorm/pull/2)

## 2021-05-13

### Updated
- Updated README to document Settings Sync needing to be disabled. [#1](https://github.com/macademy/beeline-magento-2-phpstorm/issues/1)

## 2021-05-07

### Added
- Initial release.
      
Beeline retails for
$ 99
* Individual purchase is no longer available.
Enroll in the University to get access to Beeline 👇
Graduation cap on M.academy

University

Get access to all current & future courses at M.academy.

Installed Beeline for Magento 2 + PhpStorm. Excellent features. Remember a single word for the respective class or XML file. Like, m2controller for the Controller, m2block for Block class. Kudos. #LessCode”  

Rakesh Jesadiya
Rakesh Jesadiya Rakesh Jesadiya
3x Magento Master, M2 Full Stack Certified Developer, EY

Frequently asked questions

Are there any prerequisites to install Beeline?

The code for Beeline is delivered by GitHub private repository, so a GitHub account is required. After purchase, you will be provided with instructions on how to access & install Beeline.

Want to see what's involved to install it? Watch the instructional videos.

How will major Magento releases affect Beeline?

When any other new major version of Magento 2 is released, such as 2.5, Beeline will provide a new template group specifically for that version. You will be able to toggle on or off templates for each respective version.

Another option is keep all sets enabled, and use template hints to determine which version of Magento the template is for. This could be useful if you are working on multiple Magento projects of varying versions at the same time.

Does Beeline work for code located in the `vendor` folder?
At this time, Beeline only supports code located in the `app/code` folder. Support for code within the `vendor` folder will be considered in a future release.
Does Beeline work on Windows or Linux?
Beeline was developed on macOS, but should work on Linux as they share a similar filesystem convention. At this time, Windows is not supported, but a future update may make developing with Beeline on Windows a possibility.