Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Umc 42 #43

Merged
merged 42 commits into from
Jun 26, 2020
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
eb00285
WIP: umc-42: refactoring
UltimateModuleCreator Mar 6, 2020
09868b3
More refactoring
UltimateModuleCreator Mar 26, 2020
775a353
more refactoring
UltimateModuleCreator Mar 27, 2020
c62fa9f
more refactoring
UltimateModuleCreator Mar 31, 2020
f08e379
more refactoring
UltimateModuleCreator Apr 2, 2020
6358ca3
More refactoring
UltimateModuleCreator Apr 7, 2020
d08ef6d
More refactoring
UltimateModuleCreator Apr 8, 2020
8018dda
Some unit tests
UltimateModuleCreator Apr 9, 2020
c917ec2
Some unit tests
UltimateModuleCreator Apr 9, 2020
72d3745
More tests
UltimateModuleCreator Apr 10, 2020
4108c44
moar tests
UltimateModuleCreator Apr 13, 2020
953651d
Upgrade symfony
UltimateModuleCreator Apr 14, 2020
142f034
more refactoring. what else?
UltimateModuleCreator Apr 15, 2020
4206800
even more tests
UltimateModuleCreator Apr 16, 2020
e05d453
refactoring
UltimateModuleCreator Apr 21, 2020
b1e5579
frontend refactoring
UltimateModuleCreator Apr 22, 2020
675681c
yeah....refactoring
UltimateModuleCreator May 11, 2020
44fc871
Getting close to a stable version
UltimateModuleCreator May 14, 2020
064155a
multi-platform support
UltimateModuleCreator May 20, 2020
3892e3a
separate factories per platform support
UltimateModuleCreator May 22, 2020
96c0fab
almost done splitting stuff
UltimateModuleCreator May 26, 2020
ebcacbb
adding flags to types
UltimateModuleCreator May 28, 2020
ff6c038
partial settings save
UltimateModuleCreator May 29, 2020
81e3186
menu refactoring
UltimateModuleCreator Jun 3, 2020
3a41785
frontend refactor & some unittests and some cleanup
UltimateModuleCreator Jun 4, 2020
214d0cf
more unit tests
UltimateModuleCreator Jun 5, 2020
f271a63
More generated unit tests
UltimateModuleCreator Jun 9, 2020
df45757
more generated tests & fixed dynamic fields code generation
UltimateModuleCreator Jun 11, 2020
4c337bf
more generated unit tests. sorted 'use' statements. started on valida…
UltimateModuleCreator Jun 12, 2020
a2bf958
settings save and added validator
UltimateModuleCreator Jun 15, 2020
722cdcf
cleanup
UltimateModuleCreator Jun 16, 2020
4054715
more unit tests
UltimateModuleCreator Jun 16, 2020
42c8997
more unit tests
UltimateModuleCreator Jun 17, 2020
47fc931
more unit tests
UltimateModuleCreator Jun 18, 2020
ddea3b9
more unit tests
UltimateModuleCreator Jun 19, 2020
05a6253
generated unit tests
UltimateModuleCreator Jun 22, 2020
2cd0412
add help section
UltimateModuleCreator Jun 23, 2020
31daa65
compatible with magento 2.4.0
UltimateModuleCreator Jun 23, 2020
d98396b
make compatible with 2.4
UltimateModuleCreator Jun 25, 2020
c08a584
updates & rewrites
UltimateModuleCreator Jun 26, 2020
2332366
validation fixes
UltimateModuleCreator Jun 26, 2020
83e25a0
Merge remote-tracking branch 'origin/master' into umc-42
UltimateModuleCreator Jun 26, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
More refactoring
UltimateModuleCreator committed Apr 8, 2020

Unverified

