{"id":15145653,"url":"https://github.com/friends-of-presta/fop_console","last_synced_at":"2025-10-24T16:18:05.786Z","repository":{"id":36270519,"uuid":"222747116","full_name":"friends-of-presta/fop_console","owner":"friends-of-presta","description":"Prestashop Module providing a set of shell/terminal commands for developers (PrestaShop 1.7.5+)","archived":false,"fork":false,"pushed_at":"2025-02-13T15:21:20.000Z","size":994,"stargazers_count":91,"open_issues_count":37,"forks_count":36,"subscribers_count":10,"default_branch":"dev","last_synced_at":"2025-03-29T05:03:11.170Z","etag":null,"topics":["command-line","console","php","prestashop","prestashop-1-7","prestashop-module","symfony"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mickaelandrieu/console","license":"afl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/friends-of-presta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-19T17:03:41.000Z","updated_at":"2025-03-03T05:51:25.000Z","dependencies_parsed_at":"2025-02-16T15:13:52.894Z","dependency_job_id":"a62ad83c-133c-4e5e-8893-ea3bda649b6d","html_url":"https://github.com/friends-of-presta/fop_console","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friends-of-presta%2Ffop_console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friends-of-presta%2Ffop_console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friends-of-presta%2Ffop_console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/friends-of-presta%2Ffop_console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/friends-of-presta","download_url":"https://codeload.github.com/friends-of-presta/fop_console/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294537,"owners_count":20915340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line","console","php","prestashop","prestashop-1-7","prestashop-module","symfony"],"created_at":"2024-09-26T11:41:32.189Z","updated_at":"2025-10-24T16:18:05.672Z","avatar_url":"https://github.com/friends-of-presta.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.2-8892BF.svg?style=flat-square)](https://php.net/)\n[![PHP tests](https://github.com/friends-of-presta/fop_console/actions/workflows/phpstan.yml/badge.svg)](https://github.com/friends-of-presta/fop_console/blob/dev/.github/workflows/phpstan.yml)\n[![GitHub release](https://img.shields.io/github/v/release/friends-of-presta/fop_console)](https://github.com/friends-of-presta/fop_console/releases)\n[![Slack chat](https://img.shields.io/badge/Chat-on%20Slack-red)](https://github.com/friends-of-presta/who-we-are#what-we-do)\n\n# Friends of Presta Console\n\nFop console is a module which provides a set a commands to extend PrestaShop 1.7 commands.\n\nSince version 1.7.5.0 [Prestashop provides some terminal commands](https://devdocs.prestashop.com/1.7/modules/concepts/commands/) using the [Symfony console tool](https://symfony.com/doc/3.4/console.html).\n\nThis repository provides a base Command with better support for PrestaShop legacy classes and useful commands to easy the development on Prestashop or manage a shop.\nThese commands are mainly for developers, just some basic knowledge of command line processing is needed.\n\n## Install from release (recommended)\n\n[Donwload a zip release](https://github.com/friends-of-presta/fop_console/releases) and install it like any other module.\n\nAlternatively, run this in a shell :\n\n```bash\n#!/bin/bash\nwget https://git.io/JMF3q --output-document /tmp/fop_console.zip \u0026\u0026 unzip /tmp/fop_console.zip -d modules \u0026\u0026 ./bin/console pr:mo install fop_console\n```\n\n## Install from sources\n\nIf you want use the dev branch, you can install from github.\nIf you want to contribute, first create a fork and follow the same steps using your forked repository url instead of the original one.\n\n```\ncd modules \ngit clone https://github.com/friends-of-presta/fop_console.git\ncd fop_console\ncomposer install\n```\nInstall the module in the backoffice or in command line like this :\n```\ncd ../../\nphp bin/console pr:mo install fop_console\n```\n\n## Current commands\n\n* `fop:about:version`                  Display the Fop Console version (on disk, on database, latest available release)\n* `fop:cache:clear`                    Replace the cache directory with an empty one.\n* `fop:category:clean`                 Manage empty categories\n* `fop:category:products-count`        Get the number of products for category and its children\n* `fop:configuration:export`           Export configuration values (from ps_configuration table)\n* `fop:configuration:import`           Import configuration values\n* `fop:container:check`                Health check of the Service Container\n* `fop:customer-groups`                Customer groups\n* `fop:employee:list`                  List registered employees\n* `fop:employee:change-password`       Change employee password\n* `fop:environment:debug-mode`         Enable or Disable debug mode.\n* `fop:environment:get-parameters`     Display information about the installation (db name, etc)\n* `fop:environment:setup-dev`          Install your project for local developement\n* `fop:export:data`                    Allows to export data in XML\n* `fop:generate:htaccess`              Generate the .htaccess file\n* `fop:generate:robots`                Generate the robots.txt file\n* `fop:group:transfer-customers`       Transfers or add customers from a group to an other\n* `fop:hook:add`                       Create hook in database\n* `fop:image:generate:categories`      Regenerate categories thumbnails\n* `fop:image:generate:manufacturers`   Regenerate manufacturers thumbnails\n* `fop:image:generate:products`        Regenerate products thumbnails\n* `fop:image:generate:stores`          Regenerate stores thumbnails\n* `fop:image:generate:suppliers`       Regenerate suppliers thumbnails\n* `fop:module:generate`                Scaffold new PrestaShop module\n* `fop:module:hook`                    Attach one module on specific hook ex: `php bin/console fop:module:hook --module=mymodule --hook=displayHeader`\n* `fop:module:hooks`                   Get modules list\n* `fop:module:non-essential`           Manage non essential modules\n* `fop:module:rename`                  Rename a module\n* `fop:module:unhook`                  Detach module from hook\n* `fop:override:make`                  Generate a file to make an override\n* `fop:product:latest`                 Displays the latest products\n* `fop:shop:maintenance`               Configure maintenance mode\n* `fop:shop:status`                    Display shops statuses\n* `fop:theme:reset-layout`             Reset current (or selected) theme\n\n## Create your owns Commands\n\nThe official documentation from PrestaShop and Symfony Core teams are still right, but you needs\nto extends our class.\n\n```php\n\u003c?php\n\n// psr-4 autoloader\n\nnamespace FOP\\Console\\Commands\\Domain; // e.g. namespace FOP\\Console\\Commands\\Configuration\n\nuse FOP\\Console\\Command;\nuse Symfony\\Component\\Console\\Style\\SymfonyStyle;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\nfinal class DomainAction extends Command\n{\n    /**\n     * {@inheritdoc}\n     */\n    protected function configure()\n    {\n        $this\n            -\u003esetName('fop:domain') // e.g 'fop:export'\n            // or\n            -\u003esetName('fop:domain:action') // e.g 'fop:configuration:export' \n            -\u003esetDescription('Describe the command on a user perspective.');\n    }\n\n    /**\n     * {@inheritdoc}\n     */\n    protected function execute(InputInterface $input, OutputInterface $output)\n    {\n        $this-\u003eio-\u003etext('Hello friends of PrestaShop!');\n\n        return 0; // return 0 on success or 1 on failure.\n    }\n}\n```\n\n## Getting started\n\nIn a shell (call it shell, console or terminal), at the root of a Prestashop installation, type this command to list all available commands.\nYou'll see commands provided by Symfony, Prestashop and installed modules.\n\n```shell\n./bin/console list\n```\n\nTo list only fop commands :\n```shell\n./bin/console list fop\n```\n\nTo toggle the debug-mode (_PS_DEV_MODE_) run :\n```shell\n./bin/console fop:environment:debug toggle\n```\n\nTo get help about a command :\n```shell\n./bin/console help fop:environment:debug\n```\n\nYou are ready to go !\n\n## Contribute\n\nAny contributions are very welcome :)\nFirst [install from sources](/README.md#install-from-sources) and see [Contributing](/CONTRIBUTING.md) for details.\n\n[Current contributors](https://github.com/friends-of-presta/fop_console/graphs/contributors) or [contributors](/CONTRIBUTORS.md).\n\n## Compatibility\n\n| Prestashop Version | Compatible |\n| ------------------ | -----------|\n| 1.7.4.x and below | :x: |\n| 1.7.5.x | :heavy_check_mark: |\n| 1.7.6.x | :heavy_check_mark: |\n| 1.7.7.x | :heavy_check_mark: |\n| 1.7.8.x | :heavy_check_mark: |\n\n| Php Version | Compatible |\n| ------ | -----------|\n| 7.1 and below | :x: |\n| 7.2 | :heavy_check_mark: |\n| 7.3| :heavy_check_mark: |\n| 7.4 | :heavy_check_mark: |\n| 8.0 | :interrobang: Not yet tested |\n\n## License\n\nThis module is released under AFL license.\nSee [License](/docs/licenses/LICENSE.txt) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriends-of-presta%2Ffop_console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffriends-of-presta%2Ffop_console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffriends-of-presta%2Ffop_console/lists"}