Giter Club home page Giter Club logo

common-protos-php's Introduction

Common Protos PHP

release level

Build Status

This repository is a home for the protocol buffer types which are common dependencies throughout the Google API ecosystem, generated for PHP. The protobuf definitions for these generated PHP classes are provided by the Common Components AIP repository.

Using these generated classes

These classes are made available under an Apache license (see LICENSE) and you are free to depend on them within your applications. They are considered stable and will not change in backwards-incompaible ways.

They are distributed as the google/common-protos composer package, available on Packagist.

In order to depend on these classes, add the following line to your composer.json file in the requires section:

  "google/common-protos": "^2.0"

Or else use composer from the command line:

composer require google/common-protos

License

These classes are licensed using the Apache 2.0 software license, a permissive, copyfree license. You are free to use them in your applications provided the license terms are honored.

common-protos-php's People

Contributors

alicejli avatar bshaffer avatar bytestream avatar diptanshumittal avatar dwsupplee avatar gcf-owl-bot[bot] avatar google-cloud-policy-bot[bot] avatar jdpedrie avatar justinbeckwith avatar michaelbausor avatar noahdietz avatar release-please[bot] avatar renovate-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

common-protos-php's Issues

[Policy Bot] found one or more issues with this repository.

Policy Bot found one or more issues with this repository.

  • Default branch is 'main'
  • Branch protection is enabled
  • Renovate bot is enabled
  • Merge commits disabled
  • There is a CODEOWNERS file
  • There is a valid LICENSE.md
  • There is a CODE_OF_CONDUCT.md
  • There is a CONTRIBUTING.md
  • There is a SECURITY.md

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

composer
composer.json
  • google/protobuf ^3.6.1
  • phpunit/phpunit ^4.8.36||^8.5
  • sami/sami *
github-actions
.github/workflows/docs.yml
  • actions/checkout v3
  • nick-invision/retry v2
  • php 7.4-cli
.github/workflows/tests.yml
  • actions/checkout v3
  • codecov/codecov-action v3
  • shivammathur/setup-php v2
  • nick-invision/retry v2

  • Check this box to trigger a request for Renovate to run again on this repository

Enable master branch protection

      This repository does not seem to have master branch
      protection enabled, at least in the way I'm expecting.
      I was hoping for:

      - master branch protection
      - requiring at least one code reviewer
      - requiring at least two status checks
      - enforcing rules for admins

      Please turn it on!

Class not found error for various GPBMetadata classes

Hi,

I've been struggling today with a really weird issue. I think I narrowed it down to this repository, but if it is not applicable here, please let me know.

I've been trying to use the RecaptchaEnterprise package, however when I try to use it, I get the following error:

Class "GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise" not found

 "file":
"/var/www/html/vendor/google/cloud-recaptcha-enterprise/src/V1/Event.php:179",

Which is thrown when this line of code is executed:

$event = new \Google\Cloud\RecaptchaEnterprise\V1\Event(['']);

I debugged this further, making sure everything is installed. The strange thing is that Composer correctly loads the class (ClassLoader::loadClass does not return an error), but class_exists() that returns false

As an experiment I copied the Recaptchaenterprise class to my own code, and aliased it, but then the error message went one step down:

\"GPBMetadata\\Google\\Api\\Http\" not found",

"/var/www/html/vendor/google/common-protos/metadata/Api/Annotations.php:17",

I then made a script that only includes the autoloader, and only calls class_exists. No code should be executed would be my thought.

<?php

require \dirname(__DIR__).DIRECTORY_SEPARATOR.'vendor'.DIRECTORY_SEPARATOR.'autoload.php';

$classes = [
    'GPBMetadata\Google\Cloud\Recaptchaenterprise\V1\Recaptchaenterprise',
    'GPBMetadata\Google\Api\FieldBehavior',
    'GPBMetadata\Google\Api\Http',
    'GPBMetadata\Google\Api\Backend',
    'GPBMetadata\Google\Type\Latlng'
];

foreach ($classes as $class) {
    echo $class. ' ' . var_export(class_exists($class), true).PHP_EOL;
}

But the output of this script contains a bunch weird characters.. some kind of encoding issue?

$ php test.php 
㰿灨瀊⌠䝥湥牡瑥搠批⁴桥⁰牯瑯捯氠扵晦敲䵥瑡  ... etc

But where does this output come from? I'm only calling class_exists?

For every class where class_exists returns false, this weird output is there. Some classes from this repo are correctly loaded. It seems that most classes in Api fail, but for example classes in Type, like GPBMetadata\Google\Type\Latlng succeed.

If I manually call include dirname(__DIR__).'/vendor/google/common-protos/metadata/Api/Http.php';, I get the same weird output, so it seems that simply the act of including one of these files generates some output.

Any help here? I have no idea what is causing this. I have not found any similar issues in any of the repo's. I'd have to guess it would some configuration issue, perhaps in my php.ini but I have no idea what.

Versions:

  • PHP version PHP 8.1.4 (docker image)
  • google/cloud-recaptcha-enterprise 1.8.1
  • google/common-protos 4.5.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.