Skip to content

Instantly share code, notes, and snippets.

@WallasFaria
Created February 19, 2021 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WallasFaria/032ebbfd857e7f1750d0401598daf859 to your computer and use it in GitHub Desktop.
Save WallasFaria/032ebbfd857e7f1750d0401598daf859 to your computer and use it in GitHub Desktop.
Magento: Debugger via console
<?php
# cd /path/to/magento
# php -a
require 'pub/index.php';
$entityId = 374;
$order = \Magento\Framework\App\ObjectManager::getInstance()
->get('Magento\Sales\Model\OrderRepository')
->get($entityId);
$order->setState('processing')->setStatus('processing')->save();
echo $order->getStatus();
<?php
# cd /path/to/magento
# php -a
require 'pub/index.php';
$logger = \Magento\Framework\App\ObjectManager::getInstance()
->get('Psr\Log\LoggerInterface');
# example
$cron = new MestreMage\PagarMe\Cron\Cronjob($logger);
$cron->execute();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment