Skip to content

chore: fix language PHPStan errors and address review feedback - #2353

Merged
bshaffer merged 2 commits into
mainfrom
chore/address-review-feedback
Nov 6, 2026
Merged

bshaffer merged 2 commits into
mainfrom
chore/address-review-feedback

Conversation

@bshaffer

@bshaffer bshaffer commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Remove testing/phpstan/language.neon.dist and address remaining gemini-code-assist feedback from recently merged PRs:

@bshaffer
bshaffer requested review from a team as code owners November 6, 2026 19:05
@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Nov 6, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several optimizations and safety improvements across multiple PHP samples and Dockerfiles. Key updates include adding --no-install-recommends and cleaning up apt lists in Dockerfiles, refactoring PHP code to use safer null checks and isset() array access, handling uppercase formats in Parameter Manager, and updating the google/auth dependency. The reviewer recommended further optimizing the Docker builds by adding --no-interaction and --optimize-autoloader flags to the Composer commands to prevent interactive prompts and improve production performance.

Comment thread cloud_sql/sqlserver/pdo/Dockerfile Outdated
docker-php-ext-enable pdo_sqlsrv
RUN sed -i 's/80/8080/g' /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
RUN composer update
RUN composer install --no-dev

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It is recommended to run Composer with --no-interaction to prevent the build from hanging on interactive prompts, and --optimize-autoloader to optimize the autoloader for better performance in production environments.

RUN composer install --no-dev --no-interaction --optimize-autoloader

Comment on lines 10 to 12
RUN apt-get update && apt-get -y install --no-install-recommends unzip && \
rm -rf /var/lib/apt/lists/* && \
composer install --no-dev && \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

It is recommended to run Composer with --no-interaction to prevent the build from hanging on interactive prompts, and --optimize-autoloader to optimize the autoloader for better performance in production environments.

RUN apt-get update && apt-get -y install --no-install-recommends unzip && \
    rm -rf /var/lib/apt/lists/* && \
    composer install --no-dev --no-interaction --optimize-autoloader && \

@bshaffer
bshaffer merged commit 6dea76c into main Nov 6, 2026
3 checks passed
@bshaffer
bshaffer deleted the chore/address-review-feedback branch November 6, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant