Repository navigation
chore: fix language PHPStan errors and address review feedback - #2353
Conversation
There was a problem hiding this comment.
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.
| 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 |
There was a problem hiding this comment.
| RUN apt-get update && apt-get -y install --no-install-recommends unzip && \ | ||
| rm -rf /var/lib/apt/lists/* && \ | ||
| composer install --no-dev && \ |
There was a problem hiding this comment.
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 && \
Remove
testing/phpstan/language.neon.distand address remaininggemini-code-assistfeedback from recently merged PRs:testing/phpstan/language.neon.distand annotate$entity->getMetadata()inlanguage/src/analyze_*.php$info['metageneration']with?? nullinstorage/src/delete_object_contexts.php(feat(storage): add delete object contexts sample #2342)composer install --no-devand--no-install-recommendswith apt cache cleanup incloud_sql/sqlserver/pdo/Dockerfileandendpoints/getting-started/Dockerfile.custom(chore: upgrade custom runtime Dockerfiles to PHP 8.3 #2340)$payloadfornulland normalize$formatwithstrtoupper()inparametermanager/src/*.php(feat(parametermanager): add templates, tags and checksum samples #2337)$response->hasQueryResult()instead of?:indialogflow/src/detect_intent_stream.php(dialogflow: fix detect-intent-stream losing the query result #2336)google/authto^1.45intesting/composer.jsonforguzzlehttp/guzzle^8.0compatibility (chore(deps): update dependency guzzlehttp/guzzle to v8 #2264)