Skip to content

Commit

Permalink
0.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed May 13, 2019
1 parent c49e7f6 commit e873b2e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 23 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "inkifi/core"
,"version": "0.1.7"
,"version": "0.1.8"
,"description": "A custom module for inkifi.com"
,"type": "magento2-module"
,"homepage": "https://github.com/inkifi/core"
Expand Down
9 changes: 0 additions & 9 deletions lib/main.php

This file was deleted.

14 changes: 1 addition & 13 deletions registration.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
<?php
use Magento\Framework\Component\ComponentRegistrar as R;
R::register(R::MODULE, 'Inkifi_Core', __DIR__);
// 2017-04-25, 2017-12-13
// Unfortunately, I have not found a way to make this code reusable among my modules.
// I tried to move this code to a `/lib` function like df_lib(), but it raises a «chicken and egg» problem,
// because Magento runs the `registration.php` scripts before any `/lib` functions are initalized,
// whereas the `/lib` functions are initalized from the `registration.php` scripts.
$base = dirname(__FILE__); /** @var string $base */
if (is_dir($libDir = "{$base}/lib")) { /** @var string $libDir */
// 2015-02-06
// array_slice removes «.» and «..».
// http://php.net/manual/function.scandir.php#107215
foreach (array_slice(scandir($libDir), 2) as $c) {require_once "{$libDir}/{$c}";}
}
R::register(R::MODULE, 'Inkifi_Core', __DIR__);

0 comments on commit e873b2e

Please sign in to comment.