This user has not yet uploaded their public signing key.
commit d08ef6dc5461ecf155da99e1a3f51370eb2d079b
13 changes: 5 additions & 8 deletions config/services.yaml
Original file line number Diff line number Diff line change
@@ -267,7 +267,7 @@ parameters:
view: false
dropdown:
label: Dropdown
class: App\Model\AttributeTypeDropdown
class: App\Model\Attribute\Dropdown
can_be_name: false
can_show_in_grid: true
can_have_options: true
@@ -469,7 +469,7 @@ parameters:
view: false
serialized:
label: Serialized
class: \App\Model\AttributeTypeSerialized
class: \App\Model\Attribute\Serialized
can_be_name: false
can_show_in_grid: false
can_have_options: false
@@ -921,16 +921,13 @@ services:
$standards: [PSR1, PSR2, PSR12, '%kernel.root_dir%/../vendor/magento-ecg/coding-standard/EcgM2']
$phpcsPath: '%kernel.root_dir%/../vendor/squizlabs/php_codesniffer/bin/phpcs'

App\Model\ModuleFactory:
App\Model\Module\Factory:
arguments:
$licenseFormatter:
php: '@App\Service\License\Php'
xml: '@App\Service\License\Xml'
$menuConfig: '%menu_type_config%'
App\Model\Attribute\TypeFactory:
arguments:
$map: '%attribute_type_config%'
App\Model\SerializedTypeFactory:
App\Model\Attribute\Serialized\Type\Factory:
arguments:
$typeMap: '%attribute_type_config%'

@@ -939,7 +936,7 @@ services:
$path: '%defaults_path%'
$file: '%defaults_file%'

App\Model\Attribute\AttributeTypeFactory:
App\Model\Attribute\Type\Factory:
arguments:
$typeMap: '%attribute_type_config%'

12 changes: 0 additions & 12 deletions config/source/entity__.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@



Model/Entity/Executor/Delete.php:
destination: Model/_Entity_/Executor/Delete.php
label: "Entity mass action delete executor"
scope: entity
template: source/Model/Entity/Executor/Delete.php.html.twig
Model/Entity/CollectionProvider.php:
destination: Model/_Entity_/CollectionProvider.php
label: "Entity mass action collection retriever"
scope: entity
template: source/Model/Entity/CollectionProvider.php.html.twig


Model/Search/Entity.php:
destination: Model/Search/_Entity_.php
label: "Entity admin search model"
27 changes: 0 additions & 27 deletions config/source/module__.yml
Original file line number Diff line number Diff line change
@@ -20,33 +20,6 @@ etc/frontend/di.xml:
scope: module
template: source/etc/frontend/di.xml.html.twig


Model/UploaderPool.php:
destination: Model/UploaderPool.php
label: "Pool of uploaders"
scope: module
template: source/Model/UploaderPool.php.html.twig

Model/DateFilter.php:
destination: Model/DateFilter.php
label: "Filter for date inputs"
scope: module
template: source/Model/DateFilter.php.html.twig
Model/UploadPath.php:
destination: Model/UploadPath.php
label: "Upload paths for all entities"
scope: module
template: source/Model/UploadPath.php.html.twig
Model/Source/ProductAttribute.php:
destination: Model/Source/ProductAttribute.php
label: "Product Attribute Source Model"
scope: module
template: source/Model/Source/ProductAttribute.php.html.twig
Model/Source/ProductAttributeSet.php:
destination: Model/Source/ProductAttributeSet.php
label: "Product Attribute Set Source Model"
scope: module
template: source/Model/Source/ProductAttributeSet.php.html.twig
Model/Output.php:
destination: Model/Output.php
label: "Model for filtering wysiwyg output"
1 change: 0 additions & 1 deletion src/Controller/Docs.php
Original file line number Diff line number Diff line change
@@ -32,7 +32,6 @@ class Docs extends AbstractController

/**
* Files constructor.
* @param Reader $reader
* @param string $template
*/
public function __construct(string $template)
2 changes: 1 addition & 1 deletion src/Controller/Edit.php
Original file line number Diff line number Diff line change
@@ -20,7 +20,6 @@
namespace App\Controller;

