maillotf/pcvue-bridge-bundle
Symfony bundle for connecting PHP applications with PcVue SCADA. It provides bridge services to integrate PcVue data and automation with Symfony, helping developers build interfaces and workflows that exchange information between the two systems.
composer require maillotf/pcvue-bridge-bundle. Be aware this is a Symfony bundle, not a Laravel package — there is no extra.laravel.providers auto-discovery, so nothing is registered for you.Service/PcvueService class (the entry point) and the linked FAQ.md on GitHub. The service exposes sub-clients via public properties (e.g. $service->user), and you drive everything through those.protocol, host, port, client_id, client_secret, username, password, plus optional root_dir. These are OAuth2 password-grant credentials pointing at a PcVue client.config/pcvue.php backed by env() rather than hardcoding, since the bundle's own framework.yaml snippet is irrelevant to Laravel.public function show(PcvueService $ps)
{
$user = $ps->user->getUser('4665');
return response()->json(['email' => $user->getEmail()]);
}
services.yaml alias (PcvueService: '@pcvue.service') has no Laravel equivalent. Register a singleton in a PcvueServiceProvider instead:$this->app->singleton(PcvueService::class, function () {
return new PcvueService(
config('pcvue.authentication.protocol'),
config('pcvue.authentication.host'),
config('pcvue.authentication.port'),
config('pcvue.authentication.client_id'),
config('pcvue.authentication.client_secret'),
config('pcvue.authentication.username'),
config('pcvue.authentication.password'),
config('pcvue.authentication.root_dir'),
);
});
Verify the actual constructor signature against the class — the docs only show YAML config, so the mapping from YAML keys to constructor args is something you infer from source.
$ps->user->getUser(...) through controllers. Inject PcvueService into a PcvueUserRepository/PcvueGateway class so the rest of the app is insulated from the bundle's public-property API surface, which is fragile.PcvueService (or your adapter) in the container during tests rather than hitting a live PcVue client.framework.yaml / services.yaml). You must translate both blocks yourself; there is no Laravel config publish.port is a string in the example ("80") — match the expected type when building config from env(), which returns strings anyway.$ps->user is a magic property, not a fluent accessor. It's not discoverable via IDE autocompletion and is easy to break on upgrade. Wrap it early; treat it as an internal detail.http with a username/password grant. For anything beyond localhost, use https and keep the password out of source control. Note this flow stores the end-user password in config, which is a rotation and secrets-management burden (use a vault / env var, not a committed file).symfony/* constraints against your Laravel version's pinned versions before assuming a bug in your code.root_dir is optional but load-bearing when the bundle resolves relative paths — set it explicitly if you hit file/path errors.FAQ.md are the authority. Pin the version in composer.json and re-read the service class on upgrade — expect API churn on a 1.0 bundle of this maturity.How can I help you explore Laravel packages today?