php-docs-samples
php-docs-samples copied to clipboard
feat: Laravel on Cloud Run
Code and README-based tutorial for Laravel on Cloud Run
Includes some region tags as highlighted in "Understanding the code".
(View to possibly migrate README tutorial to DevSite, but if that happens I'll submit another PR to redirect readers to that version)
Here is the summary of changes.
You are about to add 2 region tags.
- run/laravel/bootstrap/app.php:43, tag
cloudrun_laravel_secret_manager_mount - run/laravel/routes/web.php:31, tag
cloudrun_laravel_display_metadata
This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:
- [ ] Refresh this comment
Unsure why linting is failing.
Files that were not fixed due to errors reported during linting before fixing:
1) /tmpfs/src/github/php-docs-samples/run/laravel/app/Providers/RouteServiceProvider.php
@glasnt I believe that is happening due to the use of ?-> operator in the RouteServiceProvider.php file. This was introduced in PHP 8, while the linter is running an image containing PHP 7.4 see this.
When I ran the fixer on your PR locally with PHP 7.3 in verbose mode I got the "Invalid file syntax" error. On PHP 8.1 there were no changes.
Now, since this RouteServiceProvider.php is provided by the framework itself, we can either,
- Ignore this and force merge.
- Downgrade the Laravel version to be the one compatible to PHP 7.4.
- Add an exclusion in the config file for php-cs-fixer.
@bshaffer Does this look right?
tests all pass now 🥳
One noop comment, I'm happy with this being merged when you are.