use App\Service\Form\Loader;
use App\Util\OptionGroup;
use App\Util\YamlLoader;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\RequestStack;
@@ -63,6 +62,7 @@ class Edit extends AbstractController
* @param RequestStack $requestStack
* @param YamlLoader $yamlLoader
* @param \App\Model\Settings $settingsModel
* @param Loader $formLoader
* @param string $basePath
* @param array $attributeConfig
*/
10 changes: 4 additions & 6 deletions src/Controller/Save.php
Original file line number Diff line number Diff line change
@@ -19,9 +19,8 @@

namespace App\Controller;

use App\Model\ModuleFactory;
use App\Model\Module\Factory;
use App\Service\Builder;
use App\Service\ModuleLoader;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\RequestStack;
@@ -37,20 +36,20 @@ class Save extends AbstractController
*/
private $builder;
/**
* @var ModuleFactory
* @var Factory
*/
private $moduleFactory;

/**
* Save constructor.
* @param RequestStack $requestStack
* @param Builder $builder
* @param ModuleFactory $moduleFactory
* @param Factory $moduleFactory
*/
public function __construct(
RequestStack $requestStack,
Builder $builder,
ModuleFactory $moduleFactory
Factory $moduleFactory
) {
$this->requestStack = $requestStack;
$this->builder = $builder;
@@ -73,7 +72,6 @@ public function run() : JsonResponse
$response['module'] = $module->getExtensionName();
} catch (\Exception $e) {
$response['success'] = false;
// $response['message'] = '<pre>' . print_r($module->getComposerDependencies(), true) . '</pre>';
$response['message'] = $e->getMessage() . '<pre>' . $this->getExceptionTraceAsString($e) . '</pre>';
}
return new JsonResponse($response);
121 changes: 0 additions & 121 deletions src/Model/AbstractModel.php

This file was deleted.

24 changes: 12 additions & 12 deletions src/Model/Attribute.php
Original file line number Diff line number Diff line change
@@ -19,18 +19,22 @@

namespace App\Model;

use App\Model\Attribute\AttributeTypeFactory;
use App\Model\Attribute\TypeInterface;
use App\Model\Attribute\Serialized;
use App\Model\Attribute\Serialized\Factory as SerializedFactory;
use App\Model\Attribute\Type\BaseType;
use App\Model\Attribute\Type\Factory as TypeFactory;
use App\Model\Attribute\Option;
use App\Model\Attribute\Option\Factory as OptionFactory;
use App\Util\StringUtil;

class Attribute
{
/**
* @var TypeInterface
* @var BaseType
*/
private $typeInstance;
/**
* @var AttributeTypeFactory
* @var TypeFactory
*/
private $typeFactory;
/**
@@ -45,10 +49,6 @@ class Attribute
* @var SerializedFactory
*/
private $serializedFactory;
/**
* @var array
*/
private $processedOptions;
/**
* @var string
*/
@@ -132,15 +132,15 @@ class Attribute

/**
* Attribute constructor.
* @param AttributeTypeFactory $typeFactory
* @param TypeFactory $typeFactory
* @param OptionFactory $optionFactory
* @param SerializedFactory $serializedFactory
* @param StringUtil $stringUtil
* @param Entity $entity
* @param array $data
*/
public function __construct(
AttributeTypeFactory $typeFactory,
TypeFactory $typeFactory,
OptionFactory $optionFactory,
SerializedFactory $serializedFactory,
StringUtil $stringUtil,
@@ -358,9 +358,9 @@ public function isExpanded(): bool
}

/**
* @return AttributeType
* @return BaseType
*/
public function getTypeInstance() : AttributeType
public function getTypeInstance() : BaseType
{
if ($this->typeInstance === null) {
$this->typeInstance = $this->typeFactory->create($this);
Loading