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

fix for prestashop 8.0.1 #259

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from
Open
1,577 changes: 854 additions & 723 deletions composer.lock

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions config/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <[email protected]>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/

header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');

header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');

header('Location: ../');
exit;
115 changes: 115 additions & 0 deletions config/module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
imports:
- { resource: module_configuration.yml }
- { resource: module_grid.yml }
- { resource: module_front_controller.yml }
- { resource: module_controller.yml }
- { resource: module_form.yml }

parameters:
templates_module_generator_base_path: /fop_console/src/Resources/templates/generate_module_command/module

services:
fop.console.module_generator.file_generator:
abstract: true
class: FOP\Console\Generator\FileGenerator
arguments:
- '@twig'

# module

fop.console.module_generator.module.class_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\MainModuleFileGenerator
calls:
- [ setTemplateName, [ 'main.php.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%' ] ]
- [ setFileNameModule,[ '' ] ]
tags:
- { name: fop.console.module_generator.module_generator }

fop.console.module_generator.module.composer_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\ComposerStaticFileGenerator
calls:
- [ setTemplateName, [ 'composer.json.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%' ] ]
- [ setFileNameModule,[ 'composer.json' ] ]
tags:
- { name: fop.console.module_generator.module_generator }

fop.console.module_generator.module.front_phpunit_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\StaticFileGenerator
calls:
- [ setTemplateName, [ 'phpunit.front.xml.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%' ] ]
- [ setFileNameModule,[ 'phpunit.xml.front' ] ]
tags:
- { name: fop.console.module_generator.module_generator }
fop.console.module_generator.module.admin_phpunit_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\StaticFileGenerator
calls:
- [ setTemplateName, [ 'phpunit.admin.xml.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%' ] ]
- [ setFileNameModule,[ 'phpunit.xml.admin' ] ]
tags:
- { name: fop.console.module_generator.module_generator }

fop.console.module_generator.module.test_bootstrap_admin_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\StaticFileGenerator
calls:
- [ setTemplateName, [ 'bootstrap.admin.php.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%' ] ]
- [ setFileNameModule,[ '/tests/admin/bootstrap.php' ] ]
tags:
- { name: fop.console.module_generator.module_generator }

fop.console.module_generator.module.test_bootstrap_front_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\StaticFileGenerator
calls:
- [ setTemplateName, [ 'bootstrap.front.php.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%' ] ]
- [ setFileNameModule,[ '/tests/front/bootstrap.php' ] ]
tags:
- { name: fop.console.module_generator.module_generator }

fop.console.module_generator.module.route_yml_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\YamlFileGenerator
calls:
- [ setTemplateName, [ 'routes.yml.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%' ] ]
- [ setFileNameModule, [ '/routes.yml' ] ]
tags:
- { name: fop.console.module_generator.module_generator }

fop.console.module_generator.module.admin_service_yml_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\YamlFileGenerator
calls:
- [ setTemplateName, [ 'services.yml.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%' ] ]
- [ setFileNameModule, [ '/admin/services.yml' ] ]
tags:
- { name: fop.console.module_generator.module_generator }
fop.console.module_generator.module.front_service_yml_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\YamlFileGenerator
calls:
- [ setTemplateName, [ 'services.yml.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%' ] ]
- [ setFileNameModule, [ '/front/services.yml' ] ]
tags:
- { name: fop.console.module_generator.module_generator }
71 changes: 71 additions & 0 deletions config/module_configuration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
services:

# configuration generation
fop.console.module_generator.configuration.yaml_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\YamlFileGenerator
calls:
- [ setTemplateName, [ 'configuration.yml.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%/configuration' ] ]
- [ setFileNameModule, ['/admin/configuration.yml']]
tags:
- { name: fop.console.module_generator.configuration_generator }

fop.console.module_generator.configuration.form_class_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\ClassFileGenerator
calls:
- [ setTemplateName, [ 'configuration_form.php.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%/configuration' ] ]
- [ setClassFolderName,[ 'src/Form/' ] ]
- [ setFileNameModule,[ 'ConfigurationFormType.php' ] ]
tags:
- { name: fop.console.module_generator.configuration_generator }

fop.console.module_generator.configuration.text_data_class_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\ClassFileGenerator
calls:
- [ setTemplateName, [ 'text_data_configuration.php.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%/configuration' ] ]
- [ setClassFolderName,[ 'src/Configuration/' ] ]
- [ setFileNameModule,[ 'TextDataConfiguration.php' ] ]
tags:
- { name: fop.console.module_generator.configuration_generator }

fop.console.module_generator.configuration.text_data_provider_class_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\ClassFileGenerator
calls:
- [ setTemplateName, [ 'text_data_provider.php.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%/configuration' ] ]
- [ setClassFolderName,[ 'src/Provider/' ] ]
- [ setFileNameModule,[ 'ConfigurationTextFormDataProvider.php' ] ]
tags:
- { name: fop.console.module_generator.configuration_generator }

