PHP code example of tourze / wechat-work-mini-program-bundle

1. Go to this page and download the library: Download tourze/wechat-work-mini-program-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tourze / wechat-work-mini-program-bundle example snippets


return [
    // ...
    WechatWorkMiniProgramBundle\WechatWorkMiniProgramBundle::class => ['all' => true],
];



use WechatWorkMiniProgramBundle\Event\CodeToSessionEvent;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;

// Dispatch code to session event
$event = new CodeToSessionEvent();
$dispatcher->dispatch($event);

use WechatWorkMiniProgramBundle\Event\CodeToSessionEvent;

// Basic event for handling WeChat Work Mini Program authentication
$event = new CodeToSessionEvent();
bash
php bin/console wechat-work:test
bash
# PHPStan analysis
php -d memory_limit=2G ./vendor/bin/phpstan analyse packages/wechat-work-mini-program-bundle