Skip to content

Autoload is hitting disc and checking file_exists on an non existing file #6303

@umpirsky

Description

@umpirsky

Environment details

  • OS: FreeBSD
  • PHP version: 8.3.6
  • Package name and version: v0.396.0

Description

In https://github.com/googleapis/google-api-php-client-services/blob/main/autoload.php#L5 there is a check for src/Google/Client.php file existence.

A fix to remove this is suggested in #4199, but now I think we can even remove entire file and tag a new version.

In #4199 (comment) it is suggested to update the code to use the new namespaces, which we did, and we are still seeing accessing non existing file:

90220 php-fpm  RET   __getcwd 0
90220 php-fpm  CALL  access(0x73a8f48,0<F_OK>)
90220 php-fpm  NAMI  "/www/sites/.../vendor/google/apiclient-services/../apiclient/src/Google/Client.php"
90220 php-fpm  RET   access -1 errno 2 No such file or directory

Which is totally expected since autoload.php contains:

file_exists(__DIR__ . '/../apiclient/src/Google/Client.php')

Steps to reproduce

  1. include autoload.php

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions