#!/usr/bin/env php sync(); fwrite(STDOUT, sprintf( "module-permissions-sync: created=%d updated=%d unchanged=%d total=%d\n", $result['created'], $result['updated'], $result['unchanged'], $result['total'] )); } catch (Throwable $exception) { fwrite(STDERR, sprintf("module-permissions-sync: FAILED: %s\n", $exception->getMessage())); $exitCode = 1; } $vendorWarningsIgnored = moduleCliVendorWarningsIgnoredSince($warningsBefore); fwrite(STDOUT, sprintf("module-permissions-sync: vendor_warnings_ignored=%d\n", $vendorWarningsIgnored)); return $exitCode; } if (PHP_SAPI === 'cli' && realpath((string) ($_SERVER['SCRIPT_FILENAME'] ?? '')) === __FILE__) { exit(modulePermissionsSyncRun()); }