fop.console.module_generator.configuration.controller_twig_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\TwigFileGenerator
calls:
- [ setTemplateName, [ 'template_configuration.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%/configuration' ] ]
- [ setFileNameModule,[ 'configuration_view.html.twig' ] ]
- [ setModuleFolder,[ 'views/templates/admin/controller' ] ]
tags:
- { name: fop.console.module_generator.configuration_generator }

fop.console.module_generator.configuration.display_code_controller:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\CodeDisplayGenerator
calls:
- [ setTemplateName, [ 'code_controller.php.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%/configuration' ] ]
tags:
- { name: fop.console.module_generator.configuration_generator }
26 changes: 26 additions & 0 deletions config/module_controller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:

fop.console.module_generator.controller.controller_class_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\ClassFileGenerator
calls:
- [ setTemplateName, [ 'controller.php.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%/controller' ] ]
- [ setClassFolderName,[ 'src/Controller/' ] ]
- [ setFileNameModule,[ '.php' ] ]
tags:
- { name: fop.console.module_generator.controller_generator }

fop.console.module_generator.controller.controller_twig_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\TwigFileGenerator
calls:
- [ setTemplateName, [ 'template_controller.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%/controller' ] ]
- [ setModuleFolder,[ 'views/templates/admin/controller' ] ]
- [ setFileNameModule,[ 'controller.html.twig' ] ]
tags:
- { name: fop.console.module_generator.controller_generator }

14 changes: 14 additions & 0 deletions config/module_form.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
services:

# configuration generation
fop.console.module_generator.controller.class_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\ClassFileGenerator
calls:
- [ setTemplateName, [ 'form.php.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%/form' ] ]
- [ setClassFolderName,[ 'src/Form/' ] ]
- [ setFileNameModule,[ 'Type.php' ] ]
tags:
- { name: fop.console.module_generator.form_generator }
25 changes: 25 additions & 0 deletions config/module_front_controller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
services:

fop.console.module_generator.front_controller.ajax_class_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\ClassFileGenerator
calls:
- [ setTemplateName, [ 'front_controllerajax.php.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%/front_controller' ] ]
- [ setFileNameModule,[ '.php' ] ]
- [ setClassFolderName,[ 'controllers/front/' ] ]
tags:
- { name: fop.console.module_generator.front_controller_generator }

fop.console.module_generator.front_controller.ajax_javascript_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\AssetsFileGenerator
calls:
- [ setTemplateName, [ 'ajax_front_controller.js.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%/front_controller' ] ]
- [ setFileNameModule,[ 'front_controller.js' ] ]
- [ setClassFolderName,[ 'views/js/' ] ]
tags:
- { name: fop.console.module_generator.front_controller_generator }
61 changes: 61 additions & 0 deletions config/module_grid.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
services:

# configuration generation
fop.console.module_generator.grid.yaml_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\YamlFileGenerator
calls:
- [ setTemplateName, [ 'grid.yml.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%/grid' ] ]
- [ setFileNameModule, ['/admin/grid.yml']]
tags:
- { name: fop.console.module_generator.grid_generator }


fop.console.module_generator.grid.query_class_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\ClassFileGenerator
calls:
- [ setTemplateName, [ 'grid_query.php.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%/grid' ] ]
- [ setClassFolderName,[ 'src/Grid/Query/' ] ]
- [ setFileNameModule,[ 'QueryBuilder.php' ] ]
tags:
- { name: fop.console.module_generator.grid_generator }

fop.console.module_generator.grid.definition_class_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\ClassFileGenerator
calls:
- [ setTemplateName, [ 'grid_definition.php.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%/grid' ] ]
- [ setClassFolderName,[ 'src/Grid/Definition/Factory/' ] ]
- [ setFileNameModule,[ 'GridDefinitionFactory.php' ] ]
tags:
- { name: fop.console.module_generator.grid_generator }


fop.console.module_generator.grid.controller_twig_file:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\TwigFileGenerator
calls:
- [ setTemplateName, [ 'template_grid.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%/grid' ] ]
- [ setFileNameModule,[ 'grid.html.twig' ] ]
- [ setModuleFolder,[ 'views/templates/admin/controller' ] ]
tags:
- { name: fop.console.module_generator.grid_generator }

fop.console.module_generator.grid.display_code_controller:
public: true
parent: fop.console.module_generator.file_generator
class: FOP\Console\Generator\CodeDisplayGenerator
calls:
- [ setTemplateName, [ 'code_controller.php.twig' ] ]
- [ setTemplatesBaseFolder,[ '%templates_module_generator_base_path%/grid' ] ]
tags:
- { name: fop.console.module_generator.grid_generator }
Loading
Loading